From: jbf via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: jbf <roma83537@gmail.com>
Subject: help with facing page image
Date: Mon, 7 Mar 2022 14:49:28 +1100 [thread overview]
Message-ID: <1044b4f3-0e0c-83bf-c5d1-c81d04f04d67@gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2618 bytes --]
I wonder if someone can help me untangle the current little mess I seem
to be creating!
Author wants an image on facing page to each of 10 chapters in the
bodypart of the document. Assume that everything else is working
properly for this document (double-sided etc.), but other than before
chapter 1, I can't seem to get my facing page image to appear where it
should!
A question along these lines (but not quite the same) was asked back in
2019, so I started with what seemed to me to be the simplest response to
this question. Here is what I have to get the image before Chapter 1 in
bodymatter:
\startbodymatter
\definelayer[mylayer] % name of the layer
[x=0mm, y=0mm, % from upper left corner of paper
width=\paperwidth,height=\paperheight] % let the layer cover the full paper
\setlayer[mylayer]
[hoffset=2.5cm, voffset=3cm]
{\externalfigure[Chapter1.jpg][width=.9\textwidth]}
\doifoddpageelse
{}
{\pushbackground[page]
\setupbackgrounds[page]%[background=color,backgroundcolor=red]
[background=mylayer]
\page[empty]
\popbackground}
\startchapter[title={Prelude}] etc.....
This correctly places the Chapter1.jpg on the facing page to Chapter 1.
My problem comes with Chapter 2, since Chapter 1 finishes on an even
page, and this means I would need a blank odd page to follow that so
that Chapter2.jpg (a different image to the first) can be on the verso
of that and the Chapter itself would then start on the odd page facing that.
I think the \doiffoddpageelse command above is only meant to work when a
chapter ends on an odd, not an even page, but I do not know what
alternative command to give.
Repeating the above set of commands prior to \startchapter for chapter 2
places the image, naturally enough, behind the last page of text for
Chapter 1, which is unacceptable, so I thought I could simply add a
blank page or two after the chapter and it would all fall into place. I
tried various ways of doing that (e.g. \page[+2], or using makeup
pages), and while I can add pages that way, I can't get the image to
appear.
No doubt the solution is simple enough. It might also lie in the
\setuphead[chapter] arrangement too. I've tried page=yes there, but to
no avail. I also tried \ startsetups[chapter:before] with the
pushbackground etc command and added that in with
before=\directsetup{chapter:before} as suggested in the wiki, but
couldn't get that to work either. By that stage I was so tangled up in
the problem I may not have been able to think straight :-). Somehow,
though, I think most of the elements are there.
Any help would be appreciated.
Julian
[-- Attachment #1.2: Type: text/html, Size: 8030 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
___________________________________________________________________________________
next reply other threads:[~2022-03-07 3:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 3:49 jbf via ntg-context [this message]
2022-03-07 5:38 ` śrīrāma via ntg-context
2022-03-07 5:41 ` śrīrāma via ntg-context
2022-03-07 6:20 ` jbf via ntg-context
2022-03-07 7:01 ` śrīrāma via ntg-context
2022-03-07 8:27 ` jbf via ntg-context
2022-03-07 18:35 ` Wolfgang Schuster via ntg-context
2022-03-08 2:51 ` śrīrāma via ntg-context
2022-03-08 3:46 ` śrīrāma via ntg-context
2022-03-09 22:02 ` jbf via ntg-context
2022-03-10 5:35 ` Aditya Mahajan via ntg-context
2022-03-10 5:48 ` jbf via ntg-context
2022-03-10 6:51 ` śrīrāma via ntg-context
2022-03-10 8:49 ` jbf via ntg-context
2022-03-11 12:36 ` Wolfgang Schuster via ntg-context
2022-03-11 23:50 ` jbf via ntg-context
2022-03-08 0:52 ` jbf via ntg-context
2022-03-07 20:08 ` Bruce Horrocks via ntg-context
2022-03-07 20:23 ` Henning Hraban Ramm via ntg-context
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1044b4f3-0e0c-83bf-c5d1-c81d04f04d67@gmail.com \
--to=ntg-context@ntg.nl \
--cc=roma83537@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).