Am 04.12.2011 um 01:20 schrieb Aditya Mahajan:

> Hi,
> 
> How does one save and read third-party data in tuc file at the lua end?
> 
> I am trying to write a module t-ifchanged that defines a \doiffilechanged 
> macro that provides the functionality of mtxrun --ifchanged without calling 
> an external program (This is meant to be a support module for t-vim, where 
> the external calls to mtxrun are too time consuming).
> 
> I can successfully write additional data to the tuc file, but cannot figure 
> out how to initialize the data from tuc file. (See attached file). Any hints 
> are welcome.

\definetwopasslist{test}

\newcount\testcount

\starttext

\immediatesavetwopassdata{test}{}{First Entry}

One: \gettwopassdata{test}\twopassdata

\startluacode
commands.savetwopassdata("test","Second Entry")
\stopluacode

Two: \ctxlua{commands.gettwopassdata("test")}

\stoptext

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to