I've always been using \makebox
for this purpose. If it's needed more than two or three times, one could make a macro that accepts n arguments for n columns. E.g.
\newcommand\itemrow[3]{%
\item\makebox[8em][l]{#1}%
\makebox[8em][r]{#2}%
\makebox[8em][c]{#3}%
}
\begin{enumerate}
\itemrow{This should}{align}{and stuff}
\itemrow{This should}{also align}{and everything}
\itemrow{This should}{additionally align}{and all}
\itemrow{This here should}{be aligned}{with the rest}
\end{enumerate}
But that is a rather inflexible solution of course.
Best
Your diagnosis is correct: \parshape
, which is issued by \item
, overrides any \hangindent
setting. You can use the enumitem
package; adjust 1em
to what you prefer.
\documentclass{article}
\usepackage{enumitem}
\usepackage{lipsum}
\begin{document}
\lipsum*[2]
\begin{enumerate}[
leftmargin=\dimexpr\leftmargini+1em\relax,
labelindent=-1em,
listparindent=-1em,
itemindent=-1em
]
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus id diam id
ante ullamcorper vestibulum eu non nisl. Curabitur interdum laoreet massa, eu eleifend
risus placerat nec. Suspendisse potenti.
Mauris nunc risus, congue id sollicitudin id, sagittis quis elit. Proin blandit, orci
vitae vehicula faucibus, est leo facilisis ante, quis venenatis mi dolor ut tellus.
\item Integer aliquam mollis lacus, in fermentum tellus pharetra eget. Donec suscipit
condimentum tincidunt. Mauris odio felis, ultricies non lobortis non, suscipit in magna.
Nam venenatis dolor turpis. Mauris fermentum, est ac dapibus accumsan, lorem orci
vulputate nunc, quis laoreet augue elit pulvinar dui. Curabitur eu enim quis dolor
interdum vehicula eget vitae ipsum.
\end{enumerate}
\begin{enumerate}
\item Test
\end{enumerate}
\end{document}
I added another enumerate
environment in order to show that the label placement is the same and a \lipsum
paragraph for showing the global aspect.
If you need it in nested lists, I suggest to define a new environment:
\makeatletter
\newenvironment{enumeratehang}
{\enumerate[
leftmargin=\dimexpr\csname leftmargin\romannumeral\@enumdepth\endcsname+1em\relax,
labelindent=-1em,
listparindent=-1em,
itemindent=-1em
]}
{\endenumerate}
\makeatother
This will allow you to use \begin{enumeratehang}
and will work also nested with other enumeratehang
(or also enumerate
) environments.
For nested environments, we have to use the correct left margin; the counter \@enumdepth
stores the nesting level, so \romannumeral\@enumdepth
will produce i
, ii
, iii
, and so on; thus the \csname
construction will give \leftmargini
, \leftmarginii
and so on, which are the length parameters where LaTeX stores the left margin at the various nesting levels. To those we add 1em, consistent with the simple example given at the beginning.
Best Answer
You can change
\hsize
to\linewidth
insidemultienumerate
, so the environment is aware of the current value for the line width (the package uses\textwidth
by default); the representation for the counter used can be changed ny redefining\labelenumi
. Another option, if your inner items are naturally balanced would be to use three columns built, for example with themulticol
package. The following example shows both alternatives:Perhaps the best option is to use the
enumerate*
environment from theenumitem
package with theinline
package option and to control the spacing between items using\hfill
:With the edit to the original question, a better option seems to be the use of a
tabularx
environment (from thetabularx
package) of width equal to\linewidth
and with automatic cell numbering:And, of course, if this structure is to be used several times, you can define a new environment to simplify the writting: