我想要一组方程,所有方程都在同一个数字下,但有一个“主”方程,后面还有一些其他方程,用子数字标记,例如
1 = 1 (1)
1 < 2 (1a)
1 > 0 (1b)
我怎样才能实现这个目标?
答案1
用于\tag
获取主号码:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations}\label{first:main}
First some separate equations
\begin{equation}
1=1 \tag{\ref{first:main}}
\end{equation}
and another
\begin{equation}
1>0 \label{first:a}
\end{equation}
and another
\begin{equation}
1<2 \label{first:b}
\end{equation}
\end{subequations}
\begin{subequations}\label{second:main}
But it works also with \texttt{align} and the other alignment
environments
\begin{align}
1 &= 1 \tag{\ref{second:main}}\\
1 &> 0 \label{second:a}\\
1 &< 2 \label{second:b}
\end{align}
and you can reference all of them, as seen below.
\end{subequations}
Here are some references: \eqref{first:main}, \eqref{first:a}
and \eqref{second:b}.
\end{document}