Tangential to your issue, but nota bene: instead of $...$ for inline
math, ConTeXt lets you use \math{...} or \m{...}. Which is a bit more
explicit, and can be easier to debug. You might prefer it.

For display math, you really should use \startformula...\stopformula
if you aren’t using it already, because $$...$$ doesn't space
correctly. (Says the wiki. I don’t know it’s still true.)

Cheers,
Sietse


On 31 July 2013 12:26, Michael Murphy <murphy...@gmail.com> wrote:
> Hi Hans,
>
> Thanks for the response. This is sort of what I wanted, except the \widehat
> is, well, quite wide. So I hacked it around a bit to put the \widehat from a
> capital 'I' on top of a capital 'H'. In case it happens to be helpful, the
> final macro was
>
> \def\hhat{H\kern-0.61em\widehat{\phantom{I}}\kern0.178em}
>
> If I really cared, I wouldn't hard-code those numbers, but since they are in
> em I'm not really too worried.
>
> --
> Michael Murphy
> murphy...@gmail.com
>
> On Wednesday, 31 July 2013 at 08:48, Hans Hagen wrote:
>
> 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
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
>
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to