TeX + Typography = TeXcellent

Recently I’ve been working on adjusting the typography of some of our client-facing legal documents—just some general housekeeping to spruce up things that sometimes get overlooked. For the graphic design side of my brain, my first instinct for laying out lots of copy tends to be a program like Quark or InDesign—a robust page layout program. However, programs like these aren’t great at tracking changes or easy to pass off to an editor or writer for changes. WYSIWYG text editors like Microsoft Word or Pages aren’t a lot better, and definitely sacrifice control over layout for ease of use. At Software for Good, we’ve taken a route that sits squarely in the intersection of programming and typography, TeX.

TeX (pronounced ‘tech’ due to some Greek letter shenanigans), is a programming language created by Donald Knuth. A programming language! Typographers and designers be like ‘whaaat, no thank you,’ but before you run away, read up a bit on the history of the language. Knuth created it to solve a design and typography problem. Basically, his seminal book The Art of Computer Programming was up for a refresh, and the proofs he received turned out to be crap. He said, ‘I can do better’ and set about making TeX happen.

The history of this programming language intertwines with the history of typography and layout, but it just didn’t catch on for the average typesetter. TeX is largely used now in academic circles, especially for mathematics and sciences, but it’s a pretty powerful (and free!) typesetting tool. Because it was built for typesetting specifically, TeX feels like the proper tool for words from the start. TeX, though a programming language, actually belongs on the timeline of the history of printing.

Some basic aspects that might pique interest:

  • Documents are very easily be compiled into pdfs.
  • LaTeX is a system built on the TeX language that allows for more complete control over formatting.
  • XeTeX is a typesetting engine that allows for even more typographic needs such as opentype, font control, unicode, and other fun type stuff like alternates.
  • Typographically, you can do a lot with TeX + friends
  • Because TeX is text-based (not WYSIWYG), you can hook it up to version control like Git.
  • It’s all FREE and the documents can be opened/compiled/read by anyone (just need to download a little packet).
  • Documentation is not great. Because TeX was created back in the day, a lot of websites and tutorials are hard to sift through. They are either full pdfs or they specifically address using math/tables, which are things you might not need on a normal basis.
  • However, you can pretty much Google any problem you come up on, and it’s all well worth the learning.
TeX sample
A sample of a TeX doc (left) and the resulting pdf.

Dropping in controls for kerning, ligatures, and leading are all quite simple and similar once you get the knack for it. Formatting requires some of the same type of abstraction required of a web designer when creating a layout (the ability to visualize a result beforehand) and the sensibilities of a print designer (basic typography rules for print). It’s a great tool for the dev who occasionally needs to create a document for print (look up using SublimeText + Slim with TeX) and a great tool for print designers who are dipping their toes into designing with code, or for the designer and client that need to share edits easily but don’t necessarily share the same editing programs. Keep in mind that not every document should be a TeX document. Using the right tool for the right job is a huge part of designing (and life), but familiarizing yourself with a tool like TeX is well worth it.

Some reference for getting started:

TeX User Group

LaTeX tutorial

Wiki Book for LaTeX

TeX Stack Exchange, a forum for questions and answers