您尚未登录。

#1 2012-07-20 22:52:28

jouyouyun
会员
注册时间: 2011-10-10
帖子: 268

问个 LaTex 的问题

今天刚装了 texlive-most texlive-lang ,测试中文时报错,fontspec error: "font-not-found“ The font "SimHei" cannot be found.错误信息如下:

$ xelatex tt.tex
This is XeTeX, Version 3.1415926-2.3-0.9997.5 (TeX Live 2012/dev/Arch Linux)
 restricted \write18 enabled.
entering extended mode
(./tt.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,
 icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or
iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,
 lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol
ish, portuguese, romanian, russian, sanskrit, serbian, serbianc, slovak, sloven
ian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded
.
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf-dist/tex/latex/ctex/ctex.sty
(/usr/share/texmf-dist/tex/latex/ctex/opt/ctex-common-opts.def)
(/usr/share/texmf-dist/tex/latex/ctex/def/ctex-common.def
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/l3names.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty))
(/usr/share/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/share/texmf-dist/tex/latex/tools/calc.sty)
(/usr/share/texmf-dist/tex/latex/graphics/color.sty
(/usr/share/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/share/texmf-dist/tex/xelatex/xetex-def/xetex.def))
(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texmf-dist/tex/latex/latexconfig/graphics.cfg))
(/usr/share/texmf-dist/tex/latex/l3kernel/l3basics.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3expan.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3tl.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3seq.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3int.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3quark.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3prg.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3clist.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3token.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3prop.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3msg.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3io.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3file.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3skip.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3keys.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3fp.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3box.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3coffins.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3color.sty)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3luatex.sty))
(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-dist/tex/latex/tools/indentfirst.sty)
(/usr/share/texmf-dist/tex/latex/base/fix-cm.sty
(/usr/share/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/share/texmf-dist/tex/latex/ctex/engine/ctex-xecjk-engine.def
(/usr/share/texmf-dist/tex/latex/savesym/savesym.sty

LaTeX Warning: You have requested package `savesym',
               but the package provides `savesymbol'.

) (/usr/share/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
(/usr/share/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf-dist/tex/generic/xkeyval/xkeyval.tex))
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
(/usr/share/texmf-dist/tex/latex/base/fixltx2e.sty))
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/share/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/share/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/share/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/share/texmf-dist/tex/latex/tipa/t3enc.def
(/usr/share/texmf-dist/tex/latex/euenc/eu1lmss.fd))
(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty))
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec.cfg))))
(/usr/share/texmf-dist/tex/latex/ctex/engine/ctex-cjk-common.def)
(/usr/share/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.def))))
(/usr/share/texmf-dist/tex/latex/ctex/def/ctex-utf8.def)
(/usr/share/texmf-dist/tex/latex/ctex/cfg/ctex.cfg) (./tt.aux)
(/usr/share/texmf-dist/tex/latex/tipa/t3cmr.fd)
kpathsea: Running mktextfm SimHei/ICU
/usr/share/texmf/web2c/mktexnam: Could not map source abbreviation I for ICU.
/usr/share/texmf/web2c/mktexnam: Need to update /usr/share/texmf-dist/fonts/map/fontname/special.map?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ICU
This is METAFONT, Version 2.718281 (TeX Live 2012/dev/Arch Linux)


kpathsea: Running mktexmf ICU
! I can't find file `ICU'.
<*> \mode:=ljfour; mag:=1; nonstopmode; input ICU
                                                 
Please type another input file name
! Emergency stop.
<*> \mode:=ljfour; mag:=1; nonstopmode; input ICU
                                                 
Transcript written on mfput.log.
grep: ICU.log: 没有那个文件或目录
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ICU' failed to make ICU.tfm.
kpathsea: Appending font creation commands to missfont.log.


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
! 
! The font "SimHei" cannot be found.
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  
                                                  
l.4 中
       文宏包测试
? 

源代码见下:

\documentclass{article}
\usepackage{ctex}
\begin{document}
中文宏包测试
\end{document}

在此恳求诸位指教!!!

离线

#2 2012-07-20 22:56:56

xgdgscarch
会员
注册时间: 2012-05-07
帖子: 191

Re: 问个 LaTex 的问题

确认黑体装了吗?

离线

#3 2012-07-21 00:15:10

jouyouyun
会员
注册时间: 2011-10-10
帖子: 268

Re: 问个 LaTex 的问题

