Subsections

3 中文文字处理

3.1 CJK

3.2 怎样用 latex2html 生成中文 html?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



latex2html 已经具有 CJK 支持,我们要做的就是设定字符集。 在 $(HOME)/.latex2html-init 里加入charset='gb2312';。 然后用命令 latex2html -iso CN foo 来生成 html 文档。

3.3 为什么 vim 每次只能删除半个汉字?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/12/01



首先要按照问题 [*] 设置好环境变量。然后在 $(HOME)/.vimrc 里添加

$(HOME)/.vimrc
set fe=prc

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/12/01



在 vim 6.0中已经不需要这个参数了,只要你设置好locale环境变量就可以了。

3.4 如何在xpdf中看中文字体?

Contributed by: mailto:foka@debian.orgAnthony Fok 2001/03/22



Contributed by: mailto:ygh@debian.orgYu Guanghui 2001/10/20



Debian woody (testing) 或 sid (unstable)里的 xpdf_0.92-3 版才有正确的中文 字体支援。 Debian potato 里面的版本 (xpdf_0.90) 似乎没有支援。 另外,也要在 $(HOME)/.Xresources 里面加上以下十几行:

$(HOME)/.Xresources
xpdf.t1TimesRoman: /usr/share/fonts/type1/gsfonts/n021003l.pfb
xpdf.t1TimesItalic: /usr/share/fonts/type1/gsfonts/n021023l.pfb
xpdf.t1TimesBold: /usr/share/fonts/type1/gsfonts/n021004l.pfb
xpdf.t1TimesBoldItalic: /usr/share/fonts/type1/gsfonts/n021024l.pfb
xpdf.t1Helvetica: /usr/share/fonts/type1/gsfonts/n019003l.pfb
xpdf.t1HelveticaOblique: /usr/share/fonts/type1/gsfonts/n019023l.pfb
xpdf.t1HelveticaBold: /usr/share/fonts/type1/gsfonts/n019004l.pfb
xpdf.t1HelveticaBoldOblique: /usr/share/fonts/type1/gsfonts/n019024l.pfb
xpdf.t1Courier: /usr/share/fonts/type1/gsfonts/n022003l.pfb
xpdf.t1CourierOblique: /usr/share/fonts/type1/gsfonts/n022023l.pfb
xpdf.t1CourierBold: /usr/share/fonts/type1/gsfonts/n022004l.pfb
xpdf.t1CourierBoldOblique: /usr/share/fonts/type1/gsfonts/n022024l.pfb
xpdf.t1Symbol: /usr/share/fonts/type1/gsfonts/s050000l.pfb
xpdf.t1ZapfDingbats: /usr/share/fonts/type1/gsfonts/d050000l.pfb
xpdf.chineseGBFont: -*-song-medium-r-normal-*-%s-*-*-*-*-*-gb2312.1980-0
xpdf.chineseCNSFont: -*-ming-medium-r-normal-*-%s-*-*-*-*-*-big5-0
重新载入这些 X resources 后,xpdf 就可以显示漂漂的中文和英文字体了。 :-)

Debian 中文计划