From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/61549 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Manipulating \pagenumber with Lua code : example need Date: Wed, 8 Sep 2010 20:58:16 +0200 Message-ID: <59AE7AAF-F1F6-4238-92A3-59DC8C991E81@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1283972313 27487 80.91.229.12 (8 Sep 2010 18:58:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Sep 2010 18:58:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 08 20:58:30 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.69) (envelope-from ) id 1OtPqo-0004Um-2M for gctc-ntg-context-518@m.gmane.org; Wed, 08 Sep 2010 20:58:30 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 83E89CA6BF; Wed, 8 Sep 2010 20:58:28 +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 hE0d07m4WxWb; Wed, 8 Sep 2010 20:58:25 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A30C3CA699; Wed, 8 Sep 2010 20:58:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 96D48CA699 for ; Wed, 8 Sep 2010 20:58:23 +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 zDCCB+IgEB18 for ; Wed, 8 Sep 2010 20:58:21 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 0FBB8CA695 for ; Wed, 8 Sep 2010 20:58:21 +0200 (CEST) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o88IwKOu011684 for ; Wed, 8 Sep 2010 20:58:20 +0200 Original-Received: by fxm3 with SMTP id 3so418645fxm.14 for ; Wed, 08 Sep 2010 11:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=Ozq1bIskl6oCN7JqdLM2bBM5bbzH1xfKgqRJtasBXw0=; b=BAYh9WAkTdaFtBweDw0BxUWPmoA1Ima3tlxrrpa/SGnGRN84yVxMzzwKRGsvT9EVgb ry5LMbFfDYHgQm+8gp7PIIc9AfOZ2lk/JMJpfx8IG/MfiZo86HHGjyy6olOSFKIgWhJr ARfHMmSv3tCGmTLEj3RamjgfXXnVWs2sG+8uk= DomainKey-Signature: a=rsa-sha1; c=nofws; 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; b=FkSR5VvSGWwrbKSf5M79Q4be/jGwODwFr/r1aaofgZxGOL2NKxW2QvHDF359icrY7e IPo//zgRDSwGlm5RBzBxWXVvzxWRtbHpjAZa3EyBZRWFcjnMdujEGVXH6MiACAZNJH9g 9H9KVZlqFFPAcoYCouJPr3aZ0snwAn9T1bHkI= Original-Received: by 10.223.122.196 with SMTP id m4mr85616far.20.1283972300110; Wed, 08 Sep 2010 11:58:20 -0700 (PDT) Original-Received: from [192.168.2.23] (p5B295544.dip.t-dialin.net [91.41.85.68]) by mx.google.com with ESMTPS id r5sm248952faq.32.2010.09.08.11.58.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 08 Sep 2010 11:58:19 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1081) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.41; 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: 08D4iWkeT - 6aba532f1e7f - 20100908 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:61549 Archived-At: Am 08.09.2010 um 20:53 schrieb Vnpenguin: > Hi, > I would like to manipulate \pagenumber with Lua code, in order to add > an increment to page number, print out (\pagenumber + INC) instead of > \pagenumber. > > I can't found any example in Wiki yet. > > Some lines of simple code will be very appreciated :) You can use TeX for this, e.g.: - \number\numexpr\userpageno+2\relax - \number\numexpr\userpageno*2\relax - ... 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 ___________________________________________________________________________________