Math & Science ⇒ beamer | Sub-numbering for Equations
-
- Posts: 3
- Joined: Sun Dec 04, 2011 1:50 am
beamer | Sub-numbering for Equations
I am writing a beamer document in which I would like to subnumber the formulas within an array.
It is supposed to look like the following
a = (b*c)*d^(-2) (3')
= (b*c)/d^2 (3'')
Instead of (3') and (3'') it could also read (3a) and (3b)
Any helpful ideas would be appreciated!
It is supposed to look like the following
a = (b*c)*d^(-2) (3')
= (b*c)/d^2 (3'')
Instead of (3') and (3'') it could also read (3a) and (3b)
Any helpful ideas would be appreciated!
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
beamer | Sub-numbering for Equations
Hi,
better use align instead of eqnarray.
For sub-numbering, there's the subequation environment of amsmath. However it's not suitable for alignment. At least you could tag manually, such as
Stefan
better use align instead of eqnarray.
For sub-numbering, there's the subequation environment of amsmath. However it's not suitable for alignment. At least you could tag manually, such as
Code: Select all
\documentclass{beamer}
\usepackage{amsmath}
\begin{document}
\begin{frame}
\begin{align}
a &= (b*c)*d^{-2} \tag{3a}\\
&= (b*c)/d^2 \tag{3b}
\end{align}
\end{frame}
\end{document}
LaTeX.org admin
-
- Posts: 3
- Joined: Sun Dec 04, 2011 1:50 am
Re: beamer | Sub-numbering for Equations
Thanks Stefan for the swift reply. It looks good indeed, but there are 2 problems.
I want to blend in the 2 equations sequentially. It normally works with \pause, but in the align environment \pause does not seem to work.
Equations (3a) and (3b) are part of a series of equations in the document. This means I'll have further equations after (3b), which are supposed to be numbered accordingly. What I mean is that the next equation would have to be numbered with (4), which it does not do when I insert the 2 equations with align.
I want to blend in the 2 equations sequentially. It normally works with \pause, but in the align environment \pause does not seem to work.
Equations (3a) and (3b) are part of a series of equations in the document. This means I'll have further equations after (3b), which are supposed to be numbered accordingly. What I mean is that the next equation would have to be numbered with (4), which it does not do when I insert the 2 equations with align.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
beamer | Sub-numbering for Equations
Somehow I don't see a problem.Stefan_K wrote:[…] For sub-numbering, there's the subequation environment of amsmath. However it's not suitable for alignment. […]
Code: Select all
\documentclass[smaller]{beamer}
\usepackage[T1]{fontenc}
\usepackage{fix-cm}
\usepackage{mathtools} % loads »amsmath«
\begin{document}
\begin{frame}
\begin{subequations}
\begin{align}
a &= (b\cdot c)\cdot d^{-2} \\
&= (b\cdot c)/d^2
\end{align}
\end{subequations}
\end{frame}
\end{document}
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
beamer | Sub-numbering for Equations
Hi Thorsten,
correct, works fine! I just was used to subequations combined with equations, not aligning.
\pause does not work with align, however you could work with \uncover instead:
However, the numbering will be seen on the right side before uncovering.
Stefan
correct, works fine! I just was used to subequations combined with equations, not aligning.
\pause does not work with align, however you could work with \uncover instead:
Code: Select all
\documentclass[smaller]{beamer}
\usepackage[T1]{fontenc}
\usepackage{fix-cm}
\usepackage{mathtools} % loads »amsmath«
\begin{document}
\begin{frame}
\begin{subequations}
\begin{align}
a &= (b\cdot c)\cdot d^{-2} \\
\uncover<2->{&= (b\cdot c)/d^2}
\end{align}
\end{subequations}
\end{frame}
\end{document}
Stefan
LaTeX.org admin
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
beamer | Sub-numbering for Equations
Still a bit annoying. But there seems to exist a workaround for this issue [1]. This could be useful here, too.Stefan_K wrote:[…] However, the numbering will be seen on the right side before uncovering. […]
[1] {TeX} SX – Using align in beamer with overlays
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 3
- Joined: Sun Dec 04, 2011 1:50 am
beamer | Sub-numbering for Equations
Thanks to everyone for the suggestions!
Unfortunately the combination of \subequations, \align and \uncover does not work well together with the rest I have on the slide. I am copying the code below, so you can see yourself what's wrong (which is easier than me explaining in words):
Could IEEEtrantools be the solution?
BTW:
The option posted by localghost (changing the equation directly in its own line) is actually quite nice. Even though I will not use it here its good to know for later use. So thanks for suggesting!
Unfortunately the combination of \subequations, \align and \uncover does not work well together with the rest I have on the slide. I am copying the code below, so you can see yourself what's wrong (which is easier than me explaining in words):
Code: Select all
\begin{frame}
\begin{itemize}
\item Ex ante price for product under design $A$:
\begin{subequations}
\begin{align}
p(b^{*}) & = c + \sigma(v-c-\hat{\rho}(b^{*})\Delta) \\
\uncover<2->{& = c + \sigma(v-c-\hat{\rho}(b^{*})a)- \hat{\rho}(b^{*})h}
\end{align}
\end{subequations}
\item bla
\item bla bla
\pause
\begin{equation}
f = \sigma(v-c-\hat{\rho}(b^{*})a)- \hat{\rho}(b^{*})h
\end{equation}
\end{itemize}
\end{frame}
BTW:
The option posted by localghost (changing the equation directly in its own line) is actually quite nice. Even though I will not use it here its good to know for later use. So thanks for suggesting!