From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107319 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Joey McCollum Newsgroups: gmane.comp.tex.context Subject: Re: Blank page added after pagecolumns Date: Thu, 14 May 2020 17:03:23 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0773461257047037357==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="105751"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu May 14 23:04:07 2020 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 1jZL1S-000RNo-4G for gctc-ntg-context-518@m.gmane-mx.org; Thu, 14 May 2020 23:04:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CB726183CA8; Thu, 14 May 2020 23:03:40 +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 1QUN_izq1I4l; Thu, 14 May 2020 23:03:38 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 423C4183CAE; Thu, 14 May 2020 23:03:38 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 76354183CA4 for ; Thu, 14 May 2020 23:03:37 +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 inzWucLlHcoC for ; Thu, 14 May 2020 23:03:36 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.218.42; helo=mail-ej1-f42.google.com; envelope-from=jmccollum20140511@gmail.com; receiver= Original-Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 75500183C96 for ; Thu, 14 May 2020 23:03:36 +0200 (CEST) Original-Received: by mail-ej1-f42.google.com with SMTP id o10so122625ejn.10 for ; Thu, 14 May 2020 14:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=HE9nap/WAdCiyaJf2gzwFCF7n2ax9dlRnkCHp3VEdUo=; b=Im1cNlqZh2ZjZPaatUH/+BqOCgGgHMMpcshxPukkVEYt5GAAyqlUvtAp3Kwi+b9F/A Nqca8muB3OkXF2S9lHEVEcONDYRD648kR4Ksp7a2UMnK9QKOHBxu6zAhtAGi4ITWKgE8 bwaDMb523GW+S4FssMF2xaQAoiLPEEzGuNKHvQ4iu2bMRg6e+qsibJ4i45Ky/ORmsgh8 6naaVXAas7jHyHl8QR/phuGYBdsU1YJWEo8O1uYfXoe7Qi7KFKAJNnqRC15162uQ7EK9 3c4bSebksHbHp3TMpcalxWELNEhflMdkVZE1wzx9/eP8OhN2eX7Lgcj95l8u9fl5XpY7 Q7mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=HE9nap/WAdCiyaJf2gzwFCF7n2ax9dlRnkCHp3VEdUo=; b=ImrMO5IinZr4wo+nTs++VgB5il59l2vMKX6wiWje0WZkIbRaO9vWDDAsji4u/WbB+4 Ve3xg36pcruriaWwgvrQnjMDXglROQlEn1evFJhByewyELNaspDSaEyW7XtCtIKAdIYv Gs1ZVOW395JQC8XkuGZadNSh1tvDRusMhZwZ9wwJUy/g9pxVxDIMEWT1zGokdwIALqYB r3oCoEy1HQyHPPYwW/SMnTJksf+ug0jJAJyrm23ywWA+qYI+xwnF0YBQmgGEaMT7GJCt P9KD6c9c4SR2y3EUsGqwNBI3Jee0bDIN6HyRbCOCNSGKluXgKkEjecy95gs3wtEbYsZm kbRA== X-Gm-Message-State: AOAM531sr68GoR/Vq9n7PMNTmJaXVQECS3xm/KQ7DWvhlgm+Yk/DGcb3 VcwFf0/0Gc2qZELvJ69y/xhEozatxA6cPhLKz4iSPEaz X-Google-Smtp-Source: ABdhPJxa1Fts6AWnZeMdxxAzK+RMfQPb6asw2k0832yD1MXv64Ow+qz/c/PPtfGPUvbdgRKXod24PRZUc5NfMFX57UA= X-Received: by 2002:a17:906:a44f:: with SMTP id cb15mr5429961ejb.219.1589490215563; Thu, 14 May 2020 14:03:35 -0700 (PDT) In-Reply-To: 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:107319 Archived-At: --===============0773461257047037357== Content-Type: multipart/alternative; boundary="000000000000ac332705a5a2074e" --000000000000ac332705a5a2074e Content-Type: text/plain; charset="UTF-8" Okay, I think I'm getting close, but I'm not quite there yet. The pagecolumns source code is found in page-pcl.mkiv ( source.contextgarden.net/tex/context/base/mkiv/page-pcl.mkiv), and in that code, the \page_col_stop_yes macro seems to have something to do with the issue: ``` \unexpanded\def\page_col_stop_yes {\column % \page_otr_eject_page \page \endgroup % \setupoutputroutine[\s!singlecolumn]% \page_otr_command_set_vsize \page_otr_command_set_hsize \page \endgroup} ``` If I redefine this macro in my MWE as follows, I can remove the extra page that is added when the last page ends with text in the last column: ``` \unprotect \def\page_col_stop_yes {\column %\page_otr_eject_page %\page \endgroup % \setupoutputroutine[\s!singlecolumn]% \page_otr_command_set_vsize \page_otr_command_set_hsize %\page \endgroup} \protect ``` Commenting out the \page calls does the trick in this case, but now, if the last page ends with its text in a column before the last one, then the last page is not typeset at all, and a blank page takes its place. On Sun, May 10, 2020 at 8:34 PM Thangalin wrote: > Bump. > > See also: https://tex.stackexchange.com/q/542993/2148 > > On Mon, May 4, 2020 at 11:46 AM Joey McCollum > wrote: > > > > After continuing to look into this a bit, I noticed that a similar issue > involving the insertion of a blank page after a columnset environment has > been discussed on the mailing list in the thread "Blank page inserted when > text reaches column's end" (dated 08 Dec 2019). In that thread, a proposed > solution was to redefine the \page_grd_stop macro found in page-cst.mkiv as > follows: > > > > ``` > > \unprotect > > \def\page_grd_stop{% > > \endgraf % needed, else wrong vsize in one par case > > \vfill % otherwise weird \placenotes[endnotes] > > \page_grd_command_set_vsize % needed > > \penalty\c_page_otr_eject_penalty > > %\page_grd_command_flush_page > > \page_otr_fill_and_eject_page > > \page_grd_command_set_vsize % why here > > \egroup > > \page_otr_command_set_vsize > > \page_otr_command_set_hsize > > } > > \protect > > ``` > > > > Unfortunately, this approach was found to have potential issues in that > thread, and it does not fix the problem with pagecolumns in my MWE. Are > pagecolumns commands aliased to pagegrid commands like columnset commands > are, or are they defined somewhere else? I checked page-col.mkiv, but it > seems to be too short to be the file that defines pagecolumns behavior. > > > > Joey > > > > On Sat, May 2, 2020 at 11:46 AM Joey McCollum < > jmccollum20140511@gmail.com> wrote: > >> > >> I recently found the pagecolumns manual ( > http://www.pragma-ade.com/general/manuals/pagecolumns.pdf), and in > several of the examples (including those for side floats and footnotes), > the addition of a blank page after the end of the pagecolumns environment > also seems to occur. So when the manual says, "We always start at a new > page and end on a new one," does it mean that this is a feature of > pagecolumns? And if so, is there any way to disable it? I have no problem > with a page break after the end of the pagecolumns environment, but an > empty page added after the break seems unnecessary. I checked for a wiki > page on the \definepagecolumns command to get more information on its > accepted inputs, but there doesn't appear to be a page for this command. > >> > >> Joey > >> > >> On Tue, Apr 28, 2020 at 1:40 PM Joey McCollum < > jmccollum20140511@gmail.com> wrote: > >>> > >>> I am typesetting a document using pagecolumns to ensure that my > footnotes are set ragged-bottom in columns. I have observed some unexpected > behavior whenever the last column on a page is left incomplete: a blank > page is added at the end of the document. A minimal working example follows: > >>> > >>> ``` > >>> > >>> \starttext > >>> > >>> \startpagecolumns[n=2] > >>> > >>> \dorecurse{3}{\par\input zapf} > >>> > >>> \stoppagecolumns > >>> > >>> \stoptext > >>> > >>> ``` > >>> > >>> I typeset this using ConTeXt version 2020.03.10, as released with > TeXLive 2020. Notably, if \dorecurse{3} is changed to \dorecurse{2} or > \dorecurse{6} (so that the text ends in the first column of a page), then > there is no problem. I have tried to fix this by specifying page=no in the > \startpagecolumns arguments, but it did not change anything. Is there > something else I am missing? > >>> > >>> Thank you, > >>> > >>> Joey > > > > > ___________________________________________________________________________________ > > 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 > > > ___________________________________________________________________________________ > > ___________________________________________________________________________________ > 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 > > ___________________________________________________________________________________ > --000000000000ac332705a5a2074e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Okay, I think I'm getting close, but I'm not quite= there yet.=C2=A0The pagecolumns source code is found in page-pcl.mkiv (source.contextgarden.net/tex/context/base/mkiv/page-pcl.mkiv), and in= that code, the \page_col_stop_yes macro seems to have something to do with= the issue:

