value-copy - e.g. in \textreference
![](https://secure.gravatar.com/avatar/fd43e439fba554d050621d705fc2d8cb.jpg?s=120&d=mm&r=g)
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]}} \definestartstop[MyPara] [before= {\blank[medium]\incrementnumber[number]% \inothermargin{\getnumber[number]~}}, after={\blank[medium]}] \starttext \section \startMyPara blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla \stopMyPara \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
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
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
participants (2)
-
Peter Schorsch
-
Wolfgang Schuster