From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/114426 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: jbf via ntg-context Newsgroups: gmane.comp.tex.context Subject: help with facing page image Date: Mon, 7 Mar 2022 14:49:28 +1100 Message-ID: <1044b4f3-0e0c-83bf-c5d1-c81d04f04d67@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3549015811676886061==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8577"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cc: jbf To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Mar 07 04:50:15 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nR4Nz-000236-06 for gctc-ntg-context-518@m.gmane-mx.org; Mon, 07 Mar 2022 04:50:15 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 31EB62A2EAE; Mon, 7 Mar 2022 04:49:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mo1qA1IgqJ0l; Mon, 7 Mar 2022 04:49:35 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A712C2A2DEF; Mon, 7 Mar 2022 04:49:35 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A9A502A2DEF for ; Mon, 7 Mar 2022 04:49:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8oGF7njf5-Yq for ; Mon, 7 Mar 2022 04:49:33 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.210.177; helo=mail-pf1-f177.google.com; envelope-from=roma83537@gmail.com; receiver= Original-Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 566A32A2CD4 for ; Mon, 7 Mar 2022 04:49:33 +0100 (CET) Original-Received: by mail-pf1-f177.google.com with SMTP id d187so12596291pfa.10 for ; Sun, 06 Mar 2022 19:49:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:content-language:to:from :subject; bh=VShcrtOLvxvCU6/xYhx6yaKGaeE+/Ieyl/JMZAaSrcw=; b=j6dOZmV50QnRiuNG+uKcjWa7CIdJmZPuPaqeeVy+BD8/ysR1NPv7uSuvzdjXsfe4g5 5KhfToS5s8OnYKP+mrOUJcfyIHQtZXzMp/1YcDZucloYe2uZLBxyxtHw6MvMJVxMI5Bu R9Cis9+CyVEczARuQNrh8eODCOM9aNEeHWzBL2qTyTqBtQwPU9TZRdz6KGjG2tyUz9L0 4gsH10TalLloAQkzjBxgQZcUDwKtGHawGclznrVKDEbT+sCRuGEER+z0yRXpaoRzAm1r WLV0ZpAZgUZiCtxXKRvOo6DWgKU5H6io1nsf0Sjk8+ElDXmesCSsaRhroxwisiJVIyrD qQXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:from:subject; bh=VShcrtOLvxvCU6/xYhx6yaKGaeE+/Ieyl/JMZAaSrcw=; b=jRE4aVbV8UnaN7C6DyvChDV6TSowtQslgllfzbD5wy0fX8CiuxVqEcosfpeKDxLsu8 raB1pCkah15RwgJULCFhK2iuYur+HiPDtZWdqgT/qu42shsgOraMe1mdvdRbWdNBL+k+ Yo0EN3Hu5eRFjqwjc0JlRfIY1X+GSlCCNi3PhmMj+GqDoDeIvQ5tTzCdx1iAEqnOJ/eq 77WUY7TaL90qWMxTG5dpvJuXigoNyZB7YGf89B0d0JScQXL2cv69l0azK/vK6/pwz4fd j3N68wc6Q7bqCejI3pQMFhTUr+povmLjcGJOYB6nikd8PHXRAYs6MePgpCnIF1rQqPTw 6XGg== X-Gm-Message-State: AOAM5332a5f6cMXfvdOjjxQx/OCWKXw4VtRwysgXfvfR0SqtvVSjJNh4 vyG8kQefDxtOega6bqZJYmEd34mHRvo= X-Google-Smtp-Source: ABdhPJzvJt/MSPmHi+vHh63Qga6/P++dKElRkarCcOenKgV9mRUmF5j3XXvw6hP62jFKVZnr1vAQww== X-Received: by 2002:a63:4e:0:b0:37f:f3f0:2d24 with SMTP id 75-20020a63004e000000b0037ff3f02d24mr8208037pga.526.1646624970904; Sun, 06 Mar 2022 19:49:30 -0800 (PST) Original-Received: from [192.168.0.100] ([120.21.192.198]) by smtp.gmail.com with ESMTPSA id x9-20020a056a00188900b004f708b20aadsm793562pfh.179.2022.03.06.19.49.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Mar 2022 19:49:30 -0800 (PST) Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:114426 Archived-At: This is a multi-part message in MIME format. --===============3549015811676886061== Content-Type: multipart/alternative; boundary="------------3T4lei2IKEkouYS0cQfMlP0d" Content-Language: en-US This is a multi-part message in MIME format. --------------3T4lei2IKEkouYS0cQfMlP0d Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------3T4lei2IKEkouYS0cQfMlP0d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

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

--------------3T4lei2IKEkouYS0cQfMlP0d-- --===============3549015811676886061== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============3549015811676886061==--