红联Linux门户
Linux帮助

在ArchLinux上安装Latex

发布时间:2006-10-02 01:00:24来源:红联作者:Space
(1) Install tetex package

[code] # pacman -Sv tetex[/code]

(2) Prepare localized directory tree

[code] # mkdir -p /usr/share/texmf-local/tex/latex/
# mkdir -p /usr/share/texmf-local/fonts/truefont/chinese[/code]

(3) Download latest CJK from the following link:

[code] ftp://ftp.ffii.org/pub/cjk/
Uncompress the CJK package, then:
# mv cjk-version/texinput/ /usr/share/texmf-local/tex/latex/CJK[/code]

(4) Build tools:

gbkfonts, it requires header file from freetype 1.x
http://learn.tsinghua.edu.cn/homepage/015450/programs.html
ttf2pk, it is included in contrib/ of freetype 1.x, build it
statically since your system may have freetype2 installed!
[code] # tar -xvf gbkfonts-linux-0.3.tar.gz
# cd gbkfonts-linux-0.3
# cp go appendconf gbkfonts /usr/bin[/code]


Edit the file,/usr/bin/go and comment the lines including the fonts you do not need or delete them.

(5) Build fonts from TTF fonts:

[code] # cd /usr/share/texmf-local/
# cp YOURPATH/*.ttf fonts/truetype/chinese
# go fonts/truetype/chinese[/code]

Move generated file in the current directory (/usr/share/texmf-local) to correct location:

[code] # mv cid-x.map dvipdfm/config/
# mv cjk.map dvips/config/
# cp ../texmf-dist/dvips/config/config.ps dvips/config/
# echo "p +cjk.map" >> dvips/config/config.ps
# mv pdftex.cfg pdftex/config/[/code]

(6) Clean up:

[code] # cd tex/latex/CJK/
# rm -rf JIS/ KS/ SJIS/ thai/ CEF/
# /usr/share/texmf/bin/mktexlsr
# rm /usr/bin/go /usr/bin/appendconf /usr/bin/gbkfonts[/code]
文章评论

共有 0 条评论