Summary of Commonly-Used Features of Plain TEX

D. R. Wilkins

November 19, 1993

Contents

1 Summary of Commonly-Used Features of Plain TEX 2

2 Rules for Ordinary Text (without mathematics) 2 2.1 Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.3 Quotation marks . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.4 Quotation marks . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.5 Changing Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.6 Changing Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.7 Producing Blank Space in Plain TEX . . . . . . . . . . . . . . . . 4 2.8 Producing Blank Space in Plain TEX . . . . . . . . . . . . . . . . 4

3 Rules for obtaining Mathematical Formulae 5 3.1 Mathematics embedded in Text . . . . . . . . . . . . . . . . . . . 5 3.2 Displayed Mathematical Formulae . . . . . . . . . . . . . . . . . . 5 3.3 Special Characters in Mathematics Mode . . . . . . . . . . . . . . 5 3.4 Superscripts and Subscripts . . . . . . . . . . . . . . . . . . . . . 6 3.5 Greek Letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.6 Mathematical Symbols . . . . . . . . . . . . . . . . . . . . . . . . 6 3.7 Accents in Mathematics . . . . . . . . . . . . . . . . . . . . . . . 6 3.8 Standard Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.9 Fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.10 Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.11 Ellipsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.12 Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.13 Embedding Text in Mathematics . . . . . . . . . . . . . . . . . . 7 3.14 Inserting and Removing Blank Space in Formulae . . . . . . . . . 8 3.15 Further Features of Plain TEX . . . . . . . . . . . . . . . . . . . . 8 A Control Sequences used in Text (Plain TEX) 8

B Control Sequences used in Mathematics (Plain TEX) 10 B.1 Font Changes, Accents and Standard Functions . . . . . . . . . . 10 B.2 Control Sequences for Mathematical Symbols . . . . . . . . . . . 11 B.3 Some frequently used Control Sequences of Plain TEX . . . . . . . 14

1 Summary of Commonly-Used Features of Plain TEX

2 Rules for Ordinary Text (without mathematics)

2.1 Special Characters

All characters on the keyboard have their standard meaning in ordinary text with the exception of the special characters

     # $ % & ~ _^\ { } '

which have special functions within TEX. On the rare occasions when these special characters are required in the final document they must be produced by an appropriate control sequence. Thus you should type \#, \$, \%, \&, \_, \{ and \} to obtain #, $, %, &, , { and } respectively.

2.2 Special Characters

Successive paragraphs in the input file should be separated by a completely blank line. All paragraphs will be automatically indented by TEX with the exception of the first paragraph of a new section. (One can override the conventions of TEX by placing the control sequence \noindent of the control sequence \indent at the beginning of the paragraph.)

2.3 Quotation marks

