Am 10.06.24 um 10:58 schrieb Henning Hraban Ramm:
local namespace = tokens.getters.macro("??measure")
function tex.getmeasure(name,asdimen)
local value = tex.getdimensionvalue(namespace..name)
if asdimen then
return value .. "sp"
else
return value
end
So I needed just tex.getdimensionvalue(namespace..name)
Not to be misunderstood, I couldn’t check yet, maybe I wasn’t clear:
I need to process the measure as a dimension, like \measured{Bleed}.
As far as I tried, neither tex.measured nor context.measured worked (but
I wouldn’t swear on it, maybe I had a different error).
I understand now that a dimension in Lua is just a string.
I also messed a few thing up when I converted my macros from
measure-macros to measures.
Now my image calculations work again. Phew!
Thank you,
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________