ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Porting from MkII to MkIV
@ 2010-08-24 19:21 Peter Schorsch
  2010-08-24 19:43 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Schorsch @ 2010-08-24 19:21 UTC (permalink / raw)
  To: ntg-context

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...
<argument> ...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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-08-26 13:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-24 19:21 Porting from MkII to MkIV Peter Schorsch
2010-08-24 19:43 ` Wolfgang Schuster
2010-08-24 22:23   ` Peter Schorsch
2010-08-25 20:44     ` Wolfgang Schuster
2010-08-26 13:58       ` Peter Schorsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).