A flag icon shows that page is written in: English, Japanese

LATEX


pLATEX

The most popular pTeX that was developed by ASCII and has been used in a lot of universities and companies can be seemlessly installed into Unix. pTeX can produce more beautiful documents written in Japanese than any other TeX at this time of writing.

It is combined with TeTeX and introduced in the web by Haruhiko Okumura to probably become famous.

I learned his name in the university and he's been posting lots of articles in the Wiki and even written a book analyzing Japanese TeX: Haruhiko's page

I summarized what you have to do to get it installed in a versatile way as explained below. Can someone create a deb or rpm package that will automate this work?


Installation from the source

Download the latest version of ptetex (Japanese patches to various tools in the original) from:

ptetex

Also you will need tetex source version 3.0 archive:

tetex-src-3.0.tar.gz

and tetex texmf archive:

tetex-texmf-3.0po.tar.gz

Place all those three in a directory and extract the one beginning with 'p' and chdir right there:

$ tar zxvf ptetex3-20yymmdd.tar.gz
$ cd ptetex3-20yymmdd

You should edit the file "../my_option" to enable the below and make PREFIX point where you want it to create share/texmf directory:

JAPANESE=traditional
KANJI_CODE=UTF8
conf_option --with-xdvi-x-toolkit=motif
XDVI=echo
PXDVI=echo
PREFIX=/usr/local

Or you can run this Perl script ptetex_edopt.pl with any prefix given as the first argument.

$ ptetex_edopt.pl [dir_to_install]

In this command expression, [dir_to_install] should point to the place where you want to install the system with the above options turned on.

The file "../my_option" is written in shift JIS but you should see "KANJI_CODE=UTF8" without the pound sign in the beginning.

Become root if necessary and do:

# make
# make install

Never set TEXMF environment variable as the program automatically finds the texmf tree closest to it. Forget the old style of using LaTeX.

I just installed TeX this way and have no problem with typesetting English and Japanese writing vertically with tarticle, creating a pdf with dvipdfmx, and slides using beamer class with images in eps that were originally in openoffice.

Embedding Fonts

If you want to show your document with xdvi or Acrobat Reader with no Asian font pack which can be installed from here , you need to copy texmf-var/fonts/map/dvipdfm/updmap/kanjix.map from the installation directory to a directory under your home which will be created by updmap and edit it.

Run:

$ updmap

and ~/.texmf-var/fonts/map will be created. You have to manually copy kanjix.map here, replace all "Ryumin-Light" to ":0:kochi-mincho" and all ":0:GothicBBB-Medium" to "kochi-gothic", and remove all the "!" marks. Or you can run

embed_fonts.pl [< source kanjix.map file] [> embedded font map file]

like this:

$ embed_fonts.pl < /usr/local/texmf-var/fonts/map/dvipdfm/updmap/kanjix.map
  > ~/.texmf-var/fonts/map/dvipdfm/updmap/embedded_fonts.map
$ mktexlsr

Then, you should be able to do:

$ platex hoge.tex
$ dvipdfmx -f embedded_fonts.map hoge.dvi

and see the pdf with Acrobat Reader or whatever is your favorite viewer.


Home

Ryu: ryu@run.sh