Posted on 25 June 2008, 17:55 by ygleyzer

LaTeX highlight

Added highlight for LaTeX sources
  1. % Sample LaTeX file
  2. \documentstyle{article}  % other choices are book, report, vpithesis, ...
  3. \title{A Sample Document}
  4. \author{John Doe}
  5. \date{}
  6.  
  7. \begin{document}
  8. \maketitle
  9.  
  10. This is a sample input file.  Comparing it with the output it
  11. generates can show you how to produce a simple document of
  12. your own.
  13.  
  14. \section{Ordinary Text} 
  15.  
  16. The ends  of words and sentences are marked 
  17.   by   spaces. It  doesn't matter how many 
  18. spaces    you type; one is as good as 100.  The
  19. end of   a line counts as a space.
  20.  
  21. One   or more   blank lines denote the  end 
  22. of  a paragraph.  
  23. \\
  24. \LaTeXis built ``on top'' of \TeXin that it includes {\em macros\/}
  25. which make \TeXeasier to use.
  26.  
  27. \section{Math}
  28. \TeXis good at typesetting mathematical formulas like 
  29. $x-3y = 7r$ or
  30. \[ f(x) = \int_0^1 e^{-t} g(t) \, dt.  \]
  31. \end{document}

Full LaTeX support is very complex, so highlight work only for environments, macros, math mode and comments.



Login in order to comment