我直接 clone 了李文威老师 Github 上的模板于本地,未作任何修改,然后按照上面的编译方法在命令行中输入latexmk -pdf -pdflatex="xelatex -shell-escape -interaction=nonstopmode %O %S" Al-jabr-1
进行编译,但出现了如下错误:
dvipdfmx:fatal: Invalid TTC index number
No output PDF file written.
LaTeX Warning: Citation 'vdW1' on page 1 undefined on input line 12.
LaTeX Warning: Citation 'vdW2' on page 1 undefined on input line 12.
[1
Sorry, but xelatex did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\kingt\AppData\Local\MiKTeX\miktex\log\xelatex.log
Latexmk: fls file doesn't appear to have been made.
Latexmk: Getting log file 'Al-jabr-1.log'
Latexmk: Examining 'Al-jabr-1.log'
Latexmk: Missing bbl file 'Al-jabr-1.bbl' in following:
No file Al-jabr-1.bbl.
Latexmk: References changed.
Latexmk: Summary of warnings from last run of *latex:
Latex failed to resolve 2 citation(s)
Latexmk: ====List of undefined refs and citations:
Citation 'vdW1' on page 1 undefined on input line 12
Citation 'vdW2' on page 1 undefined on input line 12
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 1
Refer to 'Al-jabr-1.log' for details
Latexmk: If appropriate, the -f option can be used to get latexmk
to try to force complete processing.
Reverting Windows console CPs to (in,out) = (936,65001)
这上面提示我似乎没有生成.bbl
文件,但我看文件夹中已有.bib
文件。搜索 dvipdfmx 似乎是与字体有关,还是存在其他问题?
试了一下,可以编译成功。以下几点你都满足了吗?
- TeX Live, including the programs latexmk, xindy and biber.
- Standard fonts included in TeX Live, in particular the Fandol fonts. For some strange reason I used and installed the TeX Gyre Heros fonts in the system. In case of error messages related to these fonts, please look for the OTF files (inside the directories in your computer which store TeX-related fonts) whose names start with texgyreheros, and install them manually in your system.
- The Noto Sans CJK SC fonts from Noto CJK, which should also be installed system-wide.
感谢回复。字体我都下载了,但我用的是 MiKTeX 在 Windows 下编译,模板是用 TeXLive 在 UN*X 下编译,我不清楚二者是否会有区别。
@u40900 我是 mac 下编译成功的,话说这是完整的 log 吗?
不是,完整的在这。
@u40900 可以先看看 C:UserskingtAppDataLocalMiKTeXmiktexlogxelatex.log,到底是什么原因 xelatex 挂了。
@u23703 谢谢! 问题已解决. 我看了 .log, 上面说我的 MiKTeX 很久没更新, 更新了后现在可以成功编译了.