[debian-chinese] Latex问题

33 views
Skip to first unread message

刘宇辉

unread,
May 14, 2010, 11:01:59 PM5/14/10
to Debian邮件列表
刚刚接触到Latex, 今天早晨刚刚装了,
为了减少出错的几率,用debian软件中心安装的(squeeze),
安装了这几个软件包:
cjk-latex

latex-cjk-chinese-arphic-gkai00mp
latex-cjk-chinese-arphic-bsmi00lp
latex-cjk-chinese-arphic-bkai00mp
latex-cjk-chinese-arphic-gbsn00lp

latex-cjk-common

ttf-arphic-gkai00mp
ttf-arphic-bsmi00lp
ttf-arphic-bkai00mp
ttf-arphic-gbsn00lp
还有一些包是依赖关系安装上去的。

测试了一下:

 \documentclass[12pt]{article}
\usepackage{CJK}
\begin{document}
\begin{CJK*}{GB}{song}
\CJKtilde
\title{\bf 中文\LaTeX~(CJK+LaTeX)的使用实例}
\date{\today}
\maketitle
\end{CJK*}
\end{document}
(这个是网上的例子)

然后pdf hello1.tex :
输出:
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./hello1.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, pinyin, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/latex/CJK/CJK.sty
(/usr/share/texmf/tex/latex/CJK/mule/MULEenc.sty)
(/usr/share/texmf/tex/latex/CJK/CJK.enc)) (./hello1.aux)
(/usr/share/texmf/tex/latex/CJK/standard.bdg)
(/usr/share/texmf/tex/latex/CJK/standard.enc)
(/usr/share/texmf/tex/latex/CJK/standard.chr)

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

! Undefined control sequence.
try@size@range ...extract@rangefontinfo font@info
<-*>@nil <@nnil
l.8 \maketitle

?


查看了一下log
并没有报错或者warning 。开始怀疑是编码的格式的原因(代码里的红色的GB),把他改为UTF8,问题依旧,
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./hello1.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, pinyin, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/latex/CJK/CJK.sty
(/usr/share/texmf/tex/latex/CJK/mule/MULEenc.sty)
(/usr/share/texmf/tex/latex/CJK/CJK.enc)) (./hello1.aux)
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.bdg)
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.enc)
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.chr)

LaTeX Font Warning: Font shape `C70/song/bx/n' undefined
(Font) using `C70/song/m/n' instead on input line 8.

! Undefined control sequence.
try@size@range ...extract@rangefontinfo font@info
<-*>@nil <@nnil
l.8 \maketitle

?



由于是刚刚接触tex,希望各位指教,不胜感激!谢谢!

--
________________________
wolf python london(WPL)      
Do as you soul should do !
________________________

--
You received this message because you are subscribed to the Google Groups "Debian Chinese Project" group.
To post to this group, send email to debian-...@googlegroups.com.
To unsubscribe from this group, send email to debian-chines...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/debian-chinese?hl=en.

马耀辉

unread,
May 14, 2010, 11:23:01 PM5/14/10
to debian-c...@lists.debian.org
貌似要设置下、安装装字体才能用中文的吧,要不就texlive-xetex

刘宇辉

unread,
May 14, 2010, 11:40:31 PM5/14/10
to 马耀辉, debian-c...@lists.debian.org


2010/5/15 马耀辉 <stese...@gmail.com>
貌似要设置下、安装装字体才能用中文的吧,要不就texlive-xetex


latex-cjk-chinese-arphic-gkai00mp
latex-cjk-chinese-arphic-bsmi00lp
latex-cjk-chinese-arphic-bkai00mp
latex-cjk-chinese-arphic-gbsn00lp
 这几个应该包含了字体了吧,

我试一下texlive-xetex


刘宇辉

unread,
May 15, 2010, 12:12:54 AM5/15/10
to 马耀辉, debian-c...@lists.debian.org
还是那样,呵呵, 错误信息

2010/5/15 刘宇辉 <lyh19...@gmail.com>

马耀辉

unread,
May 15, 2010, 1:52:29 AM5/15/10
to debian-c...@lists.debian.org
xetex的字体是系统字体,fc-list看到的
编译是用xetex 

