On 2/10/2026 8:35 PM, [email protected] wrote:
Hello Pablo, thanks for the reply.
What I want is to dynamically attach notes and comments to my base text. For
example, say I have a base ConTeXt file
```
\starttext
Foo, bar
baz, quux
\stoptext
```
and an external "glossary" file (the details don't matter much):
```
bar : <definition>
baz: <definition>
```
I'd to rig the document compilation so that, e.g., the definition for the words
listed in the glossary get automatically added to the source, so what actually
gets compiled is something like:
```
\starttext
Foo, \Definition[<definition>]{bar}
\Definition[<definition>]{baz}, quux
\stoptext
```
Thus keeping the base text and the annotations cleanly separate. I've already
managed to get it to work (using `resolvers.installinputlinehandlers`), but I
wonder if there's a better way.
you can put this in some file:
\definesynonyms
[whatever]
[whatevers]
[\fullwhatever]
[\usewhatever]
\setupsynonyms[whatever][command=no]
\whatever [foo] {FOO} {what a foo}
\whatever [oof] {OOF} {oof or foo}
and after loading do:
\starttext
\usewhatever{foo}: \fullwhatever{foo}
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________