Back to Teaching Page

LaTeX Software


Custom Names for Equations

\begin{equation}\label{zzz}\tag{P1}
c^2 = a^2 + b^2
\end{equation}

Split-level Fractions

\documentclass{article}
\usepackage{xfrac}
\begin{document}
$\sfrac{12}{3}$
\end{document}

Tcolorbox

\usepackage{tcolorbox}

\begin{tcolorbox}[
    boxrule = 0.5pt, colback = green!10!white,
    grow to left by = -1in, grow to right by = -1in,
    enlarge top by = 0.1in, enlarge bottom by = 0.1in]
$c^2=a^2+b^2$
\end{tcolorbox}

Change space in listing globally

\usepackage{enumitem}
\setlist[enumerate]{itemsep=1pt, topsep=1pt}

Align (right) in matrices

\begin{pmatrix*}[r]
1 & -2\\
-1 & 3
\end{pmatrix*}

Spacing in arrays

\[
\arraycolsep = 10pt
\def\arraystretch{2.2}
\begin{array}{c|c}
a & b\\
c & d
\end{array}
\]