TEX Reference Card

(for Plain TEX)

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
Γ  \Gamma  Ξ \Xi  Φ \Phi
Δ  \Delta  Π \Pi  Ψ \Psi
Θ  \Theta  Σ \Sigma  Ω \Omega
Λ  \Lambda  Υ \Upsilon

Symbols of Type Ord

ℵ \aleph  ′ \prime  ∀ \forall
h̄ \hbar  ∅ \emptyset  ∃ \exists
ı \imath  ∇ \nabla  ¬ \neg or \lnot
ȷ \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 or \lor
∓ \mp  ∪ \cup  ∧ \wedge or \land
\ \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

Page Layout

\hsize=⟨dimen⟩  set width of page
\vsize=⟨dimen⟩  set height of page
\displaywidth=⟨dimen⟩  set width of math displays
\hoffset=⟨dimen⟩  move page horizontally
\voffset=⟨dimen⟩  move page vertically

Relations

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

Most relations can be negated by prefixing them with \not.

                                                               ≢ \not\equiv      ∉ \notin  ≠ \ne

Arrows

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

The \buildrel macro puts one symbol over another. The format is \buildrel⟨superscript⟩\over⟨relation⟩.

                                                                   ⟶^{αβ}  \buildrel\alpha\beta\over\longrightarrow
                                                               f(x) =^{def} x + 1 f(x)\; {\buildrel\rm def\over=} \;x+1

Delimiters

                                                               [ \lbrack or [ { \lbrace or \{ ⟨ \langle
                                                               ] \rbrack or ] } \rbrace or \} ⟩ \rangle
                                                               | \vert or |  ⌊ \lfloor  ⌈ \lceil
                                                               ∥ \Vert or \|  ⌋ \rfloor  ⌉ \rceil
                                                               [[ [\![  (( (\!(  ⟨⟨ \langle\!\langle
                                                               ]] ]\!]  )) )\!)  ⟩⟩ \rangle\!\rangle

Left and right delimiters will be enlarged if they are prefixed with \left or \right. Each \left must have a matching \right, one of which may be an empty delimiter (\left. or \right.). To specify a particular size, use the following:

                                                                    \bigl, \bigr     \Bigl, \Bigr     \biggl, \biggr

You can also say \bigm for a large delimiter in the middle of a formula, or just \big for one that acts as an ordinary symbol.

Every Time Insertions

\everypar  insert whenever a paragraph begins
\everymath  insert whenever math in text begins
\everydisplay  insert whenever displayed math begins
\everycr  insert after every \cr

Accents

Type  Example  In Math  In Text

                                                                                                                        hat  â  \hat              \^

expanding hat  _{abc}  \widehat  none

                                                                                                                        check  ǎ  \check            \v
                                                                                                                        tilde  ã  \tilde            \~

expanding tilde  _{abc}  \widetilde  none

                                                                                                                        acute  á  \acute            \'
                                                                                                                        grave  à  \grave            \`
                                                                                                                        dot  ȧ  \dot              \.

double dot  ä  \ddot             \"

                                                                                                                        breve  ă  \breve            \u
                                                                                                                        bar  ā  \bar              \=

vector  a⃗  \vec  none

The \skew⟨number⟩ command shifts accents for proper positioning, the larger the ⟨number⟩, the more right the shift. Compare

                                                                                                                        \hat{\hat A} gives ˆ Â,  \skew6\hat{\hat A} gives ˆ Â.

Elementary Math Control Sequences

overline a formula  \overline{x + y}  \overline\{x+y\}
underline a formula  \underline{x + y}  \underline\{x+y\}
square root  \sqrt{x + 2}  \sqrt\{x+2\}
higher order roots  \sqrt[n]{x + 2}  \root n\of\{x+2\}
fraction  \frac{n + 1}{3}  \{n+1\over 3\}
fraction, no line  {n + 1 \atop 3}  \{n+1\atop 3\}
binomial coeff.  \binom{n + 1}{3}  \{n+1\choose 3\}
braced fraction  \left\{{n + 1 \atop 3}\right\}  \{n+1\brace 3\}
bracketed fraction  \left[{n + 1 \atop 3}\right]  \{n+1\brack 3\}

The following specify a style for typesetting formulas.

                                                                                                                        \displaystyle \textstyle \scriptstyle \scriptscriptstyle

Non-Italic Function Names

                                                                                                                        \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

a \pmod{m}  a (mod m)  mod with parentheses
a \bmod m  a mod m  mod without parentheses

The following examples use \mathop to create function names.

Example Command  Plain TEX Definition

                                                                                                                        lim_{x→2}  \lim_{x\to2}   \def\lim{\mathop{\rm lim}}
                                                                                                                        log_{2}  \log_2   \def\log{\mathop{\rm log}\nolimits}

Footnotes, Insertions, and Underlines

\footnote⟨marker⟩{⟨text⟩}  footnote
\topinsert⟨vmode material⟩\endinsert insert at top of page
\pageinsert⟨vmode material⟩\endinsert insert on full page
\midinsert⟨vmode material⟩\endinsert insert middle of page
\underbar{⟨text⟩}  underline text
\begin{matrix}c \\ ◯ \end{matrix} 2007 J.H. Silverman, Permissions on back. v1.5

Send comments and corrections to J.H. Silverman, Math. Dept., Brown Univ., Providence, RI 02912 USA. ⟨jhs@math.brown.edu⟩

Useful Parameters and Conversions

\day,\month,\year  the current day, month, year
\jobname  name of current job
\romannumeral⟨number⟩  convert to lower case roman nums.
\uppercase{⟨token list⟩}  convert to upper case
\lowercase{⟨token list⟩}  convert to lower case

Fills, Leaders and Ellipses

Text or Math:  … \dots

Math: . . . \ldots · · · \cdots    ⋮ \vdots  ... \ddots

The following fill space with the indicated item.

\hrulefill  \rightarrowfill  \leftarrowfill  \dotfill

The general format for constructing leaders is

\leaders⟨box or rule⟩\hskip⟨glue⟩ repeat box or rule
\leaders⟨box or rule⟩\hfill  fill space with box or rule

TEX Fonts and Magnification

\rm Roman  \bf Bold  \tt  Typewriter

\sl Slant  \it Italic  \/ “italic correction”
\magnification=⟨number⟩  scale document by n/1000
\magstep⟨number⟩  scaling factor of 1.2^{n} × 1000
\magstephalf  scaling factor of \sqrt{1.2}
\font\FN=⟨fontname⟩  load a font, naming it \FN

\font\FN=⟨fontname⟩ at ⟨dimen⟩ scaled to dimension \font\FN=⟨fontname⟩ scaled ⟨number⟩ scaled by n/1000

true ⟨dimen⟩  dimension with no scaling
\char`\c  print the character or symbol c

