[XeTeX] anti-xunicode ;-)

Will Robertson wspr81 at gmail.com
Fri Jul 21 11:16:34 CEST 2006


Hi Francois,

(Sorry about the cedilla, but I'm on a windows machine at uni and
don't know how to type them!)

I can see situations where your package could be useful (nice name, by
the way). As a side note, I think it might be a good idea to write a
package to get LaTeX's \DeclareUnicodeCharacter working as expected --
note that it does the opposite thing to xunicode's
\DeclareUTFcharacter. To paraphrase myself from last November:

In xunicode, \textsection is defined as the unicode char "00A7:
   \DeclareUTFcharacter[\UTFencname]{x00A7}{\textsection}

In utf8enc.dfu (for \usepackage[utf8]{inputenc}), the unicode char
"00A7 is defined as the macro \textsection:
   \DeclareUnicodeCharacter{00A7}{\textsection}

(I think the similarities in names between these two macros is
confusing, but I'm not sure if you're willing, Ross, to change things
at this point. I'd also swap the arguments of \DeclareUTFcharacter for
similar reasons, if it were up to me.)

Anyway, I was saying that it would be good to provide a command
somewhere (maybe xltxtra?) along the lines of
  \newcommand\DeclareUnicodeCharacter[2]{%
    \catcode^^^^#1=\active
    \DeclareCommand^^^^#1{#2}}

(Untested. Will that work?) A warning to prevent overwriting'd be good, too.
I'd also use this macro for things like
  \DeclareUnicodeCharacter{**emdash**}{\unskip\,\textemdash\nobreak\,\ignorespaces}
or whatever.

On 7/21/06, Ross Moore <ross at ics.mq.edu.au> wrote:
> There is no incompatibility [between xdiacomp and xunicode].
> Just change the font-encoding away from the default of 'U',
> whenever you encounter one of your active characters.
>
> xunicode is set up so that accenting macros, such as \d ,
> only provide the UTF8 code when the encoding is 'U'.

Won't declaring \UTFencname to something else before xunicode is
loaded change the encoding of the definitions it makes?

Also, if you are looking to actively integrate your system into
LaTeX's output encoding system, then I feel two things have to happen:
- We need to start using a specific unicode encoding (or a set of
unicode subset encodings) rather than "U", which means undefined. This
would be one line of code to change in xunicode. Note that fontspec
has the same problem, here.
- xunicode's definitions should be provided via proper font encoding
files (e.g., eu1enc.def for the "EU1" encoding, which was suggested by
Frank Mittelbach).

You haven't spoken much about the future of xunicode. With an svn
repository at sil.org, we could start making contributions to it (such
as more documentation). But not before we know where you'd like the
package to go, of course. I'm unsure whether it's supposed to be a
backwards compatility package (for various multilingual glyph macros),
or a package to fix little things in LaTeX (such as \$), or a package
to provide input convenience (e.g., the TIPA stuff).

Will


More information about the XeTeX mailing list