From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/94290 Path: news.gmane.org!not-for-mail From: Zhichu Chen Newsgroups: gmane.comp.tex.context Subject: Re: unwanted head behavior Date: Thu, 7 Apr 2016 14:28:35 +0800 Message-ID: <5705FE13.9070703@sinap.ac.cn> References: <57032823.9020809@sinap.ac.cn> <57034AEA.60108@sinap.ac.cn> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6280283908063453530==" X-Trace: ger.gmane.org 1460010592 5358 80.91.229.3 (7 Apr 2016 06:29:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Apr 2016 06:29:52 +0000 (UTC) To: Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 07 08:29:37 2016 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 plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ao3Rg-0000nR-H4 for gctc-ntg-context-518@m.gmane.org; Thu, 07 Apr 2016 08:29:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 75972A07B; Thu, 7 Apr 2016 08:29:10 +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 afLsd34vEH5d; Thu, 7 Apr 2016 08:29:09 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id A776DA07D; Thu, 7 Apr 2016 08:29:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 47111A07A for ; Thu, 7 Apr 2016 08:29:09 +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 E655DeC2RcT3 for ; Thu, 7 Apr 2016 08:29:07 +0200 (CEST) Original-Received: from sinapcas02.sinap.ac.cn (sinapcas02.sinap.ac.cn [210.72.8.16]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 8ADA0A079 for ; Thu, 7 Apr 2016 08:28:56 +0200 (CEST) Original-Received: from [192.168.31.110] (159.226.222.24) by sinapcas02.sinap.ac.cn (210.72.8.5) with Microsoft SMTP Server id 14.1.438.0; Thu, 7 Apr 2016 14:28:48 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 In-Reply-To: <57034AEA.60108@sinap.ac.cn> X-Originating-IP: [159.226.222.24] 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:94290 Archived-At: --===============6280283908063453530== Content-Type: multipart/alternative; boundary="------------090708050007060306030706" --------------090708050007060306030706 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable If I understand correctly, the "continue=3Dyes" key prevents a new page=20 generated by a lower-level structure, e.g., section, following a=20 higher-level structure, e.g., chapter. Then why the checking is so complex in strc-sec.mkiv: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D \def\strc_sectioning_handle_page_nop {\edef\p_continue{\headparameter\c!continue}% \ifx\p_continue\v!yes \ifnum\previoussectioncountervalue=3D\zerocount \strc_sectioning_check_layout \else\ifnum\currentsectioncountervalue>\zerocount \strc_sectioning_check_layout \fi\fi \else \strc_sectioning_check_layout \fi} =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D I temporarily changed the definition to: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D \newcount\previousheadlevel \previousheadlevel\plusone \def\strc_sectioning_handle_page_nop {\edef\p_continue{\headparameter\c!continue}% \ifx\p_continue\v!yes \ifnum\currentheadlevel>\previousheadlevel\else \strc_sectioning_check_layout \fi \else \strc_sectioning_check_layout \fi \previousheadlevel\currentheadlevel} =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D Seems fine. PS: irrelevant to my problem, but I just wish ConTeXt to be perfect. So: 1, line 1060, file strc-sec.mkiv: \global\setfalse\c_strc_rendering_continue shouldn't this line be "\global\setfalse\c_strc_rendering_continuous"? 2, a lot of \.._strc_sectioniong_... macros in strc-sec.mkiv. I think=20 changing the "sectioniong" to "sectioning" may prevent potential typos. On 04/05/2016 01:19 PM, Zhichu Chen wrote: > > Dear Hans and Wolfgang, > > The following code generates a pdf that I cannot understand. > > 1. Although "placehead" is set to "no," the \part macro still makes an = empty line. > 2. The first \chapter does not open a new page, but if we switch the fi= rst \title > and the first \chapter, the result seems to be all right. > > Is there a simple fix? > > Thanks in advance. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > \setuphead > [part,chapter,title,section] > [continue=3Dyes,page=3Dyes,number=3Dno] > > \setuphead[part][placehead=3Dno] > > > \showframe > > \starttext > > \input ward\page > > \part{TITLE}\input ward\par > \title{Title} > \chapter{Title} > \chapter{Title} > \title{Title} > \chapter{Title} > > \stoptext > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > ConTeXt minimal information: > > > context -version > > mtx-context | ConTeXt Process Management 0.63 > mtx-context | > mtx-context | main context file: > /opt/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv > mtx-context | current version: 2016.03.26 13:51 > > > luatex -version > This is LuaTeX, Version beta-0.90.0 (TeX Live 2016) > > Execute 'luatex --credits' for credits and version details. > > There is NO warranty. Redistribution of this software is covered by > the terms of the GNU General Public License, version 2 or (at your opti= on) > any later version. For more information about these matters, see the fi= le > named COPYING and the LuaTeX source. > > LuaTeX is Copyright 2016 Taco Hoekwater and the LuaTeX Team. > --=20 > Best regards, > =E2=84=A4hichu =E2=84=82hen > > Shanghai Institute of Applied Physics > No. 2019, Jialuo Road > Jiading, Shanghai, P.R.China > Tel: +86-21-39194888 > > > > > > _______________________________________________________________________= ____________ > 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _______________________________________________________________________= ____________ --=20 Best regards, =E2=84=A4hichu =E2=84=82hen Shanghai Institute of Applied Physics No. 2019, Jialuo Road Jiading, Shanghai, P.R.China Tel: +86-21-39194888 --------------090708050007060306030706 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
If I understand correctly, the "continue=3Dyes" key prevents a new page generated by a lower-level structure, e.g., section, following a higher-level structure, e.g., chapter.