Alignment Displays

\settabs⟨number⟩\columns  set equally spaced tabs
\settabs\+⟨sample line⟩\cr  set tabs as per sample line
\+⟨text_{1}⟩&⟨text_{2}⟩&⋯\cr  tabbed text to be typeset
\halign  horizontal alignment
\halign to⟨dimen⟩  horizontal alignment
\openup⟨dimen⟩  add space between lines
\noalign{⟨vmode material⟩}  insert material after any \cr
\tabskip=⟨glue⟩  set glue at tab stops
\omit  omit the template for a column
\span  span two columns
\multispan⟨number⟩  span several columns
\hidewidth  ignore the width of an entry
\crcr  insert \cr if one is not present

Boxes

\hbox to⟨dimen⟩  hbox of given dimension
\vbox to⟨dimen⟩  vbox, bottom justified
\vtop to⟨dimen⟩  vbox, top justified
\vcenter to⟨dimen⟩  vbox, center justified (math only)
\rlap  right overlap material
\llap  left overlap material

Overfull Boxes

\hfuzz  allowable excess in hboxes
\vfuzz  allowable excess in vboxes
\overfullrule  width of overfull box marker. To eliminate

entirely, set \overfullrule=0pt.

Indentation and Itemized Lists

\indent  indent

\noindent  do not indent
\parindent=⟨dimen⟩  set indentation of paragraphs
\displayindent=⟨dimen⟩  set indentation of math displays
\leftskip=⟨dimen⟩  skip space on left
\rightskip=⟨dimen⟩  skip space on right
\narrower  make paragraph narrower
\item{⟨label⟩}  singly indented itemized list
\itemitem{⟨label⟩}  doubly indented itemized list
\hangindent=⟨dimen⟩  hanging indentation for paragraph
\hangafter=⟨number⟩  start hanging indent after line n.

If n < 0, indent first |n| lines.

\parshape=⟨number⟩  general paragraph shaping macro

Headers, Footers, and Page Numbers

\nopagenumbers  turn off page numbering
\pageno  current page number. To get roman nums,

set \pageno=⟨negative number⟩

\folio  current page number, roman num if < 0
\footline  material to put at foot of page
\headline  material to put at top of page. To leave

                    space, set \voffset=2\baselineskip, make
                    room with \advance\vsize by-\voffset.

Macro Definitions

\def\cs{⟨replacement text⟩}  define the macro \cs
\def\cs#1 ⋯ #n{⟨repl. text⟩}  macro with parameters

\let\cs=⟨token⟩ give \cs token’s current meaning Advanced Macro Definition Commands

\long\def  macro whose args may include \par
\outer\def  macro not allowed inside definitions
\global\def or \gdef  definition that transcends grouping
\edef  expand while defining macro

\xdef or \global\edef  global version of \edef

\noexpand⟨token⟩  do not expand token
\expandafter⟨token⟩  expand item after token first

\futurelet\cs⟨tok_{1}⟩⟨tok_{2}⟩ equals \let\cs=⟨tok_{2}⟩⟨tok_{1}⟩⟨tok_{2}⟩

