[NTG-context] dvi paper-size
Hans Hagen
pragma at wxs.nl
Sat May 28 11:41:03 CEST 2005
Taco Hoekwater wrote:
>
> \PtToCm contains assignments, so it won't expand. Here is a macro
> that does basically the same, but in a different order.
>
> \def\writepapersize{%
> \begingroup
> \dimen0 0.0351459804\paperwidth % 2.54/72.27
> \dimen1 0.0351459804\paperheight
> \special
> {papersize={\withoutpt\the\dimen0 cm,\withoutpt\the\dimen1 cm}%
> \endgroup
> }
we can use etex to get a fully expandable one:
\def\metricdimension#1{\the\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
\def\writepapersize
{\special{papersize=\metricdimension\paperwidth,\metricdimension\paperheight}
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the ntg-context
mailing list