8

Is the \XeTeXinterchartoks active also in math mode? I tried:

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\XeTeXinterchartokenstate = 1
\newXeTeXintercharclass \myletterclass 
\XeTeXcharclass `\a \myletterclass
\XeTeXcharclass `\A \myletterclass

\XeTeXinterchartoks \myletterclass \myletterclass {\hskip1em}

aAAaa          % ok

\textit{aAAaa} % ok 

$aAAaa$        % no

$\hbox{aAAaa}$ % ok

\end{document}

Is there a way to have the interchar tokens inserted in-between math mode characters?

XeTeXinterchartoks not inserted in math mode

3
  • Characters in math mode are processed as "mathchars" rather than "chars", so I guess that the interchar token feature is disabled.
    – egreg
    Dec 26, 2012 at 13:18
  • So I guess my question should read 'is there an \XeTeXintermathchartoks?' and I suspect then the answer to be no.
    – user4686
    Dec 26, 2012 at 13:44
  • You suspect right.
    – egreg
    Dec 26, 2012 at 13:45

1 Answer 1

5

The answer is rather short, I'm afraid: no. The \XeTeXinterchartoks feature is disabled in math mode.

You must log in to answer this question.