Then why the checking is so complex in strc-sec.mkiv:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
\def\strc_sectioning_handle_page_nop
=C2=A0 {\edef\p_continue{\headparameter\c!continue}%
=C2=A0=C2=A0 \ifx\p_continue\v!yes
=C2=A0=C2=A0=C2=A0=C2=A0 \ifnum\previoussectioncountervalue=3D\zero= count
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \strc_sectioning_check_layout<= br> =C2=A0=C2=A0=C2=A0=C2=A0 \else\ifnum\currentsectioncountervalue>= \zerocount
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \strc_sectioning_check_layout<= br> =C2=A0=C2=A0=C2=A0=C2=A0 \fi\fi
=C2=A0=C2=A0 \else
=C2=A0=C2=A0=C2=A0=C2=A0 \strc_sectioning_check_layout
=C2=A0=C2=A0 \fi}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

I temporarily changed the definition to:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
\newcount\previousheadlevel
\previousheadlevel\plusone
\def\strc_sectioning_handle_page_nop
=C2=A0 {\edef\p_continue{\headparameter\c!continue}%
=C2=A0=C2=A0 \ifx\p_continue\v!yes
=C2=A0=C2=A0=C2=A0=C2=A0 \ifnum\currentheadlevel>\previousheadle= vel\else
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \strc_sectioning_check_layout<= br> =C2=A0=C2=A0=C2=A0=C2=A0 \fi
=C2=A0=C2=A0 \else
=C2=A0=C2=A0=C2=A0=C2=A0 \strc_sectioning_check_layout
=C2=A0=C2=A0 \fi
=C2=A0=C2=A0 \previousheadlevel\currentheadlevel}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Seems fine.



PS: irrelevant to my problem, but I just wish ConTeXt to be perfect. So:
1, line 1060, file strc-sec.mkiv:
\global\setfalse\c_strc_rendering_continue
shouldn't this line be "\global\setfalse\c_strc_rendering_continuous"?
2, a lot of \.._strc_sectioniong_... macros in strc-sec.mkiv. I think changing the "sectioniong" to "sectioning" may prevent potential typos.



On 04/05/2016 01:19 PM, Zhichu Chen wrote:

Dear Hans and Wolfgang,

The following code generates a pdf that I cannot understand.

1. Although "placehead" is set to "no," the \part macro still makes an em=
pty line.
2. The first \chapter does not open a new page, but if we switch the firs=
t \title
    and the first \chapter, the result seems to be all right.

Is there a simple fix?

Thanks in advance.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
\setuphead
  [part,chapter,title,section]
  [continue=3Dyes,page=3Dyes,number=3Dno]

\setuphead[part][placehead=3Dno]


\showframe

\starttext

\input ward\page

\part{TITLE}\input ward\par
\title{Title}
\chapter{Title}
\chapter{Title}
\title{Title}
\chapter{Title}

\stoptext
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D

ConTeXt minimal information:


context -version

mtx-context     | ConTeXt Process Management 0.63
mtx-context     |
mtx-context     | main context file:=20
/opt/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context     | current version: 2016.03.26 13:51


luatex -version
This is LuaTeX, Version beta-0.90.0 (TeX Live 2016)

Execute  'luatex --credits'  for credits and version details.

There is NO warranty. Redistribution of this software is covered by
the terms of the GNU General Public License, version 2 or (at your option=
)
any later version. For more information about these matters, see the file
named COPYING and the LuaTeX source.

LuaTeX is Copyright 2016 Taco Hoekwater and the LuaTeX Team.
--=20
Best regards,
=E2=84=A4hichu =E2=84=82hen

Shanghai Institute of Applied Physics
No. 2019, Jialuo Road
Jiading, Shanghai, P.R.China
Tel: +86-21-39194888





____________________________________________________=
_______________________________
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/m=
ailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextre=
v/
wiki     : http://contextgarden.net
_________________________________________________________________________=
__________


--=20
Best regards,
=E2=84=A4hichu =E2=84=82hen

Shanghai Institute of Applied Physics
No. 2019, Jialuo Road
Jiading, Shanghai, P.R.China
Tel: +86-21-39194888
--------------090708050007060306030706-- --===============6280283908063453530== 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= --===============6280283908063453530==--