```
\unexpanded\def\page_col_stop_yes
=C2=A0 {\col= umn % \page_otr_eject_page
=C2=A0 =C2=A0\page
=C2=A0 =C2=A0\endgroup<= br>=C2=A0% \setupoutputroutine[\s!singlecolumn]%
=C2=A0 =C2=A0\page_otr_= command_set_vsize
=C2=A0 =C2=A0\page_otr_command_set_hsize
=C2=A0 =C2= =A0\page
=C2=A0 =C2=A0\endgroup}
```

If I redefine this macro = in my MWE as follows, I can remove the extra page that is added when the la= st page ends with text in the last column:

```

\unprotect

\def\page_col_stop_yes

{\column %\page_otr_eject_pa= ge

%\page

\endgroup

% \setupoutputroutine[\s!sing= lecolumn]%

\page_otr_command_set_vsize=

\page_otr_command_set_hsize=

%\page

\endgroup}

\protect

```

=
Commenting out the \page calls does the trick in this case, but now,= =C2=A0if the last page ends with its text in a column before the last one,= then the last page is not typeset at all, and a blank page takes its place= .

On Sun, May 10, 2020 at 8:34 PM Thangalin <thangalin@gmail.com> wrote:
Bump.

See also: https://tex.stackexchange.com/q/542993/2148=

