From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81152 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: TOC: Chapters with and without page-numbers Date: Fri, 15 Mar 2013 19:13:21 +0100 Message-ID: References: <5142C3C5.4020307@mmnetz.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1363371209 17335 80.91.229.3 (15 Mar 2013 18:13:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Mar 2013 18:13:29 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Mar 15 19:13:54 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UGZ8Y-0004d2-LX for gctc-ntg-context-518@m.gmane.org; Fri, 15 Mar 2013 19:13:50 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 266AC10211; Fri, 15 Mar 2013 19:13:28 +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 j9+or41prNNp; Fri, 15 Mar 2013 19:13:26 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 91102101EE; Fri, 15 Mar 2013 19:13:26 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 978F7101EE for ; Fri, 15 Mar 2013 19:13:24 +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 CFZa-Rgi4pH1 for ; Fri, 15 Mar 2013 19:13:23 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id A4AE0101E8 for ; Fri, 15 Mar 2013 19:13:23 +0100 (CET) Original-Received: from mail-ea0-x231.google.com (mail-ea0-x231.google.com [IPv6:2a00:1450:4013:c01::231]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2FIDMvX030062 for ; Fri, 15 Mar 2013 19:13:23 +0100 Original-Received: by mail-ea0-f177.google.com with SMTP id r16so1641533ead.8 for ; Fri, 15 Mar 2013 11:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=EsFUhmEZ3QeRolZhUcBlWneW9UFEefhRH0R6pygeClk=; b=AuwDWBgkn7oVea4whl0BGyQkr+R5XcaboUh2BhpDNolualaqRUQjP9dLjUBqo0CxUZ nkNDIeqp+JS/UBps18Pw/D2iE/0C1fxp8T6uky2IWqz11rn/1a8Wg/VTPBFFsC64TAbf WIJuIiTTsm92MC+3+IUSu5HsjRPp9lj+ByQmtHnykmaIDqYOKAd84rYvp5q0rRCEV64A UKduBQSehfwoizJgpWxkM4l2/UkIt4MDWCaDHlrmZyDsHbWbEnKKUy5MXsmUCtPLcuCp uOG7nS+XUeECTz/spsMt0fc51f7yXZLeBcxw+XmS81qcm87xG3RzBg1QSY/RL26VkqxY //1g== X-Received: by 10.14.204.195 with SMTP id h43mr20768741eeo.14.1363371202773; Fri, 15 Mar 2013 11:13:22 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4d073955.pool.mediaWays.net. [77.7.57.85]) by mx.google.com with ESMTPS id d47sm11532688eem.9.2013.03.15.11.13.21 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Mar 2013 11:13:22 -0700 (PDT) In-Reply-To: <5142C3C5.4020307@mmnetz.de> X-Mailer: Apple Mail (2.1503) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4013:c01::231; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06JbSdnyu - 0806451b15bc - 20130315 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:81152 Archived-At: Am 15.03.2013 um 07:46 schrieb H. =D6zoguz : > Maybe I have not made it clear, what I mean? > = > My Minexample is: > = > \setuplist[chapter][pagenumber=3Dno] > \starttext > \completecontent > \chapter{Chapter 1} > \section{Section 1} > \chapter{Chapter 2} > \stoptext > = > Now Chapter 1 is without pagenumber in the TOC, correct, because it has a= section after the chapter-title! But Chapter 2 has no sections, so it need= a page number, how to do that? You can play with the following solution, it=92s a bit dirty because you ha= ve to save the values of the chapter entry before you check for section ent= ries. \setuplist[chapter][alternative=3Dmychapter] \definelistalternative[mychapter][renderingsetup=3Dlist:mychapter] \startsetups[list:mychapter] \par \setbox\scratchboxone\hbox{\currentlistentrynumber \quad \currentlistentr= ytitle \quad \currentlistentrypagenumber} \setbox\scratchboxtwo\hbox{\currentlistentrynumber \quad \currentlistentr= ytitle} \determinelistcharacteristics[section] \ifnum\listlength=3D0 \box\scratchboxone \else \box\scratchboxtwo \fi \par \stopsetups \starttext \completecontent \chapter{Chapter 1} \section{Section 1} \chapter{Chapter 2} \stoptext Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________