3

I wanted to use a minipage to reduce the size of my itemize list

\documentclass{article}
\begin{document}
\begin{figure}[!htbp]

\begin{minipage}[b]{0.4\textwidth} 
    \begin{itemize}
        \item a
        \item b
        \item c
        \item d
    \end{itemize}
\end{minipage}

\hfill

\begin{minipage}[b]{0.4\textwidth}
    \begin{itemize}
        \item e
        \item f
        \item g
    \end{itemize}
\end{minipage}

\end{figure}
\end{document}

unfortunately i have an uneven number of entries and get the "error", that the second minipage starts its first item on the height of the second item of the first minipage....

so "e" is on the height of "b" while I want it to be at the same height as "a".

4

You have to use [t] position specifier instead of [b] and also don't leave blank lines before and after \hfill.

\documentclass{article}
\begin{document}
\begin{figure}[!htbp]

\begin{minipage}[t]{0.4\textwidth}
    \begin{itemize}
        \item a
        \item b
        \item c
        \item d
    \end{itemize}
\end{minipage}
\hfill
\begin{minipage}[t]{0.4\textwidth}
    \begin{itemize}
        \item e
        \item f
        \item g
    \end{itemize}
\end{minipage}    
\end{figure}
\end{document}

enter image description here

Another solution with multicol:

\documentclass{article}
\usepackage{multicol}
\begin{document}
\begin{figure}[!htbp]
\begin{multicols}{2}
    \begin{itemize}
        \item a
        \item b
        \item c
        \item d
\columnbreak
        \item e
        \item f
        \item g
    \end{itemize}
\end{multicols}
\end{figure}
\end{document}

enter image description here

Putting \raggedcolumns before \begin{multicols} like

\raggedcolumns
\begin{multicols}{2}

gives

enter image description here

And using tabularx:

\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{figure}[!htbp]
\begin{tabularx}{\textwidth}{!{\textbullet}X!{\textbullet}X}
         a & e \\
         b & f \\
         c & g \\
         d &
\end{tabularx}
\end{figure}
\end{document}

enter image description here

And finally using enumitem for its inline list:

\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}
\begin{figure}[!htbp]
    \begin{itemize*}[leftmargin=*, itemjoin={{\qquad}}]
        \item a thing
        \item b
        \item c
        \item d
        \item e
        \item f
        \item g
    \end{itemize*}
\end{figure}
\end{document}

enter image description here

You can save more space.

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.