Opensuse中文设置的具体实现[Linux安全]
本文“Opensuse中文设置的具体实现[Linux安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
Opensuse中文设置的具体实现首先要安装相关的软件包,基本上安装软件时选中texlive-cjk-latex-extra别的的包也都顺带选中安装了.下面说说设置的历程.
Opensuse中文设置的具体实现第一步:把simsun.ttc、simhei.ttf等字体拷贝到/usr/share/fonts/truetype目录下面,主如果为了让后续的SuSEconfig操作能顺利的找到文件;
Opensuse中文设置的具体实现第二步:编辑/etc/ttf2pk/ttfonts.map,增添相关内容.
在“% simplified Chinese:”背面增添以下内容:
%下面是宋体GB编码设置
song-gb@UGB@ simsun.ttc
song-s-gb@UGB@ simsun.ttc Slant=0.167
song-r-gb@UGB@ simsun.ttc Rotate=Yes
song-rs-gb@UGB@ simsun.ttc Rotate=Yes Slant=0.167
%下面是宋体GBK编码设置
song-gb@UGB@ simsun.ttc
song-s-gb@UGB@ simsun.ttc Slant=0.167
song-r-gb@UGB@ simsun.ttc Rotate=Yes
song-rs-gb@UGB@ simsun.ttc Rotate=Yes Slant=0.167
最新的OpenSuSE Factory: OpenSuSE 11.2 Milestone 2里面的CJK调整过了,要利用GBK编码,需按以下增添:
song-gbk@UGBK@ simsun.ttc
song-s-gbk@UGBK@ simsun.ttc Slant=0.167
song-r-gbk@UGBK@ simsun.ttc Rotate=Yes
song-rs-gbk@UGBK@ simsun.ttc Rotate=Yes Slant=0.167
%下面是宋体Unicode编码设置
song-uni@Unicode@ simsun.ttc
song-s-uni@Unicode@ simsun.ttc Slant=0.167
song-r-uni@Unicode@ simsun.ttc Rotate=Yes
song-rs-uni@Unicode@ simsun.ttc Rotate=Yes Slant=0.167
别的字体近似增添,在这里为了便于辨别标志,把@Unicode@、@UGBK@和@GB@前面的名称都做了呼应的描写,简单的song、songsl和songr也是可以的,不事背面的tfm文件相关的名称都要改过来了.
Opensuse中文设置的具体实现第三步:fd文件的增添,主要操作目录是/usr/share/texmf/tex/latex/CJK,在其下面的GBK, UTF8目录下增添呼应的fd文件.
GBK目录下,增添c19song.fd,内容可以参考别的fd文件,大致以下:
\def\fileversion{4.7.0}
\def\filedate{2006/10/17}
\ProvidesFile{c19song.fd}[\filedate\space\fileversion]
% character set: GBK
% font encoding: CJK (extended)
\DeclareFontFamily{C19}{song}{\hyphenchar \font\m@ne}
\DeclareFontShape{C19}{song}{m}{n}{<-> CJK * song-gbk}{}
\DeclareFontShape{C19}{song}{m}{sl}{<-> CJK * song-s-gbk}{}
\DeclareFontShape{C19}{song}{m}{it}{<-> CJKssub * song/m/sl}{}
\DeclareFontShape{C19}{song}{bx}{n}{<-> CJKb * song-gbk}{\CJKbold}
\DeclareFontShape{C19}{song}{bx}{sl}{<-> CJKb * song-s-gbk}{\CJKbold}
\DeclareFontShape{C19}{song}{bx}{it}{<-> CJKssub * song/bx/sl}{\CJKbold}
\endinput
还可以增添c19songr.fd文件,大致内容以下:
\def\fileversion{4.5.2}
\def\filedate{2007/05/15}
\ProvidesFile{c19songr.fd}[\filedate\space\fileversion]%simplified Chinese font song created by Founder.
\DeclareFontShape{C19}{songr}{m}{n}{<-> CJK * song-r-gbk}{}
\DeclareFontShape{C19}{songr}{m}{sl}{<-> CJK * song-rs-gbk}{}
\DeclareFontShape{C19}{songr}{m}{it}{<-> CJKssub * songr/m/sl}{}
\DeclareFontShape{C19}{songr}{bx}{n}{<-> CJKb * song-r-gbk}{\CJKbold}
\DeclareFontShape{C19}{songr}{bx}{sl}{<-> CJKb * song-rs-gbk}{\CJKbold}
\DeclareFontShape{C19}{songr}{bx}{it}{<-> CJKssub * songr/bx/sl}{\CJKbold}
\endinput
在UTF8目录下增添c70song.fd和c70songr.fd,内容和上面近似,只要把里面的c19换成c70, gbk改成uni便可以了.具体可以拜见别的fd文件.
最后“#mktexlsr”革新一下.
Opensuse中文设置的具体实现第四步:SuSEconfig操作,增添tfm字体文件和一些链接.在这一点上SuSE计划得很便利,履行号令:
#SuSEconfig --module cjk-latex
这样,SuSEconfig的cjk-latex模块能自动按照/etc/ttf2pk/ttfonts.map中的设置成立宋体的tfm字体文件,当然前提是能在/usr/share/fonts/truetype目录中找到simsun.ttc文件.
Opensuse中文设置的具体实现第五步:搞定dvipdfmx,这样便可以生成可拷贝的中文pdf文档.
增添/var/lib/texmf/fonts/map/dvipdfm/cid-x.map文件,内容以下:
(最新的OpenSuSE Factory: OpenSuSE 11.2 Milestone 2中cid-x.map文件应放在/usr/share/texmf/dvipdfm/下面)
song-gbk@UGBK@ unicode :0:simsun.ttc
song-s-gbk@UGBK@ unicode :0:simsun.ttc -s .167
song-uni@Unicode@ unicode :0:simsun.ttc
song-s-uni@Unicode@ unicode :0:simsun.ttc -s .167
song-r-gbk@UGBK@ Identity-V :0:simsun.ttc
song-rs-gbk@UGBK@ Identity-V :0:simsun.ttc -s .167
song-r-uni@Unicode@ Identity-V :0:simsun.ttc
song-rs-uni@Unicode@ Identity-V :0:simsun.ttc -s .167
后四行是用于旋转90度字体的.
然后,改正/usr/share/texmf/dvipdfm/dvipdfmx.cfg只利用cid-x.map文件(把最后几个"f *.map" %标志,保存"f cid-x.map"),最后mktexlsr便可以了.
以上是“Opensuse中文设置的具体实现[Linux安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |