“the j stands for Jessant”
about me | research blog | wordpress plugins | jQuery plugins

8 February, 2012

The sorry state of LaTeX editors: a manifesto

Firstly, I love LaTeX, I love coding, and I generally love feeling like a geek. Being able to produce beautifully typeset documents is hugely satisfying to me. But if you use LaTeX, you probably spend a good deal of your time actually writing markup rather than writing, well, words. Perhaps this is why LaTeX tends to be most popular in the computer science and engineering disciplines; you more or less need to have the skills and will of a coder to produce anything useful with it. But just because you can code, it doesn’t mean that you should always code.

Putting effort into your typesetting is a good thing. Producing elegant documents requires discipline and attention to detail, and LaTeX certainly gives you the right tools for exercising this discipline as far as you care to. But when you’ve set up your document layout just the way you want, defined your custom commands and prepared your reference and labels, it’s time to actually write.

Writing code and writing prose and two entirely different things. Even though LaTeX is a markup language, putting more emphasis on your actual text content that other paradigms, the truth is that its commands can quickly become unwieldy and dominate over the rest of your copy. And not being able to focus on what you are actually writing because of all the markup in the way is definitely a bad thing.

Writing with LaTeX requires two separate skillsets: markup-language programming and prose writing — but also one meta-skill: the ability to repeatedly switch back and forth between these two modes. Almost every tool or resource you’ll find in the LaTeX universe is focused only on the first of these skills, but never on the others. Nobody ever seems to bother promoting a writer-friendly environment for using LaTeX .

Every LaTeX editor I’ve tried has the same programmer-centric approach: split screen between editor/preview, syntax highlighting (which always breaks), brain-dead auto-completions, and the worst possible environment for writing you could ever imagine. LaTeX is capable of producing such beautiful output, why is it that writing LaTeX should be so painful and counter-aesthetic?

My first ever TeX IDE was TeXnic Centre, which I first used in 2009. Back then, it looked like Microsoft Office 1997. It doesn’t seem to have changed since. I floated between various basic text editors, TeXworks, Texmaker and Kile, each one pretty much as disappointing as the others. The first thing that annoys me is that in every single IDE, the auto-suggest is entirely dumb. Since they don’t do the dirty work of looking into your imported packages and determining what commands and environments they provide, your auto-suggestions are really only a list of default LaTeX commands. I understand that scoping into LaTeX packages is probably an absolute nightmare, but not doing so makes the auto-completions entirely useless. They also do some kind of reference processing to, so that when you type \cite{ you get a list of the things defined in your BibTeX file. Stop the presses. Quick-building and previewing is obviously nice, and some editors even do their best to jump to the newest addition in your freshly-compiled document. It’s never perfect, but it’s barely useful enough to prevent you giving up on life altogether.

There are now also a bunch of web-based TeX editors floating around, the most notable being ScribTeX. The advantages of not having to install LaTeX and deal with all those ridiculous intermediate files are clear. But guess what? They’re just clones of the desktop versions. Syntax highlighting, compilation/preview, and auto-completions that are only useful if you are not importing any other LaTeX package (read: useless). Their implementations may be elegant from a technical point of view, but they are not innovative in any way which I can see. But the biggest disappointment of all these LaTeX editors it that every last one of them completely disregards the notion that productive writing thrives in an environment that specifically promotes it; free from distractions and free from complicated markup.

What I’m basically talking about is the need for a distraction-free “Zen” editor. This is not a new idea, and many apps already exist for this — both OS-native (FocusWriter, WriteMonkey, Q10, WriteRoomOmmwriteriA Writer) and web-based (QuietWrite, Hallo, DarkCopy, PenZen, Koi). They all pretty much do the same thing, some with support for Markdown or RTF, but none of them seem to do anything about LaTeX. Full LaTeX support is understandably daunting – not even the so-called LaTeX Editors even support it fully. But just knowing when to show you code and when to show you content, just being able to succesfully handle the constant context-switching which LaTeX writers know all to well, for me is paramount. There is of course LyX, which does try to give you a WYSIWYG-like editing environment on top of LaTeX, although LyX itself is not simply an editor but a full-blown preprocessor. Truthfully, I have never tried it, although there are plenty of reasons why I don’t want to go down that road primarily the problems with collaborative writing and varying dependencies.

So, I am basically determined to build such an editor. Web-based by far the makes most sense, for compatibility. No cloud services or any other junk though; with HTML5 I’m hoping it shouldn’t be too hard to edit files right on your computer. Just a nice clean distraction-free TeX editor which knows when to show your syntax-highlighted TeX commands, and when to switch into “Zen” writing mode. As I thrash a proper prototype together I will launch a proper project somewhere and invite people to contribute. But you can consider this my manifesto.


Firstly if I am wrong about any of the above, please call me on it. Particularly if some existing IDE is actually better than I have given it credit for, of if I failed to mention something significant altogether. Secondly, I want to know if things rings true with anyone else, or if I’m the one who is deeply disappointed by the LaTeX editors out there. It would be nice if this actually led to something half-decent one day. Finally, this post will change over time as things get pointed out to me and the ideas mature a bit.