[texhax] Badly placed \widehat

Michael Barr barr at math.mcgill.ca
Sat Oct 30 15:55:20 CEST 2010


Beautiful!  It does work.

But the "d" is still too close to the right bracket, but thanks to Donald 
Arsenau I now understand why.  But that is a problem with the character 
"d", not with \mathaccent.

Michael

On Sat, 30 Oct 2010, Uwe Lueck wrote:

> "Michael Barr" , 29.10.2010 18:01:49:
>> \def\bbrack#1{[\![#1]\!]}
>> $\bbrack{\widehat c =\widehat d}$
>>
>> Yes, I could add extra space after the argument, but that is a real
>> kludge.  My real question is why can't I get the \widehat to actually be
>> centered over its argument.  As you can see, it starts halfway along the
>> "d" and ends well to the right.  This is also true of the one on the "c"
>> so it is not just centering over an ascender.
>
> Ok, I keep recommending my earlier $[\,CONTENT\,]$ for certain
> CONTENTs, but I see it is a halfway solution if any.
>
> "Donald Arseneau" <asnd at triumf.ca>, 30.10.2010 01:54:50:
>> 1) the letter "d" has its high point over on the right, but the
>> accent is centered over the entire letter, extrapolated along the
>> slope.  If you take the wide part of the d, follow a sloped line
>> up parallel to the stem, you nearly meet the apex of the hat.
>> I bet you expect the hat to be aligned with the stem only.
>
> So simply do so:
>
>    \newcommand*\Widehat[1]{\widehat{\hbox{$#1$}}}
>    \def\bbrack#1{[\![#1]\!]}
>    $\bbrack{\Widehat c =\Widehat d}$
>
> or as recommended earlier:
>
>    $\bbrack{\,\Widehat c =\Widehat d\,}$
>
> and if the argument of \bbrack will always have spaces from
> relation symbols and the like, I would indeed recommend
>
>    \newcommand*\Widehat[1]{\widehat{\hbox{$#1$}}}
>    \def\bbrack#1{[\![\,#1\,]\!]}
>    $\bbrack{\Widehat c =\Widehat d}$
>
> -- tested!
>
> HTH -- Uwe.
>


More information about the texhax mailing list