From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90179 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Disappearing backgrounds/pagenumbers with \page[none] Date: Mon, 9 Feb 2015 19:45:58 +0100 Message-ID: <0F551156-4B0F-4C75-A1C4-0A91468A2A13@gmail.com> References: <54D86E0D.1080007@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/mixed; boundary="===============1499004227==" X-Trace: ger.gmane.org 1423507607 12931 80.91.229.3 (9 Feb 2015 18:46:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2015 18:46:47 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 09 19:46:46 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YKtM5-0007Y4-TI for gctc-ntg-context-518@m.gmane.org; Mon, 09 Feb 2015 19:46:46 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 143751022A for ; Mon, 9 Feb 2015 19:46:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id c8h6PEqu0LWJ for ; Mon, 9 Feb 2015 19:46:43 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id A340110234 for ; Mon, 9 Feb 2015 19:46:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 91DE4101F9 for ; Mon, 9 Feb 2015 19:46:07 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YXH5Ic5ovCSt for ; Mon, 9 Feb 2015 19:46:06 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 57F24101EA for ; Mon, 9 Feb 2015 19:46:06 +0100 (CET) Original-Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t19Ik44l025861 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 9 Feb 2015 19:46:05 +0100 Original-Received: by mail-wg0-f49.google.com with SMTP id k14so28612577wgh.8 for ; Mon, 09 Feb 2015 10:46:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=hz/drO7Ms/23PJrFzWYY2rDlqBfU6YzvxmepKnji8Ow=; b=PNxy3aBUAt+gFXNKyekiFt9g8P4Xu+Kvz6BOBYqCp9C7e6QtotYAnzhojCe/7mnxRZ b7dNIDoPGRUFEoSaVIhcxZ2+2r8wojQ3o7Lycw/0FFHq7HisLwXnjk8jL0P+dEOuv0w8 VmfZLXt2B7eNkqpe/wHrkviJb3wNkGnU5urCez71nqtyQw5g7RWteX9Lpj0Sh8nsj/qG 4PpS93QZOdzn6IoDPypEumV1ijf6sFqKOyHOtdXyGkRy7iKPPTy136bDLY6cSWKOQCAz QCUPIZGRbb2ZjhORV3Qk7NHJ/nsY1ZAkWCgOft5AD/dHi81J7iplU3cnm6UQY4k5aK3c cMAQ== X-Received: by 10.180.108.103 with SMTP id hj7mr1870697wib.90.1423507563172; Mon, 09 Feb 2015 10:46:03 -0800 (PST) Original-Received: from keima.localdomain (x2f357d1.dyn.telefonica.de. [2.243.87.209]) by mx.google.com with ESMTPSA id ka1sm17518790wjc.2.2015.02.09.10.46.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Feb 2015 10:46:02 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.2070.6) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c00::231; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TNOiK5BQ - d68af439c129 - 20150209 (trained as not-spam) Received-SPF: pass (filter2-til.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c00::231 as permitted sender) receiver=filter2-til.mf.surf.net; client-ip=2a00:1450:400c:c00::231; envelope-from=; helo=mail-wg0-x231.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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:90179 Archived-At: --===============1499004227== Content-Type: multipart/alternative; boundary="Apple-Mail=_C72C2E1C-AE71-4BF9-AD3D-601883C4F2E4" --Apple-Mail=_C72C2E1C-AE71-4BF9-AD3D-601883C4F2E4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 09.02.2015 um 18:12 schrieb Aditya Mahajan : >=20 > On Mon, 9 Feb 2015, Hans Hagen wrote: >=20 >> On 2/9/2015 12:19 AM, Wolfgang Schuster wrote: >>>=20 >>>> Am 09.02.2015 um 00:10 schrieb Wolfgang Schuster >>>> >: >>>>=20 >>>> Hi, >>>>=20 >>>> there was a problem on TeX SE [1] where page numbers disappear for = a >>>> whole chapter when \page[none] is used to hide the numbers on empty >>>> left pages in a double sided document. >>>>=20 >>>> As can be seen in the following example the page numbers and >>>> background on the last two pages disappear when =E2=80=9Cmissing=E2=80= =9D mode is >>>> enabled. This happens when the =E2=80=9Cblank=E2=80=9D option for = \page is used >>>> without a change in the page number (we are already at page 3 when >>>> \page[yes,blank,right] is expanded). >>>>=20 >>>> %%%% begin example >>>> \setupbackgrounds[page][background=3Dcolor,backgroundcolor=3Dgray] >>>>=20 >>>> %\enablemode[missing] >>>>=20 >>>> \starttext >>>>=20 >>>> \dorecurse{6}{\input knuth\par} >>>>=20 >>>> % End the current page before \page[blank] is called >>>> \doifmode{missing}{\page} >>>>=20 >>>> \page[yes,blank,right] >>>>=20 >>>> \dorecurse{6}{\input knuth\par} >>>>=20 >>>> \stoptext >>>> %%%% end example >>>>=20 >>>> [1] >> = http://tex.stackexchange.com/questions/225603/missing-page-numbers-first-c= hapter-only-context >>>=20 >>> BTW: Shouldn=E2=80=99t the following assignment in page-ini.miv be = global? >>>=20 >>> \appendtoks >>> \ifcase\pageornamentstate \or >>> \pageornamentstate\zerocount >>> \fi >>> \to \everyaftershipout >>=20 >> sure >=20 > Not sure if this completely fixes the problem. For example: The \global is necessary because otherwise the assignment won=E2=80=99t = have any effect because the output routine (and this is where \everyaftershipout is used) forms = a group but this won=E2=80=99t fix the problem with \page[none]. > \definepagebreak > [chapterpagebreak] > [yes, blank, right] >=20 > \setuphead [chapter] > [page=3Dchapterpagebreak] >=20 > \showframe >=20 > \starttext > \startchapter > [title=3D{First Chapter Title}] >=20 > \dorecurse{6}{\input knuth \par} >=20 > \stopchapter > \startchapter > [title=3D{Second Chapter Title}] >=20 > \dorecurse{6}{\input knuth \par} >=20 > \stopchapter > \stoptext >=20 > There is no page number on the first page of the first chapter, but = there is one on the first page of the second chapter. You don=E2=80=99t need the \chapter commands because it is a \page = problem as can be seen in the following example (the fix above solves the problem only for page 2 and upwards). \starttext \page[yes,blank,yes] \dorecurse{6}{\input knuth\par} \stoptext To really fix the problem you have reset the \pageornamentstate value at the end of the =E2=80=9Cyes=E2=80=9D, =E2=80=9Eright=E2=80=9D etc. = keywords, e.g. (page-brk.mkiv) \installpagebreakmethod \v!yes {\ifconditional\c_page_breaks_enabled \page_otr_flush_all_floats \page_otr_command_next_page \ifinsidecolumns % this will move to MUL \page_otr_eject_page % otherwise sometimes no change \fi - \fi} + \fi + \global\pageornamentstate\zerocount} and the automatic reset with \everyaftershipout has to be removed, = otherwise things like following example have page numbers on the page 2 and 3 = which should be empty. \starttext \page[yes,blank,+3] \dorecurse{6}{\input knuth\par} \stoptext Wolfgang= --Apple-Mail=_C72C2E1C-AE71-4BF9-AD3D-601883C4F2E4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Am 09.02.2015 um 18:12 schrieb Aditya Mahajan <adityam@umich.edu>:

