2

In paralist, one can adjust the room for large labels on the fly, but can it be done directely in the \setdefaultenum command ?

enter image description here

\documentclass{article}
\usepackage[flushleft,alwaysadjust]{paralist}
\setdefaultenum{\bf 1.}{a)}{\it i.)}{}
\usepackage{xcolor}

\begin{document}

\begin{compactenum}
\item Bla
\item Bla
\item Bla
\item Bla
\item Bla
\item Bla
\item Bla
\item Bla
\item Bla
\item \textcolor{red}{Right shift}
\end{compactenum}

\begin{compactenum}[\bf 1.][10]
\item Bla
\item Bla
\item Bla
\item Bla
\item Bla
\item Bla
\item Bla
\item Bla
\item Bla
\item \textcolor{blue}{Ok}
\end{compactenum}

\end{document}
  • If it doesn't do a two-pass algorithm, I don't think it is possible. – percusse Aug 9 '15 at 20:55
  • It seems to do it on the fly like in example. But why has it to do a two pass algorithme as the right right shift is known in advance? – Tarass Aug 10 '15 at 6:20
  • If you know in advance the number of items, you can do it, as shown by the second example. Otherwise you need to record the number of items at \end{compactenum} and use this at the next run. – egreg Aug 10 '15 at 8:05
  • It's not the number of items but the wider you imagine to have. In example in the doc one take 8 as viii is the wider untill xvi (see p4). – Tarass Aug 10 '15 at 9:15
  • you have to scan all labels for the widest entry then apply the shift in the second pass during the actual typesetting. – percusse Aug 12 '15 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.