How to ignore text in math mode? #110
-
I get a lot of spelling errors in math mode. For example, in the following excerpt: ... die Bedingung \(S_\text{on} \overset{!}{=} 1\) übergeben ... I get a spelling error (GERMAN_SPELLER_RULE) and the option to "Add 'onDummy49' to dictionary". I tried adding "\text{}" to {
"rule": "GERMAN_SPELLER_RULE",
"sentence": "\\\\\\(((?!\\\\\\)).)*\\\\\\)"
} to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
I've clarified this in the docs: https://valentjn.github.io/vscode-ltex/docs/faq.html#how-can-i-prevent-text-in-math-mode-from-producing-false-positives |
Beta Was this translation helpful? Give feedback.
\text
switches to text mode, and all text in text mode is checked (the docs could be improved to mention this). As\text
is special, it cannot be ignored currently. However, for subscripts/superscripts, you should be using either\mathrm
or\mathsf
, depending on whether you're using a serif or sans-serif font. Otherwise, your subscripts/superscripts will not be correctly typeset in a bold or italic context, e.g., in standard "proposition" environments. This will also eliminate the false positives.