(i.e. the equivalent of \tag in latex/amsmath). More precisely this:
%------------------------8<--------------------------
\def\placeformulatag%
{\dosingleempty\doplaceformulatag}
\def\doplaceformulatag[#1]#2%
{\let\normalstopformula\stopformula
\def\stopformula%
{\normalstopformula
\restorenumber[formula]
\egroup
\let\stopformula\normalstopformula}
\bgroup
\savenumber[formula]
\def\dummyconversion##1{#2}
\defineconversion[dummyconversion][\dummyconversion]
\setupformulas[conversion=dummyconversion]
\placeformula[#1]}
\starttext
\placeformulatag[tag]{test} \startformula
E = mc^2
\stopformula
See \in formula[tag] for a tagged formula
\stoptext
%----------------------------8<-------------------------
However, the following (simpler) code produce an "Undefined control sequence" when using \in command.
\starttext
{
\def\a#1{test}
\defineconversion[a][\a]
\setupformulae[numberconversion=a]
\placeformula[test]
\startformula E = mc^2 \stopformula
}
This is my reference: \in{formula}[test].
\stoptext
The following code, does not produce the error, but is not practical for the reproducing the \tag command.
\starttext
{
\def\a#1{test}
\defineconversion[a][\a]
\setupformulae[numberconversion=a]
\placeformula[test]
\startformula E = mc^2 \stopformula
This is my reference: \in{formula}[test].
}
\stoptext
What am I doing wrong? I guess the command \a is no longer defined when the compiler hit \in but how can I ensure that such local definition stay accessible ?
Thank you in advance,
Antoine C.