From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/61187 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Porting from MkII to MkIV Date: Tue, 24 Aug 2010 21:43:24 +0200 Message-ID: <4C7420DC.1060305@googlemail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282679034 13500 80.91.229.12 (24 Aug 2010 19:43:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Aug 2010 19:43:54 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 24 21:43:52 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 1OnzPU-0000nE-3v for gctc-ntg-context-518@m.gmane.org; Tue, 24 Aug 2010 21:43:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 335FACA611; Tue, 24 Aug 2010 21:43:51 +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 XRqg+kXGujdw; Tue, 24 Aug 2010 21:43:47 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 41CC1CA60A; Tue, 24 Aug 2010 21:43:47 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 901F1CA60A for ; Tue, 24 Aug 2010 21:43:45 +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 ZpWZMQCnWxTF for ; Tue, 24 Aug 2010 21:43:34 +0200 (CEST) Original-Received: from filter4-nij.mf.surf.net (filter4-nij.mf.surf.net [195.169.124.155]) by balder.ntg.nl (Postfix) with ESMTP id 6EA05CA606 for ; Tue, 24 Aug 2010 21:43:34 +0200 (CEST) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter4-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o7OJhXWD010303 for ; Tue, 24 Aug 2010 21:43:33 +0200 Original-Received: by bwz6 with SMTP id 6so34415bwz.14 for ; Tue, 24 Aug 2010 12:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=39mVxv1K0uLlfu1BZTAfEo3r8PXinNAcTB+Sx8yXDV8=; b=C1Xs5jRgzDD3y+GWySBoEJtYMJowd+lGcUL9sClCrUfBN3aloNQh/bKPVlV4GLK2ZG l6fRxeE30/Wr69thuBok/jDPI4Jnty9v5a60cxulJ2BQQy9ADjtKLhMoMAXKFkKKBGlF 57kuEF1rGxd4Wq1Zbh+EKrPRKhn40HKNujs7k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=PBragHmkuDcEyKAkyB+hWpPuZx7eTh6VTxyrplpVFw32mRhfmaQkdoWw0fUhOOT+ts LRBjkLMuCxFlpiXkDKu+257JpnXrh7l/nlNLyFYPfnsx894bTrDsq87VP+kOrYb8gQe4 TMAT6AduxAWwz5fhW2V4PXIIh8IK5t5E0C/hs= Original-Received: by 10.204.39.203 with SMTP id h11mr5232843bke.8.1282679010618; Tue, 24 Aug 2010 12:43:30 -0700 (PDT) Original-Received: from [192.168.2.23] (p5B293897.dip.t-dialin.net [91.41.56.151]) by mx.google.com with ESMTPS id y19sm363664bkw.6.2010.08.24.12.43.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Aug 2010 12:43:29 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.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: 04CWjHxCl - fdf7a353ac51 - 20100824 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.155 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:61187 Archived-At: Am 24.08.10 21:21, schrieb Peter Schorsch: > Hi, > > I started to write under MkII a module to number and reference each > paragraph. I got it to work but it was not well done. Now I want to finish > and clean it to upload it on contextgarden for all. But I am stucking at the > port to MkIV. > > (Reduced MkII Version): > > \definenumber[paraNumber] > \setuphead[chapter,section,subsection,subsubsection] > [after={\resetnumber[paraNumber]}] > > \def\StartPara[#1]% > {\getparameters[tmp][heading=,mark=,#1]% > \incrementnumber[paraNumber]% > \inothermargin{\tfx\getnumber[paraNumber]~}% > \doifnot{\tmpheading}{}{\inmargin{\tmpheading}}% > \doifnot{\tmpmark}{}{\expanded{\textreference[\tmpmark]{XXX > /\getnumber[paraNumber]}}}% > } > \def\StopPara% > {\blank[medium]} > > \starttext > > \chapter{Alter novom} > > \StartPara[heading={lorem ipsum},mark=test] > Lorem ipsum ... > \StopPara > > \StartPara > Lorem ipsum \in[test] > \StopPara > > \stoptext > > XXX stands for an already ported part that works. I have two problems I do > not know how to solve: > > - the line starting with inothermargin gives back in mkii always the correct > number form: n (always latin numbers). In mkiv it gives back m.n. Also in > mkiv: inside bodymatter the numbers are latin number e.g. 1.2 and inside > appendecies latin letters and numbers, e.g. A.II. > What needs to be change in my module to get the old mkii behavior back? > > - There must be a problem in the last line: as soon I use my mark option I > get following error: > > ! Use of \dovspacingyes doesn't match its definition. > \doifnextoptionalelse ...\nextoptionalcommandyes { > #1}\def > \nextoptionalcomma... > ...ference [\tmpmark ]{XXX /\getnumber > [paraNumber]} > \expanded ...\long \xdef \@@expanded {\noexpand #1 > }\@@expanded > l.18 \StartPara[mark=test] > > > Does anyone know how to solve/port this to mkiv? \definenumber[PARANUMBER][way=bysection,prefixsegments=100] \unexpanded\def\startPARA {\dosingleempty\dostartPARA} \def\dostartPARA[#1]% {\getrawparameters[PARA][heading=,mark=,#1]% \incrementnumber[PARANUMBER]% \inothermargin{\tfx\getnumber[PARANUMBER]~}% \doifsomething\PARAheading{\inmargin{\PARAheading}}% \doifsomething\PARAmark {\textreference[\PARAmark]{XXX/\rawnumber[PARANUMBER]}}% \ignorespaces} \unexpanded\def\stopPARA {\blank[medium]} 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 ___________________________________________________________________________________