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

How can I define a charclass for umlauts, german quotes „“ (and other special characters which are not A–Z/a–z)?
I’d like to use this for extra kerning in some cases.


% char class for W
\newXeTeXintercharclass \mycharclassW
\XeTeXcharclass `\W \mycharclassW
% char class for german ä (a umlaut)
\newXeTeXintercharclass \mycharclassae
\XeTeXcharclass `a \mycharclassae
% char class for german opening quote „
\newXeTeXintercharclass \mycharclassOQ
% charclass for german closing quote “
\newXeTeXintercharclass \mycharclassCQ

% def interchartokes
\XeTeXinterchartoks \mycharclassW \mycharclassae = {\kern0.5pt}

Wa\quad Wä\quad „W“

How can I add more than one char to a new class, e.g., making C, O, U and Q available in one class (\mycharclassCOQU)?

share|improve this question
@xport: I'd keep XeTeX in the title. – egreg May 28 '11 at 8:51
@egreg: I think it is unnecessary because we already have tag system. – xport May 28 '11 at 9:15
@xport: Thanks for correcting :-). I thought it would be better to have “XeTeX” in title, cause it is more visible than a tag. but you’re right it is redundant so I’d agree with you, removing it from title … – Tobi May 28 '11 at 9:59
several months ago, other users also edited my title when I put unnecessary words as you did above. – xport May 28 '11 at 12:23
up vote 6 down vote accepted

In the same way:

\XeTeXcharclass `ä \mycharclassae

You should naturally load fontspec so that the char is printed. And the file should be in utf8.

share|improve this answer
That works fine. Thanks! ps. what’s the difference between using W and \W after the ` – Tobi May 6 '11 at 16:12
\newXeTeXintercharclass \mycharclassCOQU
\XeTeXcharclass `\C \mycharclassCOQU
\XeTeXcharclass `\O \mycharclassCOQU
\XeTeXcharclass `\Q \mycharclassCOQU
\XeTeXcharclass `\U \mycharclassCOQU

You can assign as many characters as you want to any class; however, a character may belong to only one class (the last specification wins).

share|improve this answer
Thank you! (Unfortunately it isn’t possible to vote two answers as “accepted“ so I voted Ulrike’s answer because it is the one which answers the question in the title.But I voted both as “useful”) – Tobi May 6 '11 at 16:07

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.