Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The MinionPro option swash makes \mathcal use Minion swash capitals. The position of math accents on swash capitals could use some adjustment (see below).

For a single accent, applying \skew{6} appears to work well. I suppose I could define a command, say:

\newcommand{\accentcal}[2]{\skew{6}{#1}{\mathcal{#2}}}

Is there a more flexible alternative? One of the MinionPro developers suggested "modifying the kerning files", but I am not sure how to do this.

\documentclass{article}
\usepackage[swash]{MinionPro}

\begin{document}
\[\begin{array}{ccc}
\hat{K} & \hat{\mathcal{K}} & \skew{6}\hat{\mathcal{K}} \\
\hat{C} & \hat{\mathcal{C}} & \skew{6}\hat{\mathcal{C}}
\end{array}\]

\[\begin{array}{ccc}
\widehat{K} & \widehat{\mathcal{K}} & \skew{6}\widehat{\mathcal{K}} \\
\widehat{C} & \widehat{\mathcal{C}} & \skew{6}\widehat{\mathcal{C}}
\end{array}\]
\end{document}

enter image description here

share|improve this question
    
There is an example of patching a font for a similar reason in this answer to a related question: bad-positioning-of-math-accents-for-the-beamer-standard-font –  mas Sep 1 '11 at 9:02
    
@mas Thanks. I saw that post. It isn't clear to me how I can adapt the patch; I am not familiar with font metrics. –  Audrey Sep 1 '11 at 13:57
add comment

2 Answers

up vote 5 down vote accepted
+100

Please try the fixed scripts here to generate the corrected metrics automatically. My result from your code:

enter image description here

share|improve this answer
    
+1 Thanks. Does FontPro work with the OTFs that come free with Adobe Reader? I tried building with only these and the resulting MinionPro map file turns up empty. –  Audrey Aug 1 '12 at 1:32
    
@Audrey Yes, it should work. I've just tried to build the fonts from the Version 2.068 of the font that comes with Adobe Reader on my system and it seemed to work fine. Could you please write what you did (maybe per email)? –  sebschub Aug 1 '12 at 6:58
    
I deleted OTFs for other fonts in the build and it works fine now. Are you planning on doing any work with the glyphs? The math v and \nu look the same. Moreover no professional font offers a product integral. In any case many thanks for this! –  Audrey Aug 2 '12 at 0:28
    
@Audrey I'm glad it worked. At the moment my time is rather limited and I focus on MdSymbol to finish the next release for CTAN. I'll try to add a product integral to MdSymbol first but I'll open issues for the points mentioned by you on github. Do you have other pictures of the product integral? Could you add links to the corresponding issues? The one on CTAN looks strange (at least)... –  sebschub Aug 2 '12 at 9:52
    
Yes, the symbol from prodint looks OK only with CM. With Minion, I use \pi from LM. LM has less weight so \pi doesn't look too heavy scaled up. You can find some more examples here. If you decide to open this issue at github, I can provide more details there. –  Audrey Aug 2 '12 at 15:50
show 2 more comments

There are four classes of solution to the problem:

1. Use an alternative font

One that has the letter shapes and accent positioning to your liking.

2. Create a new command for the accented characters

This can apply the appropriate amount of skew for each required character:

\newcommand*{\Khatcal}{\skew{3}{\hat}{\mathcal{K}}}

Alternatively, your suggested \newcommand is fine if all the \skew values are the same.

Defining special control sequences for accented letters that you need frequently is recommended in the TeXbook (p136) and this extends that to improve the look of the character but is no more work in the text and is easy to change.

3. Use a different accent

For example, with \hat, rather than use the standard accent, use a wide form, albeit over a single character. These can be clearer for math use, unless you are distinguishing between 'hat' and 'big hat' over a single character, and look to better fit the (full width) of the letter.

Many math accents are available in wide forms, e.g. The Comprehensive LaTeX Symbol List (texdoc comprehensive) pp59-60. These symbols are made more extensible by the MnSymbol package (which may be particularly well-suited for use with MinionPro: as I do not have the font installed I cannot verify that) and even more extensible by the yhmath package.

As an example, using the mtpro2 fonts as these are fonts I have installed that give a range of math capitals, rather than because the default small accent positioning is poor:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage[mtpscr]{mtpro2}
\begin{document}
\[\begin{array}{ccc}
\hat{K} & \hat{\mathcal{K}} & \hat{\mathscr{K}}\\
\hat{C} & \hat{\mathcal{C}} & \hat{\mathscr{C}}
\end{array}\]

\[\begin{array}{ccc}
\widehat{K} & \widehat{\mathcal{K}} & \widehat{\mathscr{K}}\\
\widehat{C} & \widehat{\mathcal{C}} & \widehat{\mathscr{C}}
\end{array}\]
\end{document}

mathmode hat accents using some mtpro2 fonts

The accent could be widened toward either side (e.g. add a thin space or phantom character) or moved (e.g. by kerning) but these solutions are as complex as the original kerning suggestion on the smaller accent. As mentioned above, trying the MnSymbol and yhmath wide forms may be simpler if the symbols they define are not already defined in earlier packages.

4. Fix the kerning for the font

This is probably the hardest option and uses tftopl and pltotf to modify the character kerning in the font's .tfm file.

You should check that the licence of the font and its supporting files allows such changes. You should also keep a backup of the unchanged font files. You may also want to use different names for the modified files (if allowed under the licence). Remember, too, if the system's .tfm file for the font is changed that the change could affect other documents compiled on the system that use the font. Lastly, if the fonts are kept with the same name a reinstallation or update of the font will lose the changes.

The process is discussed in Bad positioning of math accents for the beamer standard font.

share|improve this answer
    
Thanks. I've updated the sample to give results with \widehat. They are still pretty bad (IMO). There isn't a distinction in my work between the meaning of \hat and \widehat, but the standard is to use \hat on single characters. I'd sooner switch to another calligraphic font. (In practice I actually do switch, but it'd be great to have a nice fix so MinionPro users can make more use of swash capitals.) –  Audrey Sep 8 '11 at 17:44
    
Thanks for the update. The extra material on #4 is helpful, but it still isn't clear to me how I can adapt Hendrik's post. I'll look into the font metric tools you mentioned. #3 doesn't appear to fix the problem. I've essentially mentioned #1 and #2 already. –  Audrey Sep 18 '11 at 17:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.