Hi, On Mon, 4 Dec 2006, Taco Hoekwater wrote:
Aditya Mahajan wrote:
In ConTeXtize mathlig.tex I came across two macros...Is there any ConTeXt equivalent of these?
\def\mathlig@let@cs#1#2{\expandafter\let\expandafter#1\csname#2\endcsname}
\def\mathlig@appendcs#1#2{\expandafter\edef\csname#1\endcsname{\csname#1\endcsname#2}}
Check out the macros whose names start with \append.. in syst-new.tex
Thanks. There are two macros which I think should go somewhere in the core. \def\actively#1#2% {\begingroup\uccode`\~=`#2\relax\uppercase{\endgroup#1~}} \def\letexpandedvalue#1#2{\@EA\let\@EA#1\csname#2\endcsname} I am attaching the complete module. This was just an excercise for me to see how such things can be done in vanilla tex. And since I just copy pasted most of the code, it was much easier to understand what is going on :) It may have taken less time to simply replace all the := with \colonequals, but thats an another story. The present module will allow something like the following. Clearly not as powerful as what is possible with LuaTeX. Hans has already shown how to do this with LuaTeX about an year ago. \definemathligature [sin] {\sin} \definemathligature [cos] {\cos} \definemathligature [exp] {e^} \definemathligature [sqrt] {\sqrt} % An ugly hack to get things to work: Notice the space \definemathcommand [sin] [nolop] {\mfunction{s in}} \definemathcommand [cos] [nolop] {\mfunction{c os}} \startformula sqrt{sin(x^2) + cos(x^2)} \stopformula \startformula exp{x} + (exp{x})^2 \stopformula Is anyone else interested in this module? If so, I may upload it on the garden.