ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Schorsch <tralalas@freenet.de>
To: ntg-context@ntg.nl
Subject: Porting from MkII to MkIV
Date: Tue, 24 Aug 2010 21:21:33 +0200	[thread overview]
Message-ID: <i5163u$6ku$1@dough.gmane.org> (raw)

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
___________________________________________________________________________________


             reply	other threads:[~2010-08-24 19:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24 19:21 Peter Schorsch [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='i5163u$6ku$1@dough.gmane.org' \
    --to=tralalas@freenet.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).