\csname… \endcsname  create a control sequence name
\string\cs  list characters in name, \ c s
\number⟨number⟩  list of characters in number
\the⟨internal quantity⟩  list of tokens giving value of quantity

Conditionals

The general format of a conditional is

\if⟨condition⟩⟨true text⟩\else⟨false text⟩\fi

\ifnum⟨num_{1}⟩⟨relation⟩⟨num_{2}⟩  compare two integers
\ifdim⟨dimen_{1}⟩⟨relation⟩⟨dimen_{2}⟩  compare two dimensions
\ifodd⟨num⟩  test for an odd integer
\ifmmode  test for math mode
\if⟨token_{1}⟩⟨token_{2}⟩  test if character codes agree
\ifx⟨token_{1}⟩⟨token_{2}⟩  test if tokens agree
\ifdim⟨dim_{1}⟩⟨dim_{2}⟩  test if dimensions agree
\ifeof⟨number⟩  test for end of file
\iftrue, \iffalse  always true, always false

\ifcase⟨number⟩⟨text_{0}⟩\or⟨text_{1}⟩\or⋯

\or⟨text_{n}⟩\else⟨text⟩\fi  choose text by ⟨number⟩

\loop α \if… β \repeat loop αβα ⋯ α until \if is false

\newif\ifblob  create a new conditional called \ifblob

\blobtrue, \blobfalse  set conditional \ifblob true, false

Dimensions, Spacing, and Glue

Dimensions are specified as ⟨number⟩⟨unit of measure⟩. Glue is specified as ⟨dimen⟩ plus⟨dimen⟩ minus⟨dimen⟩.

point pt pica pc inch in centimeter cm
m width em x height ex math unit mu millimeter mm
1 pc = 12 pt 1 in = 72.72 pt 2.54 cm = 1 in 18 mu = 1 em
Horizontal Spacing:  \quad (skip 1em) \qquad

                                                               Horizontal Spacing (Text): \thinspace  \enspace  \enskip

                                                               \hskip⟨glue⟩ \hfil  \hfill  \hfilneg

Horizontal Spacing (Math): thin space \, medium space \>

thick space \; neg. thin space \! \mskip⟨muglue⟩

Vertical Spacing:  \vskip⟨glue⟩ \vfil  \vfill
\strut  box w/ ht and depth of “(”, zero width
\phantom{⟨text⟩} invisible box with dim of ⟨text⟩
\vphantom{⟨text⟩} box w/ ht & depth of ⟨text⟩, zero width
\hphantom{⟨text⟩} box w/ width of ⟨text⟩, zero ht & depth
\smash{⟨text⟩}  typeset ⟨text⟩, set ht & depth to zero
\raise⟨dimen⟩\hbox{⟨text⟩}  raise box up
\lower⟨dimen⟩\hbox{⟨text⟩}  lower box down
\moveleft⟨dimen⟩\vbox{⟨text⟩} move box left
\moveright⟨dimen⟩\vbox{⟨text⟩} move box right

                                                               Skip Space Between Lines: \smallskip  \medskip  \bigskip

                                                                   encourage a break  \smallbreak  \medbreak  \bigbreak

break if no room  \filbreak
Set Line Spacing:  \baselineskip = ⟨glue⟩

                                                                   single space  \baselineskip = 12pt
                                                                   1 1/2 space  \baselineskip = 18pt
                                                                   double space  \baselineskip = 24pt

Increase Line Spacing  \openup⟨dimen⟩

                                                                   use \jot’s  1\jot = 3pt

Allow Unjustified Lines  \raggedright
Allow Unjustified Pages  \raggedbottom

Braces and Matrices

\matrix  rectangular array of entries
\pmatrix  matrix with parentheses
\bordermatrix  matrix with labels on top and left
\overbrace  overbrace, may be superscripted
\underbrace  underbrace, may be subscripted

For small matrices in text, use the following constructions:

                                                                   \{a\,b \choose c\,d\}                      \binom{a b}{c d}
                                                                   \left( {a\atop c} {b\atop d} \right) ( a c b d)

Displayed Equations

\eqno  equation number at right
\leqno  equation number at left
\eqalign  display several aligned equations
\eqalignno  display aligned equations numbered at right
\leqalignno  display aligned equations numbered at left
\displaylines  display several equations, centered
\cases  case by case definitions
\noalign  to insert space between lines in displays,

                                                                                  use \noalign{\vskip⟨glue⟩} after any \cr

\openup⟨dimen⟩  add space between all lines in a display

Copyright \begin{matrix}c \\ ◯ \end{matrix} 2007 J.H. Silverman, January 2007 v1.5 Math. Dept., Brown Univ., Providence, RI 02912 USA TEX is a trademark of the American Mathematical Society Permission is granted to make and distribute copies of this card provided the copyright notice and this permission notice are preserved on all copies.