[Tex/LaTex] List of equations, including equation contents and caption

content-replicationequationsetoctable of contents

I would like to automatically generate a list of equations present in the document, which includes the equation itself. Here is a MWE:

\documentclass{article}
\def\caption#1{}
\begin{document}
First Euler observed that
\begin{equation}
1 + e^{i \Pi} = 0.
\caption{Euler's equation tying together the five fundamental constants of mathematics}
\end{equation}

Then, Gauss discovered the normal distribution:
\begin{equation}
P(x) = \frac{1}{{\sigma \sqrt {2\pi } }}e^{{{ - \left( {x - \mu } \right)^2 } \mathord{\left/ {\vphantom {{ - \left( {x - \mu } \right)^2 } {2\sigma ^2 }}} \right. \kern-\nulldelimiterspace} {2\sigma ^2 }}}
\caption{Normal distribution}
\end{equation}

Finally, Einstein proclaimed: 
\begin{equation}
E = m C^2
\caption{Equivalence of mass and energy}
\end{equation}

\end{document}

Here is an example of how the output might look, but any other format may be fine; it would of course be nice to have hyperref links, page numbers, etc, but these are not essential.

\section*{List of equations}
\begin{enumerate}
  \item Euler's equation tying together the five fundamental constants of mathematics
        \[
          1 + e^{i \Pi} = 0.
        \]
  \item Normal distribution:
        \[
          P(x) = \frac{1}{{\sigma \sqrt {2\pi } }}e^{{{ - \left( {x - \mu } \right)^2 } \mathord{\left/ {\vphantom {{ - \left( {x - \mu } \right)^2 } {2\sigma ^2 }}} \right. \kern-\nulldelimiterspace} {2\sigma ^2 }}}
        \]
  \item Equivalence of mass and energy
        \[
          E = m C^2
        \]
\end{enumerate}

Best Answer

Since you want a cheat sheet, I'd recommend the extract package. With a slightly different MWE:

\documentclass{article}
\usepackage[
  active,
  header=false,
  copydocumentclass=true,
  generate=\jobname-Cheatsheet,
  extract-env={equation},
  extract-cmdline={synopsis},
  ]{extract} % http://ctan.org/pkg/extract
\begin{extract*}
% Items executed in both the main and extracted document
% (extract manual, section 5.1)
\usepackage{amsmath}
\end{extract*}
\begin{extract}
% Items executed only in extracted document
\def\synopsis#1{#1}
\end{extract}
\def\synopsis#1{}
\begin{document}
First Euler observed that
\synopsis{Euler's equation tying together the five fundamental constants of mathematics}%
\begin{equation}
1 + e^{i \Pi} = 0.
\end{equation}

Then, Gauss discovered the normal distribution:
\synopsis{Normal distribution}%
\begin{equation}
P(x) = \frac{1}{{\sigma \sqrt {2\pi } }}e^{{{ - \left( {x - \mu } \right)^2 } \mathord{\left/ {\vphantom {{ - \left( {x - \mu } \right)^2 } {2\sigma ^2 }}} \right. \kern-\nulldelimiterspace} {2\sigma ^2 }}}
\end{equation}

Finally, Einstein proclaimed: 
\synopsis{Equivalence of mass and energy}%
\begin{equation}
E = m C^2
\end{equation}
\end{document}

you get an original document of:

enter image description here

and an extracted document of:

\documentclass{article}
% Items executed in both the main and extracted document
% (extract manual, section 5.1)
\usepackage{amsmath}
% Items executed only in extracted document
\def\synopsis#1{#1}

\begin{document}

\synopsis{Euler's equation tying together the five fundamental constants of mathematics}%

\begin{equation}
1 + e^{i \Pi} = 0.
\end{equation}

\synopsis{Normal distribution}%

\begin{equation}
P(x) = \frac{1}{{\sigma \sqrt {2\pi } }}e^{{{ - \left( {x - \mu } \right)^2 } \mathord{\left/ {\vphantom {{ - \left( {x - \mu } \right)^2 } {2\sigma ^2 }}} \right. \kern-\nulldelimiterspace} {2\sigma ^2 }}}
\end{equation}

\synopsis{Equivalence of mass and energy}%

\begin{equation}
E = m C^2
\end{equation}

\end{document}

and:

enter image description here

This also works with your original \caption command.