From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/46184 Path: news.gmane.org!not-for-mail From: "Zhichu Chen" Newsgroups: gmane.comp.tex.context Subject: How to get the total page number at startup in luatex? Date: Mon, 8 Dec 2008 17:33:53 +0800 Message-ID: <769ba7780812080133j69f2f431mf305de7f821610ea@mail.gmail.com> 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 1228728956 16118 80.91.229.12 (8 Dec 2008 09:35:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Dec 2008 09:35:56 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 08 10:37:01 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 1L9cXs-0004ZP-B0 for gctc-ntg-context-518@m.gmane.org; Mon, 08 Dec 2008 10:36:52 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 531861FC00; Mon, 8 Dec 2008 10:35:38 +0100 (CET) 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 17514-03-5; Mon, 8 Dec 2008 10:34:33 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3F4ED1FBBD; Mon, 8 Dec 2008 10:34:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 03ED11FBC9 for ; Mon, 8 Dec 2008 10:34:32 +0100 (CET) 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 19950-01-2 for ; Mon, 8 Dec 2008 10:33:55 +0100 (CET) Original-Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.242]) by ronja.ntg.nl (Postfix) with ESMTP id 17E151FB74 for ; Mon, 8 Dec 2008 10:33:54 +0100 (CET) Original-Received: by rv-out-0708.google.com with SMTP id f25so1033309rvb.14 for ; Mon, 08 Dec 2008 01:33:53 -0800 (PST) Original-Received: by 10.142.90.13 with SMTP id n13mr1393915wfb.167.1228728833761; Mon, 08 Dec 2008 01:33:53 -0800 (PST) Original-Received: by 10.142.253.8 with HTTP; Mon, 8 Dec 2008 01:33:53 -0800 (PST) Content-Disposition: inline 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:46184 Archived-At: Hi, I've met a weird thing, I can't get \totalnumberofpages in the preamble. But it used to work. A simple test file is ++++++++++++++++++++++++++++++++++ \dorecurse{\totalnumberofpages}{\setvalue{test::\recurselevel}{:\recurselevel:}} \def\test{\getvalue{test::\pagenumber}} \starttext \input knuth \page[yes] \input knuth \page[yes] This should be \quotation{:\pagenumber:}, but it's \quotation{\test} \stoptext ++++++++++++++++++++++++++++++++++++ Any suggestions about how to do that? I wanna define each page a macro. -- Best Regards Chen ---------------------------------------------------------------- Zhi-chu Chen | Shanghai Synchrotron Radiation Facility No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China tel: 086 21 5955 3405 | zhichu.chen.googlepages.com | www.sinap.ac.cn ---------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________