哦,开始时没装,不过我把 win 下的 sim* 拷到 arch 下后,又出现 The font "[SIMKAI.TTF]" cannot be found. 用 fc-list :lang=zh-cn 查看时,楷体显示为: 楷体_GB2312,KaiTi_GB2312:style=Regular
fc-list :lang=zh-cn 命令具体显示如下:

$ fc-list :lang=zh-cn 
WenQuanYi Bitmap Song:style=Bold
方正楷体_GBK,FZKai\-Z03:style=Regular
楷体_GB2312,KaiTi_GB2312:style=Regular
AR PL UMing TW:style=Light
方正细黑一_GBK,FZXiHeiI\-Z08:style=Regular
AR PL UMing HK:style=Light
文泉驿等宽微米黑,文泉驛等寬微米黑,WenQuanYi Micro Hei Mono:style=Regular
新宋体,NSimSun:style=Regular
AR PL UMing CN:style=Light
方正隶书_GBK,FZLiShu\-S01:style=Regular
仿宋_GB2312,FangSong_GB2312:style=Regular
方正宋体S\-超大字符集,FZSongS\-Extended:style=Regular
宋体,SimSun:style=Regular
方正仿宋_GBK,FZFangSong\-Z02:style=Regular
黑体,SimHei:style=Regular
方正行楷_GBK,FZXingKai\-S04:style=Regular
文泉驿正黑,文泉驛正黑,WenQuanYi Zen Hei:style=Regular
方正小标宋_GBK,FZXiaoBiaoSong\-B05:style=Regular
文泉驿微米黑,文泉驛微米黑,WenQuanYi Micro Hei:style=Regular
方正黑体_GBK,FZHei\-B01:style=Regular
WenQuanYi Bitmap Song:style=Regular
方正书宋_GBK,FZShuSong\-Z01:style=Regular
Fixed:style=ko
Fixed:style=ja
文泉驿等宽正黑,文泉驛等寬正黑,WenQuanYi Zen Hei Mono:style=Regular
方正魏碑_GBK,FZWeiBei\-S03:style=Regular
AR PL UMing TW MBE:style=Light
文泉驿点阵正黑,文泉驛點陣正黑,WenQuanYi Zen Hei Sharp:style=Regular
方正姚体_GBK,FZYaoTi\-M06:style=Regular
方正超粗黑_GBK,FZChaoCuHei\-M10:style=Regular
永中宋体,Evermore Song:style=Regular

离线

#4 2012-07-21 00:28:18

ffwalle
机器人
注册时间: 2011-12-03
帖子: 393

Re: 问个 LaTex 的问题

还是参考这个例子吧

\documentclass[11pt]{article}
\usepackage[BoldFont,SlantFont,CJKsetspaces,CJKchecksingle]{xeCJK}
\setCJKmainfont[BoldFont=SimHei]{SimSun}
\setCJKmonofont{SimSun}% 设置缺省中文字体
\parindent 2em   %段首缩进
 
\begin{document}
\section{举例}
\begin{verbatim}
标点。
\end{verbatim}
 
汉字Chinese数学$x=y$空格
\end{document}

just for fun :-)

离线

#5 2012-07-21 00:35:42

jouyouyun
会员
注册时间: 2011-10-10
帖子: 268

Re: 问个 LaTex 的问题

walle 说:

还是参考这个例子吧

\documentclass[11pt]{article}
\usepackage[BoldFont,SlantFont,CJKsetspaces,CJKchecksingle]{xeCJK}
\setCJKmainfont[BoldFont=SimHei]{SimSun}
\setCJKmonofont{SimSun}% 设置缺省中文字体
\parindent 2em   %段首缩进
 
\begin{document}
\section{举例}
\begin{verbatim}
标点。
\end{verbatim}
 
汉字Chinese数学$x=y$空格
\end{document}

OK! 以后就用这个了。

离线

#6 2012-08-05 20:05:49

wych
论坛版主
注册时间: 2011-11-27
帖子: 103

Re: 问个 LaTex 的问题

以前发帖说过这个问题http://bbs.archlinuxcn.org/viewtopic.php?id=759


Twitter@wych42

离线

#7 2012-08-06 18:49:31

jouyouyun
会员
注册时间: 2011-10-10
帖子: 268

Re: 问个 LaTex 的问题

wych 说:

以前发帖说过这个问题http://bbs.archlinuxcn.org/viewtopic.php?id=759

当时没看到.....

离线

页脚