From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/20531 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: dvi paper-size Date: Sat, 28 May 2005 11:01:16 +0200 Message-ID: <4298335C.50401@elvenkind.com> References: <429777CA.5080708@physik.fu-berlin.de> <42982FAF.8080203@physik.fu-berlin.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1117270990 6813 80.91.229.2 (28 May 2005 09:03:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 28 May 2005 09:03:10 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sat May 28 11:03:08 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1DbxD9-0008HJ-ER for gctc-ntg-context-518@m.gmane.org; Sat, 28 May 2005 11:02:27 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 85B15127D8; Sat, 28 May 2005 11:04:43 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00620-04; Sat, 28 May 2005 11:04:38 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9B838127A0; Sat, 28 May 2005 11:04:38 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EA5BB127A0 for ; Sat, 28 May 2005 11:04:37 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00621-06-2 for ; Sat, 28 May 2005 11:04:37 +0200 (CEST) Original-Received: from post-22.mail.nl.demon.net (post-22.mail.nl.demon.net [194.159.73.192]) by ronja.ntg.nl (Postfix) with ESMTP id 0D77E12772 for ; Sat, 28 May 2005 11:04:36 +0200 (CEST) Original-Received: from boo.demon.nl ([82.161.175.147]:40869 helo=[192.168.1.3]) by post-22.mail.nl.demon.net with esmtp (Exim 4.43) id 1DbxFE-00011w-N4 for ntg-context@ntg.nl; Sat, 28 May 2005 09:04:36 +0000 User-Agent: Mozilla Thunderbird 1.0 (X11/20050215) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <42982FAF.8080203@physik.fu-berlin.de> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:20531 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:20531 \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=3D{\withoutpt\the\dimen0 cm,\withoutpt\the\dimen1 cm}% \endgroup } Taco Tobias Burnus wrote: > Hello, >=20 > Peter M=FCnster wrote: >=20 >> On Fri, 27 May 2005, Tobias Burnus wrote: >> =20 >> >>> Should be e.g. for "A4" \special{papersize=3D210mm,297mm} and for "A5= "=20 >>> \special{papersize=3D148mm,210mm}. >>> If I add this, it actually seems to work here. I failed to create=20 >>> something which obtains the papersize automatically. >>> =20 >=20 > Ok, the following works: > \special{papersize=3D\the\paperwidth,\the\paperheight} >=20 > It puts (for \setuppapersize[letter][letter]) the following into the DV= I=20 > file (dvips -d3 test2.dvi 2>&1 |grep special): > papersize=3D614.295pt,794.96999pt which gv shows as letter. > Having the right unit (as defined in page-lay.tex, i.e. 148mm=D7210mm f= or=20 > A5, 8.5in=D711in for letter etc.) would be probably better, but this wo= rks. >=20 >> Yes, that's the problem. I tried >> \special{papersize=3D\paperwidth,\paperheight} >> =20 >=20 > That expands to: > papersize=3D\paperwidth ,\paperheight > which dvips cannot digest. >=20 >> and >> \special{papersize=3D\PtToCm{\paperwidth},\PtToCm{\paperheight}} >> =20 >=20 > Whereas that expands to >=20 > papersize=3D\begingroup \scratchdimen \paperwidth \relax \scratchdimen=20 > 0.0351459804\scratchdimen 0.0cm\endgroup ,\begingroup \scratchdimen=20 > \paperheight \relax \scratchdimen 0.0351459804\scratchdimen 0.0cm\endgr= oup > [1Processing special: papersize=3D\begingroup \scratchdimen=20 > \paperwidth \relax \scratchdimen 0.0351459804\scratchdimen=20 > 0.0cm\endgroup ,\begingroup \scratchdimen \paperheight \relax=20 > \scratchdimen 0.0351459804\scratchdimen 0.0cm\endgroup >=20 > still something dvips cannot digest. >=20 > I have to admit, I actually fail to expand > \special{papersize=3D\PtToCm{\the\paperwidth},\PtToCm{\the\paperheigh= t}} > correctly. It always ends up as \begingroup ... in the DVI file (i.e. a= s=20 > above with \paperheight|weight replaced by its numerical value). >=20 > Tobias >=20 > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context