ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Overlays...
@ 2001-03-20 22:28 Joop Susan
  2001-03-21  8:58 ` Overlays Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Joop Susan @ 2001-03-20 22:28 UTC (permalink / raw)


Hello,

I have a document with different backgrounds (external PDFs) for even and 
odd pages.

I have found how to get the right background on the right page.

\defineoverlay
    [papier]
    [{\ifodd\realpageno {\externalfigure[voorkant][width=\overlaywidth,heig
ht=\overlayheight]}
     \else {\externalfigure[achterkant][width=\overlaywidth,height=\overlay
height]}
     \fi}]

My problem is that the different backgrounds require setting a different 
topspace and height for the page.

My question: Where can I place the different setuplayout[topspace=..,height
=..] commands so the are evaluated again for every page (different for 
even and odd pages)?

Thanks,

Joop 


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

* Re: Overlays...
  2001-03-20 22:28 Overlays Joop Susan
@ 2001-03-21  8:58 ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2001-03-21  8:58 UTC (permalink / raw)
  Cc: ntg-context

At 11:28 PM 3/20/01 +0100, Joop Susan wrote:
>
>Hello,
>
>I have a document with different backgrounds (external PDFs) for even and 
>odd pages.
>
>I have found how to get the right background on the right page.
>
>\defineoverlay
>    [papier]
>    [{\ifodd\realpageno {\externalfigure[voorkant][width=\overlaywidth,heig
>ht=\overlayheight]}
>     \else {\externalfigure[achterkant][width=\overlaywidth,height=\overlay
>height]}
>     \fi}]
>
>My problem is that the different backgrounds require setting a different 
>topspace and height for the page.
>
>My question: Where can I place the different setuplayout[topspace=..,height
>=..] commands so the are evaluated again for every page (different for 
>even and odd pages)?

You can use: 

\setupbackgrounds
  [leftpage]
  [background=LeftPage]

\defineoverlay
  [LeftPage]
  [\vbox to \overlayheight 
     {\vskip 1.23cm
      \externalfigure[...][]}]

and alike, so: put the fig in a box [watch the leftpage/rightpage option,
it saves you some if's]

i'm my local alpha release i have multiple layouts [page dependent] so that
may be an option for the future 

Hans

-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: Overlays...
@ 2001-03-22 23:21 Joop Susan
  0 siblings, 0 replies; 3+ messages in thread
From: Joop Susan @ 2001-03-22 23:21 UTC (permalink / raw)
  Cc: ntg-context

Hi Hans,

You wrote:
> At 11:28 PM 3/20/01 +0100, Joop Susan wrote:
> >
> >Hello,
> >
> >I have a document with different backgrounds (external PDFs) for even and 
> >odd pages.
> >
> >I have found how to get the right background on the right page.
> >
> >\defineoverlay
> >    [papier]
> >    [{\ifodd\realpageno {\externalfigure[voorkant][width=\overlaywidth,heig
> >ht=\overlayheight]}
> >     \else {\externalfigure[achterkant][width=\overlaywidth,height=\overlay
> >height]}
> >     \fi}]
> >
> >My problem is that the different backgrounds require setting a different 
> >topspace and height for the page.
> >
> >My question: Where can I place the different setuplayout[topspace=..,height
> >=..] commands so the are evaluated again for every page (different for 
> >even and odd pages)?
> 
> You can use: 
> 
> \setupbackgrounds
>   [leftpage]
>   [background=LeftPage]
> 
> \defineoverlay
>   [LeftPage]
>   [\vbox to \overlayheight 
>      {\vskip 1.23cm
>       \externalfigure[...][]}]
> 
> and alike, so: put the fig in a box [watch the leftpage/rightpage option,
> it saves you some if's]

Sorry Hans, This does not give the desired effect. 

The right page has a Big header, actually filled in with an other MP 
overlay for a lot of fixed information and a footer. The overlays are 
realy full A4 scans of some form that I cannot recreate in 
ConTeXt/MetaFun. That's the real reason for [width=\overlaywidth,height=\ov
erlayheight].

I did not want to push the overlay down the page, which is what your code 
does, but I wanted to make the text area smaller (equivalent to the 
setuplayout[topspace=...] setting) so text is not set on top of the 
background. The left page has a smaller header and a different footer from 
the right page.

Basically I wanted to have de topspace set to different values for left 
and right page (really back and front of non-arranged A4). I cannot figure 
out where to hook in the topspace adjustment. Is there some hook that is 
executed for every new page? I do not force the page with \page otherwise 
that would be the place...

\defineoverlay
    [vulling]
    [{\ifodd\realpageno {\MPfillin{\overlaywidth}{\overlayheight}}\fi}]

\defineoverlay
    [voorkant]
    [{\externalfigure[voorkant][width=\overlaywidth,height=\overlayheight]}
]

\defineoverlay
    [achterkant]
    [{\externalfigure[achterkant][width=\overlaywidth,height=\overlayheight
]}]

\setupbackgrounds
    [rightpage]
    [background={voorkant,vulling}]

\setupbackgrounds
    [leftpage]
    [background=achterkant]

\setupbackgrounds
    [state=repeat]

How do I get the leftpage and right page to alternate repeatedly? That 
last statement is ineffective.

> i'm my local alpha release i have multiple layouts [page dependent] so that
> may be an option for the future 
> 

Sounds like THE solution, but I understand that I'll have to wait a bit 
longer for that... ;-)

Joop


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

end of thread, other threads:[~2001-03-22 23:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-20 22:28 Overlays Joop Susan
2001-03-21  8:58 ` Overlays Hans Hagen
2001-03-22 23:21 Overlays Joop Susan

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).