Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to put all the equations of my presentation made with Beamer into a single table to summarize them. They are however in various frames within \align environments. How can I achieve this?

share|improve this question
    
Welcome to TeX.SX. Note that you don't have to sign with your name since it automatically appears in the lower right corner of your post. Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  Claudio Fiandrino Nov 28 '12 at 15:33
add comment

2 Answers 2

Here's a solution that borrows from Write content of box to a file

I've used the etoolbox to wrap the align and equation environment with

% surround the align environment with
%   \begin{lrbox}{\mybox}
%       \begin{minipage}{\linewidth}
% 
%       CONTENT
%       
%       \end{minipage}
%   \end{lrbox}

which saves the content to the box \mybox; the content is of course outputted to the screen, but it is also saved for use later on in the box \savedeqns

screenshot

\documentclass{beamer}
\usepackage{amsmath}
\usepackage{etoolbox}

% to store the contents of a SINGLE equation
\newsavebox{\mybox}

% to store the contents of ALL of the equations
\newbox\savedqns
\setbox\savedqns\vbox{}

% surround the align environment with
%   \begin{lrbox}{\mybox}
%       \begin{minipage}{\linewidth}
% 
%       CONTENT
%       
%       \end{minipage}
%   \end{lrbox}
\BeforeBeginEnvironment{align}{\begin{lrbox}{\mybox}\noindent\begin{minipage}{\linewidth}}
\AfterEndEnvironment{align}{%
        \end{minipage}%
        \end{lrbox}%
        \vspace{\abovedisplayskip}%
        \noindent\usebox{\mybox}%
       % save the equations for later
         \global\setbox\savedqns\vbox{%
           \unvbox\savedqns
             \bigskip
               \filbreak
                 \noindent\usebox{\mybox}}%
        }

% do the same for the equation environment
\BeforeBeginEnvironment{equation}{\begin{lrbox}{\mybox}\noindent\begin{minipage}{\linewidth}}
\AfterEndEnvironment{equation}{%
        \end{minipage}%
        \end{lrbox}%
        \vspace{\abovedisplayskip}%
        \noindent\usebox{\mybox}%
       % save the equations for later
         \global\setbox\savedqns\vbox{%
           \unvbox\savedqns
             \bigskip
               \filbreak
                 \noindent\usebox{\mybox}}%
        }


\begin{document}

\begin{frame}{An align environment...}
\begin{align}
  y&=x^2+2\\
  &=2+x^2
\end{align}
\end{frame}

\begin{frame}{An equation environment...}
\begin{equation}
  y=mx+b
\end{equation}
\end{frame}

\begin{frame}{My very important equations- SUMMARY}
\unvbox\savedqns
\end{frame}
\end{document}
share|improve this answer
add comment

You can use the collect* environment from the collect package; a simple example:

\documentclass{beamer}
\usepackage{collect}

\definecollection{equations}

\begin{document}

\begin{frame}
\frametitle{A frame with an equation}
\begin{collect*}{equations}{}{}{}{}
\begin{align*}
a &= b \\
&=c.  
\end{align*}
\end{collect*}
\end{frame}

\begin{frame}
\frametitle{Another frame with an equation}
\begin{collect*}{equations}{}{}{}{}
\begin{align*}
x &= y \\
&=z.  
\end{align*}
\end{collect*}
\end{frame}

\begin{frame}
\frametitle{List of Equations}
\includecollection{equations}
\end{frame}

\end{document}

enter image description here

share|improve this answer
1  
Will this work for numbered equations in an align environment as well? –  user17947 Nov 28 '12 at 15:57
1  
@user17947 some work will have to be done for the correct display of the counters. –  Gonzalo Medina Nov 28 '12 at 16:03
    
\notag \vskip -1.5em? –  user17947 Nov 28 '12 at 16:35
    
@user17947 so you want to suppress the numbering in the final list? –  Gonzalo Medina Nov 28 '12 at 17:01
    
no. I would like to retain it. There is a problem with allowframebreaks option when I include the collection as a list of equations in the end inside the last frame. The equations are not visible. –  user17947 Nov 28 '12 at 18:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.