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

  • Characters in math mode are processed as "mathchars" rather than "chars", so I guess that the interchar token feature is disabled. – egreg Dec 26 '12 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 '12 at 13:44
  • You suspect right. – egreg Dec 26 '12 at 13:45
4

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy