[NTG-context] \setuppapersize[XY] not working properly with landscape orientation
Hans Hagen
pragma at wxs.nl
Thu Sep 14 21:39:42 CEST 2006
Mojca Miklavec wrote:
> On 9/7/06, Mojca Miklavec wrote:
>
>> Hello,
>>
>> \setuppapersize[XY] is not working properly when paper orientation is
>> landscape. The following code results in pages of dimensions 29.5 x
>> 29.5 cm:
>>
>> \setuppapersize
>> [XY][A4,landscape]
>> \setuppaper
>> [nx=3,ny=1]
>> \setuparranging
>> [XY]
>>
>
> Are there any news about fixing page dimensions in XY papersizes?
>
>
hm, that sounds desperate ... watch the lunatic definition below:
\unprotect
\definepapersize
[XY]
[\c!height=\dimexpr\ifnum\printlandscape>\zerocount
\dimexpr\dimexpr\@@ppwidth
-\numexpr\@@ppnx-1\relax\dimexpr\@@ppdx\relax\relax/\@@ppnx\relax
\else
\dimexpr\dimexpr\@@ppheight-\numexpr\@@ppny-1\relax\dimexpr\@@ppdy\relax\relax/\@@ppny\relax
\fi\relax,
\c!width =\dimexpr\ifnum\printlandscape>\zerocount
\dimexpr\dimexpr\@@ppheight-\numexpr\@@ppny-1\relax\dimexpr\@@ppdy\relax\relax/\@@ppny\relax
\else
\dimexpr\dimexpr\@@ppwidth
-\numexpr\@@ppnx-1\relax\dimexpr\@@ppdx\relax\relax/\@@ppnx\relax
\fi\relax]
\setuppapersize
[XY][A4,landscape]
\setuppaper
[nx=6,ny=4]
\setuparranging
[XY]
\starttext
\dorecurse{10000}{\recurselevel\space}
\stoptext
-----------------------------------------------------------------
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