[XeTeX] ZHSPACING - Newbie questions
Jon Babcock
jon at kanji.com
Mon Nov 5 20:03:37 CET 2007
Here are four extremely basic newbie questions.
My goal is to typeset mixed Chinese-Japanese-Latin scripts.
1.
> The first problem [Apostrophes & quotes seem to have too much white
> space] is caused by the character class setting for the Unicode
> left/right quotes, which are CJK ambiguous characters. By default
> zhspacing treat them as fullwidth like the fullwidth parentheses
> whose character classes are assigned to 2 and 3, and use \zhpunct
> font to type them out. So they become wide, as in common Chinese
> articles. You can avoid this by changing their classes as follows,
>
> \XeTeXcharclass`"=6
> \XeTeXcharclass`"=6
> \XeTeXcharclass`'=6
> \XeTeXcharclass`'=6
In which file should I put these statements?
> (In zhspacing class 6 is used for halfwidth punctuations.) In this
> way the quotes use the same font as the English text, appearing
> narrow.
2.
> As for the second problem [getting both vertical text and grey
> colour], it seems to me that you aren't using the right way in
> specifying the Chinese font. You should change the macro \zhfont,
> rather than executing other font commands, which would change the
> font for the English text, but theoretically takes no effect on
> Chinese, because the macro \zhfont is called when switching to
> Chinese text. So I suggest you change the definition to something
> like this:
>
> \newcommand{\CJKTitle}[1]{ \parbox{1cm}{\huge{\let\zhfont\zhsffont
> #1}} }
Where is the macro \zhfont?
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?
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?
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.
Because of its Unicode base and easy access to TTF and OTF fonts, XeTeX
holds great promise. Thanks so much.
Jon Babcock
More information about the XeTeX
mailing list