并列的方程式,每个方程式都有编号

并列的方程式,每个方程式都有编号

align命令amsmath允许我将两个方程式并排放置:

\begin{align}
x = y && a = b
\end{align}

不幸的是,对于我的目的而言,这将两个方程都显示在同一个方程编号下:

x = y    a = b   (1)

有没有办法给他们单独的数字,以便输出看起来像这样?:

x = y (1)    a = b (2)

答案1

\usepackage{multicol}
...
\begin{multicols}{2}
  \begin{equation}
    a=b
  \end{equation}\break
  \begin{equation}
    b=c
  \end{equation}
\end{multicols}

答案2

您可以使用minipages 来包装方程式:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\noindent\begin{minipage}{.5\linewidth}
\begin{equation}
  a = b + c.
\end{equation}
\end{minipage}%
\begin{minipage}{.5\linewidth}
\begin{equation}
  d = e + f.
\end{equation}
\end{minipage}

\end{document}

在此处输入图片描述

答案3

这是另一种尝试。该\doubleequation命令有一个可选参数来设置标签。如果使用,它必须呈 形状firstlabel,secondlabel

\documentclass{article}
\usepackage{amsmath}
\usepackage{calc}
\usepackage{hyperref}
\hypersetup{colorlinks=true}

\makeatletter
\newcommand*\@dblLabelI {}
\newcommand*\@dblLabelII {}
\newcommand*\@dblequationAux {}

\def\@dblequationAux #1,#2,%
    {\def\@dblLabelI{\label{#1}}\def\@dblLabelII{\label{#2}}}

\newcommand*{\doubleequation}[3][]{%
    \par\vskip\abovedisplayskip\noindent
    \if\relax\detokenize{#1}\relax
       \let\@dblLabelI\@empty
       \let\@dblLabelII\@empty
    \else % we assume here that the optional argument
          % has the required shape A,B
       \@dblequationAux #1,%
    \fi
    \makebox[0.5\linewidth-1.5em]{%
     \hspace{\stretch2}%
     \makebox[0pt]{$\displaystyle #2$}%
     \hspace{\stretch1}%
    }%
    \makebox[0.5\linewidth-1.5em]{%
     \hspace{\stretch1}%
     \makebox[0pt]{$\displaystyle #3$}%
     \hspace{\stretch2}%
    }%
    \makebox[3em][r]{(%
  \refstepcounter{equation}\theequation\@dblLabelI, 
  \refstepcounter{equation}\theequation\@dblLabelII)}%
  \par\vskip\belowdisplayskip
}
\makeatother

\begin{document}

\begin{equation}
  \label{eq:1}
  u=v
\end{equation}
Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Cur- abitur
auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu,
accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim
rutrum. 
\doubleequation[eq:2,eq:3]{a=b}{c=d}
Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Cur- abitur
auctor semper nulla. 
\doubleequation[eq:I,eq:J]{A=B}{C=D}
Donec varius orci eget risus. Duis nibh mi, congue eu,
accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim
rutrum. 
\begin{equation}
  \label{eq:4}
  w=z
\end{equation}
We may refer to \eqref{eq:2} or \eqref{eq:3} or \eqref{eq:I} or \eqref{eq:J},
and this is compatible with \verb|hyperref|.
\end{document}

双重方程

答案4

\documentclass{article}
\usepackage{amsmath,tabularx}
\begin{document}

\noindent
\begin{tabularx}{\linewidth}{@{}XX@{}}
\begin{equation}
  a = b + c.
\end{equation}
&
\begin{equation}
  d = e + f.
\end{equation}
\end{tabularx}

\end{document}

相关内容