[texhax] FW: Re: Strange behavior of \mathop

Uwe Lueck uwe.lueck at web.de
Wed Nov 10 15:34:06 CET 2010


I forgot to add that vertical centering of a single \mathop glyph may have been a *surprise* and not wanted at all. 

Contrary to the recommendation \mathop{\mathbf E} from others before, \mathop{\textbf E} positions the `E' just as \max or \sin "baseline on baseline", and this may have been intended. 

Cheers, 

    Uwe. 


-----Ursprüngliche Nachricht-----
Von: "Uwe Lueck" <uwe.lueck at web.de>
Gesendet: 10.11.2010 12:24:11
An: texhax at tug.org, asnd at triumf.ca, "Michael Barr" <barr at math.mcgill.ca>
Betreff: Re: [texhax] Strange behavior of \mathop

> Michael Barr  writes:
>> I was vaguely aware that \mathop sometimes lowers its argumet, but I was

... or better, the argument is *centered*, if it produces (contains) 
a single glyph, according to rule 13 of TeXbook Appendix G. Try

    x $\mathop{E}$ x $\mathop{e}$ x

-- the `E' is lowered, the `e' is raised (at least with me).

By contrast, if there is something more in \mathop{...} besides a symbol, 
the symbol is placed like text, its baseline just on the surrounding 
baseline. That's why "max" and "sin" within \mathop{...} are not centered, 
but typeset as text, baseline on baseline, as we expect it.

>> unprepared for this.  Look at the following two, nearly identical files,
>> paying close attention to the vertical placement of the bold "E"s.
>> 
>> \documentclass[12pt]{article}
>> \def\E{\mathop{\bf E}}
>
"Donald Arseneau" [, 09.11.2010 22:05:18:
> Use \mathbf{E} instead of the LaTeX 2.09 \bf, and all is consistent.
>
> The old-style font commands introduce spurious {} for the first
> instance at a particular size, so your E is not a single char.
>
> That is bug "latex/3357 (2001-08-04): font commands give {} in math mode"
> that was never fixed (even though I submitted a patch with the report).

I.e. (for "laymen" as I was one a few minutes ago): 
because the first appearance of \mathop{\bf E} adds some `{}' to the `E', 
it is *not* centered. It is centered the next times. Enjoy

    x $\mathop{e} \mathop{E}$ 
    x $\mathop{{}e} \mathop{{}E}$ 
    x $\mathop{e{}} \mathop{E{}}$ x

I discover that that bug report (whose original content I cannot see 
on the bugs database) seems not to be entirely correct. 
The bug occurs with \bf, \it, \sf, \tt, but not with \rm, try 

    x $\mathop{\bf E} \mathop{\bf E}$ 
    x $\mathop{\it E}$ x $\mathop{\it E}$ 
    x $\mathop{\rm E} \mathop{\rm E}$ 
    x $\mathop{\sf E} \mathop{\sf E}$ 
    x $\mathop{\tt E} \mathop{\tt E}$ 

Cheers, 

    Uwe.



More information about the texhax mailing list