Don Knuth is writting an impressive book series called "The Art of Computer Programming" since the 1960s. In 1977 he created TeX, to produce high-quality documents independently of the current printing technology. In the 1980 Leslie Lamport built LaTeX on top, which provides a lot convenient macros. For producing text-heavy pdfs TeX is the tool, which sucks least.

Building LaTeX documents

On the lowest level there is pdftex for compiling tex files to pdfs. However, I strongly recommend to use a wrapper tool like rubber or latexmk.

Packages

Pure TeX or even LaTeX means a lot of work. There are lots of handy packages available.

Document Class

Use KOMA script document classes, i.e. scrbook, scrreprt or scrartcl.

\documentclass{scrartcl}

This provides more flexibility than for example article.

Encodings

Always start with

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

The first line tells TeX, that your document is encoded in utf-8, so you can write ä instead of \"a. The second line specifies the font encoding in the pdf, which in this case is Type-1.

Internationalization

The babel package is the common approach for different languages. Other packages often build on top of it. For example use the csquotes package and the \enquote macro, to get the correct quotation marks, instead of writing them explicitly with ``''.

Links and References

Use the hyperref for references. For example, it transforms the table of contents entries into hyperlinks. It also provides the handy \autoref macro and has various options for pdf-specific features.

Diagrams

Use TikZ to generate diagrams and other graphics. It is a more modern variant to Metapost.

Bibliography

Use biblatex. In contrast to bibtex, the formatting is done with LaTeX instead of a special programming language.

Layouting

For special layout requirements consider fancyhdr, titlesec, setspace, and tocloft.

For columns use the multicol package.

Version Control

As a text-based format TeX is suited for version control software like git or svn. Write at most one sentence per line or even only sentence fragments per line. This results in much nicer diffs, which means a better history. Commit often for a detailed history.

© 2011-11-13