ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setupsynonym: 2 questions on width
@ 2009-03-04 17:34 Michael Bynum
  2009-03-05  0:05 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Bynum @ 2009-03-04 17:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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}

\starttext
\placelistofnomenclatures
\stoptext


2.)  Also, if the width in setupsynonyms is set to a value smaller
than the length of the longest entry, the entry tries to wrap around,
but it writes over top of the next entry.  Obviously this is not
desirable.  Is there a way to have the next entry below the "wrapped"
long entry instead of on the same line?  An example of this issue.

\definesynonyms[nomenclature][nomenclatures][\infull]
\setupsynonyms[nomenclature][criterium=all]

\nomenclature[a]{a}{This is the letter a}
\nomenclature[b]{abcdefghijklmnopqrstuvwxyz}{This is the alphabet}
\nomenclature[c]{c}{This is the letter c}

\starttext
\placelistofnomenclatures
\stoptext


Thanks,
Mike
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: setupsynonym: 2 questions on width
  2009-03-04 17:34 setupsynonym: 2 questions on width Michael Bynum
@ 2009-03-05  0:05 ` Wolfgang Schuster
  2009-03-05 15:19   ` Michael Bynum
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2009-03-05  0:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: setupsynonym: 2 questions on width
  2009-03-05  0:05 ` Wolfgang Schuster
@ 2009-03-05 15:19   ` Michael Bynum
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Bynum @ 2009-03-05 15:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Right, that works for this example, but if I change what nomenclatures
are in the list then I would have to go in and manually change the
setwidthof{} command.  Am I correct in thinking that?  I guess ideally
I wouldn't have to go in and change the spacing manually every time I
update my nomenclatures list.
Mike



On Wed, Mar 4, 2009 at 7:05 PM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> 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
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-05 15:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-04 17:34 setupsynonym: 2 questions on width Michael Bynum
2009-03-05  0:05 ` Wolfgang Schuster
2009-03-05 15:19   ` Michael Bynum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).