J%ORG KNAPPEN <[log in to unmask]> writes:
> Yes, this was my intention. If I type "×" (the times sign in
> Latin1,2,3, and 4) I want that it works both in text and in math mode giving
> something sensible (i.e. \textmultiply or \times resp.) I don't want to
> have the command \times in text mode and \textmultiply in math mode necessarily
The text/math ambiguity is a major problem for higherlevel user
interfaces like Scientific Word. If the user enters \gamma + 1 without
first starting a math formula, then the proper way for the software to
write it is:
\textgamma \textplus 1
instead of
$\gamma + 1$
Or, if all the math symbols are made to work equally well outside of
math, simply
\gamma +1
in the middle of the text. This is first of all bad markup, and thus
sure to lead to problems later on; but there is already a problem at the
outset, namely that there will be either no space around the plus sign,
or (if the user explicitly adds spaces, which requires extra typing on
their part) then the spacing will not be the correct math formula
spacing for a binary operator.
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 eTeX or Omega.
