Print

Print


At 21:44 +0100 2001/02/08, Frank Mittelbach wrote:
>Michael wrote:
> > Nevertheless it seems clear that it would be better to have a separate
> > hash table for math commands and text commands. So \gamma could have one
> > definition in math and another one in text without the constant use of
> > \relax \ifmmode a\else b\fi. This of course is not possible in TeX 3.x;
> > perhaps in NTS or e-TeX or Omega.
>
>but that would not solve the problem either (though I agree it would perhaps
>be a good extension) since the problem with the \halign really is the timing:
>you see the \"a under the assumption that you are parsing for text mode so you
>expand whatever the internal form expands to, eg \OT1-cmd \"\OT1\", then you
>expand \OT1-cmd which i wont bother to write down here :-) and by the time you
>reach, say \accent and trigger the template's u-part your original \" is long
>gone; so if now the u-part puts a $ in front you are too late.

The suggestion I came up with is to use modules: There is a "text" and a
"math" module. If the module name separator is ".", the Greek natural
language "gamma" command used in text is named \text.gamma, and the math
"gamma" command is named \math.gamma. Then one should have some kind of
abbreviation at hand, so that one does not have to write these names out.
For example \use{module}{math} would contain a series of definitions in
effect like \let\gamma\math.gamma, or \use{module}{math}{gamma}. -- If one
has proper "text" and "math" environments, they should be able to sort it
out, which gamma too choose.

-- I don't know how this fits together with the font table stuff, though.

  Hans Aberg