Menu

#1368 \math classifier for non-environment commands in .cwl

open
nobody
None
5*
2019-02-14
2019-02-14
Anonymous
No

I created a command as follows:
\newcommand{\var}[1]{\ensuremath{\mathit{#1}}}
I use this command to refer to variable names, which could be in both formulas and text.
If I use subscripts within the command outside a math environment, the underscore is highlighted as a syntax error.
I added \var{varname}#\math to my custom.cwl, but it doesn't help.
I assume this is because the \math classifier only works with \begin{environment} commands.
Is there a possibility of extending this classifier to work with non-evironment commands?

Thank you.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB