On 11/25/2020 11:54 AM, Jano Kula wrote:
Hello,

running in circles I have to give up on such an easy thing as passing a tex variable to lua (knowing everything is stored in lua).

\setvariable{test}{something}{HHHH}
\starttext
\getvariable{test}{something}\par
% how to access the variable on lua end?
\startluacode
-- var =
\stopluacode
\stoptext
Never give up ...

\starttext

    \setvariable{test}{something}{HHHH}

    \getvariable{test}{something}\par

    \meaning\getvariable

    \startluacode

print(">>",tokens.getters.macro(tokens.getters.macro("??variables") .. "test:something"))
    \stopluacode

    \def\MyVariableSomething{JJJJ}

    \startluacode
        print(">>",tokens.getters.macro("MyVariableSomething"))
    \stopluacode

\stoptext

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to