vypis jednotek v texu.
Petr Sojka
sojka at informatics.muni.cz
Mon May 22 17:12:30 CEST 2000
On Sun, May 21, 2000 at 05:31:31PM +0200, sKIm wrote:
Zdravim
>
> Chtel bych se zeptat, jak se da implementovat, aby pri vypisu treba sirky
> hboxu mi to nevypisovalo v pt ale v jinych jednotkach - treba v cm.
>
Jako navod muze slouzit:
\documentclass{article}
\newdimen\dimtest
\newdimen\cmdim
{\catcode`\p=12\catcode`\t=12
\global\def\XXX#1pt\endname {#1}}
\def\convertpttocm#1#2{#2=#1\divide#2 by 127 \multiply#2 by 36}
\def\printcm#1{\expandafter\XXX\the#1\endname cm}
\begin{document}
\dimtest 3.1415926pt
\convertpttocm{\dimtest}{\cmdim}
\message{v pt: \the\dimtest, v cm: \printcm{\cmdim}}
\end{document}
S pozdravem
Petr Sojka
More information about the csTeX
mailing list