我是 TeX 新手,正在尝试编译此代码:
\documentclass{article}
\usepackage{xeCJK}
\setCJKmainfont{WenQuanYi Zen Hei Mono}
\begin{document}
你好,\TeX!
\end{document}
我可以正常获取 pdf,但是警告让我感到困惑。
$ xelatex t.tex
This is XeTeX, Version 3.1415926-2.3-0.9997.5 (TeX Live 2011)
restricted \write18 enabled.
entering extended mode
(./t.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2009-06-19, ngerman-x-2009-06-19, 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/local/texlive/2011/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2011/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2011/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
(/usr/local/texlive/2011/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/expl3.sty
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3names.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3basics.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3expan.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3tl.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3int.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3quark.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3seq.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3toks.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3prg.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3clist.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3token.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3prop.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3msg.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3io.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3skip.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3box.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3keyval.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3keys.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3precom.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3xref.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3file.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3fp.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3luatex.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/tools/calc.sty))
(/usr/local/texlive/2011/texmf-dist/tex/latex/xpackages/xbase/xparse.sty)
(/usr/local/texlive/2011/texmf-dist/tex/generic/kastrup/binhex.tex)
(/usr/local/texlive/2011/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2011/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2011/texmf-dist/tex/generic/xkeyval/keyval.tex)))
(/usr/local/texlive/2011/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
(/usr/local/texlive/2011/texmf-dist/tex/latex/base/fixltx2e.sty))
(/usr/local/texlive/2011/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2011/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/local/texlive/2011/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/local/texlive/2011/texmf-dist/tex/xelatex/xunicode/xunicode.sty)
(/usr/local/texlive/2011/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
No file t.aux.
[1] (./t.aux)
** WARNING ** TrueType post table name index 32768 > 32767
)
Output written on t.pdf (1 page).
Transcript written on t.log.
日志中写道:
fontspec info: Font WenQuanYi Zen Hei Mono does not contain any OpenType `Scri
pt' information.
\g_fontspec_family_WenQuanYi Zen Hei Mono_int=\count177
fontspec info: Defining font family 'WenQuanYiZenHeiMono(0)' for font 'WenQuan
Yi Zen Hei Mono' with options [].
\g_fontspec_WenQuanYiZenHeiMono(0)_prop=\toks37
fontspec info: Defining shape 'normal' with NFSS spec.:
(fontspec) <->"WenQuanYi Zen Hei Mono/ICU:"
fontspec info: Could not resolve font WenQuanYi Zen Hei Mono/B (it probably do
esn't exist).
fontspec info: Could not resolve font WenQuanYi Zen Hei Mono/I (it probably do
esn't exist).
fontspec info: Could not resolve font WenQuanYi Zen Hei Mono/BI (it probably d
oesn't exist).
我的问题是,如果XeLaTeX找不到wqy字体,如何能成功生成pdf?
答案1
找到了字体,但fontspec
无法识别粗体 (/B) 和斜体版本 (/I)。这不是问题,因为在这种情况下它会恢复到正常字体版本。TrueType post table name index
据我所知,这个警告并不严重。