Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

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

1 Answer 1

up vote 3 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

 
discard

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.