From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62288 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: [NTG-Context] How to compute correct page number for handout Date: Sun, 3 Oct 2010 17:52:07 +0200 Message-ID: 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1286121142 26116 80.91.229.12 (3 Oct 2010 15:52:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Oct 2010 15:52:22 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 03 17:52:21 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 1P2QrM-0003Ui-LL for gctc-ntg-context-518@m.gmane.org; Sun, 03 Oct 2010 17:52:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 231ABCA728; Sun, 3 Oct 2010 17:52:20 +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 xXlN0gETvGC0; Sun, 3 Oct 2010 17:52:16 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D9F26CA71B; Sun, 3 Oct 2010 17:52:15 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 34CEECA71B for ; Sun, 3 Oct 2010 17:52:15 +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 t0InZLw3MQvw for ; Sun, 3 Oct 2010 17:52:12 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id DD993CA70D for ; Sun, 3 Oct 2010 17:52:12 +0200 (CEST) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o93FqChb000895 for ; Sun, 3 Oct 2010 17:52:12 +0200 Original-Received: by fxm10 with SMTP id 10so3923403fxm.14 for ; Sun, 03 Oct 2010 08:52:12 -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=/JXqavhipA2RwmVpJs0eh1FuA3D9CfGC5rBEzvPzVSk=; b=IA8ljsmPMPNZdJe1JEPmhtS/GgARmSjcT5GwS7NBW81IY2WfHHNXVde/OGqlqTJuhh jv6S0icwpZe/iqdT1iH/aQKn6pTPb/VyPZb94KkkguiO59/+TTWGxfyh/djxtP7Y4kvu KgHB2w3qzhTZIOZSJT2Bt/KuEB2wuVkWU2UnA= 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=NpgJNJvolWEqhb2LnWQvRfL3vtbyOIh4l+00iMd3m6Q9RKfSXMi1dzDRmqNUR8+/R2 uYu50iWnKS2dnq6nl1s5PHVfw7kGVmqPVIjur5Fcz98BkMck2JTks8VJ5vugGGHrxHry uJhOPs+iARLzv9NhDg46MW5kFMxsSPg+SPFIc= Original-Received: by 10.223.124.211 with SMTP id v19mr6771599far.66.1286121131382; Sun, 03 Oct 2010 08:52:11 -0700 (PDT) Original-Received: from [192.168.2.23] (p5B292F75.dip.t-dialin.net [91.41.47.117]) by mx.google.com with ESMTPS id a6sm1716893faa.44.2010.10.03.08.52.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 03 Oct 2010 08:52:10 -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: 03DefQcBU - efee55db51d9 - 20101003 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:62288 Archived-At: Am 29.09.2010 um 13:13 schrieb Pierre-Fran=E7ois Bonnefoi: > Hello, > = > I'use extensively context to write my lecture notes and for all of my pri= nting needs. > = > For my students, I've made some lecture presentations in color, and I pri= nt them in black&white, with four pages on one page for the handout. > = > I would like to compute a correct Table of contents according to the hand= out : so to divide the current page number by four to get a correct page nu= mber for the handout. > = > \def\ChapterPrefix#1{\the\numexpr#1/4 \relax} > \setupcombinedlist[content][level=3D1] > \setuplist[chapter][after=3D,before=3D,numbercolor=3Dyellow,numbercommand= =3D\underbar,pagecommand=3D\ChapterPrefix] > = > That doesn't work, and I've some difficulties to figure how computation i= s performed in e-TeX... > = > Could you help me to resolve this issue ? A very dirty hack: \setuppapersize[A6][A6] \let\normaltranslatednumber\translatednumber \def\translatednumber[#1]% {\number\numexpr(\normaltranslatednumber[#1]+1)/4\relax} = \starttext \completecontent \dorecurse{12} {\chapter{Chapter #1} \dorecurse{#1}{\input knuth\par}} \stoptext Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________