From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55593 Path: news.gmane.org!not-for-mail From: Andreas Harder Newsgroups: gmane.comp.tex.context Subject: Re: last chapter number Date: Sun, 17 Jan 2010 13:06:59 +0100 Message-ID: References: <7BA269C8-AAAD-46AC-A60A-BB915B5CFAA2@rz-online.de> <1867F0AF-0470-422D-ACE6-68CF3D2ECC72@googlemail.com> <6C55FC49-E9A5-44C4-979F-F660F8DDB3F2@uni-koblenz.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1263730063 2791 80.91.229.12 (17 Jan 2010 12:07:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jan 2010 12:07:43 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 17 13:07:36 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1NWTuo-0001pM-Fj for gctc-ntg-context-518@m.gmane.org; Sun, 17 Jan 2010 13:07:34 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4D112C9CCC; Sun, 17 Jan 2010 13:07:29 +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 KGxAmwLNWvUL; Sun, 17 Jan 2010 13:07:16 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B6CD9C9BD4; Sun, 17 Jan 2010 13:07:16 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 42032C9BD4 for ; Sun, 17 Jan 2010 13:07:12 +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 jKXqwxWv5iGT for ; Sun, 17 Jan 2010 13:07:06 +0100 (CET) Original-Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by balder.ntg.nl (Postfix) with ESMTP id 7B137C9BAC for ; Sun, 17 Jan 2010 13:07:05 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id F13C978A34BB for ; Sun, 17 Jan 2010 13:07:04 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13300-05 for ; Sun, 17 Jan 2010 13:07:04 +0100 (CET) X-CHKRCPT: Envelopesender noch aharder@uni-koblenz.de Original-Received: from [192.168.1.112] (77-23-29-238-dynip.superkabel.de [77.23.29.238]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTP id 7CB5078A34A6 for ; Sun, 17 Jan 2010 13:07:04 +0100 (CET) In-Reply-To: X-Mailer: Apple Mail (2.1077) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:55593 Archived-At: Am 17.01.2010 um 09:13 schrieb Wolfgang Schuster: > = > Am 16.01.2010 um 23:08 schrieb Andreas Harder: > = >>> can you try \convertedstructurecounter[chapter][type=3Dlast] >> = >> Hello Wolfgang, >> = >> I tried, but it only outputs nothing visible. > = > Sorry, my fault. Section numbering use their own system to save and get t= he numbers. > = > What you can do is to save the number of the last chapter at the end of t= he document > with two pass data (\definetwopasslist) and use the result in the second = run or you > what for a solution from Hans. Thank you Wolfgang! You pointed me to \definetwopasslist and that brought m= e to the following solution (without \definetwopasslist): \newcounter\ChapNum \def\NofChaps{0} \definehead [chapter] [before=3D\increment\ChapNum, after=3D\savecurrentvalue\NofChaps{\countervalue{ChapNum}}] \starttext Dieses Dokument besteht aus \NofChaps\ Kapiteln. \dorecurse{9}{\chapter{Kapitel #1}} \stoptext Nonetheless the needed information is already present even more if one uses= a table of contents =85 Andreas ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________