0

This question already has an answer here:

How can I determine the available width inside an enumerate environment? In particular, what width argument can I pass to the minipages in the example below so that the minipages take up all of the available horizontal space, but do not give me overfull-hbox errors. Note that I would like to be able to have the minipages get the correct width at any level of nesting for the enumerate environments. When I run the code below, the minipages in the outer enumerate environment are about 25pts too wide, while the minipages in the inner enumerate environment are about 47pts too wide. I was hoping one of textwidth, column width, or hsize would give me the correct width but the minipages, but all three fail.

\documentclass{article}

\begin{document}

\begin{enumerate}

\item
\begin{minipage}{\textwidth}
some text
\end{minipage}

\item
\begin{minipage}{\columnwidth}
some text
\end{minipage}

\item
\begin{minipage}{\hsize}
some text
\end{minipage}

\item
\begin{enumerate}

\item
\begin{minipage}{\textwidth}
some text
\end{minipage}

\item
\begin{minipage}{\columnwidth}
some text
\end{minipage}

\item
\begin{minipage}{\hsize}
some text
\end{minipage}

\end{enumerate}

\end{enumerate}

\end{document}

marked as duplicate by egreg, David Carlisle, user13907, Paul Gaborit, darthbith Jun 16 '15 at 22:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2
\documentclass{article}

\begin{document}

\begin{enumerate}

\item
\begin{minipage}{\linewidth}
some text\dotfill
\end{minipage}

\item
\begin{minipage}{\linewidth}
some text\dotfill
\end{minipage}

\item
\begin{minipage}{\linewidth}
some text\dotfill
\end{minipage}

\item
\begin{enumerate}

\item
\begin{minipage}{\linewidth}
some text\dotfill
\end{minipage}

\item
\begin{minipage}{\linewidth}
some text\dotfill
\end{minipage}

\item
\begin{minipage}{\linewidth}
some text\dotfill
\end{minipage}

\end{enumerate}

\end{enumerate}

\end{document}

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