Sublime Forum

LaTeX highlighting broken on long file

#1

Hi!

I am new to Sublime Text, and just migrated from Emacs. I installed LaTeXTools, opened my manuscript, and around line 1850, the syntax highlighting just vanishes. There are a few random syntax highlights later on in the file, but mostly it’s just yellow. (Default color scheme.)

Is this a known problem, and is there a workaround for this?

Thanks for any pointers and help!

Best,
Simen K.

0 Likes

#2

I would need a sample file to provide any help.

Alternatively you could try a different latex syntax definition.

0 Likes

#3

I found the problem. The point where it goes wrong in my file is this line:

\draw[thick] (0,0) node[anchor=east] {$$} -- (2,0);

This compiles with no errors (which, when I think about it, is a little curious), but Sublime Text interprets $$ as opening a display equation. Thus, the rest of the file is part of this equation and shown in mostly uniform yellow color.

I am not sure whether this is worth spending time on, as I find it debatable whether it is a bug or not.

Thanks!

0 Likes