joeyuping / quick_latex_obsidian

MIT License
326 stars 21 forks source link

Apply limits to prod, lim, bigcup, bigcap too #79

Closed theFox6 closed 1 year ago

theFox6 commented 1 year ago

Feature Extension Request: The Feature that limits are applied to iterative sums is really helpful to me. When you type \sum quick latex will turn it into \sum\limits which sets the limits above and under the sigma instead of next to it.

I also commonly use \prod for iterative products, \lim for limes, \bigcup for unions and \bigcap for intersections. I would like quick latex to add a \limits to those too. It would be worth considering applying it to \bigvee and \bigwedge too. Those stand for iterative disjunctions and conjunctions.

The setting could either disable/enable it for all of those operators, or there could be a list of operators limits are applied to.

joeyuping commented 1 year ago

hi @theFox6 !

thank you so much for the suggestion!

right now, my implementation for adding limit to sum is by checking for the keypress "m", then checks whether the letters infront spells "\sum", a rather brute force way .. not very scalable to include the other symbols.

may I suggest a quick workaround though, that might be more flexible?

we can use the custom shorthand function, by adding, for example,

sum:\sum\limits lim:\lim\limits U:\bigcup\limits inter:\bigcap\limits ...

you can customize the shorthand in front to whatever that suits your work flow.

might this work for you ?

thanks again~

theFox6 commented 1 year ago

Thanks for the suggestion, that should work for now. In general and regarding the future having the existing feature only for sums is a little inconsistent. Thanks for the quick reply and for creating this useful plugin.