On Mon, May 4, 2020 at 11:46 AM Joey McCollum
<jmccol= lum20140511@gmail.com> wrote:
>
> After continuing to look into this a bit, I noticed that a similar iss= ue involving the insertion of a blank page after a columnset environment ha= s been discussed on the mailing list in the thread "Blank page inserte= d when text reaches column's end" (dated 08 Dec 2019). In that thr= ead, a proposed solution was to redefine the \page_grd_stop macro found in = page-cst.mkiv as follows:
>
> ```
> \unprotect
> \def\page_grd_stop{%
>=C2=A0 =C2=A0\endgraf % needed, else wrong vsize in one par case
>=C2=A0 =C2=A0\vfill % otherwise weird \placenotes[endnotes]
>=C2=A0 =C2=A0\page_grd_command_set_vsize % needed
>=C2=A0 =C2=A0\penalty\c_page_otr_eject_penalty
>=C2=A0 =C2=A0%\page_grd_command_flush_page
>=C2=A0 =C2=A0\page_otr_fill_and_eject_page
>=C2=A0 =C2=A0\page_grd_command_set_vsize % why here
>=C2=A0 =C2=A0\egroup
>=C2=A0 =C2=A0\page_otr_command_set_vsize
>=C2=A0 =C2=A0\page_otr_command_set_hsize
> }
> \protect
> ```
>
> Unfortunately, this approach was found to have potential issues in tha= t thread, and it does not fix the problem with pagecolumns in my MWE. Are p= agecolumns commands aliased to pagegrid commands like columnset commands ar= e, or are they defined somewhere else? I checked page-col.mkiv, but it seem= s to be too short to be the file that defines pagecolumns behavior.
>
> Joey
>
> On Sat, May 2, 2020 at 11:46 AM Joey McCollum <jmccollum20140511@gmail.com> wrote:
>>
>> I recently found the pagecolumns manual (
http://www.pragma-ade.com/general/manuals/pagecolumns.pdf), and = in several of the examples (including those for side floats and footnotes),= the addition of a blank page after the end of the pagecolumns environment = also seems to occur. So when the manual says, "We always start at a ne= w page and end on a new one," does it mean that this is a feature of p= agecolumns? And if so, is there any way to disable it? I have no problem wi= th a page break after the end of the pagecolumns environment, but an empty = page added after the break seems unnecessary. I checked for a wiki page on = the \definepagecolumns command to get more information on its accepted inpu= ts, but there doesn't appear to be a page for this command.
>>
>> Joey
>>
>> On Tue, Apr 28, 2020 at 1:40 PM Joey McCollum <jmccollum20140511@gmail.co= m> wrote:
>>>
>>> I am typesetting a document using pagecolumns to ensure that m= y footnotes are set ragged-bottom in columns. I have observed some unexpect= ed behavior whenever the last column on a page is left incomplete: a blank = page is added at the end of the document. A minimal working example follows= :
>>>
>>> ```
>>>
>>> \starttext
>>>
>>> \startpagecolumns[n=3D2]
>>>
>>> \dorecurse{3}{\par\input zapf}
>>>
>>> \stoppagecolumns
>>>
>>> \stoptext
>>>
>>> ```
>>>
>>> I typeset this using ConTeXt version 2020.03.10, as released w= ith TeXLive 2020. Notably, if \dorecurse{3} is changed to \dorecurse{2} or = \dorecurse{6} (so that the text ends in the first column of a page), then t= here is no problem. I have tried to fix this by specifying page=3Dno in the= \startpagecolumns arguments, but it did not change anything. Is there some= thing else I am missing?
>>>
>>> Thank you,
>>>
>>> Joey
>
> ______________________________________________________________________= _____________
> 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/listin= fo/ntg-context
> webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.ne= t
> archive=C2=A0 : https://bitbucket.org/phg/cont= ext-mirror/commits/
> wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
> ______________________________________________________________________= _____________
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--000000000000ac332705a5a2074e-- --===============0773461257047037357== 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== --===============0773461257047037357==--