On Mon, 23 Mar 2009, Eythan Weg wrote:
Aditya Mahajan <[email protected]>
Sun, 22 Mar 2009 22:24:17 -0400 (EDT)
On Mon, 23 Mar 2009, Mojca Miklavec wrote:
>> This however fails:
>> k:=2;
>> label.bot(textext("$1\over" & decimal k & "$"), (10,0)) ;
>
> Try with \frac instead.
Or prevent expansion of \over
label.bot(textext("$1\noexpand\over" & decimal k & "$"), (10,0)) ;
Why \atop or \choose do not need \noexpand?
What is special about \over?
It is redefined by ConTeXt to be a useful command in text mode.
\starttext
\section[sec:test] {Some section}
See \over[sec:test]
\stoptext
Hans, is it OK to change the definitions in core-def to
\ifnum\texengine=\luatexengine
\ifx\in \undefined\else \let\normalmathin \in
\unexpanded\def\in {\mathortext\normalmathin \dospecialin } \fi
\ifx\at \undefined\else \let\normalmathat \at
\unexpanded\def\at {\mathortext\normalmathat \dospecialat } \fi
\ifx\about\undefined\else \let\normalmathabout\about
\unexpanded\def\about{\mathortext\normalmathabout\dospecialabout} \fi
\ifx\from \undefined\else \let\normalmathfrom \from
\unexpanded\def\from {\mathortext\normalmathfrom \dospecialfrom } \fi
\ifx\over \undefined\else \let\normalmathover \over
\unexpanded\def\over {\mathortext\normalmathover \dospecialabout} \fi
\fi
(added \unexpanded). This is certainly useful for \in and \over, maybe not
so much for the other three.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________