From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/61186 Path: news.gmane.org!not-for-mail From: Peter Schorsch Newsgroups: gmane.comp.tex.context Subject: Porting from MkII to MkIV Date: Tue, 24 Aug 2010 21:21:33 +0200 Message-ID: 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: dough.gmane.org 1282677731 7338 80.91.229.12 (24 Aug 2010 19:22:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Aug 2010 19:22:11 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 24 21:22:10 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 1Onz4M-0004wm-75 for gctc-ntg-context-518@m.gmane.org; Tue, 24 Aug 2010 21:22:02 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D038DCA60B; Tue, 24 Aug 2010 21:22:01 +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 1XShMhTWJDUu; Tue, 24 Aug 2010 21:21:59 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0A66CCA606; Tue, 24 Aug 2010 21:21:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EF477CA606 for ; Tue, 24 Aug 2010 21:21:57 +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 fA56g9+vdqoq for ; Tue, 24 Aug 2010 21:21:47 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id E7BC3CA604 for ; Tue, 24 Aug 2010 21:21:46 +0200 (CEST) Original-Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o7OJLj17017880 for ; Tue, 24 Aug 2010 21:21:46 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Onz42-0004Wb-P4 for ntg-context@ntg.nl; Tue, 24 Aug 2010 21:21:42 +0200 Original-Received: from p5490b802.dip.t-dialin.net ([84.144.184.2]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Aug 2010 21:21:42 +0200 Original-Received: from tralalas by p5490b802.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Aug 2010 21:21:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Followup-To: gmane.comp.tex.context Original-Lines: 64 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p5490b802.dip.t-dialin.net User-Agent: KNode/4.4.2 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.91.229.12; country=NO; region=12; city=Oslo; latitude=59.9167; longitude=10.7500; http://maps.google.com/maps?q=59.9167,10.7500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xCWjlJ4R - 35fb76dbcbcd - 20100824 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 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:61186 Archived-At: 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? Thanks for your help ___________________________________________________________________________________ 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 ___________________________________________________________________________________