免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 829 | 回复: 0
打印 上一主题 下一主题

Let texlive2007 support chinese [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-02 22:54 |只看该作者 |倒序浏览

                tex live guide for tex live 2007
http://www.tug.org/texlive/doc/texlive-en/live.html
The follow link对2007版是绝对正确的,我既不需要GBK编码,也不用not recommended的方法,仅摘录其中用到的
http://mailboxpublic.googlepages.com/texlive2007cjkchinesehowto
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  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
......

               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/30503/showart_655361.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP