# List of equations including the ones inside eqnarray

I am able to write my list of equations with the following commands:

\documentclass[11pt, oneside]{report}
\usepackage{tocloft}
\usepackage{amsmath}

\begin{document}

\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%

\listofmyequations

\chapter{Chapter 1}
\section{Section 1}
$$\label{eq:GeocentricLatitude} \varphi^{\prime} = \arctan \left[ \left( 1 - e^2 \right) \tan \left(\varphi \right) \right]$$
\myequations{Geocentric latitude}

\begin{eqnarray}
e^2 = 1- \left(\dfrac{b}{a}\right)^2 = 0.006694379 \label{eq:FirstEccentricitySquared}\\
e^{\prime 2} = \dfrac{a^2}{b^2} -1 = 0.00673949674 \label{eq:SecondEccentricitySquared}
\end{eqnarray}
\myequations{First Eccentricity Squared}

\end{document}


The problem comes within the eqnarray environment, because I don't know how to refer to the two equations inside in order to list them with myequations{}.

Thank you

• Off-topic: eqnarray is basically deprecated! Use align or alignat instead – user31729 Sep 20 '15 at 10:57
• I was actually using alignat, but the problem is still the same. – Zynk Sep 20 '15 at 11:13
• That's what I said off-topic. It has nothing to with your labelling problem – user31729 Sep 20 '15 at 11:17

Something like this?

For this you need slightly to change your code:

\documentclass[11pt, oneside]{report}
\usepackage{tocloft}
\usepackage{amsmath}

\begin{document}

\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[2]{%

\listofmyequations

\chapter{Chapter 1}
\section{Section 1}
$$\label{eq:GeocentricLatitude} \varphi^{\prime} = \arctan \left[ \left( 1 - e^2 \right) \tan \left(\varphi \right) \right]$$
\myequations{Geocentric latitude}{eq:GeocentricLatitude}

\begin{align}
e^2
& = 1- \left(\dfrac{b}{a}\right)^2 = 0.006694379
\label{eq:FirstEccentricitySquared}\\
e^{\prime 2}
& = \dfrac{a^2}{b^2} -1 = 0.00673949674
\label{eq:SecondEccentricitySquared}
\end{align}
\myequations{First Eccentricity Squared}{eq:FirstEccentricitySquared}
\myequations{Second Eccentricity Squared}{eq:SecondEccentricitySquared}

\end{document}


As you see, I redefined your macro \myequations. Instead of \theequations I use \ref{#2}. Consequently, macro now have two options.

Of course, this is rude solution, so there is place to find more elegant solution. For example, use equations names for labels, etc.

• Yes, this works perfectly, thank you so much! – Zynk Sep 20 '15 at 11:16