我使用 Elegantpaper v0.08 範本寫了一篇論文。並引用一些中文參考書目。編譯文件後,我發現 PDF 中有問題。參考文獻中的“等”顯示錯誤,顯示為“çŋĽ”。
我的tex檔案是這樣的。
\documentclass[lang=cn, a4paper, 12pt]{elegantpaper}
\title{test file}
\author{Direct-A}
\date{\today}
\version{0.1}
\begin{document}
\maketitle
test\cite{RN1}
\bibliography{ref}
\end{document}
和圍脖文件
@article{RN1,
author = {张麻子 and 李四 and 王五 and 张三},
title = {我就是马邦德},
journal = {让子弹飞},
volume = {1},
number = {23},
pages = {210-220},
issn = {1007-4368},
doi = {10.1016/rzdf001011},
year = {2013},
type = {Journal Article}
}
我使用MiKTex 2.9
,Visual Studio Code 1.41.1
作為編輯器和LaTeX Workshop 8.7.1
擴展。編譯:XeLaTeX => BibTeX => XeLaTeX => XeLaTeX
答案1
我發現了這個問題,感謝@Ulrike Fischer,感謝大家幫助我。
新增.tex 檔案後\XeTeXtracingfonts=1
,我檢查了日誌檔案。
我發現這個:
Requested font "SimSun/OT" at 11.99997pt
-> C:/WINDOWS/Fonts/simsun.ttc
Requested font "SimSun/OT" at 12.00003pt
-> C:/WINDOWS/Fonts/simsun.ttc
Requested font "KaiTi/OT:script=hani;language=dflt;" at 12.00002pt
-> C:/Users/****/AppData/Local/Microsoft/Windows/Fonts/KaiTi.ttf
Requested font "KaiTi/B/OT:script=hani;language=dflt;" at 12.00002pt
-> C:/Users/****/AppData/Local/Microsoft/Windows/Fonts/KaiTi.ttf
Package fontspec Info: Could not resolve font "KaiTi/B" (it probably doesn't
(fontspec) exist).
Requested font "SimHei/OT:script=hani;language=dflt;" at 12.00002pt
-> C:/WINDOWS/Fonts/simhei.ttf
Requested font "SimHei/I/OT:script=hani;language=dflt;" at 12.00002pt
-> C:/WINDOWS/Fonts/simhei.ttf
Package fontspec Info: Could not resolve font "SimHei/I" (it probably doesn't
(fontspec) exist).
Requested font "SimSun/OT:script=hani;language=dflt;" at 12.00002pt
-> C:/WINDOWS/Fonts/simsun.ttc
Requested font "SimSun/BI/OT:script=hani;language=dflt;" at 12.00002pt
-> C:/WINDOWS/Fonts/simsun.ttc
Package fontspec Info: Could not resolve font "SimSun/BI" (it probably doesn't
(fontspec) exist).
Requested font "SimSun/OT:script=hani;language=dflt;" at 12.00003pt
-> C:/WINDOWS/Fonts/simsun.ttc
Requested font "SimHei/OT:script=hani;language=dflt;" at 12.00003pt
-> C:/WINDOWS/Fonts/simhei.ttf
Requested font "KaiTi/OT:script=hani;language=dflt;" at 12.00003pt
-> C:/Users/****/AppData/Local/Microsoft/Windows/Fonts/KaiTi.ttf
Package fontspec Info: Font family 'SimSun(0)' created for font 'SimSun' with
(fontspec) options
(fontspec) [Script={CJK},BoldFont={SimHei},ItalicFont={KaiTi}].
(fontspec)
(fontspec) This font family consists of the following NFSS
(fontspec) series/shapes:
(fontspec)
(fontspec) - 'normal' (m/n) with NFSS spec.:
(fontspec) <->"SimSun/OT:script=hani;language=dflt;"
(fontspec) - 'small caps' (m/sc) with NFSS spec.:
(fontspec) - 'bold' (b/n) with NFSS spec.:
(fontspec) <->"SimHei/OT:script=hani;language=dflt;"
(fontspec) - 'bold small caps' (b/sc) with NFSS spec.:
(fontspec) - 'italic' (m/it) with NFSS spec.:
(fontspec) <->"KaiTi/OT:script=hani;language=dflt;"
(fontspec) - 'italic small caps' (m/scit) with NFSS spec.:
(test.aux)
\openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
此外,我收到了警告VS code
。
Font shape `TU/SimSun(0)/bx/n' undefined
(Font) using `TU/SimSun(0)/m/n' instead.
好吧,問題改變了。
最後我把環境改成TeXLive
(完整方案),就解決了。