LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Frank Mittelbach <[log in to unmask]>
Wed, 31 Jan 2001 07:49:51 +0100
text/plain (31 lines)
 > I do not yet understand whether there are any strong objections to
 > making them work in both modes, e.g.,
 >         \ifmmode \frac 12 \else \textonehalf \fi        or, resp.,
 >         \ifmmode ^1       \else \textonesuperior \fi
 > The strict division suggests that something is very wrong with this.
 > What?

for "symbols" like the above this can in fact be done this way and a few
symbols hare "historically defined this way, ie

\pounds -> \relax\ifmmode\mathsterling\else\textsterling

but you need the \relax to ensure that the right thing happens at the
beginning of tabular cells (timing problem in \halign)

and this is the problem: you can't do that to "letters", the use of \relax
there prohibits potential ligatures and not doing it means your definition
produce wrong results or blow up in certain situations

which is why i prefer a "simple" rule:

 - you can use in math only visible ascii directly (further restricted by what
LaTeX uses for controls, eg \_^$...); anything else has to be done via csnames
eg \times \pm \alpha ...

 - any 8bit is mapped to text only