Feature request: Automatic underscores for Greek letters #38
Labels
No Label
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: tec/LaTeX-auto-activating-snippets#38
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It would be useful if the automatic underscores also worked for Greek letters, such that when there is a
\alpha
and I type1
not\alpha1
but\alpha_1
appears.(This would be useful, but TBH if this is not easily doable, I would prioritize #30 over this, because this is just a feature, which would make this package more useful/better, the other one is a bug, which makes it unusable, for people, who are working a lot with siunitx/chemical environments.)
The thing is, we'd need a white/blacklist, because for things like \cdot if I write \cdot1 I definitely didn't mean \cdot_1.
I have a WIP aas branch which makes a snippet data structure and lets you tag snippets, when/if I finish it we could look at the previous macro in the buffer, check if it's a snippet and if it has a "subcriptable" property and add subscripts with that.
That adds considerable complexity though, I'm not sure it'd be worth it.
Yeah, I also think we'd need a whitelist/blacklist. I would probably just whitelist the Greek letters and wait, if there arise any issues, which would be solved by whitelisting more. Ideally, include a method, which users can use to add things to the whitelist
This snippet-data-structure would only work, if the Greek letter was also created by an aas-macro, wouldn't it?
Without directly checking, whether the expression before is element of the whitelist, it would be pretty tricky to expand it, no matter how it was inserted, I guess.
Right, yeah
A solution for users, who use the Unicode symbols, would be to create a variable, where the user can whitelist certain chars for the auto underscores.
Then, one could add the Unicode symbols for the Greek letters, f.e. 𝛼, 𝛽, 𝛾, 𝛿, etc..