0

Consider the following custom list


\begin{list}{}{}
\item[1)] This is the outer item
\begin{list}{}{}
\item[a.] this is the first inner item
\item[b.] this is the second inner item
\end{list}
\end{list}

This produces a list where there nested items are intended relative to the item they are contained within. That is, I get the following output.

enter image description here

I would like "a." instead to align with the beginning of "This". I tried playing with setting \leftmargin but couldn't make it work. The standard enumerate environments gets is somehow, but I don't understand how this is achieved.

Please note that I prefer to stay within the base LaTeX without any additional packages (not even common ones like enumitem). This for a tool that generates a LaTeX document from a database, so I am fine with simple, verbose solutions that will compile even with the most minimal LaTeX installation. In fact, I would even be fine with plain TeX.

1 Answer 1

1

Figured it out. Using \settowidth with the main label plus \labelsep achieves the desired effect

\begin{list}{}{}
\item[1)] This is the outer item
\begin{list}{}{\settowidth{\leftmargin}{1)\hskip\labelsep}}
\item[a.] This is the first inner item
\item[b.] This is the second inner item
\end{list}
\end{list}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .