Tobias Burnus wrote:
Hello,
Peter Münster wrote:
On Fri, 27 May 2005, Tobias Burnus wrote:
Should be e.g. for "A4" \special{papersize=210mm,297mm} and for "A5" \special{papersize=148mm,210mm}. If I add this, it actually seems to work here. I failed to create something which obtains the papersize automatically.
Ok, the following works: \special{papersize=\the\paperwidth,\the\paperheight}
It puts (for \setuppapersize[letter][letter]) the following into the DVI file (dvips -d3 test2.dvi 2>&1 |grep special): papersize=614.295pt,794.96999pt which gv shows as letter. Having the right unit (as defined in page-lay.tex, i.e. 148mm×210mm for A5, 8.5in×11in for letter etc.) would be probably better, but this works.
Yes, that's the problem. I tried \special{papersize=\paperwidth,\paperheight}
That expands to: papersize=\paperwidth ,\paperheight which dvips cannot digest.
and \special{papersize=\PtToCm{\paperwidth},\PtToCm{\paperheight}}
Whereas that expands to
papersize=\begingroup \scratchdimen \paperwidth \relax \scratchdimen 0.0351459804\scratchdimen 0.0cm\endgroup ,\begingroup \scratchdimen \paperheight \relax \scratchdimen 0.0351459804\scratchdimen 0.0cm\endgroup
[1Processing special: papersize=\begingroup \scratchdimen \paperwidth \relax \scratchdimen 0.0351459804\scratchdimen 0.0cm\endgroup ,\begingroup \scratchdimen \paperheight \relax \scratchdimen 0.0351459804\scratchdimen 0.0cm\endgroup still something dvips cannot digest.
I have to admit, I actually fail to expand \special{papersize=\PtToCm{\the\paperwidth},\PtToCm{\the\paperheight}} correctly. It always ends up as \begingroup ... in the DVI file (i.e. as above with \paperheight|weight replaced by its numerical value).
how about adding something to spec-tr: \definespecial\dosetuppaper#1#2#3% {\special{papersize=#2,#3}} paper size is already supported in the other backends for ages -) is this special official? Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------