texish

Command Cheat Sheet

A quick index of the commands. Those marked (format) require \use{document}; the rest are engine primitives available in any document.

A quick index of the commands. Those marked (format) require \use{document}; the rest are engine primitives available in any document.

Document structure (format)

CommandEffect
\title{…} \author{…} \date{…}set the title-block fields
\maketitletypeset the centered title block
\begin{abstract}…\end{abstract}a centered, indented summary
\section{…} \subsection{…}auto-numbered headings
\begin{itemize} \begin{enumerate} \itembulleted and numbered lists
\begin{quote} \begin{quotation}indented quotation blocks
\footnote{…}a numbered footnote
\figure[htb]{…} \table[htb]{…} \caption{…}floats with numbered captions

Text and markup

CommandEffect
\emph{…} \textit{…} \textbf{…}italic, italic, bold
\texttt{…}monospaced (Latin Modern Mono)
\color{name} \textcolor{name}{…}pen colour (CSS name or #RRGGBB)
\href{url}{text} \url{url}clickable links (real PDF annotations)
\TeX \LaTeX \TeXishthe logos
…’’ `` -- --- ... ~quotes, dashes, ellipsis, tie

Mathematics

CommandEffect
$…$ $$…$$inline and display math
^ _super/subscript
\frac{a}{b} a \over bfractions
\sqrt{x} \sqrt[3]{x}roots
\sum \int \prod \limitsbig operators
\left( … \right)stretchy delimiters
\hat \vec \widehataccents
\text{…} \mathcal{…}upright / calligraphic
\matrix \pmatrix \bmatrix \casesmatrices
\eqno(…)display equation number

Boxes, spacing, and pages

CommandEffect
\hbox \vbox \vtopexplicit boxes
\centerline \leftline \rightline \centeringalignment
\rlap \llapzero-width overlap boxes
\kern \hskip \vskiprigid / glue spacing
\smallskip \medskip \bigskipnamed vertical gaps
\vfil \vfill \hfil \hssstretchable fill
\lower \raiseshift a box vertically
\penalty \nobreak \ejectpage-break control

Images and graphics

CommandEffect
\includegraphics[width=,height=,scale=]{path}place a PNG or JPEG
\picture width:… height:… {…}open a vector-graphics drawing

Macros and programming

CommandEffect
\def name args {body}define a macro ([name:default] optional args)
\newenvironment name {begin}{end}define a \begin/\end environment
\let \global \gdefaliasing and global definitions
\if \ifx \else \ficonditionals
\calc{…} \+ \- \* \/arithmetic
\for … \doneiteration
\newcounter \stepcounter \value \arabic/\roman/\Roman/\alph/\Alphcounters and number formatting
\use{name} \include{path}load a format / include raw input

Units

pt (the base unit, 1/72 in), in, cm, mm, em, ex.

Search

Esc
to navigate to open Esc to close