0

I have four equations that I want to present in a 2 by 2 layout.

I found this thread, but I would like to be able to \cref each equation separately and have them numbered like in this image below but aligned nicely:

(edited) reference image

Is there a way to do this or am I better off just having 4 equations below each other?

5
  • The numbers you show are a bit confusing. Do you want them to go (1) and then (2) in the first row, and then (3) and (4) in the second row, or (1) and then (2) in the left column and then (3) and then (4) in the right column? (The latter is easier.)
    – frabjous
    May 10 at 15:41
  • Yes the last reference is supposed to be (4)
    – Speterius
    May 10 at 15:44
  • 1
    It wasn't a yes or no question, and both options would lead to the "last reference" being (4), so can you clarify please?
    – frabjous
    May 10 at 15:44
  • Oh wow my bad. The latter is fine as well if it's easier.
    – Speterius
    May 10 at 15:47
  • Now that you have seen how to do this, I recommend you to think again if it is a good thing to do. It is breaking the logical structure of right-aligned equation numbers, and potential give the reader a headache, isn't it?
    – mickep
    May 10 at 18:41

1 Answer 1

2

You can do this with two minipages, each with its own align environment.

enter image description here

I made the left minipage 40% of \textwidth and the right 60%, but you can adjust that how you like. For example, with .5\textwidth on both minipages it looks like this:

enter image description here

\documentclass{article}

\usepackage{amsmath,lipsum}

\begin{document}
\lipsum[1]


\noindent\begin{minipage}{.4\textwidth}
  \begin{align}
    x&=1 \\
    y&=1
  \end{align}
\end{minipage}% <-- % symbol necessary
\begin{minipage}{.6\textwidth}
  \begin{align}
    z&=1\\
    w&=1
  \end{align}
\end{minipage}

\vspace{\baselineskip}

\lipsum[2]

\end{document}

Also, as @frabjous suggested in the comments, you could make smaller minipages and center them to get the labels closer:

enter image description here

\noindent\begin{center}\begin{minipage}{.3\textwidth}
  \begin{align}
    x&=1 \\
    y&=1
  \end{align}
\end{minipage}\hspace{1cm}% <-- % symbol necessary
\begin{minipage}{.3\textwidth}
  \begin{align}
    z&=1\\
    w&=1
  \end{align}
\end{minipage}\end{center}
6
  • 1
    Just to add to this, if you want the sets closer together (as in the image in the question), you could make the minipages smaller and put both inside a \begin{center} ... \end{center} environment.
    – frabjous
    May 10 at 15:56
  • I know the OP said this numbering was OK in the comments, but it's got me curious anyway. Can you think of an easy way to do the numbering horizontally, (1) (2) in the first row and (3) and (4) in the bottom row? Surprisingly it's not obvious to me how to do that easily and without manually adjusting the counter.
    – frabjous
    May 10 at 16:19
  • @frabjous: You could do this with 4 minipages and equations instead of aligns. But it requires some \phantoms if the equations have different widths to keep the alignment at the = signs.
    – Sandy G
    May 10 at 16:24
  • It's not as easy as it sounds. Look at this output that comes from this code. With a lot (feels like too much) of manual intervention I got the horizontal alignments right, but the vertical alignment is also off. I could move the second row up with a negative length after \\ (more manual intervention!), but why is (7) lower than (8)?
    – frabjous
    May 10 at 17:12
  • @frabjous: It's because the minipages are center aligned (vertically). Use \begin{minipage}[b]. But you're right—that's a lot of work.
    – Sandy G
    May 10 at 18:12

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.