Hello,
I'm trying to have the situation as below:
my first equation ... (1)
my second equation .. (2)
my third equation ... (3a)
my fourth equation .. (3b)
my fifth equation ... (4)
and would like these all in the same align environment so as to not require the need to manually remove whitespace.
Obviously one 'solution' is
\begin{align}
first equation\\
second equation
\end{align}
\begin{subequations}
\begin{align}
third equation\\
fourth equation
\end{align}
\end{subequations}
\begin{align}
fifth equation
\end{align}
but as mentioned, this is not desirable as the whitespace would need to be played around with. Is there a known way to include subequations inside align tags?
Many thanks
Math & Science ⇒ Subequations within Align/Gather environment
-
- Posts: 2
- Joined: Wed Jan 19, 2011 3:24 pm
Subequations within Align/Gather environment
Last edited by davidnsibs on Thu Jan 20, 2011 12:09 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Subequations within Align/Gather environment
I'd probably define some commands of my own, perhaps something like this?
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\newcounter{subeq}
\renewcommand{\thesubeq}{\theequation\alph{subeq}}
\newcommand{\newsubeqblock}{\setcounter{subeq}{0}\refstepcounter{equation}}
\newcommand{\mysubeq}{\refstepcounter{subeq}\tag{\thesubeq}}
\begin{document}
\begin{align}
1+1&=2\\
2+2&=4\\
\newsubeqblock
\mysubeq 3+3&=6 \\
\mysubeq 3+3&=4+2 \\
4+4&= 8
\end{align}
\end{document}
-
- Posts: 2
- Joined: Wed Jan 19, 2011 3:24 pm
Re: Subequations within Align/Gather environment
That is fantastic, thank you!
-
- Posts: 1
- Joined: Wed Feb 26, 2014 4:54 am
Re: Subequations within Align/Gather environment
Yes, this is very good! Thank you, frabjous!
How can you label a complete subeqblock? Something like the following (that doesn't work):
\begin{document}
\begin{align}
1+1&=2\\
2+2&=4\\
\newsubeqblock\label{eq:block}
\mysubeq 3+3&=6 \\
\mysubeq 3+3&=4+2 \\
4+4&= 8
\end{align}
\end{document}
This is reference to a complete subeqblock \eqref{eq:block}
How can you label a complete subeqblock? Something like the following (that doesn't work):
\begin{document}
\begin{align}
1+1&=2\\
2+2&=4\\
\newsubeqblock\label{eq:block}
\mysubeq 3+3&=6 \\
\mysubeq 3+3&=4+2 \\
4+4&= 8
\end{align}
\end{document}
This is reference to a complete subeqblock \eqref{eq:block}