MWE:
\documentclass{article}
\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{enumitem}
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\setlength{\columnseprule}{1pt}
\allowdisplaybreaks
\begin{document}
\begin{multicols*}{2}
\begin{enumerate}[label=(\alph*)]
\item \begin{align*}
2x+6&=12x-8\\
2x-12x&=-8-6\\
-10x&=-14\\
x&=\dfrac{-14}{-10}\\
&=1\dfrac{2}{5}
\end{align*}
\item \begin{align*}
4x-5&=6(7)\\
&=42\\
4x&=42+5\\
&=47\\
x&=\dfrac{47}{4}\\
&=11\dfrac{3}{4}
\end{align*}
\item \begin{align*}
5(6x-2)&=3(9x+1)\\
30x-10&=27x+3\\
30x-27x&=3+10\\
3x&=13\\
x&=\dfrac{13}{3}\\
&=4\dfrac{1}{3}
\end{align*}
\item \begin{align*}
\dfrac{3(-2x+5)-4(8x+1)}{12}&=7\\
\dfrac{-6x+15-32x-4}{12}&=7\\
\dfrac{-38x+11}{12}&=7
\end{align*}\\
\begin{align*}
-38x+11&=12(7)\\
&=84\\
-38x&=84-11\\
&=73\\
x&=\dfrac{73}{-38}\\
&=-1\dfrac{35}{38}
\end{align*}
\item \begin{align*}
3&=7(x+5)\\
3&=7x+35\\
-7x&=35-3\\
&=32\\
x&=\dfrac{32}{-7}\\
&=-4\dfrac{4}{7}
\end{align*}
\item \begin{align*}
4(5x+6)&=6(3x-2)\\
20x+24&=18x-12\\
20x-18x&=-12-24\\
2x&=-36\\
x&=\dfrac{-36}{2}\\
&=-18
\end{align*}
\end{enumerate}
\end{multicols*}
\end{document}
I am trying to create a solutions page, and would like to remove the vertical space such that (a) is on the same line as the first equation, and there is no vertical space after the last equation, before (b).
Also, the second column shows that LaTex is filling up the entire column with my equations but I would like it to be aligned to the top.
How might I achieve both of these?
Thank you.
Best Answer
In this code I define a
solutions
environment, based onenumerate
, but with the\item
command patched with the help of theetoolbox
package. I also changed some of the computation results, expressed in theinteger part fractionary part
style with smaller fractions, either in the form, say,\tfrac{3}{4}
or in the form\sfrac{3}{4}
from thexfrac
package: