TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

\XeTeXinterchartokenstate = 1
\newXeTeXintercharclass \myletterclass 
\XeTeXcharclass `\a \myletterclass
\XeTeXcharclass `\A \myletterclass

\XeTeXinterchartoks \myletterclass \myletterclass {\hskip1em}

aAAaa          % ok

\textit{aAAaa} % ok 

$aAAaa$        % no

$\hbox{aAAaa}$ % ok


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

XeTeXinterchartoks not inserted in math mode

share|improve this question
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. – jfbu Dec 26 '12 at 13:44
You suspect right. – egreg Dec 26 '12 at 13:45
up vote 4 down vote accepted

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

share|improve this answer

Your Answer


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.