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?

[EMAIL PROTECTED]@cs#1#2{\expandafter\let\expandafter#1\csname#2\endcsname}

[EMAIL PROTECTED]

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~}}

[EMAIL PROTECTED]@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.

Attachment: t-mathlig.tex
Description: Binary data

_______________________________________________
dev-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/dev-context

Reply via email to