[NTG-context] issues with rotated paper size

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Tue May 14 20:05:50 CEST 2019


Pablo Rodriguez schrieb am 14.05.2019 um 18:51:
> On 5/14/19 4:53 PM, Hans Hagen wrote:
>> i have no clue what you want to achieve
> Hans and Wolfgang,
>
> I think I have found a weird behaviour in ConTeXt (latest beta from
> 2019.05.12 19:05).
>
> This is a sample of what I want to achieve (thanks to Wolfgang’s help):
>
>      \setuppapersize [A4,landscape,90] [A4]
>      \setupinteractionscreen[option={none, max}]
>      \showframe
>      \starttext
>      \showlayout
>      \stoptext
>
> If I set "option=max" (instead of "option={none, max}", I get a square
> paper of 210x210mm.
>
> These are the right page dimensions in PDF with the sample above:
>
>    /MediaBox [ 0 0 595.2756 841.8898 ]
>    /CropBox [ 0 0 595.2756 841.8898 ]
>    /TrimBox [ 0 0 595.2756 841.8898 ]
>
> These are the dimensions with "\setupinteractionscreen[option=max]":
>
>    /MediaBox [ 0 0 841.8898 595.2756 ]
>    /CropBox [ 0 -246.61417 595.2756 595.2756 ]
>    /TrimBox [ 0 -246.61417 595.2756 595.2756 ]
>
> I think it might be a bug.
When you add \setupinteractionscreen to your document ConTeXt uses a 
more complex method to save the page size which includes calculations 
for the different box types. Part of these calculations are the width 
and height of the document and paper but when you rotate one of them you 
get unexpected values for them.

\setuppapersize [A4,landscape,90] [A4]

\starttext

\starttabulate
\NC Printpaperwidth  \EQ \the\printpaperwidth  \NC\NR
\NC Paperwidth       \EQ \the\paperwidth       \NC\NR
\TB
\NC Printpaperheight \EQ \the\printpaperheight \NC\NR
\NC Paperheight      \EQ \the\paperheight      \NC\NR
\stoptabulate

\stoptext

Wolfgang



More information about the ntg-context mailing list