长时间不用,记不太清楚了

Liang Guo

unread,
May 15, 2010, 4:25:46 AM5/15/10
to debian-c...@lists.debian.org
我这几天也刚好在搞tetex, 安装了如下软件包:

latex-cjk-chinese
latex-beamer
texlive-fonts-recommended
texlive-doc-zh
texlive-fonts-extra
fontforge
latex-cjk-all

测试了你的文档, 可以编译. 

liang@guoliangc:~/tex$ cat 5.tex 
 \documentclass[12pt]{article}
 \usepackage{CJK}
 \begin{document}
 \begin{CJK*}{GB}{song}
 \CJKtilde
 \title{\bf 中文\LaTeX~(CJK+LaTeX)的使用实例}
 \date{\today}
 \maketitle
 \end{CJK*}
 \end{document}
liang@guoliangc:~/tex$ xelatex 5.tex
This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
 restricted \write18 enabled.
entering extended mode
(./5.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, pinyin, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/latex/CJK/CJK.sty
(/usr/share/texmf/tex/latex/CJK/mule/MULEenc.sty)
(/usr/share/texmf/tex/latex/CJK/CJK.enc)) (./5.aux)
(/usr/share/texmf/tex/latex/CJK/standard.bdg)
(/usr/share/texmf/tex/latex/CJK/standard.enc)
(/usr/share/texmf/tex/latex/CJK/standard.chr)

LaTeX Warning: No \author given.

[1] (./5.aux) )
(see the transcript file for additional information)
Output written on 5.pdf (1 page).
Transcript written on 5.log.

不过pdflatex无法编译
pdf命令是那个软件包的? 

Liang

刘宇辉

unread,
May 15, 2010, 4:44:26 AM5/15/10
to Liang Guo, debian-c...@lists.debian.org
我最后全部安装了
aptitude install texlive-full
还是不行,
我是今天才接触latex,所以具体的也不太清楚,正在看台湾的一个文档


2010/5/15 Liang Guo <bluesto...@gmail.com>

Liang Guo

unread,
May 15, 2010, 5:09:40 AM5/15/10
to 刘宇辉, debian-c...@lists.debian.org
你是用xelatex生成pdf的 ?  

刘宇辉

unread,
May 15, 2010, 6:47:27 AM5/15/10
to Liang Guo, debian-c...@lists.debian.org
不是的,直接是pdftex 来生成pdf的,用英文的话,正常。

2010/5/15 Liang Guo <bluesto...@gmail.com>

amateur

unread,
May 16, 2010, 8:04:41 AM5/16/10
to debian-c...@lists.debian.org
On Sat. 2010-05-15 18:47:27 +0800, 刘宇辉 wrote:
> 不是的,直接是pdftex 来生成pdf的,用英文的话,正常。
> >>> \documentclass[12pt]{article}
> >>> \usepackage{CJK}
> >>> \begin{document}
> >>> \begin{CJK*}{GB}{song}
> >>> \CJKtilde
> >>> \title{\bf 中文\LaTeX~(CJK+LaTeX)的使用实例}
> >>> \date{\today}
> >>> \maketitle
> >>> \end{CJK*}

这里加一行:
\clearpage

试试
> >>> \end{document}

--
Could somebody drag the Irix team kicking and screaming into the 1980's,
please?

I realize it might be quite painful for them, but maybe you could buy them
a disco tape, so they'd feel a little bit more at home.

-- Linus "Stayin' alive, stayin' alive" Torvalds


--
To UNSUBSCRIBE, email to debian-chine...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20100516120441.GA4299@localdomain

jun yu

unread,
May 16, 2010, 8:33:25 AM5/16/10
to amateur, debian-c...@lists.debian.org
还是直接装 texlive 比较好,系统的包好像比较老

2010/5/16 amateur <tianle...@gmail.com>:
--
庾俊 Jack
技术总监 Technical Director
妈妈晒 www.mamashai.com
Tel: 86 10 84873560
Cell: 86 15811391251
Email: mail...@gmail.com
MSN: yv...@hotmail.com
Blog: blog.sina.com.cn/mamashai

