-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable subscript in siunitx macros #30
Comments
It's basically the same issue as in #23, we need a method to check if point is inside \qty or \num etc. If we don't care about nesting it shouldn't be too hard, PRs welcome.
A possible workaround meanwhile if it's only annoying on "e" would be to advise laas-auto-script-condition to return nil if we're subscripting "e".
|
I think the functions TeX-current-macro and LaTeX-current-environment (provided by AuCTeX) would be helping a lot in fixing this > and also #23.
I'm not familiar, what do they do? Would they work in Org?
|
They do exactly what their name implies, and I think exactly what we need here. From the documentation of
From the documentation of
Edit: Regarding org, I don't know, since I don't use latex heavily in my org files. Do the other AuCTeX-functions work in org? |
Ok, and what about Org? Would be odd if we check for siunitx in TeX and not in Org
|
(Not trying to be sarcastic, sorry if it sounded like that)
|
I edited my comment some minutes ago (should have marked it, my fault.) |
I edited my comment some minutes ago (should have marked it, my fault.)
Oh, I don't get the edits when reading by email.
I wrote: "Regarding org, I don't know, since I didn't use latex heavily in my org files. Do the other Auctex-functions work in org?"
Some do, we'll need to check edge cases. laas has auctex as a dependency so if they do work we can rely on them 100%.
|
Hey, long time no see! I completely forgot about this issue. I can confirm that Here is some org prose \qty{123}{\km} blah blah blah If the cursor is above In light of this, can we address this issue now? |
Sure, open a PR |
Inspired by #23, we should disable subscripts within
siunitx
macros such as\qty
,\num
, and so on.It's currently painful to write exponents for numbers in these macros as they they currently expand to something like
\num{123e_3}
instead of\num{123e3}
The text was updated successfully, but these errors were encountered: