Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to display equation in LaTeX

📅 2014-May-28 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ equation, latex ⬩ 📚 Archive

% How to display equation in LaTeX

% Simple equation with no numbering
\begin{equation*}
x = y + z
\end{equation*}

% Equation with numbering
\begin{equation}
x = y + z
\end{equation}

% Equation with numbering (and label)
\begin{equation}
x = y + z
\label{eq:foo}
\end{equation}

% Multiple equations that are aligned
\begin{align*}
x = y + z \\
a = b + c \\
p = q + r
\end{align*}

% Multiple equations with no alignment
\begin{gather*}
x = y + z \\
a = b + c \\
p = q + r
\end{gather*}

Tried with: Ubuntu 14.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