I'm using xelatex. I would like, I think, to alter the kerning between certain italic/math characters, and apostrophes and quotation marks. Here's my problem:
\documentclass[a4paper,12pt]{minimal}
\usepackage{mathspec}
\setallmainfonts[Ligatures=TeX]{Adobe Garamond Pro}
\begin{document}
$F$' $F$''
\end{document}
This, with xelatex, gives me:
That clearly seems wrong.
My question is whether it's possible to tell xelatex to alter the kerning here automatically, without inserting extra commands within the document body itself. I have tried to alter the code given here, but to no avail. The following doesn't work:
\documentclass[a4paper,12pt]{minimal}
\usepackage{mathspec}
\setallmainfonts[Ligatures=TeX]{Adobe Garamond Pro}
\makeatletter
\XeTeXinterchartokenstate=1
\newXeTeXintercharclass\LetterClass
\newXeTeXintercharclass\QuoteClass
\@tempcnta=`\A
\loop\unless\ifnum\@tempcnta>`\Z
\XeTeXcharclass \@tempcnta \LetterClass
\advance \@tempcnta by 1
\repeat
\@tempcnta=`\a
\loop\unless\ifnum\@tempcnta>`\z
\XeTeXcharclass \@tempcnta \LetterClass
\advance \@tempcnta by 1
\repeat
\XeTeXcharclass `\'=\QuoteClass
\XeTeXinterchartoks\LetterClass\QuoteClass={\kern 2pt} % deliberately big
\makeatother
\begin{document}
$F$' $F$'' $F'$ F'
\end{document}
I can see what's going wrong, but I'm not sure what I should do to fix it, or whether this sort of method is wrong-headed from the start.
The solution should let me do this automatically, to whole classes of italic/math letters.
Thanks in advance.
$"F$'
\textit{F}'
for example.\XeTeXinterchartoks
might be a solution. Could you post what you tried for that solution too?mathspec
.