From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62290 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Pierre-Fran=E7ois_Bonnefoi?= Newsgroups: gmane.comp.tex.context Subject: Re: [NTG-Context] How to compute correct page number for handout Date: Sun, 3 Oct 2010 18:15:16 +0200 Message-ID: <14E2332E-59AC-4EB1-89A8-CBD7D3133641@unilim.fr> 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 1286122536 31348 80.91.229.12 (3 Oct 2010 16:15:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Oct 2010 16:15:36 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 03 18:15:34 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 1P2RDl-0007sv-5t for gctc-ntg-context-518@m.gmane.org; Sun, 03 Oct 2010 18:15:29 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 93DE1CA729; Sun, 3 Oct 2010 18:15: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 zO34NN4mN0By; Sun, 3 Oct 2010 18:15:25 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 263B4CA70A; Sun, 3 Oct 2010 18:15:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AB69DCA70A for ; Sun, 3 Oct 2010 18:15: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 j0aEVD-LaTu5 for ; Sun, 3 Oct 2010 18:15: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 6A718CA703 for ; Sun, 3 Oct 2010 18:15:21 +0200 (CEST) Original-Received: from smtp.unilim.fr (mail.unilim.fr [164.81.1.45]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o93GFKmN020682 for ; Sun, 3 Oct 2010 18:15:20 +0200 Original-Received: from [192.168.0.2] (nor87-1-88-167-27-236.fbx.proxad.net [88.167.27.236]) (authenticated bits=0) by smtp.unilim.fr (8.13.1/8.13.1) with ESMTP id o93GFH70008255 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Sun, 3 Oct 2010 18:15:17 +0200 In-Reply-To: X-Mailer: Apple Mail (2.1081) X-Univ-Limoges-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (smtp.unilim.fr [164.81.1.45]); Sun, 03 Oct 2010 18:15:18 +0200 (CEST) X-Univ-Limoges-MD: Pas de virus trouve X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-Scanned-By: MIMEDefang 2.67 on 164.81.1.45 X-Univ-Limoges-MailScanner-Information: Serveur Anti-virus Please contact postmaster@unilim.fr for more information X-Univ-Limoges-MailScanner-ID: o93GFH70008255 X-Univ-Limoges-MailScanner: Found to be clean X-Univ-Limoges-MailScanner-Envelope-From: bonnefoi@unilim.fr X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=164.81.1.45; country=FR; region=B1; city=Limoges; latitude=45.8500; longitude=1.2500; http://maps.google.com/maps?q=45.8500,1.2500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08DegfkIQ - 5e4c97498b86 - 20101003 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:62290 Archived-At: You saved my day ! Le 3 oct. 2010 =E0 17:52, Wolfgang Schuster a =E9crit : > = > 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 pr= inting needs. >> = >> For my students, I've made some lecture presentations in color, and I pr= int 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 han= dout : so to divide the current page number by four to get a correct page n= umber for the handout. >> = >> \def\ChapterPrefix#1{\the\numexpr#1/4 \relax} >> \setupcombinedlist[content][level=3D1] >> \setuplist[chapter][after=3D,before=3D,numbercolor=3Dyellow,numbercomman= d=3D\underbar,pagecommand=3D\ChapterPrefix] >> = >> That doesn't work, and I've some difficulties to figure how computation = is 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= the Wiki! > = > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-co= ntext > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _________________________________________________________________________= __________ ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________