How to preserve a TeX token list across passes (the ConTeXt way)?
I made a plain TeX module for simple abbreviation and bibliography handling. The problem is it currently uses a temporary file to keep track of used bibs / abbreviations. Essentially it writes \addToList [\usedAbbreviations]{<abbr>} and \addToList[\usedReferences]{<cite>} commands to it, and this file is input on the second pass. After finding out that ConTeXt *really is* well thought of and robust I changed the functionality to use TeXutil with \writeutilitycommand. Everything seems to work, the commands appear in .tui/.tuo files and are executed, but the token lists are empty when execution reaches the document. I couldn't figure out how to fix it as I don't yet know enough about the anatomy of a ConTeXt run and the system. Jyrki Ruuskanen
Jyrki Ruuskanen wrote:
I made a plain TeX module for simple abbreviation and bibliography handling. The problem is it currently uses a temporary file to keep track of used bibs / abbreviations. Essentially it writes \addToList [\usedAbbreviations]{<abbr>} and \addToList[\usedReferences]{<cite>} commands to it, and this file is input on the second pass.
After finding out that ConTeXt *really is* well thought of and robust I changed the functionality to use TeXutil with \writeutilitycommand. Everything seems to work, the commands appear in .tui/.tuo files and are executed, but the token lists are empty when execution reaches the document. I couldn't figure out how to fix it as I don't yet know enough about the anatomy of a ConTeXt run and the system.
Some small example files would help a lot. We have to know what *precisely* is in the tui file. Cheers ,Taco
Jyrki Ruuskanen wrote:
I made a plain TeX module for simple abbreviation and bibliography handling. The problem is it currently uses a temporary file to keep track of used bibs / abbreviations. Essentially it writes \addToList [\usedAbbreviations]{<abbr>} and \addToList[\usedReferences]{<cite>} commands to it, and this file is input on the second pass.
After finding out that ConTeXt *really is* well thought of and robust I changed the functionality to use TeXutil with \writeutilitycommand. Everything seems to work, the commands appear in .tui/.tuo files and are executed, but the token lists are empty when execution reaches the document. I couldn't figure out how to fix it as I don't yet know enough about the anatomy of a ConTeXt run and the system.
can you make a small example? maybe a grouping issue Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Jyrki Ruuskanen
-
Taco Hoekwater