From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/41980 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Total number of figures/tables, etc. Date: Sun, 29 Jun 2008 11:45:54 -0400 (EDT) Message-ID: 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 1214754224 15908 80.91.229.12 (29 Jun 2008 15:43:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Jun 2008 15:43:44 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jun 29 17:44:28 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 1KCz4k-0001Ub-Qf for gctc-ntg-context-518@m.gmane.org; Sun, 29 Jun 2008 17:44:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A8AE51FC72; Sun, 29 Jun 2008 17:43:33 +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 28668-04-15; Sun, 29 Jun 2008 17:43:14 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 123DB1FBC1; Sun, 29 Jun 2008 17:43:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 867DE1FBC1 for ; Sun, 29 Jun 2008 17:43:07 +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 28742-01-9 for ; Sun, 29 Jun 2008 17:42:52 +0200 (CEST) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by ronja.ntg.nl (Postfix) with ESMTP id 3E52E1FA41 for ; Sun, 29 Jun 2008 17:42:52 +0200 (CEST) Original-Received: FROM adi-laptop.local (c-68-40-40-75.hsd1.mi.comcast.net [68.40.40.75]) BY hackers.mr.itd.umich.edu ID 4867AD78.58371.8628 ; 29 Jun 2008 11:42:48 -0400 In-Reply-To: <48675790.5060608@mail.ru> User-Agent: Alpine 1.00 (DEB 882 2007-12-20) 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:41980 Archived-At: 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. \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 ___________________________________________________________________________________