Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The align command from amsmath allows me to put two equations side-by-side:

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

Unfortunately for my purposes, this shows both equations under one equation number:

x = y    a = b   (1)

Is there any way to give them individual numbers, so that the output looks like this?:

x = y (1)    a = b (2)
share|improve this question

4 Answers 4

You can use minipages to wrap the equations:

\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}

enter image description here

share|improve this answer
\usepackage{multicol}
...
\begin{multicols}{2}
  \begin{equation}
    a=b
  \end{equation}\break
  \begin{equation}
    b=c
  \end{equation}
\end{multicols}
share|improve this answer
\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}
share|improve this answer

Here is another attempt. The \doubleequation command has an optional argument to set labels. If used, it must be of the shape 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}

double equation

share|improve this answer
    
the spacing is deliberately set on 1/3rd and 2/3rd anchor points, with 3em (randomly chosen) reserved space for the tag. It looks a bit odd compared to the centered equations though, perhaps. And there must be a better choice for the tag width. –  jfbu Jun 23 '13 at 16:11
    
Actually this is not an answer to this but to another similar question which already has better answers than my proposal. So I will remain hidden here... –  jfbu Jun 23 '13 at 16:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.