[XeTeX] anti-xunicode ;-)
François Charette
firmicus at ankabut.net
Fri Jul 21 15:58:12 CEST 2006
Ross Moore wrote:
> here is no incompatibility.
> Just change the font-encoding away from the default of 'U',
> whenever you encounter one of your active characters.
Thanks for pointing that out.
> You also need a declaration for how \d works
> with the 'UX' encoding.
> If this is the same as for T1 or T3 then you could
> just use those instead.
\d is identical in all font encodings, since it simply uses the glyph
"." in the current font.
Jonathan Kew wrote:
> BTW, in the latest xetex you can use the e-TeX style construction
>
> \iffontchar\font"1E0D
>
> in place of
>
> \ifnum\XeTeXcharglyph"1E0D > 0
>
Good to know, thanks!
Will Robertson wrote:
> Hi Francois,
>
> (Sorry about the cedilla, but I'm on a windows machine at uni and
> don't know how to type them!)
>
Don't worry, I'm used to that. Here in Germany people often spell my
name Francoise, which is slightly worse ;-)
> 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.)
>
I agree, I was also confused by that.
> 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.
>
Good idea: I had also tried something along these lines... but no, that
doesn't work :-( Once we have reimplemented that macro though, I think
it might be a good thing to integrate it to xltxtra instead of creating
yet another package. Perhaps xdiacomp then, once it comes to maturity,
could be better implemented as an option to the xltxtra package? Ideally
it should contain a large collection of "fallback macros" (which can be
put together from the data in D. Unruh's ucs package), and it would be
up to the user to decide which Unicode characters (or even better, range
of characters) should be made \active. For instance by typing something
like:
\MakeUnicodeRangeActive{1D80}{1DBF}
the characters in the Block "Phonetic Extensions Supplement" would
become automagically active, and in the absence of the appropriate
glyphs in the font, their fallback macros (in this case via tipa's T3
encoding) would do the job of providing the glyphs. An additional option
could also make it possible to choose the preferred fontfamily for that
encoding (here ptm or cmr), depending of which one harmonizes best with
the default roman font. Another possibility, perhaps, would be an option
for declaring a second OpenType font as a fallback before getting at the
LaTeX macro, though in general this might not be really advisable.
Cheers,
François
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20060721/a8294ff7/attachment-0001.htm
More information about the XeTeX
mailing list