2007/8/30, Peter Schorsch
Hi,
during my first tries of context-programming I bounced a couple of times against a problem I am calling myself my value-copy-border.
E.g. number is a register/variable that helps numbering some paragraphs. Some of these paragraphs also should be cross-linked. But the pointer gets always the value, number has at the point of the pointer - and not at the point of the marked paragraph.
How can I get just the value of a variable? - like currentsection in the example:
\definenumber[number]
\setuphead[chapter,section,subsection,subsubsection [after={\resetnumber[number]}]
\def\MyMark[#1] {\textreference[#1]{Para. \currentheadnumber / \getnumber[number]}}
\def\MyMark[#1]% {\expanded{\textreference[#1]{Para. \currentheadnumber / \getnumber[number]}}}
\definestartstop[MyPara] [before= {\blank[medium]\incrementnumber[number]% \inothermargin{\getnumber[number]~}}, after={\blank[medium]}]
\starttext
\section
\section{...}
\startMyPara blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla \stopMyPara
\subsection
\subsection{...}
\startMyPara blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla \stopMyPara
\startMyPara\MyMark[testmark] blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla \stopMyPara
\section The Link should be [Abs. 1.1/2] but is \in[testmark] %unluckily it is [Abs. 1.1/0]
\stoptext
Wolfgang