我能够使用以下命令编写方程式列表:
\documentclass[11pt, oneside]{report}
\usepackage{tocloft}
\usepackage{amsmath}
\begin{document}
\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%
\addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par}
\listofmyequations
\chapter{Chapter 1}
\section{Section 1}
\begin{equation}
\label{eq:GeocentricLatitude}
\varphi^{\prime} = \arctan \left[ \left( 1 - e^2 \right) \tan \left(\varphi \right) \right]
\end{equation}
\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}
问题出在eqnarray
环境内部,因为我不知道如何引用里面的两个方程式以便用列出它们myequations{}
。
谢谢
答案1
像这样吗?
为此你需要稍微改变你的代码:
\documentclass[11pt, oneside]{report}
\usepackage{tocloft}
\usepackage{amsmath}
\begin{document}
\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[2]{%
\addcontentsline{equ}{myequations}{\protect\numberline{\ref{#2}}#1}\par}
\listofmyequations
\chapter{Chapter 1}
\section{Section 1}
\begin{equation}
\label{eq:GeocentricLatitude}
\varphi^{\prime} = \arctan \left[ \left( 1 - e^2 \right) \tan \left(\varphi \right) \right]
\end{equation}
\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}
如您所见,我重新定义了您的宏。我使用\myequations
而不是。因此,宏现在有两个选项。\theequations
\ref{#2}
当然,这是粗鲁的解决方案,所以还有地方可以找到更优雅的解决方案。例如,使用方程式名称作为标签等。