Math & ScienceSubequations

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Lumy
Posts: 24
Joined: Tue Jan 06, 2009 2:41 pm

Subequations

Post by Lumy »

Hello,

How do I write equation numbering style

(1a)
(2a)
(2b)
(3a)
(3b)
(1b)
(4)
(4a)
(4b)?

-------------------------------------
\begin{subequations}\label{1}
\begin{equation}\label{1a}
\end{equation}
\end{subequations}
\begin{subequations}\label{2}
\begin{equation}\label{2a}
\end{equation}
\begin{equation}\label{2b}
\end{equation}
\end{subequations}
\begin{subequations}\label{3}
\begin{equation}\label{3a}
\end{equation}
\begin{equation}\label{3b}
\end{equation}
\end{subequations}
\begin{subequations}
\begin{equation}\label{1b}
\end{equation}
\end{subequations}
\begin{equation}\label{4}
\end{equation}
etc

Don't work (1b).
Tkank you very much.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
eimund
Posts: 6
Joined: Mon Jul 20, 2009 1:09 pm

Subequations

Post by eimund »

This should work

Code: Select all

\begin{subequations}\label{1}
\begin{equation}\label{1a}
\end{equation}
\end{subequations}
\begin{subequations}\label{2}
\begin{equation}\label{2a}
\end{equation}
\begin{equation}\label{2b}
\end{equation}
\end{subequations}
\begin{subequations}\label{3}
\begin{equation}\label{3a}
\end{equation}
\begin{equation}\label{3b}
\end{equation}
\end{subequations}
\setcounter{equation}{0}
\begin{subequations}
\begin{equation}\setcounter{equation}{2}\label{1b}
\end{equation}
\end{subequations} 
\begin{equation}\setcounter{equation}{4}\label{4}
\end{equation}
Regards
Eimund Smestad
Lumy
Posts: 24
Joined: Tue Jan 06, 2009 2:41 pm

Re: Subequations

Post by Lumy »

Thank you.

But, there is a way to not use the instruction "\setcounter"?


Thank you very much.
eimund
Posts: 6
Joined: Mon Jul 20, 2009 1:09 pm

Re: Subequations

Post by eimund »

I do not think so, however I am not 100% sure (but close). The problem is that equation counter increments every time you use \begin{equation}, it will not increment if you use \begin{equation*} and the number will not appear for this equation. But to actually jump in numbers you have to set a new value in the counter, since \begin{equation} gets it's number from the equation counter, and then that is the job of \setcounter. \label has nothing to do with the counter, it is just a tag for the equation, so you can put a reference to it elsewhere in your text by \ref.

Eimund
Post Reply