ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Strange offset
@ 2003-11-25  9:33 Tobias Burnus
  2003-11-25 11:28 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Burnus @ 2003-11-25  9:33 UTC (permalink / raw)


Hi,

I get this stange result: The second page (p.3-4) of each embedded
file have the wrong offset, for the other pages (p. 6-\infty) they are ok.
Any ideas? This is with

  pdfeTeXk, Version 3.14159-1.10b-2.1 (Web2C 7.4.5) (format=cont-en 2003.10.6

and the TeX code from below.


Tobias

-------------------------------------------------------------------------
% format=english
\setupoutput[pdftex]
\setuppagenumbering[alternative=doublesided]

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

\setuplayout
  [height=210mm,width=297mm,
   header=0pt,footer=0pt,
   topspace=0.2cm,
   cutspace=0cm,backspace=1cm]

\newcounter\DirtyTrickCounter

\startsetups[verydirtytrick]

  \doglobal\increment\DirtyTrickCounter

  \ifodd\realpageno
    \ifodd\DirtyTrickCounter
      \hbox to \overlaywidth{{\hskip0mm}\foregroundbox}
    \else
      \hbox to \overlaywidth{{\hskip-1.3cm}\foregroundbox}
    \fi
  \else
    \ifodd\DirtyTrickCounter
      \hbox to \overlaywidth{{\hskip10mm}\foregroundbox}
    \else
      \hbox to \overlaywidth{{\hskip-0.3cm}\foregroundbox}
    \fi
  \fi

\stopsetups

\defineoverlay
  [verydirtytrick]
  [\setups{verydirtytrick}]

\starttext

\combinepages
  [main.pdf]
  [nx=2,ny=1,
   background=verydirtytrick,
   frame=off]

\combinepages
  [out.pdf]
  [nx=2,ny=1,
   background=verydirtytrick,
   frame=off]

\stoptext

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Re: Strange offset
  2003-11-25  9:33 Strange offset Tobias Burnus
@ 2003-11-25 11:28 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2003-11-25 11:28 UTC (permalink / raw)


At 10:33 25/11/2003, you wrote:
>Hi,
>
>I get this stange result: The second page (p.3-4) of each embedded
>file have the wrong offset, for the other pages (p. 6-\infty) they are ok.
>Any ideas? This is with
>
>   pdfeTeXk, Version 3.14159-1.10b-2.1 (Web2C 7.4.5) (format=cont-en 2003.10.6
>
>and the TeX code from below.

in page-imp, patch:

                      \hfil}%
                   \hfilneg}
                \vfil}%
            \vfilneg}%
         \pagina %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  add this 
line
         \ifnum\combinedpagescounter>\@@ipn \exitloop\fi}
    \else
      \doloop
        {\startbaselinecorrection


If you run your code with:

\startsetups[verydirtytrick]

   \doglobal\increment\DirtyTrickCounter

   \ifodd\realpageno\relax
     \ifodd\DirtyTrickCounter
       \hbox to \overlaywidth{1{\hskip0mm}\foregroundbox1}
     \else
       \hbox to \overlaywidth{2{\hskip-1.3cm}\foregroundbox2}
     \fi
   \else
     \ifodd\DirtyTrickCounter
       \hbox to \overlaywidth{3{\hskip10mm}\foregroundbox3}
     \else
       \hbox to \overlaywidth{4{\hskip-0.3cm}\foregroundbox4}
     \fi
   \fi

\stopsetups

you can see that some branches are never entered, which is due to the fact 
that we're dealing with a sequence of \vbox's and you decide on \realpago 
whil ethe previous one is not yet flushed (i.e. fits on the page so tex 
will issue a page break when something new is added, with the new being the 
wrong calculated thing).

Hans  

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-25 11:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-25  9:33 Strange offset Tobias Burnus
2003-11-25 11:28 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).