Re: [NTG-context] calculating with dimension unit
Hello, thanks for the helpfull tipps. Only one wasn't working: \defineexpandable\ColumnABii {\ctxlua{context([==[\ColumnA + \ColumnB]==])}} ColumnABii: \ColumnABii The result is: ColumnABii: 30mm+ 40mm And it should be ColumnABii: 70mm And in the other cases I get back: 199.16928pt instead of 70mm but this seems to be the same. I think this calculating with dimension is not very well documented in the context-wiki. Thus I would like to write a small article about "Calculating with dimension units" in the wiki.contextgarden.net to help others a bit. Or is there already an article somewhere? Regards Jannis
I think this calculating with dimension is not very well documented in the context-wiki. Thus I would like to write a small article about "Calculating with dimension units" in the wiki.contextgarden.net to help others a bit. Or is there already an article somewhere?
Such an article will be very useful. Currently the information is scattered in plain tex manuals, etex manual, context manuals, and context source code documentation. Having it in one place will make it more easily accessible.
On Mon, Apr 22, 2013 at 1:31 PM, Jan Heinen
Hello,
thanks for the helpfull tipps. Only one wasn't working:
\defineexpandable\ColumnABii {\ctxlua{context([==[\ColumnA + \ColumnB]==])}}
ColumnABii: \ColumnABii
The result is: ColumnABii: 30mm+ 40mm And it should be ColumnABii: 70mm
ColumnABii: \the\dimexpr \ColumnABii\relax
And in the other cases I get back: 199.16928pt instead of 70mm but this seems to be the same.
TeX internally uses scaled points (1pt = 2^16 scaled point) and prints values in american point (1pt = 1/72.27 inch 1inch =2.54cm) -- luigi
participants (3)
-
Aditya Mahajan
-
Jan Heinen
-
luigi scarso