Tuesday, August 4, 2009

The perfect LaTeX editor

LaTeX is great. It's math support is the best, and the automatic layout and referencing works perfect. Say if I wanted to write the Einstein field equations, all I'd have to do is type

G_{\mu\nu} + \Lambda g_{\mu\nu} = \frac{8 \pi G}{c^4} T_{\mu\nu}

in a text file (with some appropriate LaTeX specific headers), compile it, and I'd end up with

It's just brilliant.

However, most of the LaTeX editors available are just fancy text editors, with nothing quite special. Sure, they've all got the syntax highlighting and push-button compilation, but I want more. The reason I want more is because I've done some Java coding in the Netbeans IDE. Some of its features are:
  • Automatic code formatting. Any LaTeX enthusiast who has worked with multiple people on one file knows that your co-authors invariably mess up the formatting. Automatic formatting comes to the rescue with just one push of the button.
  • Live parsing. No more trying to figure out where those damn compilation errors are. Live parsing tells you with a red underline, much like the grammar check in Microsoft Word, the exact position your faulty code.
  • Code completion. Try it. Love it. Can't live without it. Why type the whole command when only the first few characters suffice?
  • Build-in documentation. Hover over a function or variable, and a nice documentation popup will appear which tells you all you need to know about that function / variable.
  • Subversion support. It tracks the changes you've made in the file with nice colors in the sidebar. And it automatically merges your changes with those of your collaborators. How cool is that?
The list goes on, but these are the features I miss the most in almost any LaTeX editor. Almost any, because last week I discovered TeXlipse. It's a plugin for Eclipse that adds LaTeX support. And because Eclipse is a modern IDE just like Netbeans, it also has the features above out of the box. Once I got it working (which required some effort I must admit), I couldn't be happier! Here it is action:

Notice the red cross before the line of the error, and the yellow warning sign before the line where there's an underfull hbox. Although it's not visible from the screenshot, the cursor is over the \otimes, causing the popup to appear that describes that particular command.

Although I'm working with it for a only week now, I'm pretty sure I'll stick to TeXlipse. It just makes my LaTeX workflow that much more pleasant.


  1. Try www.lyx.org! Way better than Texlipse!!!

  2. Tried lyx. First thing I encountered was a PDF which looked totally different from what I could see in lyx. So where's the sense in a WYSIWYG editor which is more a WYSIWYDG editor?

  3. If it is about Java, you might try a lightweight solution:

    jHepWork http://jwork.org/jhepwork/

    it has Latex syntax highlighting, latex-file structure view, build-in Bibtex manager database, LatexTools, equation editor (GUI!) and eclipse-like bookmarks,