On Mon, 9 Feb 2015, Hans Hagen wrote:

On 2/9/2015 12:19 AM, = Wolfgang Schuster wrote:

Am = 09.02.2015 um 00:10 schrieb Wolfgang Schuster
<schuster.wolfgang@gmail.com <mailto:schuster.wolfgang@gmail.com>>:

Hi,

there was a = problem on TeX SE [1]  where page numbers disappear for a
whole chapter when \page[none] is used to hide the numbers on = empty
left pages in a double sided document.

As can be seen in the following example the = page numbers and
background on the last two pages = disappear when =E2=80=9Cmissing=E2=80=9D mode is
enabled. = This happens when the =E2=80=9Cblank=E2=80=9D option for \page is = used
without a change in the page number (we are already = at page 3 when
\page[yes,blank,right] is expanded).

%%%% begin example
\setupbackgrounds[page][background=3Dcolor,backgroundcolor=3Dgr= ay]

%\enablemode[missing]

\starttext

\dorecurse{6}{\input = knuth\par}

% End the current page before = \page[blank] is called
\doifmode{missing}{\page}

\page[yes,blank,right]

\dorecurse{6}{\input knuth\par}

\stoptext
%%%% end example

[1]
http://tex.stackexchange.com/questions/225603/missing-page-numb= ers-first-chapter-only-context

BTW: Shouldn=E2=80=99t the following = assignment in page-ini.miv be global?

\appendtoks
    \ifcase\pageornamentstate \or
        \pageornamentst= ate\zerocount
    \fi
\to = \everyaftershipout

sure

Not sure if this = completely fixes the problem. For example:

The \global is necessary because otherwise the = assignment won=E2=80=99t have any effect because
the output = routine (and this is where \everyaftershipout is used) forms a group but = this won=E2=80=99t
fix the problem with = \page[none].

\definepagebreak
       [chapterpagebreak]
       [yes, = blank, right]


\setuphead = [chapter]
          [pa= ge=3Dchapterpagebreak]

\showframe

\starttext
\startchapter
       [title=3D{First = Chapter Title}]

\dorecurse{6}{\input knuth = \par}

\stopchapter
\startchapter
       [title=3D{Second = Chapter Title}]

\dorecurse{6}{\input knuth = \par}

\stopchapter
\stoptext

There is no page number on the first page of the = first chapter, but there is one on the first page of the second = chapter.

You = don=E2=80=99t need the \chapter commands because it is a \page problem = as can be seen in the following example
(the fix = above solves the problem only for page 2 and upwards).

\starttext

\page[yes,blank,yes]

\dorecurse{6}{\input = knuth\par}

\stoptext


To really fix the = problem you have reset the \pageornamentstate value at
the end of the =E2=80=9Cyes=E2=80=9D, =E2=80=9Eright=E2=80=9D = etc. keywords, e.g. (page-brk.mkiv)

\installpagebreakmethod = \v!yes
  = {\ifconditional\c_page_breaks_enabled
    =  \page_otr_flush_all_floats
    =  \page_otr_command_next_page
    =  \ifinsidecolumns       % this will move to = MUL
       \page_otr_eject_page = % otherwise sometimes no change
    =  \fi
-  \fi}
+ =  \fi
+ =  \global\pageornamentstate\zerocount}

and the automatic reset with = \everyaftershipout has to be removed, otherwise
things like following example have page numbers on the page 2 = and 3 which
should be empty.
\starttext

\page[yes,blank,+3]

\dorecurse{6}{\input = knuth\par}

\stoptext


Wolfgang
= --Apple-Mail=_C72C2E1C-AE71-4BF9-AD3D-601883C4F2E4-- --===============1499004227== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1499004227==--