|
我的系统是FC4,tetex-3.0-4
我按照这个地方http://www.hebl.name/zh/archives/cjkinstall/
http://www.hebl.name/zh/archives/tetex30-cjk/
编译时没错误,但中文还是不能正确显示,黑方块或乱码。
我的安装过程:
1. 下载了cjk-4.6.0.tar.gz,gbkfonts-linux-0.3.tar.bz2,dvipdfmx-20050201.tar.gz
2.在/usr/local/share下面建立好目录
cd /usr/local/share
mkdir -p texmf/tex/latex
mkdir -p texmf/fonts/truetype/chinese
3. 从windows(XP)下复制字体simsun.ttf,simhei.ttf,simfang.ttf, simkai.ttf到/usr/local/share/texmf/fonts/truetype/chinese目录下
4. 安裝CJK
cd /usr/local/src
tar xzvf cjk-4.6.0.tar.gz
cd cjk-4.6.0
mv texinput /usr/local/share/texmf/tex/latex/CJK
5. 安裝字体生成文件gbkfonts
cd /usr/local/src
tar xjvf gbkfonts-linux-0.3.tar.bz2
cd gbkfonts-linux-0.3
cp gbkfonts-glibc2.3 /usr/local/bin/gbkfonts
cp appendconf go /usr/local/bin
修改/usr/local/bin/go文件
cd /usr/local/bin
vim go
將下面這一段
gbkfonts ${opts} $dir/simsun.ttf song
gbkfonts ${opts} $dir/simkai.ttf kai
gbkfonts ${opts} $dir/simhei.ttf hei
gbkfonts ${opts} $dir/simfang.ttf fs
gbkfonts ${opts} $dir/fzssjw.ttf fzss
gbkfonts ${opts} $dir/fzs3jw.ttf fzs3
gbkfonts ${opts} $dir/fzxkjw.ttf fzxk
gbkfonts ${opts} $dir/fznbsjw.ttf fznbs
gbkfonts ${opts} $dir/fzfsjw.ttf fzfs
gbkfonts ${opts} $dir/fzktjw.ttf fzkt
gbkfonts ${opts} $dir/fzs3jw.ttf fzs3
除了前四行,其余的加#注释保存。即
gbkfonts ${opts} $dir/simsun.ttf song
gbkfonts ${opts} $dir/simkai.ttf kai
gbkfonts ${opts} $dir/simhei.ttf hei
gbkfonts ${opts} $dir/simfang.ttf fs
#gbkfonts ${opts} $dir/fzssjw.ttf fzss
#gbkfonts ${opts} $dir/fzs3jw.ttf fzs3
#gbkfonts ${opts} $dir/fzxkjw.ttf fzxk
#gbkfonts ${opts} $dir/fznbsjw.ttf fznbs
#gbkfonts ${opts} $dir/fzfsjw.ttf fzfs
#gbkfonts ${opts} $dir/fzktjw.ttf fzkt
#gbkfonts ${opts} $dir/fzs3jw.ttf fzs3
6. 切换目录到/usr/local/share/texmf安装字体:
# gbkfonts fonts/truetype/chinese/simsun.ttf song
# gbkfonts fonts/truetype/chinese/simkai.ttf kai
# gbkfonts fonts/truetype/chinese/simhei.ttf hei
# gbkfonts fonts/truetype/chinese/simfang.ttf fs
7. 安装dvipdfmx,
ccd /usr/local/src
tar xzvf dvipdfmx*.gz
cd dvipdfmx*
./configure --prefix=/usr/local
make
make install
8. appendconf /usr/local/share/texmf
查看texmf目录下的内容为
cid-x.map.old dvipdfm fonts pdftex tex ttfonts.map.old
cjk.map.old dvips ls-R pdftex.cfg.old ttf2pk
9. 修改几个配置文件
在/usr/share/texmf/dvips/config/config.ps 中将
o |lpr
前加%注释掉,以及加上这幺一行
p +cjk.map
将UGBK.sfd复制到/usr/local/share/texmf/ttf2pk Adobe-GB1-UCS2、UniGB-UCS2-H和UniGB-UCS2-V复制到
/usr/local/share/texmf/dvipdfm/CMap
10. 更新TeX数据库
[root@loaclhost texmf]#mktexlsr
mktexlsr: Updating /root/.texmf-config/ls-R...
mktexlsr: Updating /root/.texmf-var/ls-R...
mktexlsr: Updating /usr/local/share/texmf/ls-R...
mktexlsr: Updating /usr/share/texmf/ls-R...
mktexlsr: Updating /usr/share/texmf-config/ls-R...
mktexlsr: Updating /usr/share/texmf-var/ls-R...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Done.
[root@loaclhost texmf]#texhash
texhash: Updating /root/.texmf-config/ls-R...
texhash: Updating /root/.texmf-var/ls-R...
texhash: Updating /usr/local/share/texmf/ls-R...
texhash: Updating /usr/share/texmf/ls-R...
texhash: Updating /usr/share/texmf-config/ls-R...
texhash: Updating /usr/share/texmf-var/ls-R...
texhash: Updating /var/lib/texmf/ls-R...
texhash: Done.
我在kile里面写了下面这一段,编译时没有错误。但是,dvi查看时,中文的地方是一个个黑方块,DVI to PDF中文部分是乱码,DVI to PS中文部分是一片空白。
\documentclass{article}
%\usepackage{graphics}
\usepackage{graphicx}
\usepackage{CJK}
\title{My first \LaTeX\ Article}
\author{David Arnold}
\date{December 7,2001}
\begin{document}
\maketitle
\begin{CJK*}{GBK}{song}%CJK环境
\CJKtilde
\begin{abstract}
An abstract is one of the most important parts of your
article.\footnote{What happens to second place?} Readers use the
abstract to determine if they want to read further, so you have to
hook them in with a good abstract.
\end{abstract}
%中文
这是一个中文测试版.
这是一个中文测试版这是一个中文测试版这是一个中文测试版
这是一个中文测试版这是一个中文测试版 这是一个中文测试版
这是一个中文测试版 这是一个中文测试版
\begin{thebibliography}{sample.lable}
\bibitem{arnold} Arnold,
\emph{Intermediate Algebra}
\end{thebibliography}
\end{CJK*}
\end{document} |
|