[XeTeX] ZHSPACING - Newbie questions

Yin Dian yindian at gmail.com
Tue Nov 6 03:48:09 CET 2007


On 11/6/07, Jon Babcock <jon at kanji.com> wrote:
> Here are four extremely basic newbie questions.
> 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.
> 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.
> 3.
> In a message
> http://tug.org/pipermail/xetex/2007-October/007508.html
> Kyungjun Lee asked:
>  "Is there an easy/automatic way to switch between using one font for
>  Korean and another for English, for example? I'm looking for a simple
>  solution that can solve multiple languages in a single sentence."
> and the response was:
> >  You can utilize the \XeTeXinterchartoks primitive in xetex-dev, which
> >  can be checked out from SVN, for performing automatic font changes.
> >  Similar work has been done for Chinese document typesetting,
> >  referring to http://code.google.com/p/zhspacing/.
> >  <http://code.google.com/p/zhspacing/>
> Does this mean that a new .sty file, like zhspacing,  must be written
> for  Japanese and for Korean?
Generally this is true. The three countries have different typesetting
customs and standards, and I know little about things on Japanese and
Korean, so I can't provide a generic solution. Also I don't have that
much time on this.
> 4. General question.
> It looks like XeTeX can be programmed (hacked) now to typeset text in
> mixed CJK-Latin scripts. Is this capability likely to become part of the
> next "stable" (not sure what word to use here) version, perhaps .997?,
> that will be included in, for example, a TeXLive distribution?
I believe that. Ask Jonathan Kew for authoritative news.
> Obviously, I'm not only a newbie to XeTeX, but a newbie to TeX as well,
> and a confused newbie at that.  I apologize for asking such basic questions.
> Background note:
> After much trial and error, I was able to compile and run the .997
> version of XeTeX which allows me to use zhspacing. I'm using .997 XeTeX
> and zhspacing in conjunction with the TeXLive 2007-10 distribution on
> Ubuntu 7.10.
Happy hacking :)
> Because of its Unicode base and easy access to TTF and OTF fonts, XeTeX
> holds great promise. Thanks so much.
> Jon Babcock
-YIN Dian

More information about the XeTeX mailing list