From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90104 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: TOC with Grey background for pages belonging to last section of every chapter Date: Mon, 2 Feb 2015 23:23:44 +0100 Message-ID: <1375D1CA-977F-460D-8CC5-CA0C93E847C1@gmail.com> References: <52301dbe3d341fb2c7484eebabac5f61.squirrel@webmail.xs4all.nl> <475204C3-A90A-404E-BBB9-2323A3703E96@gmail.com> <28763E80-A4F8-4CB6-8385-5A5FDED2E09B@gmail.com> <2DDCC73C-2FCE-4D38-8DAF-932ECDCCC31A@gmail.com> <5c7bfc9db3058be10166eca7725bd9c1.squirrel@webmail.xs4all.nl> <965F0DD6-3E47-42EF-9B55-FC16DFC4E3D0@gmail.com> <10244E89-A448-4EB6-8425-65C098BCB83E@web.de> 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="===============0080726568==" X-Trace: ger.gmane.org 1422915867 32572 80.91.229.3 (2 Feb 2015 22:24:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2015 22:24:27 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 02 23:24: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 1YIPPt-0001jh-Vb for gctc-ntg-context-518@m.gmane.org; Mon, 02 Feb 2015 23:24:26 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2D20F1043C for ; Mon, 2 Feb 2015 23:24: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 Z_-JlMWUMKRl for ; Mon, 2 Feb 2015 23:24:24 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C939C10238 for ; Mon, 2 Feb 2015 23:23:56 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DC8BD101FB for ; Mon, 2 Feb 2015 23:23:51 +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 wSTEdUxuzLfj for ; Mon, 2 Feb 2015 23:23:50 +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 5C237101F9 for ; Mon, 2 Feb 2015 23:23:50 +0100 (CET) Original-Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t12MNnjO019430 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 2 Feb 2015 23:23:49 +0100 Original-Received: by mail-wi0-f174.google.com with SMTP id n3so20256278wiv.1 for ; Mon, 02 Feb 2015 14:23:49 -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=94UdDrlyXGWs67YBdiHb4K9EXjaJv+u7sU3vdp/PdK8=; b=DIN9yV+KWvDKEOTYmoiJl1pgPSLhCye/+3yH0HvndGfUFMN5nk3NsajEbByMhGFTon LRbEmL6U0DoCHeJ0vmjsZjM09gM6kozezkwH2d2AzjX4HUSPCw1bk0EcS8XIW1dN9crc lsj7otum8UC33f3+NdFvoUB/12zXStMir86UHBn+hbb1cmaReCrJvn40viQE+/jDmkt+ H2Vw1pgd4ontmxWUbEEuIbQTz+TAggDI6kMTaM3wsSp8h/hDNgLr8dcwrj5M0qX+vP8R iOwZ/aQkgfebiayUpMOcc427TACe1rhJBbdHKSJ46t/miBJhthWj+QldXdhqGcDTJd/D xCVg== X-Received: by 10.180.8.233 with SMTP id u9mr26607565wia.56.1422915829010; Mon, 02 Feb 2015 14:23:49 -0800 (PST) Original-Received: from keima.localdomain (x2f2ecdf.dyn.telefonica.de. [2.242.236.223]) by mx.google.com with ESMTPSA id hm6sm19022549wjb.32.2015.02.02.14.23.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 14:23:48 -0800 (PST) In-Reply-To: <10244E89-A448-4EB6-8425-65C098BCB83E@web.de> 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:c05::22e; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03NLynNPf - fa8f89e158c0 - 20150202 (trained as not-spam) Received-SPF: pass (filter3-ams.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c05::22e as permitted sender) receiver=filter3-ams.mf.surf.net; client-ip=2a00:1450:400c:c05::22e; envelope-from=; helo=mail-wi0-x22e.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:90104 Archived-At: --===============0080726568== Content-Type: multipart/alternative; boundary="Apple-Mail=_46E3F0D5-0439-4809-8E74-8491C8D2A5A5" --Apple-Mail=_46E3F0D5-0439-4809-8E74-8491C8D2A5A5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 02.02.2015 um 14:00 schrieb Keith J. Schultz = : >=20 > Hi Wolgang, >=20 > I noticed that \startnamedsection does not add it to the TOC > how would one go about having these =E2=80=9Enamedsections=E2=80=9C = added to the TOC. >=20 > regards > Keith. >=20 >> Am 02.02.2015 um 12:51 schrieb Wolfgang Schuster = >: >>=20 >> You have to add =E2=80=9Elocation=3Dparagraph=E2=80=9D to the = textbackground setup. >>=20 >> \definetextbackground >> [ChapterFrame] >> [frame=3Doff, >> background=3Dcolor, >> backgroundcolor=3Dgreen, >> backgroundoffset=3D1ex, >> location=3Dparagraph] % default: location=3Dtext >>=20 >> \definehead [Framed] [chapter] >> \definehead [Frameless] [chapter] >>=20 >> \setuphead >> [Frameless] >> [before=3D{\blank[2*line]}] >>=20 >> \setuphead >> [Framed] >> [page=3Dno, >> before=3D, >> = beforesection=3D{\page\blank[2*line]\starttextbackground[ChapterFrame]}, >> aftersection=3D\stoptextbackground] >>=20 >> \starttext >>=20 >> \startnamedsection[Frameless][title=3DChapter without frame] >>=20 >> \input knuth >>=20 >> \stopnamedsection >>=20 >> \startnamedsection[Framed][title=3DChapter with frame] >>=20 >> \input knuth >>=20 >> \stopnamedsection >>=20 >> \stoptext The command \startnamedsection[chapter] is the same as using = \startchapter in your document, the only difference is that you use the header-type as = argument in the first case while in the second case the head-type is part of the command name. When you print your table of contents with the \placecontent or = \completecontent commands ConTeXt uses only headers which are in the list for the = =E2=80=9Ccontent=E2=80=9D list. To print additional headers which are defined with \definehead in your = document you can either use \placelist[chapter,MYHEADER,section,=E2=80=A6] = instead of \placecontent or you extend the list for =E2=80=9Ccontent=E2=80=9D with = \setupcombinedlist[content][list=3D{chapter,MYHEADER,=E2=80=A6}] or \placecontent[list=3D{chapter,MYHEADER,=E2=80=A6}] Wolfgang= --Apple-Mail=_46E3F0D5-0439-4809-8E74-8491C8D2A5A5 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Am 02.02.2015 um 14:00 schrieb Keith J. Schultz <keithjschultz@web.de>:

Hi = Wolgang,

I noticed = that \startnamedsection does not add it to the TOC
how would one go about having these =E2=80=9Enamedsections=E2=80= =9C added to the TOC.

regards
Keith.

Am 02.02.2015 um 12:51 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:

You have to add =E2=80=9Elocation=3Dparagraph=E2=80= =9D to the textbackground setup.

\definetextbackground
 [ChapterFrame]
 [frame=3Doff,
  background=3Dcolor,
  backgroundcolor=3Dgreen,
  backgroundoffset=3D1ex,
  location=3Dparagraph] % default: = location=3Dtext

\definehead [Framed] =    [chapter]
\definehead [Frameless] = [chapter]

\setuphead
 [Frameless]
 [before=3D{\blank[2*line]}]

\setuphead
 [Framed]
 [page=3Dno,
  before=3D,
  beforesection=3D{\page\blank[2*line]\starttextbackg= round[ChapterFrame]},
  aftersection=3D\stoptextbackground]

\starttext

\startnamedsection[Frameless][title=3DChapter = without frame]

\input knuth

\stopnamedsection

\startnamedsection[Framed][title=3DChapter with = frame]

\input knuth

\stopnamedsection

\stoptext
<= br class=3D"">
The command \startnamedsection[chapter] is = the same as using \startchapter in your
document, = the only difference is that you use the header-type as argument in the = first
case while in the second case the head-type = is part of the command name.

When you print your table of contents = with the \placecontent or \completecontent
commands = ConTeXt uses only headers which are in the list for the =E2=80=9Ccontent=E2= =80=9D list.
To print additional headers which are = defined with \definehead in your document
you can = either use \placelist[chapter,MYHEADER,section,=E2=80=A6] instead of = \placecontent
or you extend the list for = =E2=80=9Ccontent=E2=80=9D with = \setupcombinedlist[content][list=3D{chapter,MYHEADER,=E2=80=A6}]
or \placecontent[list=3D{chapter,MYHEADER,=E2=80=A6}]
Wolfgang
= --Apple-Mail=_46E3F0D5-0439-4809-8E74-8491C8D2A5A5-- --===============0080726568== 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= --===============0080726568==--