Posted on 25 June 2008, 17:55
by ygleyzer
LaTeX highlight
Added highlight for LaTeX sources- % Sample LaTeX file
- \documentstyle{article} % other choices are book, report, vpithesis, ...
- \title{A Sample Document}
- \author{John Doe}
- \date{}
- \begin{document}
- \maketitle
- This is a sample input file. Comparing it with the output it
- generates can show you how to produce a simple document of
- your own.
- \section{Ordinary Text}
- The ends of words and sentences are marked
- by spaces. It doesn't matter how many
- spaces you type; one is as good as 100. The
- end of a line counts as a space.
- One or more blank lines denote the end
- of a paragraph.
- \\
- \LaTeX\ is built ``on top'' of \TeX\ in that it includes {\em macros\/}
- which make \TeX\ easier to use.
- \section{Math}
- \TeX\ is good at typesetting mathematical formulas like
- $x-3y = 7r$ or
- \[ f(x) = \int_0^1 e^{-t} g(t) \, dt. \]
- \end{document}
Full LaTeX support is very complex, so highlight work only for environments, macros, math mode and comments.