1

This question already has an answer here:

I would like to customize the settings for text highlighting on TexStudio.

I'm working with lot of big and small equations and using the breqn package. Here is some sample code:

\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath} 
\usepackage{mathpazo}
\usepackage[mathpazo]{flexisym}
\usepackage{breqn}
\newcommand{\eq}[1]{\begin{dmath}#1\end{dmath}}

\begin{document}
    A small inline equation: $small$\\

    A regular non-inlined equation:
    \begin{equation}
        Regular = \omega \times \delta
    \end{equation}

    A big equation that might need line breaks:
    \begin{dmath}
        Big = \omega \times \delta + bla + bla + bla + bla + bla  + bla + bla + bla + bla  + bla + bla + bla  + bla + bla + bla  
    \end{dmath}

    The way I'd like to deal with this:
    \eq{something = \omega + \delta}    
\end{document}

And the result is fine:

The resulting PDF

However, when working on the text editor of TexStudio, the code looks like this: Working with TexStudio

My question: Is there a way to get TeXstudio to understand that the dmath environment is an equation environment so that it does not highlights the math symbols in red but use the formatting used in the equation environment? Would it be possible to do the same with the custum command as well?

marked as duplicate by Troy, Mico, Bobyandbob, TeXnician, Zarko Feb 6 '18 at 16:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.