2

In a presentation, when I talk about a previous equation, I think it is better to repeat it than just referencing it. My equations in beamer are numbered. So, I want repeat equation (4.9) after equation (4.12), and then continue the numbering normally:

equation    (4.11)
equation    (4.12)
equation    (4.9)
equation    (4.13)
equation    (4.14)

What is the best way to do it?

Code sample:

\documentclass{beamer}
\usepackage{latexsym}
\usepackage{verbatim}
\usepackage[brazil]{babel}

\newtheorem{remark}{Observação}

\begin{document}

\begin{frame} \frametitle{Norma e medida angular usando produto escalar} \begin{itemize} \item De posse do produto escalar, agora as fórmulas para a norma e para a medida angular podem ser escritas da seguinte maneira: \begin{equation}\label{E:NormaProdEscalar} \lVert\vec{v}\rVert = \sqrt{\vec{v}\cdot\vec{v}}, \end{equation} \begin{equation}\label{E:CosAngProdEscalar} \cos \theta = \frac{\vec{u}\cdot\vec{v}}{\lVert\vec{u}\rVert\lVert\vec{v}\rVert}. \end{equation} \end{itemize} \end{frame}

\begin{frame} \frametitle{Definição geométrica de produto escalar} \begin{remark} \begin{enumerate}[(a)] \item Nós definimos o produto escalar algebricamente, num sistema de coordenadas ortogonal, mas ele também pode ser definido geometricamente, sem coordenadas, pela equação~\eqref{E:CosAngProdEscalar}: \begin{equation}\label{E:ProdEscalarGeom} \vec{u}\cdot\vec{v} = \lVert\vec{u}\rVert\lVert\vec{v}\rVert \cos \theta, \end{equation} onde $\theta = \mathrm{ang}(\vec{u},\vec{v})$. \item Mas atenção: embora não seja necessário um sistema de coordenadas ortogonal para definirmos produto escalar, a fórmula \begin{equation}\label{E:ProdEscalarCoord2} (u_1, \dots, u_n)\cdot(v_1, \dots, v_n) = u_1v_1 + \dots + u_nv_n, \end{equation} \emph{só pode ser usada num sistema de coordenadas ortogonal}. \end{enumerate} \end{remark} \end{frame}

\begin{frame} \frametitle{Definição geométrica de produto escalar} \addtocounter{remark}{-1} \begin{remark} (Continuação) \begin{enumerate}[(a)]\addtocounter{enumi}{2} \item O mesmo vale para norma: ela pode ser definida geometricamente, sem coordenadas, aproveitando uma definição geométrica prévia do produto escalar: \begin{equation} \lVert\vec{v}\rVert = \sqrt{\vec{v}\cdot\vec{v}}, \tag{1} \end{equation} mas a fórmula \begin{equation}\label{E:NormaCoord2} \lVert(v_1, \dots, v_n)\rVert = \sqrt{v_1^2 + \dots + v_n^2}, \end{equation} \emph{só pode ser usada num sistema de coordenadas ortogonal.} \end{enumerate} \end{remark} \end{frame}

\end{document}

Notice I used tag{1} to repeat the number of a previous equation. This is not a good way to repeat a previous value of a counter, because that value may change, say to 2, and if this happens, I would have to change manually tag{1} to tag{2}.

page 1 page 2 page 3

João Alves Jr.
  • 261
  • 1
  • 8

1 Answers1

4

You could use \tag{\ref{E:NormaProdEscalar}} to avoid the hard coded equation number:

\documentclass{beamer}
\usepackage{latexsym}
\usepackage{verbatim}
\usepackage[brazil]{babel}

\newtheorem{remark}{Observação}

\usepackage{thm-restate}

\begin{document}

\begin{frame} \frametitle{Norma e medida angular usando produto escalar} \begin{itemize} \item De posse do produto escalar, agora as fórmulas para a norma e para a medida angular podem ser escritas da seguinte maneira: \begin{equation}\label{E:NormaProdEscalar} \lVert\vec{v}\rVert = \sqrt{\vec{v}\cdot\vec{v}}, \end{equation} \begin{equation}\label{E:CosAngProdEscalar} \cos \theta = \frac{\vec{u}\cdot\vec{v}}{\lVert\vec{u}\rVert\lVert\vec{v}\rVert}. \end{equation} \end{itemize} \end{frame}

\begin{frame} \frametitle{Definição geométrica de produto escalar} \begin{remark} \begin{enumerate}[(a)] \item Nós definimos o produto escalar algebricamente, num sistema de coordenadas ortogonal, mas ele também pode ser definido geometricamente, sem coordenadas, pela equação~\eqref{E:CosAngProdEscalar}: \begin{equation}\label{E:ProdEscalarGeom} \vec{u}\cdot\vec{v} = \lVert\vec{u}\rVert\lVert\vec{v}\rVert \cos \theta, \end{equation} onde $\theta = \mathrm{ang}(\vec{u},\vec{v})$. \item Mas atenção: embora não seja necessário um sistema de coordenadas ortogonal para definirmos produto escalar, a fórmula \begin{equation}\label{E:ProdEscalarCoord2} (u_1, \dots, u_n)\cdot(v_1, \dots, v_n) = u_1v_1 + \dots + u_nv_n, \end{equation} \emph{só pode ser usada num sistema de coordenadas ortogonal}. \end{enumerate} \end{remark} \end{frame}

\begin{frame} \frametitle{Definição geométrica de produto escalar} \addtocounter{remark}{-1} \begin{remark} (Continuação) \begin{enumerate}[(a)]\addtocounter{enumi}{1} \item O mesmo vale para norma: ela pode ser definida geometricamente, sem coordenadas, aproveitando uma definição geométrica prévia do produto escalar: \begin{equation} \lVert\vec{v}\rVert = \sqrt{\vec{v}\cdot\vec{v}}, \tag{\ref{E:NormaProdEscalar}} \end{equation} mas a fórmula \begin{equation}\label{E:NormaCoord2} \lVert(v_1, \dots, v_n)\rVert = \sqrt{v_1^2 + \dots + v_n^2}, \end{equation} \emph{só pode ser usada num sistema de coordenadas ortogonal.} \end{enumerate} \end{remark} \end{frame}

\end{document}