To produce single quotation marks use the characters ` (left quote) and ' (right quote). For double quotation marks use `` (two left quotes) and '' (two right quotes). Do not use " (undirected double quote). Thus to obtain

“This is easy” he said.

you should type

     ``This is easy'' he said.

The control sequence \thinspace can be used to separate single quotes from double quotes where necessary.

2.4 Quotation marks

Dashes of various lengths are obtained using -, -- and ---. You should use - for hyphenation, -- when specifying ranges of numbers, and --- to obtain a punctuation dash. Thus we obtain

The Cayley-Hamilton Theorem.

See pages 95–104.

Use three dashes to obtain a punctuation dash—like this.

by typing

     The Cayley-Hamilton Theorem.
     See pages 95--104.
     Use three dashes to obtain a punctuation dash---like this.

2.5 Changing Fonts

The control sequences \rm, \sl, \it, \tt and \bf change to roman, slanted, italic, teletype and boldface fonts respectively. Any change of font made within a group enclosed within curly brackets { and } will only apply to text within that group. On leaving the group, the current font is restored to what it was before entering the group. Thus we can obtain

This sentence contains a word set in boldface type

by typing

     This sentence contains a word set in {\bf boldface} type

The control sequence \/ produces the so-called ‘italic correction’. It is sometimes desirable when changing from a slanted font (such as italic or slanted) back to a non-slanted font such as roman or boldface, in order to produce a small amount of extra space to compensate for the slantedness of the font, and thus improve the appearance of the final document. However the italic correction should not be applied before a period (full stop) or a comma. To obtain

Here is some italicized text.

one should type

     Here is some {\it italicized\/} text.

However it usually does not matter all that much if you forget about this italic correction.

2.6 Changing Fonts

These are produced by control sequences such as \', \` and \". Thus one types Se\'{a}n and H\"{o}lder to obtain ‘Seán’ and ‘Hölder’ respectively. For a full list of such accents, see Appendix A. Note however that accents within mathematics are produced in a different fashion.

2.7 Producing Blank Space in Plain TEX

To produce (horizontal) blank space within a paragraph, use \hskip, followed by the length of the blank space. The length of the skip should be expressed in a unit recognized by TEX. These recognized units are given in the following table:

pt point  (1 in = 72.27 pt)
pc pica  (1 pc = 12 pt)
in inch  (1 in = 25.4 mm)
bp big point  (1 in = 72 bp)
cm centimetre (1 cm = 10 mm)
mm millimetre
dd didot point (1157 dd = 1238 pt)
cc cicero  (1 cc = 12 dd)
sp scaled point (65536 sp = 1 pt)

Thus to produce a horizontal blank space of 20 mm in the middle of a paragraph one would type \hskip 20 mm (or, better still, type ‘\hskip 20 mm \relax’ to avoid the error that might occur if the following word were to begin with the letters ‘plus’).

To produce (vertical) blank space between paragraphs, use \vskip, followed by the length of the vertical skip.

2.8 Producing Blank Space in Plain TEX

To force TEX to produce a blank space where it might not otherwise put one, one should precede the blank space with a \ (backslash). It is often advisable to precede with a backslash blank spaces after certain abbreviations such as ‘Dr.’, ‘etc.’, and ‘Math. Soc.’ (so that one should type Dr.\ Smith etc.).

If you wish to ensure that TEX does not start a new line at a particular blank space, then you can use ~ in place of the blank space. Thus if you type I.~Newton or Example~4 then you prevent a line break at these places.

3 Rules for obtaining Mathematical Formulae

3.1 Mathematics embedded in Text

Any mathematical expressions embedded in text should be preceded and followed by the character $. Thus to obtain

Let f be the function defined by f(x) = x + 7.

one should type

     Let $f$ be the function defined by $f(x) = x + 7$.

3.2 Displayed Mathematical Formulae

Any displayed mathematical formulae should be preceded and followed by $$. Thus to obtain

Let g be the function defined by

g(x, y) = xy + x + y + 2.

The function g is positive when both x and y are positive.

one should type

     Let $g$ be the function defined by
     $$g(x,y) = xy + x + y + 2.$$
     The function $g$ is positive when both $x$ and $y$ are positive.

3.3 Special Characters in Mathematics Mode

All characters on the keyboard have their standard meaning in mathematical expressions with the exception of the special characters

     # $ % & ~ _^\ { } '

which have special functions within TEX. On the rare occasions when these special characters are required in the final document they must be produced by an appropriate control sequence. Thus you should type \#, \$, \%, \&, \_, \{ and \} to obtain #, $, %, &, , { and } respectively. To obtain \ in mathematics

mode, type \backslash.

The character ' is used to put a superscript prime after a character. Thus if we type $f'$ and $g''$ we obtain f′ and g′′ respectively.

3.4 Superscripts and Subscripts

Superscripts and subscripts are produced using the characters ^and _respectively. Thus we obtain t^{2} + x_{1} − x_{1}^{3} by typeint $t^2 + x_1 - x^3_1$. If a superscript or subscript consists of more than one character then the superscripts and subscripts should be enclosed in curly brackets. Thus one obtains a_{i,j} by typing $a_{i,j}$. One can obtain double subscripts: we obtain s_{n_{j}} by typing

$s_{n_j}$.

3.5 Greek Letters

Greek letters are obtained by preceding the name of the letter by a backslash. Thus we obtain α, β, γ by typing $\alpha, \beta, \gamma$. See Appendix B for a list of Greek letters. Some Greek letters have variant forms—see Appendix B.

3.6 Mathematical Symbols

Mathematical symbols such as ÷, ≡, ⊗, ∑, ∈, ∪, ∩ and → are obtained using the appropriate control sequences—see Appendix B.

3.7 Accents in Mathematics

These are produced using the appropriate control sequence—see Appendix B.

3.8 Standard Functions

Certain standard functions such as sin and log are obtained by preceding the name with a backslash—see Appendix B for a full list of these. To obtain a function or similar expression not on this list you should convert to the roman font (e.g., to obtain Aut(G) one should type ${\rm Aut}(G)$).

3.9 Fractions

Fractions are obtained in Plain TEX using the control sequence \over. We type

{ numerator \over denominator }

to obtain the required fraction. Thus to obtain

f(x) = \frac{2x}{(1 + x^{2})^{2}}

we type

     $$f(x) = { 2 x \over (1 + x^2)^2 }$$

3.10 Roots

Square roots are obtained using the control sequence \sqrt. Thus to obtain \sqrt{3x + 7} we type $\sqrt\{3x + 7\}$. To obtain an nth root in Plain TEX we use the construction

\root n \of { expression }

Thus ^{3} \sqrt{3x + 7} is obtained by typing $\root 3 \of \{3x + 7\}$.

3.11 Ellipsis

Ellipsis (three dots) is obtained in mathematical formulae using the control sequences \cdots (centred ellipsis) and \ldots (lowered ellipsis). Thus to obtain x_{1} + x_{2} + ⋯ + x_{n} and x_{1}, x_{2}, …, x_{n} we type $x_1 + x_2 + \cdots + x_n$ and

$x_1, x_2, \ldots, x_n$ respectively.

3.12 Delimiters

To surround a subformula with delimiters large enough to enclose the subformula we use the construction

\left( … subformula … \right)

(where the parentheses ( …) may be replaced by any other pair of delimiters such as [ …] or \{ … \}). Thus to obtain the equation

f(x) = (1 + \frac{2x}{x^{2} + 1}) − sin(x)

we type

     $$f(x) = \left( 1 + { 2x \over x^2 + 1 } \right) - \sin(x)$$

3.13 Embedding Text in Mathematics

Text can be embedded in mathematics using the control sequence \hbox. Thus if we type

     $$V' = \{ f \in X' : f(v) = 0 \hbox{ for all } v \in V \}$$

we obtain

V′ = {f ∈ X′ : f(v) = 0 for all v ∈ V }

3.14 Inserting and Removing Blank Space in Formulae

The control sequence \quad produces a ‘quad’ of blank space (a ‘quad’ is approximately the width of the letter ‘m’). The control sequence \qquad produces two quads of blank space. The control sequence \, inserts a thin blank space and the control sequence \! removes a thin space. One uses \, and \! to improve the appearance of mathematical formulae. For example, if we type

     $$\int_0^\pi \sin x dx = 2,$$

we obtain

∫_{0}^{π} sin xdx = 2,

whereas if we type

     $$\int_0^\pi \sin x \,dx = 2,$$

we obtain

∫_{0}^{π} sin x dx = 2,

and this equation has a more satisfactory appearance.

3.15 Further Features of Plain TEX

There are plenty of control sequences in Plain TEX for accomplishing various tasks. Among the most widely used of these are \eqalign (for producing multiline formulae), \cases (for equations which divide up into a number of cases) \matrix (for producing arrays) and \pmatrix (for producing matrices surrounded by large parentheses).

A Control Sequences used in Text (Plain TEX)

Control Sequences for Changing Fonts in Text

\rm changes to the normal “roman” font: Roman
\sl changes to a slanted roman font:  Slanted
\it changes to an italic font:  Italic
\tt changes to an “typewriter” font:  Typewriter
\bf changes to a boldface font:  Boldface

Control Sequences for obtaining Accents in Text

\'{e} é e.g., math\'{e}matique yields ‘mathématique’
\`{e} è e.g., alg\`{e}bre yields ‘algèbre’
\^{e} ê e.g., h\^{o}te yields ‘hôte’
\"{o} ö e.g., H\"{o}lder yields ‘Hölder’
\~{n} ñ e.g., ma\~{n}ana yields ‘mañana’

  \={o} ō
  \.{o} ȯ
  \u{o} ŏ

\v{c} č e.g., \v{C}ech yields ‘Čech’

  \H{o} ő
  \t{oo} oo

\c{c} ç e.g., gar\c{c}on yields ‘garçon’

  \d{o}   o.
  \b{o}   ō

These accents are for use in ordinary text. They cannot be used within mathematical formulae, since different control sequences are used to produce accents within mathematics.

Special Symbols used in Text

\oe, \OE  œ, Œ
\ae, \AE  æ, Æ
\aa, \AA  å, Å
\o, \O  ø, Ø
\l, \L  ł, Ł
\ss  ß
?`  ¿
!`  ¡
\dag  †
\ddag  ‡
\S  §
\P  ¶
\copyright  \begin{matrix}c \\ ◯ \end{matrix}
{\it \$}  $
{\it \&}  &
\i  ı
\j  ȷ

B Control Sequences used in Mathematics (Plain TEX)

B.1 Font Changes, Accents and Standard Functions

Changing Fonts in Mathematical Expressions

Fonts are changed using suitable control sequences.

\mit changes to the ‘math italic’ font: MathItalic
\rm changes to the roman font:  Roman
\sl changes to a slanted roman font: Slanted
\it changes to an italic font:  Italic
\tt changes to an “typewriter” font: Typewriter
\bf changes to a boldface font:  Boldface
\cal changes to a calligraphic font:  CALLIGRAPHIC

The default font for mathematics is MathItalic. The CALLIGRAPHIC font is only available for uppercase letters. Any change of font made within a group enclosed within curly brackets { and } will only apply to text within that group. On leaving the group, the current font is restored to what it was before entering the group.

Accents in Mathematics Mode

Accents in mathematics mode are produced using appropriate control sequences. The effect of these on the letter a is exhibited in the following table.

$\underline\{a\}$  \underline{a}
$\overline\{a\}$   \overline{a}
$\hat{a}$        â
$\check{a}$      ǎ
$\tilde{a}$      ã
$\acute{a}$      á
$\grave{a}$      à
$\dot{a}$        ȧ
$\ddot{a}$       ä
$\breve{a}$      ă
$\bar{a}$        ā
$\vec{a}$        a⃗

These control sequences should only be used for mathematics, not for ordinary text.

You should bear in mind that when a character is underlined in a mathematical manuscript then it is normally typeset in bold face without any underlining. Underlining is used very rarely in print.

Standard Functions

The names of certain standard functions and abbreviations are obtained by typing a backlash \ before the name. The complete list in TEX is as follows:-

\arccos \cos \csc \exp \ker  \limsup \min \sinh
\arcsin \cosh \deg \gcd \lg  \ln  \Pr \sup
\arctan \cot \det \hom \lim  \log  \sec \tan
\arg  \coth \dim \inf \liminf \max  \sin \tanh

B.2 Control Sequences for Mathematical Symbols

Lowercase Greek Letters

α \alpha  ι \iota  ϱ \varrho
β \beta  κ \kappa  σ \sigma
γ \gamma  λ \lambda ς \varsigma
δ \delta  μ \mu  τ \tau
ϵ \epsilon  ν \nu  υ \upsilon
ε \varepsilon ξ \xi  ϕ \phi
ζ \zeta  o o  φ \varphi
η \eta  π \pi  χ \chi
θ \theta  ϖ \varpi  ψ \psi
ϑ \vartheta  ρ \rho  ω \omega

Uppercase Greek Letters

   Γ \Gamma  Ξ \Xi  Φ \Phi
   Δ \Delta  Π \Pi  Ψ \Psi
   Θ \Theta  Σ \Sigma  Ω \Omega
   Λ \Lambda Υ \Upsilon

Miscellaneous Symbols

ℵ \aleph  ′ \prime  ∀ \forall
h̄ \hbar  ∅ \emptyset  ∃ \exists
ı \imath  ∇ \nabla  ¬ \neg
ȷ \jmath  √ \surd  ♭ \flat
ℓ \ell  ⊤ \top  ♮ \natural
℘ \wp  ⊥ \bot  ♯ \sharp
ℜ \Re  ∥ \|  ♣ \clubsuit
ℑ \Im         ^{}\angle  ♢ \diamondsuit
∂ \partial △ \triangle  ♡ \heartsuit
∞ \infty  \ \backslash ♠ \spadesuit

“Large” Operators

   ∑ \sum  ⋂ \bigcap  ⨀ \bigodot
   ∏ \prod  ⋃ \bigcup  ⨂ \bigotimes
   ∐ \coprod  ⨆ \bigsqcup  ⨁ \bigoplus
   ∫ \int  ⋁ \bigvee  ⨄ \biguplus
   ∮ \oint  ⋀ \bigwedge

Binary Operations

± \pm  ∩ \cap  ∨ \vee
∓ \mp  ∪ \cup  ∧ \wedge
\ \setminus ⊎ \uplus  ⊕ \oplus
· \cdot  ⊓ \sqcap  ⊖ \ominus
× \times  ⊔ \sqcup  ⊗ \otimes
∗ \ast  ◁ \triangleleft  ⊘ \oslash
⋆ \star  ▷ \triangleright  ⊙ \odot
⋄ \diamond  ≀ \wr  † \dagger
∘ \circ  ◯ \bigcirc  ‡ \ddagger
• \bullet  △ \bigtriangleup  ⨿ \amalg
÷ \div  ▽ \bigtriangledown

Relations

  ≤ \leq  ≥ \geq  ≡ \equiv
  ≺ \prec  ≻ \succ  ∼ \sim
  ⪯ \preceq  ⪰ \succeq  ≃ \simeq
  ≪ \ll  ≫ \gg  ≍ \asymp
  ⊂ \subset  ⊃ \supset  ≈ \approx
  ⊆ \subseteq  ⊇ \supseteq      ≅ \cong
  ⊑ \sqsubseteq ⊒ \sqsupseteq ▷◁ \bowtie
  ∈ \in  ∋ \ni  ∝ \propto
  ⊢ \vdash  ⊣ \dashv  ⊧ \models
  ⌣ \smile  | \mid           ≐ \doteq
  ⌢ \frown  ∥ \parallel  ⊥ \perp

Negated Relations

   ≮ \not<  ≯ \not>  ≠ \not=
   ≰ \not\leq  ≱ \not\geq  ≢ \not\equiv
   ⊀ \not\prec  ⊁ \not\succ  ≁ \not\sim
   ⪯̸ \not\preceq  ⪰̸ \not\succeq  ≄ \not\simeq
   ⊄ \not\subset  ⊅ \not\supset  ≉ \not\approx
   ⊈ \not\subseteq  ⊉ \not\supseteq      ≅ \not\cong
   ⋢ \not\sqsubseteq ⋣ \not\sqsupseteq ≭ \not\asymp

Arrows

← \leftarrow  ⟵ \longleftarrow  ↑ \uparrow
⇐ \Leftarrow  ⟸ \Longleftarrow  ⇑ \Uparrow
→ \rightarrow  ⟶ \longrightarrow  ↓ \downarrow
⇒ \Rightarrow  ⟹ \Longrightarrow  ⇓ \Downarrow
↔ \leftrightarrow  ⟷\longleftrightarrow ↕ \updownarrow
⇔ \Leftrightarrow  ⟺\Longleftrightarrow ⇕ \Updownarrow
↦ \mapsto  ⟼ \longmapsto  ↗ \nearrow
↩ \hookleftarrow  ↪ \hookrightarrow  ↘ \searrow
↼ \leftharpoonup  ⇀ \rightharpoonup  ↙ \swarrow
↽ \leftharpoondown  ⇁ \rightharpoondown  ↖ \nwarrow

⇀ ↽ \rightleftharpoons

Openings

              [ \lbrack ⌊ \lfloor        \lciel
              { \lbrace ⟨ \langle

Closings

              ] \rbrack ⌋ \rfloor        \rciel
              } \rbrace ⟩ \rangle

Alternative Names

≠ \ne or \neq (same as \not=)

≤ \le  (same as \leq)
≥ \ge  (same as \geq)

{ \{  (same as \lbrace)
} \}  (same as \lbrace)
→ \to  (same as \rightarrow)
← \gets  (same as \leftarrow)

∋ \owns  (same as \ni)

∧ \land  (same as \wedge)

∨ \lor  (same as \vee)

¬ \lnot  (same as \neg)

| \vert  (same as |)
∥ \Vert  (same as \|)

⟺\iff  (same as \Longleftrightarrow, but with

extra space at each end)

: \colon  (same as :, but with less space around it and

less likelihood of a line break after it)

B.3 Some frequently used Control Sequences of Plain TEX

We list some of the control sequences of Plain TEX that are frequently used when typesetting mathematical formulae. The list is by no means exhaustive. For information on how to apply these control sequences, consult the appropriate manual (e.g. ‘The TEXbook’).

\over  produces fractions
\sqrt  produces square roots
\root  produces nth roots
\left  produces left delimiter of required size
\right  produces right delimiter of required size
\quad  produces a ‘quad’ of blank space
\qquad  produces two ‘quads’ of blank space
\,  produces a thin space
\!  removes a thin space
\hbox  creates a box of text within mathematics
\eqalign  creates a multiline formula
\eqalignno creates a numbered multiline formula
\leqalignno creates a multiline formula numbered on the left
\cases  creates an equation that splits into cases
\matrix  produces an array
\pmatrix  produces a matrix surrounded by parentheses