# How to design math accent positions correctly?

I am designing a math font with the usual math encodings (ot1, oms, oml, omx, msam, msbm) and am trying to get the math accents correctly. I already found out that the correct accent position is done with the skewchar and kernings with the skewchar. But I am still wondering:

cmsy10 has its skewchar at the code '060 = 48 and cmmi10 has its skewchar at the code '177 = 127. The skewchar of cmsy10 is a prime (') with the width 275/1000 whereas the skewchar of cmmi10 is a tie (◌̑) with a width of 277/1000. What is the connection of the skewchar with the accent positioning? (Is the width the only important thing of the skewchar?) How can TeX tell whether T' means a kerning between "T" and "prime" or a kerning between "T" with the skewchar?

• see rule 12 of appendix G for how the skewchar is used in accent positioning – David Carlisle Dec 23 '18 at 14:58
• …and Rule 14 (of Appendix G of The TeXbook) for information on how TeX deals with the—unusual!—case of the “skewchar” being used directly as an ordinary symbol. – GuM Dec 23 '18 at 15:27
• @DavidCarlisle I have already seen rule 12 of appendix G but did hope, that someone could explain me the cryptic information there in plain English. After your comment I tried to understand it myself: The width of the skewchar is not used for accent positioning. – Linus Romer Dec 23 '18 at 15:43
• @GuM That explains, why $\mathcal{C}'$ will not be kerned: The prime (') will hardly ever be interpreted as text symbol. – Linus Romer Dec 23 '18 at 15:50
• On the other hand, $${\kern 0pt \mathcal{A}}\prime \ne \mathcal{A}\prime$$. What is used for accent positioning is the amount of kern that the font of the accentee specifies between the accentee itself and the skewchar. When no kern is specified (or it is set to zero), the default is to center the accent over the accentee (but what is actually centered over the accentee is a box containing the accent plus its italic correction, you can fiddle with this to provide a different default for special accents); positive kerns move the accent to the right, negative ones to the left. – GuM Dec 23 '18 at 16:18

$${\kern 0pt \mathcal{A}}\prime \ne \mathcal{A}\prime \ne \mathcal{A}' = \mathcal{A'}$$