On 7/31/2013 12:04 AM, Michael Murphy wrote:
Hello all,
I'm trying to typeset 'H' with a circumflex (or hat) in math mode, but the result is rather ugly when not using latin-modern. I've tried to redefine the \hat macro to move the accent up a bit using \topaccent: is this the best approach? Having to nest '$' does not seem right at all. (Also, for some reason although I find \mathhat in enco-ini.mkiv, when I try to use it I get undefined control sequence.)
Thanks, Michael
\starttypescript [mathfont] \definetypeface [mathfont] [mm] [math] [palatino] [default] [rscale=1.0] \stoptypescript \usetypescript[mathfont] \setupbodyfont[mathfont]
\starttext
$\hat{H}$
\def\hat#1{\topaccent{3pt}{0}{90}{\textcircumflex}{$#1$}}
$\hat{H}$
\stoptext
$\widehat{H}$ ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------