[XeTeX] ZHSPACING - Newbie questions

Jon Babcock jon at kanji.com
Tue Nov 6 18:13:41 CET 2007

Thanks YIN Dian.
>> My goal is to typeset mixed Chinese-Japanese-Latin scripts.
>> 1.
>>>  \XeTeXcharclass`"=6
>>>  \XeTeXcharclass`"=6
>>>  \XeTeXcharclass`'=6
>>>  \XeTeXcharclass`'=6
>> In which file should I put these statements?
> You can put these in the .tex file anywhere before you use the quotes.
> In preamble, for example.
Once I disambiguated the various quotation marks, assigned them to the 
preferred XeTeXcharclass in my .tex file, and stopped trying to rewrite 
zhspacing, I got the desired results. To disambiguate the quotation 
marks themselves, I found this explanation useful:

And I'm looking at the explanations of 'class' in The TeXbook, p154 ff.

Now I'm trying to figure out why the enclosed number characters, e.g. ① 
, show as a blank in the PDF.
E.g.,【泰】水-5-10 tài  >〈形〉①順適如意﹑命運亨通。

"\XeTeXcharclass`①=6" by itself doesn't seem to work. More study is needed.
>> 2.
>>>  \newcommand{\CJKTitle}[1]{ \parbox{1cm}{\huge{\let\zhfont\zhsffont
>>>  #1}} }
>> Where is the macro \zhfont?
> \zhfont is usually defined like this: \newfontfamily\zhfont{Some font name}
> By default it is defined to use the font SimSun. You can surely define
> it to your own taste.
> In the case above, it is \let to be the same as \zhsffont, which is
> defined earlier.
This works fine. Thank you.

Dealing with CJK fonts with XeTeX and fontspec has been a pleasure.

Thank you, YIN Dian [音點/飲店/陰電 ?? <g>],  for answering my other two 

At the end of the day, perhaps there should be a way to automatically 
switch fonts based on the encoding range containing the underlying 
Unicode characters, an expanded and more rigorous implementation of what 
is done in OpenOffice Writer, for example, where in Preferences the 
fonts for "Western" and "Asian" can be set.

Once again, thanks for your help.

Jon Babcock

More information about the XeTeX mailing list