Skip to content
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

Add more commands for automatic vowel detection in formulas #92

Merged
merged 1 commit into from
Jul 25, 2021
Merged

Add more commands for automatic vowel detection in formulas #92

merged 1 commit into from
Jul 25, 2021

Conversation

scaomath
Copy link
Contributor

Related to valentjn/vscode-ltex#131.

Background

I write papers which constantly uses an $\alpha$-weighted interpolation and an $\widetilde{H}^1$-conforming space. One day I was too tired at night, fixing typos relying on LTeX (but telling me collaborators I was working hard), and did not manually check the things. The final version almost got to the publication stage...

Change

Basically added more LaTeX commands in the following block:

if (isMathMode(this.curMode) && (this.mathVowelState == MathVowelState.UNDECIDED)) {
if (command.equals("\\mathbb") || command.equals("\\mathbf")
|| command.equals("\\mathcal") || command.equals("\\mathfrak")
|| command.equals("\\mathit") || command.equals("\\mathnormal")
|| command.equals("\\mathsf") || command.equals("\\mathtt")) {
// leave this.mathVowelState as MathVowelState.UNDECIDED
} else if (command.equals("\\ell")) {
this.mathVowelState = MathVowelState.STARTS_WITH_VOWEL;
} else {

  • Added some commonly used Greek letters such as \alpha, \epsilon, etc;
  • Added some commonly used amsmath commands such as \operatorname{}, \mathop{}, and tildes and hats.

@valentjn valentjn self-assigned this Jul 25, 2021
@valentjn valentjn added this to the 12.4.0 milestone Jul 25, 2021
@valentjn valentjn changed the title Adding more rules for EN_A_VS_AN for letters (or greeks) with an a latex command in front Add more commands for automatic vowel detection in formulas Jul 25, 2021
@valentjn valentjn merged commit b450dd4 into valentjn:develop Jul 25, 2021
@valentjn
Copy link
Owner

Thanks for the pull request. Sorry to hear you almost got some typos published. Of course, a grammar/spell checker doesn't replace the manual proofreading stage, even if the checker is as great as LTEX. Maybe I should add a disclaimer somewhere.

valentjn added a commit that referenced this pull request Aug 4, 2021
valentjn added a commit that referenced this pull request Aug 4, 2021
valentjn added a commit that referenced this pull request Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants