↑ Home  

TeX tricks

(Or: How to efficiently defeat LaTeX)

TeX and LaTeX

LaTeX is a typesetting format based on the typesetting language TeX. On the plus side, LaTeX gives us all kinds of referencing help, floating figures and tables, tables of contents, bibliography and more. Unfortunately, in some respects it is inflexible. To determine details of the format - where to put a particular figure, the style to use in page headers - is often impossible.

Hacker that I am, I personally prefer using TeX commands rather than LaTeX macros when it isn't too much trouble. They are more fundamental and their effect is more predictable. Besides, I find some peculiarities of LaTeX can only be understood if you have a good knowledge of TeX. Even without LaTeX, TeX offers many powerful features: It has complex templates for table entries, lines of arbitrary thickness, advanced alignment and spacing features, indentation along a arbitrary contours, ways to influence where lines and pages are broken, etc. etc. LaTeX produces reasonably good output in most cases but is hard to influence if you disagree with the result. It's all right for users who want to concentrate on the content and don't want to spend time fine-tuning the appearance of their text. For the others, here is some information I have found useful in the past:

TeX usage tips

General tips on running and coding TeX

Tips for slides style

Workarounds for the most annoying features of slides style

Favourite maths TeX macros

A collection of mostly math-related personal macros

Tables in TeX

Learn about TeX tables, which form the basis for LaTeX's tabular and eqnarray environments

Macros for displayed equations

A more flexible and usable alternative to LaTeX's eqnarray environment

Favourite LaTeX hacks

Some things LaTeX's creator didn't think of

Listing pre-defined macros

A toolkit which allows hacking LaTeX's internal macros

Advanced citing with BibTeX

Indicating why you cite something and proper citing of URLs

Installing additional LaTeX packages

How to find and install supplementary document class and style files

Generating high-quality portable PDF files

The right ghostscript arguments so as not to degrade quality

Further reading

THE book on TeX by its creator:

Donald E. Knuth: The TeXbook, Addison-Wesley Publishing Company

tells you all there is to know about TeX (and some things you'd rather never have heard of). It contains information on a multitude of TeX control sequences, on how TeX processes its source code, lots of exercises (hairy for beginners), a basic example format (which unfortunately lacks references), a comprehensive index, an appendix on what can be done with TeX if you have good nerves ("Dirty Tricks"), and documentation of some error messages ("If you have been so devious as to get this message, you will understand it, and you deserve no sympathy.").

TeX by Topic

by Victor Eijkhout is a reference which covers many many details of TeX and will help you a lot if TeX does something counterintuitive (as happens regularly). Furthermore, it is available free from the author's web page (you are allowed to donate).

Making TeX work

by Norman Walsh is an out-of-print book, now available on sourceforge. While it admits to being out of date, much of the information is still relevant and interesting.

Matthew Skala's website has solutions to a number of LaTeX problems and related material, including a Makefile for complex LaTeX documents.

TOS / Impressum