-----------------晒一点,就发光!----------------
妈妈晒相信:
最好的科技和创想,体现于是否能造福后代。
每个人都可能成就发光的人生!


--
To UNSUBSCRIBE, email to debian-chine...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/AANLkTikp6-EwzWUXLYI4y...@mail.gmail.com

Botu Sun

unread,
May 17, 2010, 12:42:16 AM5/17/10
to jun yu, amateur, debian-c...@lists.debian.org
try this



\documentclass[12pt]{article}

\usepackage{CJK}
\begin{document}
\begin{CJK*}{GB}{song}
\CJKtilde
\title{\bf 中文\LaTeX~(CJK+LaTeX)的使用实例}
\date{\today}
\maketitle
\end{CJK*}
\end{document}

2010/5/16 jun yu <mail...@gmail.com>:

Wang Zhiyong

unread,
May 17, 2010, 8:02:41 AM5/17/10
to 刘宇辉, Debian邮件列表
刘宇辉的问题是中文无法编译吗?
参见
mail.amss.ac.cn/viewthread.php?action=printable&tid=54661
中文就是这样让人崩溃.


在Linux下使用中文,可能遇到如下问题:
1,你是使用发行版里的texlive还是自己从texlive iso安装?
2,安装字体或者copy MS的字体或者使用adobe字体.
3,中文支持包安装在哪里?
4,刷新字体和tex
5,写特别的,与ctex用户不同的头文件
6,设置环境变量


这些问题都可能遇到,还有使用什么编辑器:
vim+latexsuite emacs+actex kile lyx scite ...?
怎样配置和修改编辑器和相应辅助工具,
还有交换含有中文文本文件时可能遇到的乱码问题
(你可以iconv处理,但是对方呢?),
交换源文件时的编译问题(比如老板使用老版的tex,
而你使用zhspacing xeltex xecjk ..., 老板
怎么编译?!)


建议
如果不经常使用tex,那么还是使用win下的ctex.
如果不经常使用中文tex,那还是回到win.
折腾,非不能也,不为也.
爱windows爱生命.

如果没有那么多"如果"
请搜索
linux 中文
linux xelatex
linux cjk
linux zhspacing
texlive 中文

google XXX site:ctex.org OR site:ubuntu.org.cn
都会有很多帮助.


如果刘宇辉想学习和使用tex,那么我想可以先放放中文问题.
不就是不能使用中文嘛!!!能像在排版软件中录入汉字
和学习排版数学公式和特殊符号,定制版面,插入图像和表格,
使用不同的字体,处理公式序号,使用bibtex或直接
加入参考文献,制作演示文档(使用beamer),做一些简单的或复杂的
图形(metapost,asympotote作图)有什么关系?


中文问题本来就学习和使用tex没有关系.

经过你的不懈折腾,中文问题总会解决.而这时发现
每次重装系统或者更换发行版都要重来一遍 :-)
这就是Linux下使用中文tex.
Fuck


P.S. 如果回长信,请在硬盘上先写好再粘到浏览器里.如果在浏览器里写,
那么点击发送前复制出来留个备份.

amateur

unread,
May 18, 2010, 2:34:38 AM5/18/10
to debian-c...@lists.debian.org
On Mon. 2010-05-17 20:02:41 +0800, Wang Zhiyong wrote:
> 刘宇辉的问题是中文无法编译吗?
> 参见
> mail.amss.ac.cn/viewthread.php?action=printable&tid=54661
> 中文就是这样让人崩溃.

大家抱怨的都是中文问题,为什么呢?说到底,还是国内搞这个的太少了,或者
说搞的人比较多,但是大家的生存压力比较大,没有那么多时间来搞。当你想抱
怨的时候,想想这个,可能感觉会好一些。

