Can I use
enctex with XeLaTeX? I want use it as it's a requirement for
encxvlna (package that inserts non-breaking space into Czech documents).
All documents howto use it describe just
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.Sign up to join this community
The impossibility of using encTeX with XeTeX and LuaTeX results from sections 2 and 3 of the manual.
The encTeX extensions is only able to emulate UTF-8 input, while still reading a file one byte at a time. It does so when reading the bytes, so for example something like
\mubyte \foo ABCD\endmubyte
can be declared, which changes
\foo before macro expansion takes place. Sequences are recognized until there's a match with one that's defined.
This means that the level encTeX operates at comes after multibyte conversion into a single Unicode entity has taken place with XeLaTeX and LuaLaTeX. For instance, if the input file is UTF-8 encoded, the multibyte sequence
^^c3^^a1 (I'm using the usual TeX representation) is transformed into the entity
U+00E1 (that is, LATIN SMALL LETTER A WITH ACUTE) before tokenization is performed and category codes are assigned. Since encTeX still works with
xchr arrays with 256 slots, it cannot understand such extended entities.
Maybe this problem can be solved, but, as things stand, XeTeX and LuaTeX cannot be compiled to accept the
-enc option for enabling usage of encTeX.