[XeTeX] Polyglossia gloss file for Japanese
Takayuki YATO (ZR)
zrbabbler at yahoo.co.jp
Sat Nov 13 17:48:28 CET 2010
Here I'd like to present an experimental implementation of the
polyglossia gloss file for the Japanese language. It does not
yet contain many of the fancy stuffs (though it contains ruby
output in the simplest way and kintou-wari) because I want
for present to focus on the fundamental design of the package.
The main points of the design of mine are as follows:
- It only supports horizontal writing; there are still too
grave issues on vertical typesetting of XeTeX to consider
- The paragraph building in Japanese requires several features
that is absent in the original TeX engine:
(1) proper line breaking, including kinsoku rules
(2) automatic font switching (without language switches)
(3) space adjustment around punctuation marks
The XeTeX engine supports only (1) (by \XeTeXlinebreaklocale,
etc.) and leaves the others to macro programming with the
inter-character token insertion feature (\XeTeXinterchartoks,
etc.) as minimal assistance. Since we cannot single out the
"best" package for support of these features (in fact there
is not yet a single one that is satisfactory), the current
implementation leaves the choice to document authors: i.e.
they can choose the "base module" out of 'none' (to load no
package and use \XeTeXlinebreaklocale) and 'xeCJK' (to load
it). We could add to the choices other packages such as
zhspacing, etc. The choice of base module is usually auto-
- The layout of Japanese documents is very different from that
of documents in European languages. Even the seemingly
omnipotent memoir class could not produce proper layout
for Japanese documents. Thus the approach that tries to
tweak this and that points of the specified class will not
work successfully, and you must ideally employ document
classes designed specially for Japanese documents.
For that reason, the implementation does not modify the
layout in default. But still I have provided a simple and
rough tweaking of layout, including the enlargement of
leading, and this will be enabled by language option
- In the ideal situation where tailored classes are used,
the caption strings (\chaptername, etc.) are of course
already rendered in Japanese. Because in some places
different syntax is needed (such as "Chapter 2" vs.
"第2章") and the way to produce the right syntax often
varies between document classes, the best way seems
to be to leave the strings unchanged. Thus I have chosen
this as default, but again I have provided two sorts of
caption settings that do modify strings. The option
[caption=simple] works with almost all classes but
changes "Chapter 2" to funny "チャプター2"; the option
[caption=elaborate] gives the decent result "第2章" but
might fail in using with some classes.
- other features: support for Japanese calendar (eg. 平成
20年), conversion to kanji numerals (eg. 二十), Japanese
style ruby, etc.
The attached zip file contains three example documents which
utilizes Polyglossia and the Japanese gloss file.
- pgja-test1.pdf: This example uses the standard report
class with [layout=simple] setting, and uses Japanese
proportional fonts (IPA P Mincho/Gothic) as text fonts.
This output might seem preferable to your eyes but often
stigmatized as poor typography in Japan.
- pgja-test2.pdf: This example is in the same layout as the
previous one, but employs xeCJK package as base module.
This enables one to automatically switch between Latin
fonts and Japanese (monospace) fonts,
- pgja-test3.pdf: This is my best effort to typeset Japanese
documents in XeLaTeX. It utilizes two additional packages
I have developed for typesetting Japanese documents.
+ bsjscls package: An adaptation of jsclasses document classes
to XeLaTeX. The jsclasses package is developed by Haruhiko
Okumura and is the most reputable set of document classes
of pLaTeX for general purpose.
+ zxjatype package: An extension to xeCJK package with an
additional punctuation style suitable for Japanese.
(I am planning to put these packages on CTAN after this issue
- Note that the last line of each example shows the output from
the deliberately wrong input, in which an English sentence
is put in a Japanese language environment.
Tak Yato (Takayuki YATO; aka. "ZR")
Tak Yato (Takayuki YATO; aka. ZR)
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 174982 bytes
More information about the XeTeX