Re: synonyms
Henning Hraban Ramm <[email protected]>
| Newsgroups | gmane.comp.tex.context |
|---|---|
| Message-ID | <[email protected]> |
Hi JP,
thank you very much, then I can document it accordingly.
Best, Hraban
Am 14.08.26 um 08:54 schrieb Jean-Pierre Delange via ntg-context:
> Hi Hraban,
>
> I think your observation is correct — but fortunately it seems to be
> a feature rather than another mysterious ConTeXt gremlin.
>
> The point is that |\infull| is not a generic command that searches
> through every synonym list. It is tied to the predefined |
> abbreviation| list. So this works:
>
> \abbreviation{CG}{context group}
> \CG\ is \infull{CG}
>
> because |CG| belongs to that predefined list.
>
> With a user-defined synonym list, however, the third argument of |
> \definesynonyms| is important: it defines the command that retrieves
> the full form for that particular list.
>
> I tested the following complete MWE with current LMTX:
>
> % ========= Beginning of MWE =====
>
> \abbreviation{CG}{context group}
> \abbreviation[kuk]{k.u.k.}{königlich und kaiserlich}
> \definesynonyms
> [Abk]
> [Aküs]
> [\AbkFull]
> \setupsynonyms
> [Abk]
> [style=,
> color=green,
> textstyle=bold,
> textcolor=red]
> \Abk{TUG}{\TeX\ Users Group}
> \Abk[zB]{z.\,B.}{zum Beispiel}
> \starttext
> \subject{Predefined abbreviations}
> \CG\ is \infull{CG}.
> \kuk
> \blank[big]
> \subject{User-defined synonyms}
> \zB\ is \AbkFull{zB}.
> \TUG\ is \AbkFull{TUG}.
> \blank[big]
> \subject{Lists}
> \completelistofabbreviations
> \placelistofAküs
> \stoptext
>
> % ==== End of MWE ====
>
>
> The output is as expected:
>
> CG is CONTEXT GROUP.
> k.u.k.
> z. B. is zum Beispiel.
> TUG is TEX Users Group.
>
> and the two lists remain separate: the predefined abbreviations list
> contains |CG| and |k.u.k.|, while the custom |Abk| list contains |
> TUG| and |z. B.|.
>
> So I would avoid reusing |\infull| for the custom list, especially
> if both predefined abbreviations and user-defined synonyms are used
> in the same document. A dedicated command such as |\AbkFull| makes
> the relationship explicit and avoids surprises.
>
> The current source confirms this: the third argument of |
> \definesynonyms| is used to define the command that inserts the
> meaning for that specific synonym list. The /Excursion/ manual uses
> the same mechanism with:
>
> \definesynonyms[Shortcut][Shortcuts][\infull]
>
> So perhaps the only real culprit here is the documentation: this
> connection between the third argument and the synonym list could be
> made a little more explicit.
>
> Best,
> JP
>
> PS : I kept your |k.u.k.| example — Musil would surely approve of giving
> abbreviations their proper administrative treatment.
>
>
>
> Le 13/08/2026 à 21:04, Henning Hraban Ramm a écrit :
>> Hi,
>> I recognized I didn’t have synonyms/abbreviations in my book and
>> tested them.
>> Apparently, \infull doesn’t work with self-defined synonym lists. Is
>> this to be expected?
>>
>> Hraban
>>
>>
>> """
>> \abbreviation{CG}{context group}
>> \abbreviation[kuk]{k.u.k.}{königlich und kaiserlich}
>>
>> \definesynonyms[Abk][Aküs] % Singular/Plural
>> \setupsynonyms[Abk][
>> style=,color=green, % list format
>> textstyle=bold,textcolor=red, % text format
>> ]
>> \Abk{TUG}{\TeX\ Users Group}
>> \Abk[zB]{z.\,B.}{zum Beispiel}
>>
>> \starttext
>>
>> \samplefile{knuth}\TUG
>>
>> \zB\ is \infull{zB} /// \CG\ is \infull{CG}
>> % ^^^^^^^^^^^ is empty
>>
>> \kuk
>>
>> %\page
>> %\placelistofabbreviations
>>
>> \completelistofabbreviations
>>
>> \placelistofabbreviations % empty
>>
>> \placelistofAküs % or \placelistofsynonyms[Abk]
>>
>> \stoptext
>> """
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry
>> to the Wiki!
>>
>> maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/
>> ntg-context.ntg.nl
>> webpage : https://www.pragma-ade.nl / https://context.aanhet.net
>> (mirror)
>> archive : https://github.com/contextgarden/context
>> wiki : https://wiki.contextgarden.net
>> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________