在前面一系列工作(一,二)后,现在应该已经可以在Latex中使用GBK和UTF8作为中文编码了,此时,可以用latex编译为dvi,用dvips生成ps文件,用dvipdfm生成pdf文件,或直接用pdflatex生成pdf文件,但这样的pdf文件还不能复制中文。如果想要可以复制的中文,还要配置好dvipdfmx工具。在Ubutnu+Tetex环境中,是在/etc/texmf/dvipdfm/cid- x.map中加入:
%% Microsoft Fonts
%% added by rui at 2007-07-18
%gbksong@UGBK@ UniGB-UTF16-H STSong-Light
gbkhei@UGBK@ UniGB-UCS2-H simhei
gbkkai@UGBK@ UniGB-UCS2-H simkai
gbksong@UGBK@ UniGB-UCS2-H simsun
utf8song@Unicode@ unicode simsun
utf8hei@Unicode@ unicode simhei
utf8kai@Unicode@ unicode simkai
utf8fs@Unicode@ unicode simfang
utf8li@Unicode@ unicode simli
utf8you@Unicode@ unicode simyou
utf8xinwei@Unicode@ unicode stxinwei
utf8zhongsong@Unicode@ unicode stzhongs
utf8caiyun@Unicode@ unicode stcaiyun
utf8fangsong@Unicode@ unicode stfangso
utf8xihei@Unicode@ unicode stxihei
utf8xingkai@Unicode@ unicode stxingka
utf8songsl@Unicode@ unicode simsun -s .167
utf8heisl@Unicode@ unicode simhei -s .167
utf8kaisl@Unicode@ unicode simkai -s .167
utf8fssl@Unicode@ unicode simfang -s .167
utf8lisl@Unicode@ unicode simli -s .167
utf8yousl@Unicode@ unicode simyou -s .167
utf8xinweisl@Unicode @ unicode stxinwei -s .167
utf8zhongsongsl@Unicode@ unicode stzhongs -s .167
utf8caiyunsl@Unicode@ unicode stcaiyun -s .167
utf8fangsongsl@Unicode@ unicode stfangso -s .167
utf8xiheisl@Unicode@ unicode stxihei -s .167
utf8xingkaisl@Unicode@ unicode stxingka -s .167
%采用Adobe官方OpenType字体打造完美tetex中文环境,http://lidaibin.livejournal.com/8492.html
%utf8song@Unicode@ unicode !AdobeSongStd-Light
这里,我只完全配置好了UTF8编码的字体,对GBK的字体,要自己做类似的工作。
如果想要中文的bookmars,则还需要文件UTF8-UCS2 的 CMap,可以在 这里(或一、 二)下载一个软件包,然后解出其中的UTF8-UCS2到目录 /usr/share/fonts/cmap/ 下(在配置文件 /etc/texmf/texmf.d/80DVIPDFMx.cnf 中指定的目录),然后就可以使用中文的bookmarks了。
在你的tex文件中,加入
\usepackage[dvipdfm,CJKbookmarks,bookmarks=true,%
bookmarksnumbered=true]{hyperref}
% 对于 GB2312 编码的文件,我们可以在其后加上一行特殊指令:
%\AtBeginDvi{\special{pdf:tounicode GBpc-EUC-UCS2}}
% 而 UTF8 编码的文件,则使用:
\AtBeginDvi{\special{pdf:tounicode UTF8-UCS2}}
好了,现在试试吧。
--
一步一步教你从互联网赚钱 http://www.zqzn.com/index.asp?rid=key480769
投资理财 http://li-cai.blogspot.com/
2007年7月19日 星期四
订阅:
帖子评论 (Atom)

0 评论:
发表评论