tex live guide for tex live 2007
The follow link对2007版是绝对正确的,我既不需要GBK编码,也不用not recommended的方法,仅摘录其中用到的
Attention:
In
TeXLive 2007, there is no need to use CJK package anymore, XeTeX is
good enough to handle Chinese and Open/TrueType fonts. and the key
problem of XeTeX, i.e. the font switching problem, is tend to be fixed
in the next release of XeTeX. But many old documents are written using
macropackages/styles based on CJK or CCT, some of them are still widely
used today, so, in some cases it is essential to install these fonts.
Install TeXLive
_________________
First, install TeXLive.
wget ftp://ftp.tsinghua.edu.cn/mirror/CTAN/systems/texlive/Images/texlive2007-live-20070212.iso.zip
unzip texlive2007-live-20070212.iso.zip
mount -o loop texlive2007-live-20070212.iso /mnt
cd /mnt
sudo ./install-tl
press I to install.
Setup System Path
_________________
Set the path. Take debian GNU/Linux as example, modify your /etc/environment like this and make a reboot:
PATH="/usr/local/texlive/2007/bin/i386-linux:/usr/local/matlab/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games"
LANG="en_US.UTF-8"
LANGUAGE="en_US.UTF-8"
Copy The Files Needed
_________________
make a dir called font, copy the font here.
mkdir ~/font
cd ~/font
cp /media/sda/windows/Fonts/simhei.ttf .
copy all the files needed.
sudo apt-get install fontforge
cp /usr/local/texlive/2007/texmf-dist/source/latex/CJK/utils/subfonts/* ~/font/
cp /usr/local/texlive/2007/texmf/fonts/sfd/*.sfd ~/font/
Generate Font
______________
Then, make the font. It is a good way to test how fast your computer is
:) it takes me 3 minutes to generate the fonts[Core Duo 2].
Some
one complain that the procedure take them 1 hours to do so, this is
because you use the new version of fontforge. so be sure to use
fontforge 2005.
time fontforge -script subfonts.pe simhei.ttf hei Unicode.sfd
create a file name makemap like this:
for i in *.tfm
do
cat >> hei.map << EOF
${i%.tfm} ${i%.tfm} < ${i%.tfm}.pfb
EOF
done
Make map file:
chmod +x makemap
./makemap
create a file name c70hei.fd for CJK package:
% This is c70hei.fd for CJK package.
% created by Edward G.J. Lee
% modify by Yue Wang
\ProvidesFile{c70hei.fd}
\DeclareFontFamily{C70}{hei}{\hyphenchar \font\m@ne}
\DeclareFontShape{C70}{hei}{m}{n}{<-> CJK * hei}{}
\DeclareFontShape{C70}{hei}{bx}{n}{<-> CJKb * hei}{\CJKbold}
\endinput
Copy Fonts into TEXMF
_________________
create the local directory to save the font
cd ~/.texlive2007
cd texmf-var
mkdir -p fonts/map/dvips/CJK
mkdir -p fonts/tfm/CJK/hei
mkdir -p fonts/type1/CJK/hei
mkdir -p tex/latex/CJK/UTF8
cp ~/font/hei.map fonts/map/dvips/CJK/
cp ~/font/*.tfm fonts/tfm/CJK/hei
cp ~/font/*.pfb fonts/type1/CJK/hei
cp ~/font/c70hei.fd tex/latex/CJK/UTF8
Update The System and Test
_____________________
Just run:
texhash
updmap --enable Map hei.map
create a test file to test your work.
\documentclass{article}
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{hei}
你好!
\end{CJK}
\end{document}
latex test.tex
xdvi test.dvi
dvipdfm test.dvi
xpdf test.pdf
pdflatex test.tex
......
阅读(1449) | 评论(0) | 转发(0) |