Putting the below commands in the preamble of a document causes TexStudio to wrongly flag "math command outside math env" (as illustrated)
The declaration I found on the list at absolute value symbols. Is there any way to prevent TexStudio doing this?
Note: This is not the question of how to make TexStudio recognise the \DeclarePairedDelimiter command which is answered by editing the .cwl file


:-)– campa Dec 09 '20 at 15:43