嗨,我正在 iopart 文档中编写,因此,令人沮丧的是,amsmath 似乎不是一个选项。尽管如此,我在一行上有三个方程式,如下所示:
\begin{equation}
some equation, \qquad
another equation, \qquad
third equation,
\end{equation}
我希望方程编号为 (4,5,6),而不是像现在这样只是 (4)。我会使用 tag 命令并手动标记它,但由于 amsmath 不可用,tag 命令不起作用。任何帮助都将不胜感激。谢谢
答案1
对于一次性案例,您可以手动执行此操作:
\documentclass[12pt]{iopart}
\makeatletter
\newcommand{\advancethree}[3]{%
\stepcounter{equation}%
\edef\@currentlabel{\theequation}\label{#1}%
\edef\temp{\theequation, }%
\stepcounter{equation}%
\edef\@currentlabel{\theequation}\label{#2}%
\edef\temp{\temp\theequation, }%
\stepcounter{equation}%
\edef\@currentlabel{\theequation}\label{#3}%
\edef\temp{\temp\theequation}%
\renewcommand{\theequation}{\temp}%
}
\let\ORItheequation\theequation
\newcommand{\restore}{\addtocounter{equation}{-1}\let\theequation\ORItheequation}
\makeatother
\begin{document}
\advancethree{one}{two}{three}
\begin{equation}
1+1=2\qquad
2+2=4\qquad
3+3=6
\end{equation}\restore
Another equation
\begin{equation}
4+4=8
\end{equation}
Here are the references: \ref{one}, \ref{two} and \ref{three}.
\end{document}