Dario Taraborelli : latex

home about
hometools › latex

The Beauty of LaTeX

Latest update
Apr 16, 2008 Added notes and acknowledgments
 

[latex fonts screenshot]There are several reasons why one should prefer LaTeX to a WYSIWYG word processor like Microsoft Word: portability, lightness, security are just a few of them (not to mention that LaTeX is free). There is still a further reason that definitely convinced me to abandon MS Word: you will never be able to produce professionally typeset and well-structured documents using most WYSIWYG word processors.
LaTeX is a free typesetting system that allows you to concentrate on content and forget about the layout: the software takes care of the actual typesetting, structuring and page formatting, producing documents of astonishing elegance.
The software I use to write in LaTeX on a Mac compiles documents in PDF format (but exporting to other formats such as RTF or HTML is also possible). It supports unicode and all the advanced typographic features of OpenType and AAT fonts, like Adobe Garamond Pro and Hoefler Text. It allows fine-tuned control on a number of typesetting options, although just using the default configuration results in documents with high typographic quality. In what follows I review some examples, comparing how fonts are rendered in MS Word and in LaTeX.

Contents
  1. Kerning
  2. Real Small Caps
  3. Common ligatures
  4. Rare and ancient ligatures
  5. Glyph variants
  6. Line breaks, justification and hyphenation
  7. Getting expert fonts
  8. Links
  9. Acknowledgments
  10. Technical notes

 

1. Kerning


Kerning is the process of selectively adjusting the spacing between letters pairs to improve the overall appearance of text. Examples of letter pairs that need kerning treatment are AV, AY, PA, and AT. These letter pairs often look awkward together, and need to either be moved closer together, or further apart manually. Professional typesetting systems and fonts allow fine-grained adjustments for such letter pairs. Popular word processors either lack support for kerning tables or disable kerning by default (this is the case with both Microsoft Word for Mac OS v.X and 2008) [Thanks to Mark Dancer and Nicholas Shera for pointing this out].

MS Word (wrong default kerning for the "Ta" letter pair):
[example of inappropriate kerning in MS Word]
[Adobe Garamond Pro, 48pt] pdf doc


LaTeX (correct kerning for the "Ta" letter pair):
[example of correct kerning in LaTeX]
[Adobe Garamond Pro, 48pt] pdf tex


 

2. Real small caps


Most word processors create fake small capitals by adjusting the size of capitals. Professional fonts contain different sets of glyphs for small capitals and full-size capitals that any serious typesetting system should be able to use in the appropriate context. In particular, real small capitals are more than resized versions of uppercase capitals: they have a relatively heavier stroke and are designed to be visually compatible with lowercase characters of the same typeface.

MS Word (fake small caps):
[example of fake small caps in MS Word]
[Adobe Garamond Pro, 48pt] pdf doc


LaTeX (real small caps):
[example of correct use of real small caps in LaTeX]
[Adobe Garamond Pro, 48pt] pdf tex


 

3. Common ligatures


A good typesetting programme should always use contextual intelligence and substitution tables to determine whether ligatures are needed. Common ligatures are essential to professionally typeset text.

MS Word (common ligature errors):
[example of common ligatures in MS Word]
[Hoefler Text, 48pt] pdf doc


LaTeX (correct use of ligatures):
[example of common ligatures in LaTeX]
[Hoefler Text, 48pt] pdf tex


 

4. Rare and ancient ligatures


XƎTeX in conjunction with professional fonts gives the possibility to exploit the whole set of rare ligatures and decorations, that are automatically added to the text.

MS Word (text with no ligature):
[text without rare ligatures in MS Word]
[Adobe Minion Pro, 24pt] pdf doc


LaTeX (text with rare and old-style ligatures):
[example of rare ligatures in LaTeX]
[Adobe Minion Pro, 24pt] pdf tex


[example of rare ligatures in LaTeX]
[Hoefler Text, 24pt] pdf tex


 

5. Glyph variants


Expert fonts often include variants or alternate shapes for alphabetic characters and numbers. XƎTeX with the fonstpec package offers the possibility to access and select variants on single characters or for a whole text block.

LaTeX (example of font variants):
[example of font variants in LaTeX]
[Zapfino, 25pt] pdf tex


 

6. Line breaks, justification and hyphenation


Readability results not only from a good selection of typefaces, but also from a correct distribution of characters and whitespace per line. To attain this goal, most WYSIWYG word processors use relatively dumb justification/hyphenation procedures (i.e. algorithms that establish the position for line breaks by processing text line by line). LaTeX uses an advanced algorithm, based on seminal work by Donald Knuth and Michael F. Plass and enhanced by Frank Liang in 1983 for his PhD dissertation and, which considers paragraphs as `wholes´ in order to decide where to add line breaks [Thanks to Olaf 'Rhialto' Seibert for the correct attribution]. The algorithm uses language-specific patterns in order to decide the preferred position for hyphenation. The engine then selects line breaks so as to make paragraphs look as good as possible. Information that is taken into account for calculating optimal line breaks includes the number of consecutive lines ending with hyphens, word tightness on each line, the change of tightness between consecutive lines. Further development has enabled the LaTeX engine to allow certain characters to stick into the margin, thus generating an optically straight margin - i.e., a margin that looks straight without being geometrically so. LaTeX's hyphenation settings can be fine-tuned by expert users.

Advanced hyphenation/justification in LaTeX:
[example of advanced hyphenation/justification in LaTeX]
[Hoefler Text, 10pt, magnified] pdf tex

For visual examples of the differences between paragraph and line-by-line based algorithms, see Maarten Sneep's document: Justification & Hyphenation in various text engines


 

7. Getting expert fonts


XƎTeX gives the best results with expert fonts such as those based on OpenType technology but works with standard TrueType fonts as well. Zillions of expert fonts can be purchased online from digital foundries, but Mac OS comes bundled with a number of excellent fonts with expert features (e.g. Hoefler Text, Optima, Skia, Apple Chancery, Zapfino). More free OpenType fonts are available on the net. Check out for example the Gentium, Charis SIL and Doulos SIL fonts from SIL, Cardo by David J. Perry, the free fonts designed by Jos Buivenga (the creator of Fontin), or this amazing collection of professional quality fonts selected by Vitaly Friedman.
 


 

8. Typesetting with LaTeX: selected links


9. Acknowledgments


Thanks to all those who helped improve this article with valuable feedback: Will Robertson (fontspec author), Bastien Guerry, Nicholas Shera, Mark Dancer, Olaf 'Rhialto' Seibert.

10. Technical notes


These examples were produced on a Powerbook G4 running Mac OS 10.3.9, with Microsoft Word v.X and TeXShop 1.35, the XƎTeX engine with fontspec package, and using the following fonts: Adobe Garamond Pro (commercial font), Adobe Minion Pro (commercial font), Hoefler Text (font bundled with Mac OS X), Zapfino (font bundled with Mac OS X). This article, the PDF samples and TeX sources are licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. A backlink is sufficient for attribution. The TeX, LaTeX and XƎTeX logos on this page are rendered via a nifty XHTML and CSS hack by Edward O'Connor.




research | papers & communications | teaching | erp | links | tools | cv | contact
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.4
Page was generated in 1.7433 seconds