Re: [NTG-context] Math accents set too close to capital
Hi, Have you tries U+1024 or LETTER CAPITAL H WITH CIRCUMFLEX? True not all Fonts might not have it and it is TEXT not Math. Just a thought. regards Keith. Am 31.07.2013 um 00:04 schrieb Michael Murphy murphy...@gmail.com: 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 -- Michael Murphy murphy...@gmail.com ___ 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 ___
Re: [NTG-context] Math accents set too close to capital
On Wed, Jul 31, 2013 at 09:05:18AM +0200, Keith J. Schultz wrote: Hi, Have you tries U+1024 or LETTER CAPITAL H WITH CIRCUMFLEX? True not all Fonts might not have it and it is TEXT not Math. And you shouldn’t use it in math, even Unicode discourages such use. Accents in text and math are not the same. Regards, Khaled ___ 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 ___
Re: [NTG-context] Math accents set too close to capital
I did try that, but it doesn't seem to exist in my font. Besides, I'm inclined to agree with Khaled on math accents. I think that what I'm trying to do shouldn't be that hard, I just want the \mathhat accent to be placed a little higher. Something like \skew in plain TeX, but in the vertical direction. Michael On Thursday, 1 August 2013 at 09:04, Khaled Hosny wrote: On Wed, Jul 31, 2013 at 09:05:18AM +0200, Keith J. Schultz wrote: Hi, Have you tries U+1024 or LETTER CAPITAL H WITH CIRCUMFLEX? True not all Fonts might not have it and it is TEXT not Math. And you shouldn’t use it in math, even Unicode discourages such use. Accents in text and math are not the same. ___ 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 ___
Re: [NTG-context] Math accents set too close to capital
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 ___
Re: [NTG-context] Math accents set too close to capital
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 (http://www.pragma-ade.com) | www.pragma-pod.nl (http://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 ___
Re: [NTG-context] Math accents set too close to capital
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 ___
Re: [NTG-context] Math accents set too close to capital
On 2013–07–31 Sietse Brouwer wrote: Tangential to your issue, but nota bene: instead of $...$ for inline math, ConTeXt lets you use \math{...} or \m{...}. Indeed. And when you use \asciimode, you have no other choice (and that's a good thing): \asciimode \starttext My #1 is $5 \math{a^2 + b^2} \stoptext Marco signature.asc Description: Digital signature ___ 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 ___
[NTG-context] Math accents set too close to capital
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 -- Michael Murphy murphy...@gmail.com ___ 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 ___