Does anyone have a tip for me? I really want these tags in my document.

Many thanks in advance,

On 27 February 2017 at 19:22, Antoine Cailliau <antoinecaill...@gmail.com>
wrote:

> I try to replicate the following : https://mailman.ntg.nl/
> pipermail/ntg-context/2006/021038.html (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.
>
>
> On 27 February 2017 at 17:28, Antoine Cailliau <antoinecaill...@gmail.com>
> wrote:
>
>> Thanks.
>>
>> I updated the wiki.
>>
>> On 27 February 2017 at 17:18, Pablo Rodriguez <oi...@gmx.es> wrote:
>>
>>> On 02/27/2017 04:55 PM, Antoine Cailliau wrote:
>>> > The following code is documented to change the numbering of the
>>> equations.
>>> > However, this still use numerals for the equations.
>>> > [...]
>>> > Is this a bug ? Is it the correct way to change the numbering ?
>>>
>>> Hi Antoine,
>>>
>>> it’s numberconversion (as it reads in “ConTeXt Commands”):
>>>
>>>     \setupformulas[numberconversion=greek]
>>>     \setupbodyfont[dejavu]
>>>     \starttext
>>>     \placeformula[test]
>>>     \startformula E = mc^2 \stopformula
>>>     \stoptext
>>>
>>> BTW, if this is wrong documented in the wiki, please correct it for
>>> future reference.
>>>
>>> Pablo
>>> --
>>> http://www.ousia.tk
>>> ____________________________________________________________
>>> _______________________
>>> 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/list
>>> info/ntg-context
>>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> wiki     : http://contextgarden.net
>>> ____________________________________________________________
>>> _______________________
>>
>>
>>
>
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to