You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the point of view of Latex, these shortcuts are perfectly legit, but alas they break down Textmate syntax highlighting. In fact, any text written after the first line is parsed as if being in math mode. This happens because Textmate finds an opening of math mode (\begin{equation}) but it cannot parse the corresponding ending (\end{equation}).
Thank you for your attention.
Cheers,
Guido
The text was updated successfully, but these errors were encountered:
A good fix for issues like this one, which I have also encountered, would be to change the LaTeX grammar so that many of the LaTeX additions to the basic TeX grammar are invoked only between the "\begin{document}" and "\end{document}" environments. In particular, the special significance of \begin and \end only applies within the "document" environment - any '\begin' and '\end' that occurs anywhere else will almost certainly be part of the definition of some command or environment, which means that it will be surrounded by braces as in {\begin{equation}}.
Dear all,
In my field of research (physics) many authors define the following shortcuts in their Latex files:
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
From the point of view of Latex, these shortcuts are perfectly legit, but alas they break down Textmate syntax highlighting. In fact, any text written after the first line is parsed as if being in math mode. This happens because Textmate finds an opening of math mode (\begin{equation}) but it cannot parse the corresponding ending (\end{equation}).
Thank you for your attention.
Cheers,
Guido
The text was updated successfully, but these errors were encountered: