Re: ptex & zw (was Re: [OS X TeX] Kanbun (漢文) and French...)

Wolfgang Schuster schuster.wolfgang at googlemail.com
Mon Jan 5 16:25:15 CET 2009


Am 05.01.2009 um 16:08 schrieb Jean-Christophe Helary:

>>>> I am downloading the uptex package at the moment. I had seen the  
>>>> kanbun.sty and sfkanbun.sty files references on the Japanese  
>>>> pages and was considering to use them. I have no idea though how  
>>>> to "adapt them to XeteX". But I'll certainly take a look.
>>>
>>> The kanbun packages use the pTeX only dimension zw and you have
>>> to replace it with a normal TeX dimension.
>>
>> Ok, I've noticed where the zw was used in the sty files. I'll check  
>> more later tomorrow, it is way past bed time !
>
> I've eventually found out what zw stood for. It looks like an  
> equivalent to em but refers to a square in which the letter is  
> rather than to the letter itself...

Yes, zw is a pTeX only dimension with the width/height of
the boxsize of a ideographic char. You could define your own
version in TeX with:

\newdimen\zw

\def\KAN#1#2#3#4#5#6{%
\setbox0=\hbox{ }% ideographic space
\zw=\wd0
...
\ifdim\wd0>.6\zw
   \ifdim11pt>\zw
     \OYA=17pt
   \else
     \OYA=1.6zw
   \fi
\else
...
}

I used the simpler kanbun.sty file as example.

Another things you have to do are to change the encoding of
the file to UTF-8 and to replace ¥ with \.

Wolfgang




More information about the macostex-archives mailing list