|
|
第 1 帖 | |
|
|
标题: Slackware teTeX + Chinese mini-HOWTO This is a quick solution to setup CJK for Slackware Linux 9/-current.
(1) Install tetex package (2) Prepare localized directory tree # mkdir -p /usr/share/texmf-local/tex/latex/ (3) Download latest CJK, e.g., 4.5.2 from the following link: ftp://ftp.ffii.org/pub/cjk/ Uncompress the CJK package, then: # mv cjk-4.5.2/texinput/ /usr/share/texmf-local/tex/latex/CJK (4) Build tools: gbkfonts, it requires header file from freetype 1.x http://learn.tsinghua.edu.cn/homepag.../programs.html ttf2pk, it is included in contrib/ of freetype 1.x, build it statically since your system may have freetype2 installed! (5) Build fonts from TTF fonts: # cd /usr/share/texmf-local/ # gbkfonts /usr/X11R6/lib/X11/fonts/TTF/simsun.ttc song # gbkfonts /usr/X11R6/lib/X11/fonts/TTF/simhei.ttc hei # gbkfonts /usr/X11R6/lib/X11/fonts/TTF/simkai.ttc kai # gbkfonts /usr/X11R6/lib/X11/fonts/TTF/simfang.ttc fs # gbkfonts /usr/X11R6/lib/X11/fonts/TTF/fzwbjw.ttc fzweibeis # gbkfonts /usr/X11R6/lib/X11/fonts/TTF/fzwbfw.ttc fzweibeit Move generated file in the current directory (/usr/share/texmf-local) to correct location: # mv cid-x.map dvipdfm/config/ # mv cjk.map dvips/config/ # cp ../texmf/dvips/config/config.ps dvips/config/ # echo "p +cjk.map" >> dvips/config/config.ps # mv pdftex.cfg pdftex/config/ (6) Clean up: # cd tex/latex/CJK/ # rm -rf JIS/ KS/ SJIS/ thai/ CEF/ # /usr/share/texmf/bin/mktexlsr (7) Change permissions: # chown -R root:root /usr/share/texmf-local/ (8) Add /usr/local/texmf-local/bin in $PATH: # vi /etc/profile.d/tetex.csh /etc/profile.d/tetex.sh 此帖于 04-02-23 11:29 被 windrose 编辑. |
|
|
|
|
|
|
|
第 2 帖 | |
|
|
###################################################
Move generated file in the current directory (/usr/share/texmf-local) to correct location: # mv cid-x.map dvipdfm/config/ # mv cjk.map dvips/config/ # cp ../texmf/dvips/config/config.ps dvips/config/ # echo "p +cjk.map" >> dvips/config/config.ps # mv pdftex.cfg pdftex/config/ ############################################# 1.only "cp cjk.map and updmap --enable Map `pwd`/cjk.map " needed. all tools will use the type1 fonts by default. other files would be used if you want to support truetype font. 2. cp -r tex /usr/share/texmf-local/ (don't forgot) 3. if needed, you should modify the *.fd files in /usr/share/texmf-local/tex/latex/...(sorry, i forgot it), you can take the pre-existed files in cjk package for example to support Bold in chinese. may we exchange some ideas about TeX with each other. 此帖于 03-12-19 21:46 被 gnwd 编辑. |
|
|
|
|
|
|
|
第 3 帖 | |
|
|
TeXLive CD has CJK support built-in since release 7.
Simply enable it when doing setup.
__________________
Vim 中文文档 http://vimcdoc.sf.net http://vcd.gro.clinux.org.cn |
|
|
|
|
|
|
|
第 4 帖 | |
|
|
> 1.only "cp cjk.map and updmap --enable Map `pwd`/cjk.map " needed.
> all tools will use the type1 fonts by default. other files would be used if you > want to support truetype font. haven't tried this. gbkfonts generated lots of fonts of afm, tfm, and type1. Frankly speaking, I do not know too much of the fonts. > 2. cp -r tex /usr/share/texmf-local/ (don't forgot) not necessary. See my original post, in fact I run the gbkfonts in /usr/share/texmf-local. > 3. if needed, you should modify the *.fd files in /usr/share/texmf-local/tex/latex/...(sorry, i forgot it), you can take the pre-existed files in cjk package for example to support Bold in chinese. Not necessary, these are automatically generated by gbkfonts. > may we exchange some ideas about TeX with each other. welcome, but do not expect too much from me 'coz I know little about TeX. This mini-HOWTO is just one of my test of TeX.
__________________
Proud Slacker since Slackware 3.4 |
|
|
|
|
|
|
|
第 5 帖 | |
|
|
BTW, this solutions does not change anything in the main texmf directory. All the new files and changes are in /usr/local/texmf-local. So it's safe to tar the texmf-loca directory and copy to other machines directly.
|
|
|
|
|
|
|
|
第 6 帖 | ||
|
|
引用:
|
||
|
|
|
||
|
|
第 7 帖 | |
|
|
按上述办法试了一下,但是在/usr/share/texmf-local/中没有发现bin目录,需要自己建立吗?要cp哪些东西进去呢?
__________________
Free as in freedom, slack as in Slackware. 欢迎访问 http://slack.linuxsir.org 个人blog:http://blog.tuxfans.com/ RSS:http://feeds.feedburner.com/windroseblog |
|
|
|
|
|
|
|
第 8 帖 | |
|
|
yes, you need to create the bin directory by yourself, just copy the gbkfonts and ttf2pk binaries into bin. you can copy them to /usr/local/bin as well. they are only required for building gbkfonts from truetype fonts.
|
|
|
|
|
|
|
|
第 9 帖 | |
|
|
我的体会:gbkfonts似乎不需要ttf2pk,我下载源码之后make clean && make就能生成可执行的gbkfonts了。但是gbkfonts只能在它的源码目录中运行,在别的目录下指明gbkfonts的路径或者直接cp到其他目录下,运行会出错。运行gbkfonts之后,只要按gnwd的方法做就可以了。
此帖于 04-01-31 08:42 被 windrose 编辑. |
|
|
|
|
|
|
|
第 10 帖 | |
|
|
you are right, ttf2pk is not required for gbkfonts. I built it because somebody mentioned it can be used for latex to use truetype font directly, but I have not tried it.
|
|
|
|
|
|
|
|
第 11 帖 | |
|
|
for the execution error of gbkfonts, I guess you build it with dynamic linking against freefont1. if you build it statically, there's no problem that you execute it anywhere.
|
|
|
|
|
|
|
|
第 12 帖 | |
|
|
Where can I download dvipdfmx soure ?
|
|
|
|
|
|
|
|
第 13 帖 | |
|
|
Where can I download dvipdfmx soure ?
|
|
|
|
|
|
|
|
第 14 帖 | ||
|
|
引用:
next time, google before you ask ![]() |
||
|
|
|
||
|
|
第 15 帖 | |
|
|
标题: dvipdfmx的安装 前提:按前面terminator的方法安装并设置好CJK
一、下载及安装 下载地址: http://project.ktug.or.kr/dvipdfmx/snapshot/release/ 从中下载当前版本dvipdfmx-20031116.tar.gz。 不建议从 http://project.ktug.or.kr/dvipdfmx/snapshot/current/ 下载最新版(当前是dvipdfmx-20031207.tar.gz),因为其中可能有bug,导致产生pdf文件时有一堆Warnings提示。 下载到的是源代码,需要解开后自行编译。需要注意的是运行configure前要设置两个环境变量: export CPPFLAGS=-I/usr/share/texmf/include LDFLAGS=-L/usr/share/texmf/lib configure时也要指定参数: ./configure --bindir=/usr/share/texmf/bin --datadir=/usr/share make su -c 'make install' (或 su -c checkinstall,假如你安装了checkinstall) 二、安装后的设置 按上述方法安装之后,dvipdfmx中没有对中文的支持,需要进行适当的设置。 1. 完善CMap目录 dvipdfmx安装时,会在/usr/share/texmf/dvipdfm中建立CMap目录,但其中没有中文的CMap。由于CMap是Acrobat制定的标准,具有通用性,因此可以下载Acrobat的文件。一个简单的方法是借用xpdf中文包中的CMap文件: ftp://ftp.foolabs.com/pub/xpdf/xpdf-...plified.tar.gz 解压缩后,将其CMap目录下的所有文件cp到 /usr/share/texmf/dvipdfm/CMap/ 即可。 2.设置ttf字体目录 在/usr/share/texmf/web2c/texmf.cnf中,指定了从$TEXMF/fonts/truetype目录中查找truetype字体,因此需要: mkdir /usr/share/texmf/fonts/truetype 然后把几种中文字体cp或ln到这个目录中,也可以直接修改上述texmf.cnf文件,指定truetype字体的路径。 3.建立ttf2pk目录 mkdir /usr/share/texmf/ttf2pk ttf2pk是freetype 1中提供的一个工具,使得TeX可以使用truetype字体。 下载: ftp://ftp.freetype.org/freetype/free...contrib.tar.gz 也可以从freetype的其他镜像下载这个文件,解开文件后,我们需要的是 ttf2pk/data/中的文件: cp ttf2pk/data/* /usr/share/texmf/ttf2pk/ 3.修改dvipdfmx.cfg文件 用文本编辑器打开 /usr/share/texmf/dvipdfm/dvipdfmx.cfg,找到一行: f dvipdfm.map 在它前面加个%注释掉,使之不起作用。 4.运行texhash使系统能找到我们新增的所有文件。 至此,dvipdfmx设置完毕。 |
|
|
|
|
|