Open Dario-Rosa85 opened 4 years ago
The current syntax highlighting is accomplished using a set of regex rules
So when you define your \begin{equation}
as it doesn't find a corresponding \end{equation}
it highlights the rest of the document as an "equation" - hence green.
If I were you, I wouldn't use such commands, and use the autocomplete functionality baked into the package to do this.
Thank you! now it works
sorry. I have another example of weird highlighting: why after $\hat \gamma^i$ it remains in equation mode until the end of the period?
That is unrelated; for this kind of grammar Atom limits the number of syntax tokens per line, as well as the parsed line length for performance reasons. These limits can be changed (see grammar-token-limit
package), or you can split the content across multiple source lines.
Thank you, @Aerijo. I did not know. I will split the lines.
Could you help me in detecting why, after the following command
\newcommand{\be}{\begin{equation}}
the color palette becomes wrong, with the plain text becoming green? I attach a screenshot to show what I mean.