Discussion:
Show dimensions in different units in console and logfile
(too old to reply)
Peter Flynn
2020-05-14 13:04:26 UTC
Permalink
The very excellent xprintlen package by Lam Huang lets you output
dimensions in units other than points *in your typeset output*.

Is there an equivalent package that will output dimensions in units
other than points *to the console* (ie while processing, perhaps in
\message or \typeout) and therefore to the log file also?

Peter
GL
2020-05-14 19:23:59 UTC
Permalink
Post by Peter Flynn
The very excellent xprintlen package by Lam Huang lets you output
dimensions in units other than points *in your typeset output*.
Is there an equivalent package that will output dimensions in units
other than points *to the console* (ie while processing, perhaps in
\message or \typeout) and therefore to the log file also?
Peter
Conversion can be done using \dimexpr... no need of a package.

For example to convert pt to em :

\***@pt \dimexpr 140pt *\p@ /\dimexpr 1em\relax \relax em

to convert to dd :

\***@pt \dimexpr 140pt *\p@ /\dimexpr 1dd\relax \relax dd

The scaling operation of \dimexpr is very accurate.

Regards.
Peter Flynn
2020-05-14 23:13:51 UTC
Permalink
On 14/05/2020 20:23, GL wrote:
[...]
Post by GL
Conversion can be done using \dimexpr... no need of a package.
Perfect, many thanks.

P

Loading...