Hi all, Below are three methods of defining a dimension / dimension string in ConTeXt --- the first two boil down to storing a string in a macro, the last is a proper TeX dimen. I want to access these dimensions from Lua.
I can access the dimen via tex.dimen.ColumnC, but how can I access the macro contents? If there is no solution, I can always explicitly pass the value to Lua with \ctxlua{var = '\measure{ColumnA}'} , but I want to know if there is a Lua-only method to get these values. %% MWE \definemeasure[ColumnA][10mm] \def\ColumnB{20mm} \newdimen\ColumnC \ColumnC=30mm \startluacode -- print values to stdout logs.report('====') logs.report('ColumnA', context.measure('ColumnA')) logs.report('ColumnB', context.ColumnB) logs.report('ColumnC', tex.dimen.ColumnC) -- prints in scaled points print('====') \stopluacode Cheers, Sietse ___________________________________________________________________________________ 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 ___________________________________________________________________________________