Re: [NTG-context] Exchangeing content of variables between luacode and context

2019-11-20 Thread Rudolf Bahr
On Wed, Nov 20, 2019 at 09:24:44AM +0100, Hans Hagen wrote: > you can store info in the tuc file (there are examplex on the wiki and in > the test suite) or you cam create a table, save it at the end of the run and > load it at the start > > (assuming that you cannot just recalculate the values

Re: [NTG-context] Exchangeing content of variables between luacode and context

2019-11-20 Thread Hans Hagen
On 11/19/2019 8:34 PM, Rudolf Bahr wrote: My 'actual problem' is more or less a design problem: Should in a book project ConTeXt be the master and Luacode the slave or vice versa? Both seems possible. nearly always context is th emaster (it is anyway as it manages the process) The task to

Re: [NTG-context] Exchangeing content of variables between luacode and context

2019-11-19 Thread Henning Hraban Ramm
Hi Rudolf, storing variable states within the script sounds like AppleScript… Why don’t you write your settings into some file (a Lua table representation would make sense, otherwise something like JSON or INI) and read that in in every run, if it exists? Grüßlinge, Hraban ---

Re: [NTG-context] Exchangeing content of variables between luacode and context

2019-11-19 Thread Rudolf Bahr
On Tue, Nov 19, 2019 at 04:55:15PM +0100, Wolfgang Schuster wrote: > > Can you make a minimal example of your actual problem. No, sorry, I can't. My 'actual problem' is more or less a design problem: Should in a book project ConTeXt be the master and Luacode the slave or vice versa? Both seems

Re: [NTG-context] Exchangeing content of variables between luacode and context

2019-11-19 Thread Wolfgang Schuster
Rudolf Bahr schrieb am 19.11.2019 um 14:19: Hello All! To send variable contents from context to luacode I can put them into the function invocation or use 'tokens.getters.macro("TestA")', an interesting and very nice possibility to let luacode itself getting contents of context macros. The