Am 15.09.2025 um 15:09 schrieb Henning Hraban Ramm:
Hi again,
I’d like to calculate the thickness of the current document.
This doesn’t work (“Argument of \lastcounter has an extra }”):
\definemeasure[paperthickness][.1mm]
\expanded{\definemeasure[bookthickness][\measured{paperthickness}
*\lastcounter[userpage]/2]}
It works with e.g. "50\measured{paperthickness}", but multiplication of
a dimension/measure with a counter seems to be a problem.
You're using the wrong counter command.
\starttext
\definemeasure[paperthickness][.1mm]
\the\dimexpression{\measured{paperthickness}*\lastcountervalue[userpage]/2}
\the\dimexpression{\measured{paperthickness}*\lastuserpage/2}
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________