From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/41986 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Total number of figures/tables, etc. Date: Sun, 29 Jun 2008 21:42:57 +0200 Message-ID: <4867E5C1.5010002@wxs.nl> References: <48675790.5060608@mail.ru> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1214787340 4157 80.91.229.12 (30 Jun 2008 00:55:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Jun 2008 00:55:40 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 30 02:56:25 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KD7gu-0003kU-HS for gctc-ntg-context-518@m.gmane.org; Mon, 30 Jun 2008 02:56:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8DC221FF1A; Mon, 30 Jun 2008 02:55:32 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07646-05-20; Mon, 30 Jun 2008 02:55:32 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B1E501FEF1; Sun, 29 Jun 2008 23:42:57 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 556541FC45 for ; Sun, 29 Jun 2008 23:42:53 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12742-06-20 for ; Sun, 29 Jun 2008 23:42:17 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with ESMTP id 4726A200C9 for ; Sun, 29 Jun 2008 21:43:00 +0200 (CEST) Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-1 (SurgeMail 3.9e) with ESMTP id 16310-1840426 for ; Sun, 29 Jun 2008 21:43:00 +0200 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) In-Reply-To: X-Originating-IP: 10.100.1.100 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:41986 Archived-At: Aditya Mahajan wrote: > On Sun, 29 Jun 2008, Oleg Kolosov wrote: > >> Hi! >> >> Is there are an easy way to get total number of pages/tables/figures >> etc.? \getnumber[table] of \getnumber[figure] returns 0, >> \getnumber[page] gives some irrelevant number. I've found command >> \totalnumberofpages, is there are something similar for others? It would >> be great to also automatically change the following word as in: >> >> 1 figure, but 2 figures >> >> Is there support for that in ConTeXt? > > No, but it is easy to define this on your own. To Hans: Is > reading utilities not implemented in mkiv? The following works fine with > mkii but not with mkiv. in mkiv i load at everyjob time instead of everystarttext this should work (patch in core-uti.mkiv) but i wonder why i used everyjob % \to \everyjob \to \everystarttext > \def\noffigures {1} > > \def\savenoffigures > {\savecurrentvalue{\noffigures}{\getnumber[figure]}} > > \appendtoks \savenoffigures \to \everystoptext > > \def\shownoffigures > {\noffigures\ % > \doifelse{\noffigures}{1}{figure}{figures}} > > \starttext > > This text has \shownoffigures. > > \dorecurse{10}{\placefigure{something}{} \input knuth \endgraf } > > \stoptext > > ___________________________________________________________________________________ > 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 : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________