TeX is a programming language designed for digital typesetting. It was invented by Donald Knuth, professor of Computer Science at Stanford. LaTeX was original created by Leslie Lamport as a framework for using TeX to produce properly formatted text. It’s probably easiest to think of LaTeX as a template system for TeX.
Donald Knuth published the first edition of volume one of his seminal work The Art of Computer Programming in 1968, with subsequent volumes coming in 1969 and 1973. In 1976 he was working on a second edition. In the intervening time, the publisher had switched over from hot metal typesetting to photographic typesetting. Knuth was not pleased with the results. He decided to devise his own digital typesetting system. Originally, he thought he could create something serviceable in six-months or a year with the help of a few CompSci graduate students. It actually took ten years of work, and the end result — the TeX typesetting system — changed digital publishing. TeX, along with LaTeX developed in the late 1980s, is now the standard document preparation system for science and math publishing, and is used in a wide variety of industries and settings.
About Code-based Digital Typesetting
If you are used to working with a visual document editor — Microsoft Word or Adobe Publisher, for example — TeX and LaTeX may seem very strange. You don’t move images of letters around on a screen, you edit source code like a computer program. It can be a little tricky at first, but it is ultimately faster, and produces more reliable results.
If you have ever used HTML with CSS, you have a better understanding of how TeX and LaTeX works: source text, along with styling instructions, are edited manually and then interpreted by an application to produce visual output for end-users. TeX is a low-level language that specifies both content and style, down to the character level. LaTeX separates style, content, and layout, creating sometime roughly like a document content management system and markdown language.
Getting TeX and LaTeX
The following are the recommended TeX/LaTeX Distributions:
(Note to Linux users: Many Linux distributions come with TeX Live, or another TeX/LaTeX distribution, already installed.)
All three of these provide a full TeX implementation along with LaTeX. For information on other TeX implementations, see the list maintained by the TeX User Group.
- LaTeX: an introduction (PDF), a one-page overview on LaTeX — probably the first thing you should read (after this guide) to get a decent high-level understanding of TeX and LaTeX;
- WikiBooks’ Guide to TeX, a community-created overview on TeX, with great information; also see the excellent WikiBooks’ Guide to the LaTeX Markup Language;
- TeX by Topic (PDF), a classic book on the core TeX system;
- The Beginner’s Guide to Using TeX in OS X, an introduction covering Mac-specific issues;
- Getting to Grips with LaTeX, a collection of tutorials for beginning and intermediate users;
- Formatting Information: An introduction to typesetting with LaTeX, a very popular, and continuously updated guide to LaTeX;
- LaTeX Quick Start — Single Page Tutorial, if you just want to get off and running right away;
- The Not So Short Introduction to LaTeX 2ε (PDF), the most widely-read and widely recommended guide to learning LaTeX from the ground up;
- Getting Started with LaTeX, an introduction, intended for students, from the School of Mathematics at Trinity College Dublin;
- LaTeX Tutorials: A Primer (PDF), an in-depth tutorial from the Indian TeX Users Group;
- Making Friends with LaTeX (PDF) is a very helpful guide to sorting out all the confusion and developing a useful, practical workflow for creating LaTeX documents;
- LaTeX for Complete Novices, is yet another introduction to the system; it is part of a series of LaTeX books which also covers several specific topics.
If you plan to use LaTeX for typesetting math or science material, you’ll want to read:
- Short Math Guide for LaTeX (PDF);
- An Introduction to Using TeX in the Harvard Mathematics Department;
- Effective Scientific Electronic Publishing.
- TeX Tutorials, a 14-part video series on just TeX typesetting, using TeXShop on Mac;
- Beginners LaTeX Tutorial, a 7-part series on getting started with LaTeX;
- YouTuber Mauricio Lobos has created several topic-specific LaTeX tutorial videos.
- The Visual LaTeX FAQ (PDF), an index of common typesetting and layout problems, with their solutions;
- The Great, Big List of LaTeX Symbols (PDF), a large reference for finding the LaTeX macro code for various special characters and typographical symbols; or try the even more complete The Comprehensive LaTeX Symbol List (PDF);
- For easier help finding symbols, try Detexify, which searches for LaTeX symbols based on your own drawing (it’s kind of amazing);
- LaTeXe Help, language documentation for LaTeX;
- LaTeX: An Unofficial Reference Manual (PDF), a thorough reference of basic LaTeX;
- Maths Cheat Sheet (PDF), a quick reference to TeX math formatting;
- The TeX Showcase is a listing of “extreme” examples of what is possible with TeX; a very interesting collection and reference source.
- BibTeX, a tool for producing bibliographic references with LaTeX; see the Tame the BeaST (PDF) tutorial for more information;
- TeXShop, a TeX/LaTeX file editor and GUI rendering utility for the Mac OS X;
- TeXnic Center, an IDE for LaTeX document preparation;
- CONTeXT, a TeX-based document engineering system — an alternative to LaTeX;
- Pandoc is a document preparation system that allows you to easily convert documents into and out of many different formats, including several TeX-related formats;
- PythonTeX, a LaTeX package that allows Python code to be included and executed in a LaTeX document (see A Gentle Introduction to PythonTeX (PDF) to get really excited about this);
- MathTeX, a server-side tool for converting LaTeX-styled math content into images and embedding them onto a page;
- For a (mostly complete) list of TeX and LaTeX add-on packages, see the Comprehensive TeX Archive Network Package Catalog;
- For a huge list of tools and online resources, see the TeX User Group’s TeX Resources on the Web page.
Community and Continued Learning
- TeX Users Group (TUG), a worldwide association of people who use TeX and TeX-related technologies; they sponsor local and international meetings and conferences and publish TUGboat, a thrice-annual journal;
- The TeX/LaTeX Stack Exchange has become the place to go with TeX-related questions and problems;
- LaTeX Community Forum provides a great place for both asking questions and engaging in conversation with TeX and LaTeX users.
Books on TeX
- The TeXbook, by Don Knuth — this is the definitive guide to the core TeX typesetting system, written by its creator; if you want more depth on the topic, you may also be interested in Knuth’s other works on typography:
- The Metafont Book, which covers the font-creation system he invented along with TeX;
- Computers & Typesetting, a five-volume set of books for the dedicated TeX enthusiast; The TeX Book and The Metafont Book are two of the five volumes, two more volumes are actually the annotated source code of TeX and Metafont, the fifth book provides highly-detailed definitions of hundreds of letters, numerals, and other symbols — this is not a set for the technical lightweight;
- Digital Typography (Lecture Notes), a fascinating collection of lectures from Knuth, exploring the relationship between computers and typesetting;
- Tex for the Impatient, by Abrahams, Hargreaves, and Berry — a great book for people who want to understand the core TeX program but don’t have the time (or math background) to understand Knuth’s books;
- A Beginner’s Book of TeX, by Seroul and Levy — another great guide to TeX, for beginners but also intermediate users;
- A Plain TeX Primer, by Malcolm Clark — “plain” in the title could refer to “Plain TeX,” not LaTeX or another variant, or to the primer itself, written in a plain and easy to read style;
- TeX in Practice is a four-volume series by Stephan von Bechtolsheim:
- Making TeX Work, by Norman Walsh is an essential and practical book focus on the various pieces of software, system setup, and workflow needed to actual use TeX in real life;
- The Advanced TeXbook, by David Salomon is one of the few advanced, practical guides to TeX; (friendly warning: the Amazon page for this book displays the cover of the wrong book).
Books on LaTeX
- Guide to LaTeX, by Helmut Kopka — an official beginner’s introduction to the LaTeX system;
- The LaTeX Companion (Tools and Techniques for Computer Typesetting), by Mittelbach, et al — an essential, in-depth guide to LaTeX, including information about over 200 add-on packages; this same team of authors also wrote The LaTeX Graphics Companion, a similarly essential guide for anyone working with graphics in LaTeX;
- The LaTeX Web Companion: Integrating TeX, HTML, and XML, by Goossens, et al — part of the same “companion” series, this book covers essential techniques for publishing LaTeX documents to the web;
- LaTeX Beginner’s Guide, by Stefan Kottwitz — an unofficial, but very helpful, guide to LaTeX from a frequent contributor to the TeX Stack Exchange site, filled with up-to-date information; Kottwitz also wrote the LaTeX Cookbook
- More Math Into LaTeX, by George Grätzer is considered the essential reference book for anyone who needs to display math formulas in LaTeX documents; Grätzer also wrote a more general guide to the system, Practical LaTeX;
- LaTeX Document Preparation System Users, by Leslie Lamport is the original book by the original author of LaTeX; from a practical standpoint, the second edition is more useful.
TeX and LaTeX provide a way of generating beautiful books and documents of the highest quality, and allow advanced users to automate many aspects of document preparation and styling. The learning curve is a bit steeper than it is for visual-based desktop publishing programs, but the possibilities are much more exciting.
Further Reading and Resources
We have more guides, tutorials, and infographics related to typesetting and publishing:
- Composing Good HTML: this is a solid introduction to writing well-formed HTML and using HTML validator software.
- CSS3 — Intro, Guides & Resources: this is a great place to start learning webpage layout.
- Fonts For Web Design: a Primer: learn the basics of fonts and their use in web design.
Web Design Trends You’ll Never Forget
The best thing about LaTeX is that if you use it properly, you will create timeless documents — ones that will never look tacky. If only the same thing could be said of the web! In our infographic Web Design Trends You’ll Never Forget we run through decades of designs that were once thought to be the height of coolness.