如何从两边对数学等式进行编号?

如何从两边对数学等式进行编号?

我想要实现的目标是这样的:

(1) E = mc^2 (equivalence mass-energy)

即我想要一个标签在右侧一般号码在左侧。

最初的方法只能满足我一半的需求:

\begin{equation}\label{eq:equivalence-mass-energy}
E=mc^2 \tag{equivalence mass-energy}
\end{equation}

然后,我如何控制交叉引用中显示的内容(数字或标签)?

答案1

其中一个应该可以解决问题:

\documentclass{article}
\usepackage[utf8]{inputenc}%
\usepackage[leqno]{amsmath}
\usepackage{nccmath} %
\usepackage{cleveref}

\begin{document}

\begin{flalign}
  &&E&=mc²&&\llap{\footnotesize(equivalence mass-energy)}\label{Ein}\\
  & & L & = m\Bigl(c²-\mfrac12 v²\Bigl) & & \llap{\footnotesize\parbox[t]{0.25\linewidth}{(Poincaré's equation for the lagrangian of an electron)}}\label{Zwei}%
\end{flalign}
\Cref{Ein} is essentially the same as \cref{Zwei}. %

\begin{alignat}{2}
  \hspace{6.5em} E & =mc² & \hspace{6.5em} & \rlap{\footnotesize(equivalence mass-energy)}\label{Ein-a} \\
  L & = m\Bigl(c²-\mfrac12 v²\Bigl) & & \rlap{\footnotesize\parbox[t]{0.25\linewidth}{(Poincaré's equation for the lagrangian of an electron)}}\label{Zwei-a}%
\end{alignat}
Another layout for \cref{Ein-a,Zwei-a}. %

\end{document} 

在此处输入图片描述

相关内容