raymond@math.berkeley.edu (Raymond Chen) (09/24/90)
Instead of typing the rather clumsly-looking
$$
D( x_1 + \cdots + x_n, x_1^2 + \cdots + x_n^2, \ldots, x_1^n + \cdots + x_n^n)
$$
I'd prefer to write something like
$$
D( x_1 + -- + x_n, x_1^2 + -- + x_n^2, __, x_1^n + -- + x_n^n)
$$
(The reason is that "\cdots " and "\ldots " draw attention away from
the rest of the expression. I happen to believe that unimportant
parts of expressions should not look more impressive than
the important parts.)
Now, thinking myself a TeXnician, I thought of saving away the original
minus sign via |\let\min@s=-|, then setting the mathcode of |-| to "8000.
The new active |-| peeks ahead via |\futurelet| to see if the next token is
another minus sign. So far so good.
The trouble is that if the macro decides that it is just a plain old
minus sign, I can't typeset that minus sign because TeX keeps converting
the catcode of my |-| token (even the one that |\min@s| saved away) back
into a |-|_{13} because of the funky mathcode. So now minus signs
are completely inaccessible. (Nevermind that I can't even do
|\advance\ht0 by-5pt| from math mode any more because |\futurelet| is
handled by the stomach, not the gullet.)
Any takers?
P.S. In the meantime, I'm using |@| as my character with the funky mathcode,
and using |@_| and |@-| as my abbreviations for |\ldots| and |\cdots|.
It works, but it isn't as pretty.