Am 03.11.22 um 22:43 schrieb Henning Hraban Ramm via ntg-context:
Am 03.11.22 um 21:51 schrieb Hans Hagen via ntg-context:
On 11/3/2022 9:32 PM, Henning Hraban Ramm via ntg-context wrote:
I’m constantly struggling with dimension calculations. Is there anything I can read about the possibilities and limitations?
e.g. with \definemeasure[PageWidth][132mm] none of the following works: \definemeasure[FlapWidth][0.8 * \measure{PageWidth}]
use \measured (with a "d" to get a dimension)
Only in expressions like that or always?
In https://source.contextgarden.net/syst-aux.mkiv it looks like \measured returns a dimension, while \measure returns a string (\the\measured), is this right?
So I should use \measure{} in setup keyvals, and \measured in dim expressions?
Now, when I use calculated measures for a page size, I get: """ You can't use '\dimexpr' in horizontal mode """
Here’s my MWE: """ \definemeasure[PageWidth][132mm] \definemeasure[FlapWidth][\measured{PageWidth} * 0.8] \starttext FlapWidth: \measure{FlapWidth} \stoptext """ Results in: FlapWidth: 0.0pt.8 Longer example attached. Hraban