I am using various macros that I have fine-tuned with units like pt
and cm
. I use those macros normally in certain places (say, in main body text or in footnote text). To properly generalize those macros, I would like to replace the absolute units by relative ones.
Say I have a macro \newcommand*{\aalso}{\textsl{and also}\hspace{1.1pt}}
. Say I normally use that macro in footnotes. But now I realize that I made a mistake and would like to change the length 1.1pt
to something of the form ...em
so that I can use the macro elsewhere. How do I get the right number? I assume that the right way is to define some macro like \emConverter{1.1pt}
that, if issued in a footnote context, gives me the length of 1.1pt
in a footnote context converted to a relative length in em
. It doesn't need to be a LaTeX-parsable value; it's okay if this is just printed out directly into the document, for me to then manually write the new em
-value into the source code.
Some relevant questions:
Best Answer
A variant for also showing a given length (explicit or implicit) in a different unit of measure (default
mm
); I also added rounding to five digitsAn example application; we want to modify the output of
layout
so that it uses millimeters. We need only\thelength
:I only show the relevant part of the output, with the lengths