[NTG-context] Let chapter start on odd page and make the even page before show an image

juh juh+ntg-context at mailbox.org
Fri May 29 10:29:49 CEST 2020


Dear all,

with your help I can colorize the empty even page right before a chapter starts
on the odd page. The mwe below shows it.

Now I would like to redefine the contents of the left page on the fly in the text
so that I could place images on this page.

I thought that I could get a simple solution by inserting a TEXpage as even
page, but this does not work for several reasons. First a TEXpage is not counted
correctly like a normal page.  And secondly I found now way to put it on the
even page.

So what I really want to achieve is a way to redefine this setups at some point
in the text to insert eg. a picture on the even page before a chapter.

\startsetups [chapter:before]
  \doifoddpageelse
    {}
    {\pushbackground[page]
     \setupbackgrounds[page][background=color,backgroundcolor=blue,]
     \page[empty,right]
     \popbackground}
\stopsetups



Here comes the not so mwe:

%% start mwe
\setuplayout [ location=doublesided ]
\setuppagenumbering[alternative=doublesided]
\definepagebreak [chapter] [footer,yes,header,footer,right]

\startsetups [chapter:before]
  \doifoddpageelse
    {}
    {\pushbackground[page]
     \setupbackgrounds[page][background=color,backgroundcolor=blue,]
     \page[empty,right]
     \popbackground}
\stopsetups

\setuphead 
  [chapter] 
  [
   page=yes,
   before=\directsetup{chapter:before},
  ]

\setupexternalfigure[location=default]

\starttext

\startchapter
  [title={foo}]

  \dorecurse{2}{\input tufte \par}

\stopchapter

\startchapter
  [title={foo2}]

  \dorecurse{6}{\input tufte \par}

\stopchapter

\startchapter
  [title={bar}]

    \input knuth

\startTEXpage
  \externalfigure[cow.pdf][height=\paperheight,width=\paperwidth]
\stopTEXpage

\stopchapter


\startchapter
  [title={baz}]

    \input knuth

\stopchapter

\stoptext
%% stop mwe 

As you see the image is not in the right place and of course the pagenumbering
is wrong. 

I want that one of these blue pages shows an image. Is this possible?

Thanks for your help.
juh

 
-- 
Autoren-Homepage: ......... http://literatur.hasecke.com
Satiren & Essays: ......... http://www.sudelbuch.de
Privater Blog: ............ http://www.hasecke.eu
Netzliteratur-Projekt: .... http://www.generationenprojekt.de


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200529/d20f4af0/attachment.sig>


More information about the ntg-context mailing list