Math & Science ⇒ beamer | Sub-numbering for Equations
-
- Posts: 3
- Joined: Sun Dec 04, 2011 1:50 am
beamer | Sub-numbering for Equations
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!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
beamer | Sub-numbering for Equations
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}
-
- Posts: 3
- Joined: Sun Dec 04, 2011 1:50 am
Re: beamer | Sub-numbering for Equations
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
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
beamer | Sub-numbering for Equations
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
- 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
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
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!