Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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".

share|improve this question

1 Answer 1

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.

share|improve this answer
    
thanks for the lecture~ –  Chris Aug 23 at 23:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.