ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Let chapter start on odd page and make the even page before show an image
@ 2020-05-29  8:29 juh
  2020-05-29 10:45 ` Wolfgang Schuster
  0 siblings, 1 reply; 10+ messages in thread
From: juh @ 2020-05-29  8:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2335 bytes --]

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



[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-05-29 21:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29  8:29 Let chapter start on odd page and make the even page before show an image juh
2020-05-29 10:45 ` Wolfgang Schuster
2020-05-29 13:10   ` Jan U. Hasecke
2020-05-29 13:35     ` Wolfgang Schuster
2020-05-29 15:42       ` Jan U. Hasecke
2020-05-29 16:03         ` Aditya Mahajan
2020-05-29 17:27           ` Jan U. Hasecke
2020-05-29 20:13             ` Henning Hraban Ramm
2020-05-29 20:18               ` Aditya Mahajan
2020-05-29 21:20                 ` Henning Hraban Ramm

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