I would like to use the following command in my LaTeX code
so that I can easily define new symbols that I often use in my equations, such as:
The intent being to reduce the amount of typing necessary to define new symbols and to enhance readability of the code.
The problem now is twofold:
- TeXstudio dosn't realize my
\newsymdefines a new command and complains that the first argument (
\kTq) is an uncrecognized command.
- It also doesn't realize the second argument is eventually enclosed in an
\ensuremathenvironment and complains math command outside math environment
As a result I have my
\newsym definitions cluttered with bad-syntax highlighting, impeding the readability, which was the
entire half of the purpose of defining
\newsum in the first place.
Can I solve this dilemma by somehow adjusting the way TeXstudio does the error highlighting in this particular case? I don't wan't to disable the highlighting altogether; they are otherwise useful.
Or is there a smarter alternative to my definition of
\newsym that avoids this problem?