>
>
> 在Linux下使用中文,可能遇到如下问题:
> 1,你是使用发行版里的texlive还是自己从texlive iso安装?
> 2,安装字体或者copy MS的字体或者使用adobe字体.
> 3,中文支持包安装在哪里?
> 4,刷新字体和tex
> 5,写特别的,与ctex用户不同的头文件
> 6,设置环境变量
>
>
> 这些问题都可能遇到,还有使用什么编辑器:
> vim+latexsuite emacs+actex kile lyx scite ...?
> 怎样配置和修改编辑器和相应辅助工具,
> 还有交换含有中文文本文件时可能遇到的乱码问题
> (你可以iconv处理,但是对方呢?),
> 交换源文件时的编译问题(比如老板使用老版的tex,
> 而你使用zhspacing xeltex xecjk ..., 老板
> 怎么编译?!)
>
>
> 建议
> 如果不经常使用tex,那么还是使用win下的ctex.
> 如果不经常使用中文tex,那还是回到win.
> 折腾,非不能也,不为也.

同意这种看法,如果你对一个软件的原理并不感兴趣,只是把 TeX 当作一个工
具来用,最好还是直接使用 CTeX。如果你想用 Windows 那样的方式使用 Linux
,最好的选择还是直接使用 Windows。目前来说,Linux 虽然做的已经非常不错
了,但是考虑到使用习惯和网上的资料数量,与 Windows 还有一定差距。不适
合对 Linux 不感兴趣的新手使用。如果想使用 Linux,就必须意识到可能会遇
到很多问题,要付出代价。当然回报也是十分丰厚的(决定于你对此兴趣有多大
)。

> 爱windows爱生命.
爱生命,远离电脑。

>
>
>
> 如果没有那么多"如果"
> 请搜索
> linux 中文
> linux xelatex
> linux cjk
> linux zhspacing
> texlive 中文
>
> google XXX site:ctex.org OR site:ubuntu.org.cn
> 都会有很多帮助.
>
>
>
>
> 如果刘宇辉想学习和使用tex,那么我想可以先放放中文问题.
> 不就是不能使用中文嘛!!!能像在排版软件中录入汉字
> 和学习排版数学公式和特殊符号,定制版面,插入图像和表格,
> 使用不同的字体,处理公式序号,使用bibtex或直接
> 加入参考文献,制作演示文档(使用beamer),做一些简单的或复杂的
> 图形(metapost,asympotote作图)有什么关系?

我觉得使用才是最好的老师,最好是先搞定中文,以后经常用,这样才能提起兴
趣,不断使用、不断进步。
>
>
> 中文问题本来就学习和使用tex没有关系.
No, It does matter.

>
>
>
> 经过你的不懈折腾,中文问题总会解决.而这时发现
> 每次重装系统或者更换发行版都要重来一遍 :-)
> 这就是Linux下使用中文tex.

事实上,TeX 系统最近两年正处于一个大的变革当中,XeTeX/LuaTeX 等新的
TeX 引擎都在很快的演进,比如中文支持、TrueType/OTF 字体支持、Unicode
等。在这个演进过程中,引入了一些(有些是不必要的)不兼容性。如果你想使
用最新的技术,那么这个代价是不可避免的。但是一般来说升级中出现的问题在
网上会有高手给出解决方案的。如果想追求稳定的话,建议不要经常升级 TeX。


> Fuck
>
>
> P.S. 如果回长信,请在硬盘上先写好再粘到浏览器里.如果在浏览器里写,
> 那么点击发送前复制出来留个备份.

建议你使用邮件客户端工具。

>
-------------------------

--
Good-bye. I am leaving because I am bored.
-- George Saunders' dying words


--
To UNSUBSCRIBE, email to debian-chine...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Archive: http://lists.debian.org/20100518063438.GC4020@localdomain

刘宇辉

unread,
May 18, 2010, 8:37:24 PM5/18/10
to amateur, debian-c...@lists.debian.org


2010/5/18 amateur <tianle...@gmail.com>
遇到了问题,解决才能使自己不断进步,要想很轻易的获得成功 这个不大可能,是吧。
 

还是喜欢先在vim里面写完,再粘贴

>
-------------------------

--
Good-bye.  I am leaving because I am bored.
               -- George Saunders' dying words


--
To UNSUBSCRIBE, email to debian-chine...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20100518063438.GC4020@localdomain




--
________________________
wolf python london(WPL)      
Do as you soul should do !
________________________

Reply all
Reply to author
Forward
0 new messages