#394 Syntax highlighting for math environment

None
open
nobody
4
2013-04-22
2012-02-18
No

I noted bad syntax highlighting when one uses many nested math environments in the TXS editor. (v2.3)
As you can see in the attached screenshot, this occurs with "split" and "flalign" env.
Indeed, "\begin" is highlighted with the "math-keyword" Basic Highlighting option instead "extra-keyword"; and the name of the math environments are highlighted with the "environment" Basic Highlighting option instead "structure".

Note: I use Qt 4.8.0 (with Mingw 4.4) and libraries from KDE on Windows for poppler and zlib.

Discussion

• Anonymous - 2012-02-18

Screenshot of the math environment in the editor

• Indeed, "\begin" is highlighted with the "math-keyword" Basic Highlighting option instead "extra-keyword";

Isn't that a feature?

\begin-s within a math environment shouldn't have the same format as \begin-s outsides.

the name of the math environments are highlighted with the "environment" Basic Highlighting option instead "structure".

The names are always highlighted with "environment" and not with "structure".
But the overlap between "extra-keyword" and "environment" is leaking the bold formatting into the "environment" format.

• Ticket moved from /p/texstudio/bugs/485/

• moved, it's more changing the highlighting is more like a feature request