找回密码
 注册
查看: 1677|回复: 3

用latex写文章保存的时候用该用什么编码?

[复制链接]
发表于 2005-5-25 16:38:30 | 显示全部楼层 |阅读模式
装好了cjk-latex,测试的时候发现了一些问题。
我用gedit写好源文件,保存的时候编码方式选择的是GB2312,送给Latex编译的时候出现下面的错误
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./GB.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
kish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/latex/cjk-latex/CJK.sty
(/usr/share/texmf/tex/latex/cjk-latex/mule/MULEenc.sty)
(/usr/share/texmf/tex/latex/cjk-latex/CJK.enc)) (./GB.aux)
(/usr/share/texmf/tex/latex/cjk-latex/standard.bdg)
(/usr/share/texmf/tex/latex/cjk-latex/standard.enc)
(/usr/share/texmf/tex/latex/cjk-latex/standard.chr)

LaTeX Font Warning: Font shape `C10/gbsimsun/m/n' undefined
(Font)              using `C10/song/m/n' instead on input line 18.

(/usr/share/texmf/tex/latex/cjk-latex/GB/c10song.fd)
(/usr/share/texmf/tex/latex/cjk-latex/GB/c10fs.fd)

LaTeX Font Warning: Font shape `C10/song/m/n'
(Font)              in size <12> not available.
(Font)              Font shape `C10/fs/m/n'
(Font)              tried instead on input line 18.

! Undefined control sequence.
try@size@range ...extract@rangefontinfo font@info
                                                  <-*>@nil <@nnil
l.18 \uffff\uffff\uffff\uffff
         \uffff\uffff\uffff\uffff
? q
OK, entering batchmode


似乎latex不能识别gb2312编码的文本。
但是如果用gedit保存成iso-8859-1这些western的编码方式,则会提示
Invalid byte sequence in conversion input


有什么办法能把中文保存成ASCII纯文本呢?
 楼主| 发表于 2005-5-25 16:39:13 | 显示全部楼层
源文件
[code:1]
\documentclass[12pt]{article}

\usepackage{CJK}


\begin{document}

\begin{CJK*}{GB}{gbsimsun}


中文测试

\end{CJK*}

\end{document}

[/code:1]
回复

使用道具 举报

发表于 2005-5-28 18:32:30 | 显示全部楼层
我用的是GBK的
回复

使用道具 举报

发表于 2005-6-1 22:35:36 | 显示全部楼层
\begin{CJK*}{GB}{gbsimsun}
应该是\begin{CJK*}{GBK}{song}吧?
另外,你安装字体了没有?
回复

使用道具 举报

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

本版积分规则

GMT+8, 2025-2-6 19:50 , Processed in 0.044091 second(s), 15 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

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