Storing Lua values between Ctx "*first* and next runs
Hello, is there a Lua variable/namespace which is stored automatically between Ctx "*first" and following runs? I thought 'userdata' is intended for this, but it seems it's not; I'd like to achieve something like: ---- \startluacode if tex.modes["*first"] then userdata.LPr = "Something" -- Is there a variable which is shared between Ctx runs? else assert(userdata.LPr == "Something") end \stopluacode ---- Of course, I can store the table via serialization functions to an extra file, but I thought there is already a variable/mechanism for this (e.g. using .tua/.tuc file) ... is it? Best regards, Lukas -- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396
On 7/14/2018 1:24 PM, Procházka Lukáš Ing. wrote:
Hello,
is there a Lua variable/namespace which is stored automatically between Ctx "*first" and following runs?
I thought 'userdata' is intended for this, but it seems it's not; I'd like to achieve something like:
---- \startluacode if tex.modes["*first"] then userdata.LPr = "Something" -- Is there a variable which is shared between Ctx runs? else assert(userdata.LPr == "Something") end \stopluacode ----
Of course, I can store the table via serialization functions to an extra file, but I thought there is already a variable/mechanism for this (e.g. using .tua/.tuc file) ... is it?
search for datasets in the test suite ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Procházka Lukáš Ing.