[NTG-context] setupsynonym: 2 questions on width

Wolfgang Schuster schuster.wolfgang at googlemail.com
Thu Mar 5 01:05:37 CET 2009


Am 04.03.2009 um 18:34 schrieb Michael Bynum:

> 1.)  I have a list of synonyms that I need to print in an aligned
> list.  Is there a way to align the synonym definitions with the
> longest synonym entry (width=? option maybe)?  Here is a small example
> where the entries do not align.
>
> \definesynonyms[nomenclature][nomenclatures][\infull]
> \setupsynonyms[nomenclature][criterium=all,width=broad]
>
> \nomenclature[a]{a}{This is the letter a}
> \nomenclature[b]{abcdefghijklmnopqrstuvwxyz}{This is the alphabet}
> \nomenclature[c]{c}{This is the letter c}

\def\setwidthof#1\to#2%
   {\bgroup
    \setbox\scratchbox\hbox{#1}%
    \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}

\setwidthof{abcdefghijklmnopqrstuvwxyz}\to\nomenclaturewidth

\setupsynonyms[nomenclature][width=\nomenclaturewidth]

Wolfgang



More information about the ntg-context mailing list