1

I want to create an worksheet with several equations, which are enumerated. To get two columns I separated my page into two minipages. I got the same amount of equations on each minipage, but they don't align horizontally, which I want them to. How can I align my equations horizontally?

EDIT: If someone could tell me how to insert a blank space with the height of an (for example) fraction I would be fine.

\documentclass{scrartcl}
\usepackage{amsmath, amsthm, amssymb}
\begin{document}

\begin{enumerate}

\begin{enumerate}
\item Test \\
\begin{minipage}[t]{0.5\textwidth}
\item\vspace{1pt}
\begin{align*}
f(x)&=\frac{1}{5}(x^2+x+5)
\intertext{\item\hspace{1pt}}
f(x)&=2x^2(3x+4)
\intertext{\item\hspace{1pt}}
f(x)&=\frac{1}{8}(3x^4-8x^3+16)
\intertext{\item\hspace{1pt}}
f(x)&=12x^{\frac{1}{2}}-4
\intertext{\item\hspace{1pt}}
f(x)&=15x^0
\end{align*}
\end{minipage}

\begin{minipage}[t]{0.5\textwidth}
\item\vspace{1pt}
\begin{align*}
f(x)&=x^{-3}
\intertext{\item\hspace{1pt}}
f(x)&=2-x^{-2}+4x^{-1}
\intertext{\item\hspace{1mm}}
f(x)&=(x-3)^2+4
\intertext{\item\hspace{1pt}}
f(x)&=2(x+15)^2-38
\intertext{\item\hspace{1pt}}
f(x)&=(x^3\cdot x^2)+x^4
\end{align*}
\end{minipage}
\end{enumerate}
\end{enumerate}
\end{document}
  • As always, an empty line signifies a paragraph break, so you need to remove the one between the minipages, and add a % after the first \end{minipage} to remove the space caused by the linebreak. And use \linewidth instead of \textwidth. – Torbjørn T. Mar 27 '17 at 17:03
  • I inserted the spaces just for better understanding, but okay they are wrong right. But that's not the problem...The % symbol doesn't change anything either...Neither does the \linewidth – FriedrichP Mar 27 '17 at 17:12
  • The % and \linewidth only removes the overfull hbox you get. But I see the problem, you're after \vphantom{\frac{1}{2}}. – Torbjørn T. Mar 27 '17 at 17:23
0

I understand you didn't have the empty line between your two minipages in your actual code, but if you did, then you would have needed to remove it, as it signifies a paragraph break, which means the minipages will be placed one above the other.

But to answer your actual question, to make sure all the equations have the height of a fraction, you can insert a \vphantom{1}{2} in the lines that do not have a fraction.

In addition, with

\begin{minipage}{0.5\textwidth}
...
\end{minipage}%
\begin{minipage}{0.5\textwidth}
...
\end{minipage}

you will get an overfull hbox warning, because the minipages will be a little bit indented in a list. Using \linewidth instead, cf. Difference between \textwidth, \linewidth and \hsize, takes care of that.

\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}
\begin{enumerate}
\item Test 

\begin{minipage}[t]{0.5\linewidth}
\item\vspace{1pt}
\begin{align*}
f(x)&=\frac{1}{5}(x^2+x+5)
\intertext{\item\hspace{1pt}}
f(x)&=2x^2(3x+4)\vphantom{\frac{1}{5}}
\intertext{\item\hspace{1pt}}
f(x)&=\frac{1}{8}(3x^4-8x^3+16)
\intertext{\item\hspace{1pt}}
f(x)&=12x^{\frac{1}{2}}-4\vphantom{\frac{1}{5}}
\intertext{\item\hspace{1pt}}
f(x)&=15x^0\vphantom{\frac{1}{5}}
\end{align*}
\end{minipage}%
\begin{minipage}[t]{0.5\linewidth}
\item\vspace{1pt}
\begin{align*}
f(x)&=x^{-3}\vphantom{\frac{1}{5}}
\intertext{\item\hspace{1pt}}
f(x)&=2-x^{-2}+4x^{-1}\vphantom{\frac{1}{5}}
\intertext{\item\hspace{1mm}}
f(x)&=(x-3)^2+4\vphantom{\frac{1}{5}}
\intertext{\item\hspace{1pt}}
f(x)&=2(x+15)^2-38\vphantom{\frac{1}{5}}
\intertext{\item\hspace{1pt}}
f(x)&=(x^3\cdot x^2)+x^4\vphantom{\frac{1}{5}}
\end{align*}
\end{minipage}
\end{enumerate}
\end{document}
1

You can obtain what you want in a much simpler way with the taskspackage:

\documentclass{scrartcl}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{enumitem}
\usepackage{tasks}
\settasks{counter-format =tsk[1]., label-width=1em, item-indent=0em, before-skip =\medskipamount, after-item-skip=0pt}

\begin{document}

\begin{enumerate}[wide=0pt, before=\everymath{\displaystyle}]
  \item Test
        \begin{tasks}(2)
          \task $ f(x) = \frac{1}{5}(x²+x+5) $

          \task $ f(x) = 2x²(3x+4) $

          \task $ f(x)= \frac{1}{8}(3x⁴-8x³+16) $

          \task $ f(x) = 12x^{\frac{1}{2}}-4 $

          \task $ f(x) = 15x⁰ $

          \task $ f(x) = x⁻³ $

          \task $ f(x) = 2-x⁻²+4x⁻¹ $

          \task $ f(x) = (x-3)²+4 $

          \task $ f(x) =2 (x+15)²-38 $

          \task $ f(x) = (x³ · x²)+x⁴ $
        \end{tasks}
\end{enumerate}

\end{document} 

enter image description here

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.