Tuesday, January 19, 2010

Numbering equations 1a, 1b etc in TeX

This is how it's done:

One nice trick is if you want equations with lettered sublabels - 1a, 1b, etc. First you must include the amsmath package, and the enclose the relevant equations in the 'subequations' environment like this:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
...
\begin{subequations}
\begin{eqnarray}
x
&=& y^2 \\
&=& (a-b)^2 \nonumber \\
&=&
c
\end{eqnarray}
\end{subequations}
...
\end{document}

where the \nonumber command suppresses numbering of that line. You can use any number of ordinary equations or equation arrays inside the subequations environment.

No comments:

Post a Comment