# LaTeX-specific syntax highlighting for Stack Exchange sites? [closed]

Yes, I saw this question about adding LaTeX syntax highlighting to the general purpose system on Stack Overflow proper. However, there are now at least three sites (MathOverflow, Mathematics, and TeX), where LaTeX is probably going to be the only language inside all those code blocks. So this is a request for a single-language syntax highlighting system just for LaTeX to be used on those sites.

Shreevatsar posted on meta.tex.stackexchange:
A toy example of something that ought to be highlighted correctly:

\begin{enumerate}
\item This is # not a comment
\item This is % a comment
\end{enumerate}


A good syntax highlighter would recognize which lines are comments, and also probably do something with 'begin', 'end' and 'item' (as the LaTeX Wikibook does).

(It seems a weaker version of this has been asked before as Syntax Highlighting Hints, and there's even a somewhat simple hack that is not implemented. Irrespective of all that history, consider this another request for TeX-specific syntax highlighting on this website, not necessarily using any of the more general solutions.)

-

## closed as off topic by Jeff Atwood♦Jul 27 '10 at 8:43

Questions on Meta Stack Exchange are expected to relate to the software that powers the Stack Exchange network within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Note that Mathoverflow, at least, doesn't often have occasion for syntax-highlighting LaTeX code: instead the requirement is to typeset mathematics using TeX-style input, which is handled by jsmath. It's mainly tex.stackexchange, as well Stack Overflow and SuperUser, that need syntax highlighting for LaTeX. Despite all the history, I remain foolishly optimistic that the overlords here will listen to requests and implement it. :-) –  ShreevatsaR Jul 27 '10 at 2:02
Original question on meta.tex.stackexchange.com: meta.tex.stackexchange.com/questions/10/syntax-highlighting –  ShreevatsaR Jul 27 '10 at 2:04
@ShreevatsaR: You are right that the non-tex sites will probably have little reason to use TeX in code blocks. What I meant was that if these sites ever do use code, there is a very high chance that it will be in LaTeX. If people think it detracts from the point, I am open to changing it. –  Larry Wang Jul 27 '10 at 2:19
This should be opened on the per-site meta for discussion, not here. See meta.stackexchange.com/questions/58397/… –  Jeff Atwood Jul 27 '10 at 8:43
@Jeff Atwood: I didn't ask this question here and wouldn't have thought of it, but this is really a cross-site request for several Stack Exchange sites, not just one. (But it's a variant of this request.) –  ShreevatsaR Jul 27 '10 at 12:48
@Jeff: What if I rephrased the question to ask something more general: Can stackexchange sites have language-specific syntax highlighting if they expect only one language to be used? –  Larry Wang Jul 27 '10 at 16:46