5

I have two relatively short equations which I want to fit in one line. Using the multicols and miniage I am getting :

equation1, (1) equation2. (2)

The numbers are on the right side of each equations but I want something like that:

equation1, equation2 (1),(2)

Where the both numbers are together on the far right. I've just spent the last hour looking for the answer and still no idea.

5

1 Answer 1

1

This is about as simple as it gets. The rule is used to provide context. Also, for some reason it doesn't like \stepcounter{equation}, so I had to do it old school.

\documentclass{article}
\usepackage{mathtools}

\makeatletter
\newcommand{\stepeq}{\global\advance\c@equation by 1}%
\makeatother

\begin{document}
\noindent\rule{\textwidth}{1pt}
\renewcommand{\theequation}{\arabic{equation}\stepeq{),(}\arabic{equation}}
\begin{align}
x&=a & y&=b
\end{align}
\renewcommand{\theequation}{\arabic{equation}}
\begin{equation}
z=c
\end{equation}

\end{document}

equations

2
  • This doesn't really work, since references don't function as expected.
    – Werner
    Apr 28, 2014 at 23:30
  • Even using \tag, you can't create separate references for the two equations using \label and \ref. But it's not like we were encouraging this sort of thing. Apr 29, 2014 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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