[NTG-context] How to align numerals in lists on the dot or paranthesis that follows the numeral?

Taco Hoekwater taco at elvenkind.com
Sun Jun 24 10:31:27 CEST 2007


Hamid Kamrani wrote:
> At least in the U.S., it is the rule and a strict requirement to
> typeset vertical lists in such a way that the numerals align on the
> dot or parenthesis following the numeral.

It is quite possible that there is a simpler solution that I simply
failed to find, but this works:

\unprotect
\startsetups [numberitemleft]
   \hbox to \dimexpr\getitemparameter\itemlevel \c!width -
                    \getitemparameter\itemlevel \c!distance\relax
       \bgroup \hfill
\stopsetups

\startsetups [numberitemright]
   \egroup
\stopsetups
\protect

\starttext
\startitemize[n,packed][left={\setups[numberitemleft]},
                         right={\setups[numberitemright]},
                         stopper={.}]
      \item The first item.
      \item The second item.
      \item The third item.
      \item The fourth item.
      \item The fifth item.
      \item The sixth item.
      \item The seventh item.
      \item The eighth item.
      \item The ninth item.
      \item The tenth item.
\stopitemize
\stoptext


You probably want to increase the 'width' parameter, but that should be
straightforward.

Best wishes,
Taco


More information about the ntg-context mailing list