5

\XeTeXcharclass for glues (including null ones) is 4095 (was 255).

High punctuation spacing in French with XeTeX is based on \XeTeXcharclass and \XeTeXinterchartoks both in polyglossia and babel/frenchb.

As a maintainer of frenchb, I need to check whether a /positive/ glue preceeds one of the ; : ! : characters; checking the \XeTeXcharclass doesn't make a difference between null and positive glues. This is the origin of the bug:

xelatex + frenchb introduce extra spaces before some characters in lstlisting blocks

[The lstlisting environment adds "\glue 0 plus 1fil minus 1fil" betweeen every token]

With pdfTeX or LuaTeX, I check the width of the glue and decide whether to add space or not, that's why the bug mentioned above only occurs with XeTeX. A possible fix for XeTeX would be to define a special \XeTeXcharclass, say

\newXeTeXintercharclass\FBnulglue

but I have no idea of how to put glues with default width 0pt into this class. Thanks for any hint!

David Carlisle
  • 757,742
Daniel Flipo
  • 2,059
  • the question doesn't seem very clear. You can not put glue in a charclass, they classify characters. You can specify 0pt glue at the boundary between any two classes via \XeTeXinterchartoks xx yy = {\hsip zz\relax} – David Carlisle Dec 04 '15 at 17:03
  • OK, you confirm what I feared: ``You can not put glue in a charclass, they classify characters.'' This means the \XeTeXinterchartoks mechanism is not sufficient to achieve fully satisfactory results while dealing with French high punctuation characters. – Daniel Flipo Dec 05 '15 at 09:22

1 Answers1

2

You can not put glue in a charclass, they classify characters.

You can specify 0pt glue at the boundary between any two classes via

\XeTeXinterchartoks xx yy = {\hksip zz\relax}

(Also note recent xetex have more classes and the null class is now 4095 not 255)

David Carlisle
  • 757,742
  • Upvote for the hint of the null class now being 4095 – xetexref until recently (at least 2019-03-05) still said 255. – dariok Jun 07 '20 at 23:05