4

\XeTeXcharclass for glues (including null ones) is 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!

  • 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 4 '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 5 '15 at 9:22
1

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)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.