Re: [NTG-context] How to preserve a TeX token list across passes (the ConTeXt way)?

2006-05-15 Thread Hans Hagen
Jyrki Ruuskanen wrote:
 Ok, the module is read in cont-sys.rme with \usemodule[jtex]. It 
 initializes the lists inside protect / unprotect pair with 
 \newtoks\usedAbbreviations and \newtoks\usedReferences along with 
 macro definitions.

 Abbreviations are introduced with 
 \setAbbreviation[key]{abbr}{meaning}{description} which 
 defines macros \key \key@meaning and \key@description. Each call 
 to \key calls 
 \writeutilitycommand{\addToList[\string\usedAbbreviations]{key}, so 
 after the first run the .tui file has a number of c 
 \addToList[\usedAbbreviations]{something} lines in it.

 Functionality is similar for the bibliography. The \cite command 
 writes \addToList[\usedReferences]{cite} into .tui.

 So, the .tuo file should populate used* lists and I could typeset the 
 list of used abbreviations in initialization order with 
 \executeListIntersection[\abbreviations][\usedAbbreviations]{\printAbbreviation}.
  
 Same for used bib references. But well, lists remain empty.

 I'll attach the module and the .tui file.
is there also a test file? 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] How to preserve a TeX token list across passes (the ConTeXt way)?

2006-05-11 Thread Jyrki Ruuskanen
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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] How to preserve a TeX token list across passes (the ConTeXt way)?

2006-05-11 Thread Taco Hoekwater


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
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] How to preserve a TeX token list across passes (the ConTeXt way)?

2006-05-11 Thread Hans Hagen
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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] How to preserve a TeX token list across passes (the ConTeXt way)?

2006-05-11 Thread Jyrki Ruuskanen
Ok, the module is read in cont-sys.rme with \usemodule[jtex]. It  
initializes the lists inside protect / unprotect pair with \newtoks 
\usedAbbreviations and \newtoks\usedReferences along with macro  
definitions.


Abbreviations are introduced with \setAbbreviation[key]{abbr} 
{meaning}{description} which defines macros \key \key@meaning  
and \key@description. Each call to \key calls \writeutilitycommand 
{\addToList[\string\usedAbbreviations]{key}, so after the first run  
the .tui file has a number of c \addToList[\usedAbbreviations] 
{something} lines in it.


Functionality is similar for the bibliography. The \cite command  
writes \addToList[\usedReferences]{cite} into .tui.


So, the .tuo file should populate used* lists and I could typeset the  
list of used abbreviations in initialization order with  
\executeListIntersection[\abbreviations][\usedAbbreviations] 
{\printAbbreviation}. Same for used bib references. But well, lists  
remain empty.


I'll attach the module and the .tui file.

And excuse me, I have never ever used a mailing list. How am I  
supposed to answer to a certain message in the chain? Thanks guys.


Jyrki



final.tui
Description: Binary data


t-jtex.tex
Description: Binary data
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] How to preserve a TeX token list across passes (the ConTeXt way)?

2006-05-11 Thread Jyrki Ruuskanen
Thanks for the cont-sys tip, good to know.Yes, I have used \definesynonyms, but I need abbreviations to have three levels: the abbreviation itself, the meaning of abbreviation and the description of the abbreviation (for example, "WWW" is short for "World Wide Web" and is described as a "Worldwide interconnected mess of multimedia, which took off in early 90's."). ConTeXt synonyms seem to have two.I'm sure there are a million ways of doing this. I decided to implement it from the ground up to learn some plain TeX. But now I need to integrate my macros with ConTeXt to make passing the lists graceful without extra auxiliary files and forced double runs.And as for the reply button, I guess I have to subscribe to get the mails in my mailbox. I'll do that now ;)Jyrki___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] How to preserve a TeX token list across passes (the ConTeXt way)?

2006-05-11 Thread Hans Hagen
Jyrki Ruuskanen wrote:
 Ok, the module is read in cont-sys.rme with \usemodule[jtex]. It 
 initializes the lists inside protect / unprotect pair with 
 \newtoks\usedAbbreviations and \newtoks\usedReferences along with 
 macro definitions.

 Abbreviations are introduced with 
 \setAbbreviation[key]{abbr}{meaning}{description} which 
 defines macros \key \key@meaning and \key@description. Each call 
 to \key calls 
 \writeutilitycommand{\addToList[\string\usedAbbreviations]{key}, so 
 after the first run the .tui file has a number of c 
 \addToList[\usedAbbreviations]{something} lines in it.

 Functionality is similar for the bibliography. The \cite command 
 writes \addToList[\usedReferences]{cite} into .tui.

 So, the .tuo file should populate used* lists and I could typeset the 
 list of used abbreviations in initialization order with 
 \executeListIntersection[\abbreviations][\usedAbbreviations]{\printAbbreviation}.
  
 Same for used bib references. But well, lists remain empty.

 I'll attach the module and the .tui file.

 And excuse me, I have never ever used a mailing list. How am I 
 supposed to answer to a certain message in the chain? Thanks guys.
i'm away two days (ntg tex days) and will oook into it after that 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context