Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Creating Chinese language documents using LaTeX and emacs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Languages
View previous topic :: View next topic  
Author Message
panyo
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2004
Posts: 86

PostPosted: Fri Jan 02, 2004 2:50 am    Post subject: Creating Chinese language documents using LaTeX and emacs Reply with quote

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:
Code:
emerge arphicfonts


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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Languages All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum