LaTeX
Tables
Simple table
\begin{tabular}[<pos>]{<cols>}
<content>
\end{tabular}
<pos>
: [c]
to center the table to the text baseline (default), [t]
for top alignment, [b]
for bottom alignment.<cols>
: alignment and borders of each column. l
: left-justified column.c
: centered column.r
: right-justified column.p{<width>}
: paragraph column with top vertical alignment.m{<width>}
: paragraph column with middle vertical alignment (needs array
package).b{<width>}
: paragraph column with bottom vertical alignment (needs array
package).|
: vertical line.||
: double vertical line.*{<n>}{<format>}
: the format is repeated n
times (e.g. *{3}{|l}|
equals |l|l|l|
).
Span multiple columns
\multicolumn{<ncols>}{<align>}{<text>}
<ncols>
: number of columns to span.<align>
: text alignment (e.g. l
, c
, r
).
Span multiple rows
\usepackage{multirow}
\multirow[<vpos>]{<nrows>}[<bigstruts>]{<width>}[<vmove>]{<text>}
<vpos>
: [c]
for vertically centered (default), [t]
for top alignment, [b]
for bottom alignment.<nrows>
: number of rows to span.<width>
: text width, or *
(natural width), or =
.<vmove>
: length for fine-tuning.
Span multiple rows and columns
\begin{tabular}{|c|c|c|c|} \hline
1 & 2 & 3 & 4 \\ \hline
2 & \multicolumn{2}{|c|}{\multirow{2}{*}{A}} & \multirow{2}{*}{B} \\ \cline{1-1}
3 & \multicolumn{2}{|c|}{} & \\ \hline
4 & \multicolumn{2}{|c|}{C} & D \\ \hline
\end{tabular}
Quality tables
\usepackage{booktabs}
\begin{tabular}{@{}llr@{}} \toprule
\multicolumn{2}{c}{Item} & \\ \cmidrule(r){1-2}
Vegetable & Description & Price (\$) \\ \midrule
Carrots & per gram & 13.65 \\
& each & 0.01 \\
Spinach & fresh & 92.50 \\
Broccoli & frozen & 8.99 \\ \bottomrule
\end{tabular}
Greek letters
Symbol | LaTeX | Symbol | LaTeX | Symbol | LaTeX |
---|
α | \alpha | | | | |
β | \beta | | | | |
γ | \gamma | Γ | \Gamma | | |
δ | \delta | Δ | \Delta | | |
ϵ | \epsilon | | | ε | \varepsilon |
ζ | \zeta | | | | |
η | \eta | | | | |
θ | \theta | Θ | \Theta | ϑ | \vartheta |
ι | \iota | | | | |
κ | \kappa | | | ϰ | \varkappa |
λ | \lambda | Λ | \Lambda | | |
μ | \mu | | | | |
ν | \nu | | | | |
ξ | \xi | Ξ | \Xi | | |
π | \pi | Π | \Pi | ϖ | \varpi |
ρ | \rho | | | ϱ | \varrho |
σ | \sigma | Σ | \Sigma | ς | \varsigma |
τ | \tau | | | | |
υ | \upsilon | Υ | \Upsilon | | |
ϕ | \phi | Φ | \Phi | φ | \varphi |
χ | \chi | | | | |
ψ | \psi | Ψ | \Psi | | |
ω | \omega | Ω | \Omega | | |
ϝ | \digamma | | | | |