[NTG-context] \definemeasure / \dimexpr

Henning Hraban Ramm texml at fiee.net
Sun Nov 13 15:31:09 CET 2022


Yes! Finally! Thank you, Wolfgang!

Am 13.11.22 um 13:17 schrieb Wolfgang Schuster via ntg-context:
> Henning Hraban Ramm via ntg-context schrieb am 13.11.2022 um 11:37:
>> \definemeasure[SpineWidth][2mm + (0.135mm * \noffigurepages/2)]
> 
> You can try
>      \expanded{\definemeasure[SpineWidth][...]}

Yes, that works. I could have thought of that myself.

>> \definemeasure[SpineWidth][2mm + (0.09mm * 1.5 * 90)]
>> doesn’t work:
> 
> You can use integers to multiply or divide a length, a float is only 
> allowed
> before a length. e.g. 1.5\scratchdimen or 1.5\dimexpr ...\relax
> 
> In your case you have to use
> 
>      \definemeasure[SpineWidth][2mm + (0.09mm * 3 * 90 / 2)]
> 
> or
> 
>      \definemeasure[SpineWidth][2mm + (0.09mm * 135)]

Ah, the float/int usage was the missing link.

Now I can document my calculated cover for wiki, CG journal, my book, DTK...

Hraban


More information about the ntg-context mailing list