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}
\linewidthis what you're looking for. See Difference between\textwidth\linewidthand\hsize– egreg Jun 16 '15 at 22:17