From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/104537 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Strange behavior in somewhat complex layout (again) Date: Thu, 27 Jun 2019 20:17:59 +0200 Message-ID: <41b1aaff-2add-78ce-16ae-b84572579afb@gmail.com> References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0442863261092239172==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="15998"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/6.1.18 To: mailing list for ConTeXt users , Andres Conrado Montoya Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 27 20:18:24 2019 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hgYyW-0003zw-Ey for gctc-ntg-context-518@m.gmane.org; Thu, 27 Jun 2019 20:18:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1CB0D151EF3; Thu, 27 Jun 2019 20:18:00 +0200 (CEST) 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 460gPqEJyDWs; Thu, 27 Jun 2019 20:17:58 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2E566151CF8; Thu, 27 Jun 2019 20:17:58 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B0494151CF8 for ; Thu, 27 Jun 2019 20:17:56 +0200 (CEST) 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 Vfoa_qQKegsu for ; Thu, 27 Jun 2019 20:17:56 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.45; helo=mail-wr1-f45.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Original-Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 17F2F151CE5 for ; Thu, 27 Jun 2019 20:17:55 +0200 (CEST) Original-Received: by mail-wr1-f45.google.com with SMTP id d18so3622870wrs.5 for ; Thu, 27 Jun 2019 11:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=csK1utMjZOzOWSMWMnH4yQQ0Ofk6my2UYjRXAkV2RiE=; b=LrQuhJIxgufY2i4oUvA57gUv1YG321iUmsvtOq4o9GlggKO+Y5G9o8yNtdvILRZcfR OuP/QOb9YYVesBWdmEbLvJmnHLv4llfWm8PNjHu9vIXu8dcX8zJrzI+4+48bT5Q3GPky O7fWAqPs9CasbwPkeS1TlBeKDWtTe2lwBE8cLyVz8a2Qc7DELSnfDmwkhkp4GijXIcEQ G5sxc+1c4nphtpQcQsCjdM0qHk4T39qoA4d5Kl5PjAxUbHu9tzK6S+e5OrznbXY1UjYQ TA8NB8qBr+nZ8i7UWuSPj0brusWQ3cm1QHBDf2MCLG86xE1CG8XpGBq+9unzknPOuxl7 ec3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=csK1utMjZOzOWSMWMnH4yQQ0Ofk6my2UYjRXAkV2RiE=; b=R7nYQkMa+wJKR1EE3qWss8g+R/DARmizGpwEpDtRcvT9X+JkrT7hgv4hqnEpkjFiIG 1mHynC9zy3Oc+f2w8N8iXgsDD/yL4O9M08n3kA5zzWAhQTmFQZtLgbkHwVdvcDWHZ54S vXkqkb8opNhzmdOUHDOaOcgaa6oJ8+yW6rSX5msCJNF7Qhko5D8DWYJg/tPqcuMhKTBr 6L+xtFihIX52hca6d7DsBHsEdJMy2ny5q0Lxt4jP7Qy+DobeQqDsj6sQ0dJdfUhZuksX swiNuz38JQ53ltChSI1bncDoHq1yJom5E05yP4G1+/iJFfSwfzr25X4VvbG7BuuzCPLh iAZg== X-Gm-Message-State: APjAAAXHVTX2izHvvhVywzJyfcIiG9lNUAKRPgf7d/DylWryK1ucRU+k Vfl1j8y4LIDT2mfcWhaGIVU= X-Google-Smtp-Source: APXvYqwTRxoeV1FAKoOZpIqoZoHua8SuSYHEDONFOneKfsjF09GghtMTKlfeLQMX26Nd1X+WRXk9Ag== X-Received: by 2002:adf:ff84:: with SMTP id j4mr4179068wrr.71.1561659475662; Thu, 27 Jun 2019 11:17:55 -0700 (PDT) Original-Received: from [192.168.1.12] (x4d076bf4.dyn.telefonica.de. [77.7.107.244]) by smtp.gmail.com with ESMTPSA id c15sm5187210wrd.88.2019.06.27.11.17.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 11:17:54 -0700 (PDT) In-Reply-To: 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.org gmane.comp.tex.context:104537 Archived-At: This is a multi-part message in MIME format. --===============0442863261092239172== Content-Type: multipart/alternative; boundary="------------FAC108ED792C852C08CD9308" Content-Language: en-US This is a multi-part message in MIME format. --------------FAC108ED792C852C08CD9308 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Andres Conrado Montoya schrieb am 27.06.2019 um 19:22: > Hi List, it seems my message went unnoticed, if you can help me out, > please do. I'm an struggling with this layout. > > I'm trying to make something using bits and examples found here and > elsewhere, but I'm hitting a wall. I know there's a flawed logic in my > approach, but I can't figure it out. Any help is appreciated. > > Expected behavior of the following MWE: > When starting a new chapter, check if the page is even (left page), if > so, fill it with color, and start the chapter in the next odd page > (right page), removing the header but leaving the footer in that > start-chapter page; and if this is a start-chapter page, use a > specific graphic overlay for the page, but if if not (if its a regular > page), use another graphic. > > Result: > The header still appears in the start-chapter page, if it comes after > the color filled page. But, if the start-chapter page comes after a > regular (even) page, everything works as expected (no color-filled > page, no header in the start-chapter page). > > MWE: > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% START MWE > > [...] > > \startsetups [chapter:before] >    \doifoddpageelse >      {} >  {\pushbackground[page] > \setupbackgrounds[page][background=color,backgroundcolor=rojo] > \page[yes,right] >       \popbackground} > \stopsetups \startsetups [chapter:before]   \page   \doifoddpageelse     {}     {\pushbackground[page]        \setupbackgrounds[page][background=color,backgroundcolor=rojo]        \page[yes,header,footer,right]      \popbackground} \stopsetups > \setuphead[chapter] >           [width=20em, > before=\directsetup{chapter:before}, Apply the above setup with beforesection=\directsetup{chapter:before}, Wolfgang --------------FAC108ED792C852C08CD9308 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Andres Conrado Montoya schrieb am 27.06.2019 um 19:22:
Hi List, it seems my message went unnoticed, if you can help me out, please do. I'm an struggling with this layout.

I'm trying to make something using bits and examples found here and elsewhere, but I'm hitting a wall. I know there's a flawed logic in my approach, but I can't figure it out. Any help is appreciated.

Expected behavior of the following MWE:
When starting a new chapter, check if the page is even (left page), if so, fill it with color, and start the chapter in the next odd page (right page), removing the header but leaving the footer in that start-chapter page; and if this is a start-chapter page, use a specific graphic overlay for the page, but if if not (if its a regular page), use another graphic.

Result:
The header still appears in the start-chapter page, if it comes after the color filled page. But, if the start-chapter page comes after a regular (even) page, everything works as expected (no color-filled page, no header in the start-chapter page).

MWE:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% START MWE

[...]

\startsetups [chapter:before]
   \doifoddpageelse
     {}
     {\pushbackground[page]
        \setupbackgrounds[page][background=color,backgroundcolor=rojo]
        \page[yes,right]
      \popbackground}
\stopsetups
\startsetups [chapter:before]
  \page
  \doifoddpageelse
    {}
    {\pushbackground[page]
       \setupbackgrounds[page][background=color,backgroundcolor=rojo]
       \page[yes,header,footer,right]
     \popbackground}
\stopsetups

\setuphead[chapter]
          [width=20em,
          before=\directsetup{chapter:before},
Apply the above setup with

beforesection=\directsetup{chapter:before},

Wolfgang

--------------FAC108ED792C852C08CD9308-- --===============0442863261092239172== 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== --===============0442863261092239172==--