From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/89697 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: how to (re)set section numbers Date: Thu, 1 Jan 2015 20:48:48 +0100 Message-ID: <1540069A-E3D2-4A52-A694-F820BD4B2C2D@gmail.com> References: <0F330292-451C-47E1-A7BB-5D5EA052BAB9@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/mixed; boundary="===============0932792310==" X-Trace: ger.gmane.org 1420141771 3154 80.91.229.3 (1 Jan 2015 19:49:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Jan 2015 19:49:31 +0000 (UTC) Cc: mailing list for ConTeXt users To: "j. van den hoff" Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 01 20:49:26 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 1Y6lkM-0003eh-AD for gctc-ntg-context-518@m.gmane.org; Thu, 01 Jan 2015 20:49:26 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A55BA1022D for ; Thu, 1 Jan 2015 20:49:25 +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 CYMfu1-YroIs for ; Thu, 1 Jan 2015 20:49:24 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1A9491022F for ; Thu, 1 Jan 2015 20:48:57 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 26CF9101EA for ; Thu, 1 Jan 2015 20:48:53 +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 jtWIIzj9ZB-O for ; Thu, 1 Jan 2015 20:48:52 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 3E911101E8 for ; Thu, 1 Jan 2015 20:48:52 +0100 (CET) Original-Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::22f]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t01Jmp78006382 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 1 Jan 2015 20:48:51 +0100 Original-Received: by mail-wg0-f47.google.com with SMTP id n12so23398664wgh.20 for ; Thu, 01 Jan 2015 11:48:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=+eZqELVcIb7ZtTdm/3sxTM4gY5QvYdjSTdKgLrb48I0=; b=t6dq7z9VT7CUIJa8DrCFE5cDJQwPzWg9zBlxlhSOGfa7cKUxfFecyojgANlNvr8HbD IaU5xv74vzZGQfDnGaEe33pvnjnXBnFQa7vKb1krp/eRct9ncoUff1AjTKkHw9CLN3NP 4TVsOPPWUIWF17vCvOdg8Frhm5ACk8guWSzfHHVdh0eJArod+4F79XPhVayvFHrispXE Tf3GgoObTk2F+HUHf56rIDi1ttIISfxEFg8iK0W5Jh5oZ4WREYVfBH4wPAnzc9I93D0Z g4yV3D4GJB4n6Zf8Ung8VcmpyMzyjIyWSeAyx6JQfAxaNF+VHv8OI15VkL3YlwONGyS7 tl0Q== X-Received: by 10.194.78.204 with SMTP id d12mr143657812wjx.37.1420141731109; Thu, 01 Jan 2015 11:48:51 -0800 (PST) Original-Received: from keima.localdomain (x2f2433b.dyn.telefonica.de. [2.242.67.59]) by mx.google.com with ESMTPSA id u13sm59352840wjr.26.2015.01.01.11.48.49 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Jan 2015 11:48:50 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1993) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c00::22f; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03NyHMP75 - f287093454d8 - 20150101 (trained as not-spam) Received-SPF: pass (filter3-ams.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c00::22f as permitted sender) receiver=filter3-ams.mf.surf.net; client-ip=2a00:1450:400c:c00::22f; envelope-from=; helo=mail-wg0-x22f.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:89697 Archived-At: --===============0932792310== Content-Type: multipart/alternative; boundary="Apple-Mail=_BCD1398A-1B24-42E3-8D8F-0356009C9AC6" --Apple-Mail=_BCD1398A-1B24-42E3-8D8F-0356009C9AC6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 01.01.2015 um 20:16 schrieb j. van den hoff = : >=20 > On Thu, 01 Jan 2015 20:00:00 +0100, Wolfgang Schuster = > = wrote: >=20 >>=20 >>> Am 30.12.2014 um 20:01 schrieb j. van den hoff = : >>>=20 >>> I have followed the recommendations how to include unnumbered = sections in the table-of-content along >>> the lines >>>=20 >>> \setuphead[subject] >>> [incrementnumber=3Dyes,number=3Dno] >>>=20 >>>=20 >>> etc. >>> this works OK if the unnumbered sections are at the end of the = document. otherwise the enumeration of the actually >>> (visibly) numbered sections is messed up (i.e. if a `subject' = section goes, e.g. _before_ all actually enumerated >>> sections, there counters are off by one). >>>=20 >>> question: what is the best way of (re)setting the section counters? = i.e. if the doucment structure is, e.g., >>>=20 >>> \subject >>> \section >>> \subsection >>> \section >>> \subject >>>=20 >>> I'd like to end up with the ToC containing entries for all subjects = and sections but the numbered sections should occur (in ToC and = document) as 1, 1.1, 2 rather than 2 2.1, 3 (in this example). I was not = able to find a solution in the documenation/wiki. >>=20 >> Can you send a *working* minimal example. >=20 > yes, of course (I presumed this to be not necessary here): >=20 > \setuphead[subject] > [incrementnumber=3Dyes, number=3Dno] > \setuplist[section][width=3D1.5em] > \setuplist[subsection][width=3D2.25em, margin=3D1.5em] %`margin' = determines alignment > \setuplist[subject][margin=3D1.5em] > \setupcombinedlist[content] = [list=3D{chapter,section,subsection,subject,subsubject}] > \starttext > \completecontent > \subject{this subject messes up the further enumeration of numbered = sections} > bla > \section{this should be sec. 1} > bla > \subsection{this should be subsec. 1.1} > bla > \section{this should be sec. 2} > bla > \subject{this subject does no harm...} > bla > \stoptext >=20 > In my real life example the first `subject', e.g., contains a Glossary = of abbreviations and I want to start the actual enumeration with the = body text proper (Introduction and onwards), while still listing the = glossary in the ToC. and I did not find any other (general) solution in = the docs, how to include unnumbered sections in the ToC=E2=80=A6 You need \setuphead[subject][incrementnumber=3Dlist] because when you write =E2=80=9Eincrementnumber=3Dyes=E2=80=9D you tell = context to increment the counter for \subject which uses by default the \section counter. Wolfgang= --Apple-Mail=_BCD1398A-1B24-42E3-8D8F-0356009C9AC6 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Am 01.01.2015 um 20:16 schrieb j. van den hoff <veedeehjay@googlemail.com>:

On Thu, 01 Jan 2015 20:00:00 +0100, Wolfgang = Schuster <schuster.wolfgang@gmail.com> wrote:


Am 30.12.2014 um 20:01 = schrieb j. van den hoff <veedeehjay@googlemail.com>:

I have followed the recommendations how to include unnumbered = sections in the table-of-content along
the lines

\setuphead[subject]
   [incrementnumber=3Dyes,number=3Dno]


etc.
this works = OK if the unnumbered sections are at the end of the document. otherwise = the enumeration of the actually
(visibly) numbered = sections is messed up (i.e. if a `subject' section goes, e.g. _before_ = all actually enumerated
sections, there counters are off = by one).

question: what is the best way of = (re)setting the section counters? i.e. if the doucment structure is, = e.g.,

\subject
\section
\subsection
\section
\subject

I'd like to end up with the ToC containing = entries for all subjects and sections but the numbered sections should = occur (in ToC and document) as 1, 1.1, 2 rather than 2 2.1, 3 (in this = example). I was not able to find a solution in the documenation/wiki.

Can you send a *working* minimal = example.

yes, of course (I presumed = this to be not necessary here):

\setuphead[subject]
  [incrementnumber=3Dyes, = number=3Dno]
  \setuplist[section][width=3D1.5em]
  \setuplist[subsection][width=3D2.25em,= margin=3D1.5em] %`margin' determines alignment
  \setuplist[subject][margin=3D1.5em]
\setupcombinedlist[content] = [list=3D{chapter,section,subsection,subject,subsubject}]
\starttext
\completecontent
\subject{this subject messes up the further = enumeration of numbered sections}
bla
\section{this should be = sec. 1}
bla
\subsection{this should be subsec. = 1.1}
bla
\section{this should be sec. 2}
bla
\subject{this subject does = no harm...}
bla
\stoptext

In my real life example the first `subject', = e.g., contains a Glossary of abbreviations and I want to start the = actual enumeration with the body text proper (Introduction and onwards), = while still listing the glossary in the ToC. and I did not find any = other (general) solution in the docs, how to include unnumbered sections = in the ToC=E2=80=A6

You need

    = \setuphead[subject][incrementnumber=3Dlist]

because when you write = =E2=80=9Eincrementnumber=3Dyes=E2=80=9D you tell context to increment = the counter for \subject
which uses by default the = \section counter.

Wolfgang
= --Apple-Mail=_BCD1398A-1B24-42E3-8D8F-0356009C9AC6-- --===============0932792310== 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= --===============0932792310==--