panyo Tux's lil' helper
Joined: 02 Jan 2004 Posts: 86
|
Posted: Fri Jan 02, 2004 2:50 am Post subject: Creating Chinese language documents using LaTeX and emacs |
|
|
After (perhaps not enough) searching, I could not find a complete gentoo oriented
description in English of how to use emacs to write Chinese documents in LaTeX.
Thus, I am posting my successful experience. Of the things I tried, I believe the
following are the required steps.
To get Chinese big5 and GB fonts, I installed the following font:
Two more fonts were masked for PowerPC so I had to change into the
appropriate /usr/portage/media-fonts/ directory to emerge. For more
ttf fonts
Code: | emerge twmoefonts-0.1.ebuild |
Next, to get leim enabled emacs, I did
Code: | ACCEPT_KEYWORDS="~ppc" USE="leim" emacs |
I had a problem displaying big5 characters in emacs, seeing only empty
squares instead of characters including in the big5 line of the file
displayed by C-h h or on the mode line of Big5 based input methods I
entered with C-\ .
To fix this problem I had to get the right bitmap fonts from the
second masked package:
Code: | emerge zh-kcfonts-1.05.ebuild |
I then had to add the path to the new font (X11/..misc) to
/etc/fonts/local.conf
Code: |
<!-- Font directory list configured on -->
<dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
<dir>/usr/share/fonts</dir>
<dir>/usr/local/share/fonts</dir>
<dir>/usr/X11R6/lib/X11/fonts/misc</dir>
<dir>/usr/X11R6/lib/X11/fonts/75dpi</dir>
<dir>/usr/X11R6/lib/X11/fonts/100dpi</dir>
<dir>~/.fonts</dir>
|
To get CJK LaTeX support, I followed the instructions at
http://www.physics.wustl.edu/~alford/japanese_latex.html
I needed to add /usr/local/bin to my path, so I added this to .bash_profile
Code: | export $PATH:/usr/local/bin |
At this point, I was able to typeset the Japanese example file on the
above site without errors. I looked through the *.hbf files in
/usr/share/texmf/fonts/hbf to find the appropriate family names (kai
for ntuakai48) for my LaTeX file
Code: |
\documentclass[12pt]{article}
\usepackage{CJK}
\begin{document}
\begin{CJK*}{Bg5}{kai}
...
\end{CJK*}
\end{document}
|
The CJK example file altered in this way typset with no
errors. However, I needed to take one final step in order for the
fonts to be created for xdvi and xpdf. I had to compile the
preprocessors in the utils subdirectory of the CJK archive I
downloaded, following the seventh point in its doc/INSTALL file. I
copied the executable files in each utils/*conv directory to
/usr/local/bin and everything worked.
I now can use gentoo on powerPC to write Chinese web pages and PDF
files with emacs.
I used the ntuakai example because having made only small progress in
learning Chinese, I would like to use the chinese-ecdict input method
in emacs, which uses English words to input characters and appears to
be available only for big5 (as a learner, I find the traditional
characters easier to decipher anyway).
This may not be the most efficient or correct way to do this. I hope
it helps, and welcome any corrections or advice. |
|