Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xdvi and Japanese



Oda-san, Okamoto-san, et al,

Well, that'll teach me to say things like you can't scare me with 3
messages in one day.  4 days on the road and I get at least 20 tlug
messages.

The Oda-Okamoto conversation makes it clear that I'm about 2 months
from being happy discussing linux+TeX+Japanese at a TLUG meeting.  So
I'll have to beg off on that one.  Most of my free time for the next
couple of weeks is going to be taken up with serious beta testing.
For those adventurous types who are going to go ahead and try to
install the beastie anyway, here are some guesses and philosophies.

Minimum requirements for a complete discussion (if you have shortcuts
like a kanji/PS printer, be my guest :-):

(1) A HOW-TO for a Japanese-capable editing environment. (Not a
    problem.  XFree86 + Mule will do, although this is a serious hog.
    It seems that Mule likes to load up on fonts if you specify an
    initial fontSet other than the default, and this seriously slows
    down life.  Personally I don't use JE; I had serious problems with
    the docs and installation package about a year ago, and find I can
    do quite well without it except for the rare occasion I need to
    mount a DOS/V floppy---does JE handle that Microsoft abomination
    SJIS in file names?  But JE + a lighter-weight editor might be a
    good solution, if the installation problems have been solved.
    OTOH I can't live without AUC-TeX in any language.)
(2) Printing to non-kanji+PS printers.  (I've spent too much time
    publishing stuff to the outside-of-Japan market to be satisfied
    with demanding a kanji-capable PS printer.)  This requires getting
    GS working.  Japanese GS (v2.6.1 is the latest I know of) is too
    primitive, and I forget what it was but it had at least one hack
    that hamstrung a feature that got used occasionally in some of my
    documents.  And it breaks Ghostview AFAIK (this was a homebrew
    GView port for DESQview/X so it may be DOS/V or DESQview/X or
    me-specific; somebody claimed Ghostview worked with J-GS earlier
    in this thread).  So I had to kludge around it in Japanese docs
    (not a big problem) and keep an extra copy of GS around.  At least
    one Latin-1 font was neither upward nor downward compatible.  :-(
    Eventually I gave up on it and use the Institute's Sun system now.
    Sufficiently late at night it's as fast as Linux---almost.  So
    I'm getting ready to move back to my own box.  But I don't yet
    have the Japanese fonts working (looks straightforward), and don't
    know what Ghostview thinks of all that.

    AFAIK Japanese font support in Ghostscript is pretty poor even
    yet.  The problem is that you have a choice between one-character-
    at-a-time access to those multi-megabyte font files, or preloading
    the whole font.  What is needed is some kind of lazy-loading
    capability, where very common characters would be preloaded (eg,
    all the kana, hankaku, eiji, suuji, and maybe the kyouiku kanji
    series), and others are read and cached as needed.  This should be
    transparent to the user and the rest of Ghostscript.  gunzipping
    on the fly would be nice, too.
(3) Some sort of automated fix for the !@#$% Shit-JIS problem.  Maybe
    a cron job that weeds all SJIS files out of your system :-)
    Shouldn't be too hard, but important: boy is it a pain if you
    don't know what you're doing and rarely import other people's
    docs---and suddenly nothing will print and your latex log is full
    of bizarre control charcters.  The optimum of course would be a
    patch for the JE libs that automatically converts any Japanese
    code into your preferred flavor (kinda like the zlib that gunzips
    on the fly).
(4) A well-documented and complete TeX all from one port.  This could
    be a bear, or even a tanuki.  The JTeX used on our Sun system is
    based on NTT-JTeX.  That used on Linux (from the presence of the
    dvi{out,prt} programs) seems to be ASCII-JTeX.  NTT-JTeX looks
    better thought out and more appropriate to the Un*x environment to
    me.  But I don't know for sure.

(4) is probably the source of Craig's font problems in xdvi.  There a
minimum of 3 incompatible ways of indexing the fonts (Knuth, NTT-JTeX,
ASCII-JTeX), plus many semi-compatible variations on each theme.
There are more ways of encoding the fonts than there are users of TeX.
The typical solution is simply to duplicate the fonts (the European
fonts all taken together take up about the same space as one Japanese
font; the load on inodes is much more significant) for each TeX port
you're using.  The JTeXs should both be able to find the Computer
Modern (cm*) fonts, but often they cannot, or expect them to be
encoded differently.

Now, since DVI = device-independent, my guess is that this is due to
some environment variable pointing xdvi to the wrong place.  I seem to
recall that xdvi was patched to read some Japanese font encodings, but
that's very vague.  However, I'm not up on all this anymore (what I
know about Japanese TeXs was learned under DOS, anyway), I just know
that mixing and matching TeXs is taihen.  Your best bet IMHO is to rip
out your entire TeX installation (well, the environment variables and
path entries that point to it anyway) and start again from the
beginning with JTeX, unless (1) your Japanese is fluent and (2) I'm
quite wrong in my suspicion that freeware Japanese software has
documentation of the same abysmal quality as the software
documentation and textbooks I am forced to use for my Pascal class.
The default installation procedures may or may not be of great
quality, but at least they are based on a consistent set of
assumptions about the environment the software will be installed into.
They will probably work.  Trying to mix features from different TeX
systems depends on knowing a lot about what you're doing, which in
turn requires superior docs.  Don Knuth, Karl Berry, Leslie Lamport
(the comments in latex.tex have saved my life on several occasions),
and Mike Spivak produce good docs.  At the opposite end of the
spectrum, the docs for ASCII-JTeX were terrible in 1992---they were
just cookbook installation instructions.  They did not give the
necessary information about font encoding and indexing.  I don't know
about recent versions.

Steve Turnbull
Yaseppochi-gumi
http://turnbull.sk.tsukuba.ac.jp/
turnbull@example.com
turnbull@example.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links