2

I have long blocks of short formulas so I want to typeset them in 2 columns. I want them to be numbered and aligned horizontally within the columns so I'm using the align environment within a multicols environment. Like so:

\begin{multicols}{2}
\begin{align}
x_1 &= a+b \\
x_2 &= y + 3 \\
x_3 &= z + \sqrt{c}
\end{align}
\end{multicols}

This does split the formulas into 2 columns but there seems to be a large space at the top that I can't avoid.
enter image description here

How do I get rid of it?

Edit: I'm thinking multicols is just not the right thing to use here. It starts a new paragraph within the first column and immediately after itself. Is there a better way to arrange individually numbered equations within one 2 column block?

  • The problem here is that align and other multi-line display environments from amsmath are not designed to begin after a \par (which is implied here). The mechanism suggested here may work for you: https://tex.stackexchange.com/a/36963 – barbara beeton Oct 14 '20 at 21:02
  • 1
    It is also true that multicol adds more space (about 9.5pt) above than below. \multicolsep is applied both above and below, but i can't find where the extra spce is coming from. – John Kormylo Oct 14 '20 at 21:40

2 Answers2

1

You have also another possibility to use tasks package. To set the format

[item-format=\ensuremath,counter-format=(tsk), label-width=4ex, column-sep=5pt]

I invite you to see the manual at the link https://ctan.mirror.garr.it/mirrors/ctan/macros/latex/contrib/tasks/tasks-manual.pdf.

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{tasks}
\begin{document}
I have these exercises to solve.
\begin{tasks}[item-format=\ensuremath,counter-format=(tsk), label-width=4ex, column-sep=5pt](2)
\task x_1 = a+b 
\task x_2 = y + 3
\task x_3 = z + \sqrt{c}
\end{tasks}
After \ldots
\end{document}

enter image description here

Sebastiano
  • 54,118
0

Hope you need to remove the above space for the equation, if yes \SwapAboveDisplaySkip from the package mathtools may helps you, and the modified MWE is:

\documentclass{book}
\usepackage{mathtools,multicol}
\begin{document}

\begin{multicols}{2} \begin{align} \SwapAboveDisplaySkip% x_1 &= a+b \ x_2 &= y + 3 \ x_3 &= z + \sqrt{c} \end{align} \end{multicols} \end{document}

MadyYuvi
  • 13,693
  • This did not work. It did remove a small amount of extra space but the tops of the columns are still offset by about the height of one of the equations. – aquaticapetheory Oct 16 '20 at 13:56