joeyuping / quick_latex_obsidian

MIT License
326 stars 21 forks source link

feature request: auto enclose after subscript #10

Closed nathancartlidge closed 3 years ago

nathancartlidge commented 3 years ago

Similar to the already-existing superscript enclosing, but for the A_b (subscript) notation instead of A^b This feature could optionally be merged into the same setting?

Thanks

joeyuping commented 3 years ago

Thank you!

Actually, I did include this function in my very first version. But while testing out myself, I realize that often I use subscript only for very short indexing. e.g. X_1, X_2 .... without enclosing with {} brackets. And when I do that, I often press the space key some characters down the line and this function will miss fire to enclose everything inbetween with {}. That was the reason why I removed this function.

But upon your suggestion, I thought this might still be useful for some. So I added back the function, while at the same time included a limitation, that expression after subscript that is longer than 10 characters will be ignored. Please see version 1.5.0

Lets have a feel of how that works out :)

thanks again! @infinityiowastaken