From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71597 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Counter for section heads Date: Fri, 7 Oct 2011 09:28:38 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1317972546 31839 80.91.229.12 (7 Oct 2011 07:29:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 Oct 2011 07:29:06 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 07 09:29:02 2011 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.69) (envelope-from ) id 1RC4rd-0002hE-QM for gctc-ntg-context-518@m.gmane.org; Fri, 07 Oct 2011 09:29:01 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E13C2CB002; Fri, 7 Oct 2011 09:28:58 +0200 (CEST) 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 xcegEE-dM3Qd; Fri, 7 Oct 2011 09:28:45 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A2B06CAFF4; Fri, 7 Oct 2011 09:28:45 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 38FB2CAFF4 for ; Fri, 7 Oct 2011 09:28:44 +0200 (CEST) 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 bEewzEyyAeZB for ; Fri, 7 Oct 2011 09:28:42 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id DB9BECA680 for ; Fri, 7 Oct 2011 09:28:41 +0200 (CEST) Original-Received: from mail-ey0-f169.google.com (mail-ey0-f169.google.com [209.85.215.169]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p977SfU8023131 for ; Fri, 7 Oct 2011 09:28:41 +0200 Original-Received: by eye13 with SMTP id 13so3991923eye.14 for ; Fri, 07 Oct 2011 00:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=6bLAR1f+S0UI5pNPq+5n9lNyB72PGqe1G477RR+j9tk=; b=COqDFsZSNNPFrkqY0QIS0TyVjCEHgXs1AcYSrhnciCHvLBqknv2BXJZtwxdzuph1G1 IHgJ1oKGWb5gKlCldJrvow6YOFPi8xYixUhL3pUZBM197ulxnn1Q2vHHg5CQlLB3JvTC 78WxtY90b/J+MJkg0F/3hnRK10hTstJz9FA04= Original-Received: by 10.223.63.75 with SMTP id a11mr9050976fai.9.1317972520811; Fri, 07 Oct 2011 00:28:40 -0700 (PDT) Original-Received: from [192.168.2.31] (p5482CF64.dip.t-dialin.net. [84.130.207.100]) by mx.google.com with ESMTPS id w6sm11295934fah.0.2011.10.07.00.28.38 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Oct 2011 00:28:39 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1244.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.215.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bFFHsFm4 - e10b352638a9 - 20111007 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:71597 Archived-At: Am 07.10.2011 um 06:27 schrieb Aditya Mahajan: > I want to obtain the total number of sections at a particular depth, and thought that I could get that using \laststructurecounter{....}. But, I cannot find the name of the counter associated with sections. > > Is there a macro or a lua function that returns the name of a counter for the current section (that can then be used by \laststructurecounter)? > > Is there any other way to find the number of sections at the current depth. For example, this document > > ~~~ > \section {one} > > \subsection{1} \subsection{2} \subsection{3} > ~~~ > > has one section at depth 1 and three sectons at depth 2. \definestructureconversionset[default][n,n,A,I][n] \starttext \section {one} \subsection{1} \subsection{2} \subsection{3} Raw number: \namedheadnumber{section} \namedheadnumber{subsection} Converted number: \headnumber[section] \headnumber[subsection] \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________