[XeTeX] xltxtra wishlist

caapv 208 caapv208 at yahoo.co.jp
Wed May 30 16:49:14 CEST 2007


--- Jjgod Jiang <gzjjgod at gmail.com> wrote:

> I believe Miyata Shigeru has been working on this
> feature for a long time
> and it will be released with the next version of
> XeTeX (0.998).

Hopefully, yes.
OK, here are some clarification:
I'm working on an implementation of JISX4051, which is
mainly targeted for Japanese typesetting and not
optimized for Chinese typesetting.
It is not so easy as you may think.  JISX4051 classifies
characters into 23 classes of which I decided 7 should
be dropped since they do not suit very well with TeX
model.  Unfortunately, for one reason or another, some
of the remaining classes must be subdivided into smaller
pieces and I currently have 22 classes including non-
characters (255), which means I have to set 484=22^2
token registers!  Maybe I had better prepare a simpler
implementation which utilizes only 6 or 7 character
classes.
I also have to write several facilities for user
customization, since JISX4051 allows quite a few room
for system dependent feature extensions.

>     \chardef\@@jop=4

I'm pretty sure I won't use hard coded number for
defining inter-character tokens, but I have yet to
decide whether I'm going to use either count registers,
countdef'ed commands, or simply macros to specify
character classes.

> \@for\Punct:={`',`",`(,`〔,`[,`{,`〈,`《,`「,`『,`
【}\do{\XeTeXcharclass\Punct=\@@jop}

It turns out that what are classified into the class 2,
with the sole exception of double quotes, in the format
file are what I want to use as "openers belonging to
Japanese font".  Hence this definition was not
necessary.

> can assign all these characters to charclass 4.
> Then, XeTeX allow us to
> specify some control sequences between two
> charclasses:
> 
>     \chardef\@@nchar=0
>     \chardef\@@ideog=1
>     \XeTeXinterchartoks\@@nchar\@@ideog = {\bJap}
> 
> This code means we need to execute \bJap command
> between "normal character"
> and "ideograph character", so that we can use \bJap
> command to switch font.
> 
>     \XeTeXinterchartoks\@@ideog\@@nchar = {\eJap}
> 
> And here, we switched font back for normal
> characters.

I have decided that characters which must be taken from
Japanese fonts should be enclosed in \bgroup \egroup
pairs.  This has something to do with the orthogonality
of shape and family in NFSS2, but maybe I should
consider this a bit harder.
 
> It is, of course, a little bit more complicated than
> font fallback mechanism,
> but it allows us to control space between many
> possiblities.

In my implementation, glues are inserted before the
current font is switched to a Japanese one and after it
is switched to a non-Japanese one.  Due to the scale
factor (MatchUpperCase etc.), this should give a more
consistent result, although the order of the font switch
and the glue insertion must be reversed if the strict
conformance to JISX4051 is desired.

> - Jiang

Regards,
SMiyata

--------------------------------------
Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar
http://pr.mail.yahoo.co.jp/toolbar/



More information about the XeTeX mailing list