LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 774|回复: 6

[解决]LATEX的中文支持??

[复制链接]
发表于 2009-8-12 17:37:45 | 显示全部楼层 |阅读模式
xelatex+xecjk是最和谐的办法,也是未来的趋势
===================
我已经安装了texlive-most texlive-lang 两个软件包组,使用kile,可是编译例子是依然
会出错:
估计原因大约是字体的问题,请问有兄弟知道如何解决吗??
% This is the file UTF8.tex of the CJK package
%   for testing UTF 8 encoding.
%
% written by Werner Lemberg <wl@gnu.org>
%
% Version 4.8.2 (29-Dec-2008)

\documentclass[12pt]{article}

\usepackage{CJK}
\usepackage[T1]{fontenc}


% WARNING!  The font `cyberbit.ttf' is *not* part of TeXLive!
% Its use is discouraged. If you really want to use it, please
% follow the instructions given in `font.txt'.
%
% Look at the `CJKutf8.tex' example file (and read the
% `CJKutf8.txt' documentation file) for a better way how to
% process documents in UTF 8 encoding.


% we want the Unicode font for normal text also
\DeclareFontFamily{T1}{song}{}
\DeclareFontShape{T1}{song}{m}{n}{<-> cyberb00}{}
\renewcommand\rmdefault{song}


\begin{document}

\begin{CJK}{UTF8}{song}

\noindent Hello World!

\noindent Καλημέρα κόσμε

\CJKnospace
\noindent こんにちは 世界

\end{CJK}

\end{document}

%%% Local Variables:
%%% coding: utf-8
%%% mode: latex
%%% TeX-master: t
%%% End:

====================
This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7) (format=pdflatex 2009.8.12)  12 AUG 2009 17:20
entering extended mode
%&-line parsing enabled.
**UTF8.tex
(./UTF8.tex
LaTeX2e <2005/12/01>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar
abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la
tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, romanian, rus
sian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, ukenglis
h, ukrainian, uppersorbian, welsh, loaded.
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texmf-dist/tex/latex/cjk/texinput/CJK.sty
Package: CJK 2008/12/29 4.8.2

(/usr/share/texmf-dist/tex/latex/cjk/texinput/mule/MULEenc.sty
Package: MULEenc 2008/12/29 4.8.2
)
(/usr/share/texmf-dist/tex/latex/cjk/texinput/CJK.enc
File: CJK.enc 2008/12/29 4.8.2
)
LaTeX Info: Redefining \selectfont on input line 756.
\CJK@indent=\box26
)
(/usr/share/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package

(/usr/share/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding T1 on input line 43.
)) (./UTF8.aux)
\openout1 = `UTF8.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C00/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C05/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C09/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C10/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C20/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C19/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C40/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C42/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C43/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C50/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C52/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C49/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C60/mj/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C61/mj/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C63/mj/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C64/mj/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C65/mj/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C70/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C31/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C32/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C33/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C34/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C35/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C36/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C37/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C80/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C81/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C01/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C11/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C21/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C41/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.
LaTeX Font Info:    Checking defaults for C62/song/m/n on input line 29.
LaTeX Font Info:    ... okay on input line 29.

! Font T1/song/m/n/12=cyberb00 at 12.0pt not loadable: Metric (TFM) file not fo
und.
<to be read again>
                   relax
l.29 \begin{document}
                     
I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.

(/usr/share/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.bdg
File: UTF8.bdg 2008/12/29 4.8.2
)
(/usr/share/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.enc
File: UTF8.enc 2008/12/29 4.8.2
)
(/usr/share/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.chr
File: UTF8.chr 2008/12/29 4.8.2
)
Missing character: There is no H in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no o in font nullfont!
Missing character: There is no W in font nullfont!
Missing character: There is no o in font nullfont!
Missing character: There is no r in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no d in font nullfont!
Missing character: There is no ! in font nullfont!
LaTeX Font Info:    Try loading font information for C70+song on input line 35.


(/usr/share/texmf-dist/tex/latex/cjk/texinput/UTF8/c70song.fd
File: c70song.fd 2008/12/29 4.8.2
)
! Font C70/song/m/n/12/03=cyberb03 at 12.0pt not loadable: Metric (TFM) file no
t found.
<to be read again>
                   relax
l.35 \noindent Κ
                 αλημέρα κόσμε
I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.

Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no � in font nullfont!
! Font C70/song/m/n/12/30=cyberb30 at 12.0pt not loadable: Metric (TFM) file no
t found.
<to be read again>
                   relax
l.38 \noindent こ
                  んにちは 世界
I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.

Missing character: There is no S in font nullfont!
Missing character: There is no � in font nullfont!
Missing character: There is no k in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no o in font nullfont!
! Font C70/song/m/n/12/4e=cyberb4e at 12.0pt not loadable: Metric (TFM) file no
t found.
<to be read again>
                   relax
l.38 \noindent こんにちは 世
                                  界
I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.

Missing character: There is no ^^V in font nullfont!
! Font C70/song/m/n/12/75=cyberb75 at 12.0pt not loadable: Metric (TFM) file no
t found.
<to be read again>
                   relax
l.38 \noindent こんにちは 世界
                                    
I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.

Missing character: There is no L in font nullfont!
Missing character: There is no 1 in font nullfont!
[1

] (./UTF8.aux) )
Here is how much of TeX's memory you used:
1395 strings out of 493886
14051 string characters out of 1155675
62242 words of memory out of 3000000
4717 multiletter control sequences out of 10000+50000
4702 words of font info for 16 fonts, out of 3000000 for 5000
714 hyphenation exceptions out of 8191
22i,4n,21p,169b,199s stack positions out of 5000i,500n,10000p,200000b,50000s

Output written on UTF8.pdf (1 page, 903 bytes).
PDF statistics:
6 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 131072)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
发表于 2009-8-12 23:04:40 | 显示全部楼层
尽量用xelatex+xecjk。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-8-12 23:25:35 | 显示全部楼层
Post by zhuqin_83;2015550
尽量用xelatex+xecjk。


为什么呢?难道是latex + cjk 很不和谐??
回复 支持 反对

使用道具 举报

发表于 2009-8-12 23:28:35 | 显示全部楼层
Post by zhuqin_83;2015550
尽量用xelatex+xecjk。


顶,lol。
回复 支持 反对

使用道具 举报

发表于 2009-8-13 01:40:34 | 显示全部楼层
Post by ashmer;2015555
为什么呢?难道是latex + cjk 很不和谐??
过时了。
补丁那个补丁
回复 支持 反对

使用道具 举报

发表于 2009-8-13 10:35:24 | 显示全部楼层
Post by zhuqin_83;2015550
尽量用xelatex+xecjk。
正解。也是趋势。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-8-13 13:19:49 | 显示全部楼层
Post by zhuqin_83;2015606
过时了。
补丁那个补丁


果然如此。google了一番,测试了一下,xelatex确实很和谐。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表