About Tex and L TEX: 1.1 An Overview
About Tex and L TEX: 1.1 An Overview
About Tex and L TEX: 1.1 An Overview
1.1 An overview
TEX typesetting commands have been used to create many new commands
that are easier and more convenient to use; these new commands comprise
the LTEX system. But behind the scenes, all LTEX commands need to be re-
A A
onym for TEX and LTEX because most of this material applies equally well
A
to LTEX or to plain TEX. Sometimes, for emphasis, we will say LTEX and
A A
world can print this message precisely as intended using their local version
of TEX. The les we feed to the TEX program contain only printable ascii
characters, so these les are easy to transfer from one computer to another.
In addition to this portability, TEX documents are stable. Work on the
basic TEX engine has now been frozen (except for bug xes) so a decade-
old TEX document can be rerendered today.
1
2 CHAPTER 1. ABOUT TEX AND LTEX A
LTEX and TEX are hardly the only systems purporting to paint digital char-
A
acters on a laser-printed page. But even at this late date, few other systems
do it as well as TEX does. Let's see what lies behind this extravagant claim.
Over the centuries, printers (doubtless attempting to mirror the owing
appearance of ne handwriting) became accustomed to replacing certain
pairs of adjacent letters by single characters termed ligatures. Early printers
used far more ligatures than do current typesetters, but some ligatures have
survived until now (or at least until the advent of computer typesetting!).
Today, knowledgeable typesetters would replace letter groups fl and fi by
the typographic equivalents and (look closely at the diVerences). Other
ligatures that should be used include V, Y, and Z, and TEX can actually
accommodate other exotic ligatures if the need arises. Human authors could,
of course, be taught to somehow select them as they key in their texts, but
this is a bad ideacomputers that never err should do it instead. The task
of creating ligatures automatically is apparently beyond the capabilities of
most computer typesetting systems, and it's becoming increasingly common
to read books in which some (or all!) of the f-ligatures are missing.
TEX uses its ligature mechanism to improve the appearance of often
misused characters like dashes and quotes. Depending on how an author
enters a dash and on the context (math mode or not), LTEX or TEX typesets
A
Kerned TOYOTA
Unkerned TOYOTA
Kerned IRRAWADDY
Unkerned IRRAWADDY
Kerned JAVA WAVE
Unkerned JAVA WAVE
Figure 2: Kerning
ent.) Although TEX works hard to set type without the necessity of hyphen-
ating, TEX does contain algorithms that ensure proper hyphenation about
95% of the time. (Corrections to a word's hyphenation are easy to specify.)
In general, TEX works hard to compute proper line breaks in a paragraph. In
extreme cases, the last word of a paragraph inuences the line break of the
rst line, so neither TEX nor LTEX will compute line breaks until the entire
A
complex tables and mathematics and other technical material. (See gure 3
on the following page for mathematics, and gure 4 on page 7 and especially
the front endpaper for examples of tables.) For mathematical typesetting,
TEX is even able to distinguish between math in the context of display or
textcompare the displayed formula
m
X
2
k
x
i D0 i
01 1
BB 1
1 ::: 1 v
u s r
: : : 1n C
t1 C 1 C 1 C q1 C p1 C p1 C
u
12 C
KBBB :2 22
::
: : : 2n C
:C
C
@ :: ::
: : :: A
m m2 : : : mn
Z
2 e x2 k
l
's 's
e dx
: : : ; ;; : : : ;
g
f;
0
k Cl elements
In the case of footnotes and oating objects (like gures and tables),
TEX is adept at guring out how much space to leave to accommodate the
item and at moving a gure or table to the next page if the current page is
already too full (that's why they're called oats). Automatic numbering of
footnotes, tables, and so on, is also possible.
Sometimes, external programs work in concert with TEX. In the case of
index preparation, an author inserts various commands in the manuscript,
and LTEX or TEX obligingly spits the material to a separate index le. An-
A
other program, such as MakeIndex, is needed to sort the entries properly and
merge identical entries together. In the case of bibliography preparation, an
author may well like to prepare a collection of entries pertaining to her eld
of specialty, say, and have only a small number of entries selected for a par-
ticular report. The bibliographic information will need special formatting to
accommodate itself to the needs of the journal. This is done by a program,
usually BibTEX.
No matter what avor of TEX an author uses, these abilities are always
present. However, in plain TEX an author has to work harder, because rela-
tively few high level commands exist. The more complete a macro package
is, such as LTEX (see page 33), the easier these capabilities become.
A
Although the major advantage of using a program like TEX (plus per-
haps helpers like BibTEX or MakeIndex ) is convenience, the major payoV
occurring whenever the original manuscript undergoes revision. Changes to
pagination, page layout, and so on, which occur as a result of the document's
revision, automatically propagate to these ancillary materials.
Any reader with even a smattering of LTEX or TEX experience knows that
A
For one reason, there is rarely immediate feedback with a TEX docu-
ment, and this may contribute to this perception. Like any computer sys-
Probe: actually.
VA
VA VA
elangyosj elangyosj elangyosj elangyosj elangyosj elangyosj