I am trying to use the multicol
package to save vertical space while using the enumerate environment. To use a specific example, if I had 3 items in a list, I'd rather they not stack vertically, but be on the same row.
More specifically, I am trying to separate a set of answers to a physics problem from the problem statement itself neatly, and to this end I decided to use the \paragraph{}
command.
This all works just fine, except when I try to place the multicols
environment with the enumerated list inside of it right after a \paragraph{}
. This is what I get:
Here ''Vastaukset:'' is inside the \paragraph
. It's obvious this does not look very good. Here is a MWE code sample that produces the unwanted result:
\documentclass[a4paper,12pt,finnish]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{enumitem}
\usepackage{multicol}
\begin{document}
\paragraph{Vastaukset:}
\begin{multicols}{3}
\begin{enumerate}[label=\alph*)]
\item 2,70 fm ja 3,5 fm,
\item 4,26 fm ja 5,6 fm,
\item 6,34 fm ja 8,3 fm.
\end{enumerate}
\end{multicols}
\end{document}
If I were to place text between the \paragraph{}
and multicols
the list items would align themselves just fine:
\documentclass[a4paper,12pt,finnish]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{enumitem}
\usepackage{multicol}
\begin{document}
\paragraph{Vastaukset:}
aaa
\begin{multicols}{3}
\begin{enumerate}[label=\alph*)]
\item 2,70 fm ja 3,5 fm,
\item 4,26 fm ja 5,6 fm,
\item 6,34 fm ja 8,3 fm.
\end{enumerate}
\end{multicols}
\end{document}
I was unable to find the solution to this specific problem through the search functionality on this site, and would really appreciate any help.
tasks
package