joeyuping / quick_latex_obsidian

MIT License
326 stars 21 forks source link

Superscript Rule/Fraction Rule problem #56

Closed vreithinger closed 2 years ago

vreithinger commented 2 years ago

Awesome plugin, thank you very much for making it. However i think i discovered a bug. If one wants to write $e^{\frac{2 \pi i x}{L}}$ (which is often used in physics) one would start to write e^() -> e^(2) -> e^(2[space]) but after the space behind the 2 the superscript rule instantely encloses the Bracket as follows: e^{(2}). If i try to use curly brackets instead of round ones so the superscript rule does not add them the following happens: e^{} -> e^{2 \pi i x}/L so far so good, but as soon as i add a space to the end to use the Fraction rule, the following happens: e^{2 \pi i \frac{x}}{L}. The only way to write the right expression would be either to turn the rules off or to use two pairs of brackets e^{()}. {} to cancel the superscript rule and () to not confuse the fraction rule. The solution would be to stop the superscript rule if a space is added inside brackets in the exponent. That means e^(2[space]) would not result in e^{(2}) but e^(2)[space] would result in e^{(2)}.

joeyuping commented 2 years ago

Hi !

Thanks so much for bringing this up! Have resolved this issue in v2.3.4, please kindly update and see if it is ok~