我最近重新设置了 MiKTeX 和 Texmaker 安装,但自此以后一直无法成功编译 XeLaTeX(通过 Texmaker)。这适用于最基本的示例。此文件:
\documentclass{article}
\begin{document}
Lorem ipsum dolor sit amet
\end{document}
使用 PDFLaTeX 编译得很好,但使用 XeLaTeX 编译时不会生成 pdf 并显示以下日志:
2022-10-11 11:34:55,942+0200 INFO xelatex - this process (11536) started by texmaker in directory C:\Users\abc\Desktop\sample with command line: xelatex -synctex=1 -interaction=nonstopmode sample.tex
2022-10-11 11:34:55,942+0200 INFO xelatex - running on Windows 10.0.19044
2022-10-11 11:34:55,947+0200 INFO xelatex - this is MiKTeX-XETEX 4.9.0 (0.999994) (MiKTeX 22.8.28)
2022-10-11 11:34:55,952+0200 INFO xelatex - allowing known shell commands
2022-10-11 11:34:56,198+0200 INFO xelatex.core - start process: miktex-dvipdfmx.exe -q -E -o sample.pdf
2022-10-11 11:34:56,726+0200 INFO xelatex - this process (11536) finishes with exit code 0
当我尝试编译一些稍微复杂一些的文件时(这些文件在重新安装之前运行良好),我收到了“dvipdfmx:fatal”提示。日志文件:
2022-10-11 11:45:03,525+0200 INFO xelatex - this process (9960) started by texmaker in directory C:\Users\abc\Desktop\mock-q. 140 with command line: xelatex -synctex=1 -interaction=nonstopmode "q. 140.tex"
2022-10-11 11:45:03,525+0200 INFO xelatex - running on Windows 10.0.19044
2022-10-11 11:45:03,530+0200 INFO xelatex - this is MiKTeX-XETEX 4.9.0 (0.999994) (MiKTeX 22.8.28)
2022-10-11 11:45:03,534+0200 INFO xelatex - allowing known shell commands
2022-10-11 11:45:06,912+0200 INFO xelatex.core - start process: miktex-dvipdfmx.exe -q -E -o "q. 140.pdf"
2022-10-11 11:45:07,961+0200 FATAL xelatex.core - Invalid argument
2022-10-11 11:45:07,961+0200 FATAL xelatex.core - Function: fwrite
2022-10-11 11:45:07,961+0200 FATAL xelatex.core - Result: 22
2022-10-11 11:45:07,961+0200 FATAL xelatex.core - Data: <no data>
2022-10-11 11:45:07,961+0200 FATAL xelatex.core - Source: Libraries\MiKTeX\TeXAndFriends\include\miktex/C4P/C4P.h:531
2022-10-11 11:45:07,961+0200 FATAL xelatex - Invalid argument
2022-10-11 11:45:07,961+0200 FATAL xelatex - Info:
2022-10-11 11:45:07,962+0200 FATAL xelatex - Source: Libraries\MiKTeX\TeXAndFriends\include\miktex/C4P/C4P.h
2022-10-11 11:45:07,962+0200 FATAL xelatex - Line: 531
2022-10-11 11:45:07,964+0200 INFO xelatex - this process (9960) finishes with exit code 1
2022-10-11 11:45:07,966+0200 WARN xelatex.core - still open: "q. 140.aux"
2022-10-11 11:45:07,966+0200 WARN xelatex.core - still open: "q. 140.1"
2022-10-11 11:45:07,966+0200 WARN xelatex.core - still open: C:\Users\abc\AppData\Local\Programs\MiKTeX\fonts/tfm/public/cm\cmsy6.tfm
2022-10-11 11:45:07,966+0200 WARN xelatex.core - still open: C:\Users\abc\AppData\Local\Programs\MiKTeX\fonts/tfm/public/cm\cmsy8.tfm
2022-10-11 11:45:07,966+0200 WARN xelatex.core - still open: C:\Users\abc\AppData\Local\Programs\MiKTeX\fonts/tfm/public/cm\cmmi6.tfm
2022-10-11 11:45:07,967+0200 WARN xelatex.core - still open: C:\Users\abc\AppData\Local\Programs\MiKTeX\fonts/tfm/public/cm\cmmi8.tfm
2022-10-11 11:45:07,967+0200 WARN xelatex.core - still open: C:\Users\abc\AppData\Local\Programs\MiKTeX\fonts/tfm/public/cm\cmr6.tfm
2022-10-11 11:45:07,967+0200 WARN xelatex.core - still open: C:\Users\abc\AppData\Local\Programs\MiKTeX\fonts/tfm/public/cm\cmr8.tfm
2022-10-11 11:45:07,967+0200 WARN xelatex.core - still open: "q. 140.tex"
2022-10-11 11:45:07,967+0200 WARN xelatex.core - still open: "q. 140.log"
2022-10-11 11:45:07,967+0200 WARN xelatex.core - still open: C:\Users\abc\AppData\Local\Programs\MiKTeX\fonts/tfm/public/lm\ec-lmr10.tfm
2022-10-11 11:45:07,967+0200 WARN xelatex.core - still open: C:\Users\abc\AppData\Local\Programs\MiKTeX\fonts/tfm/jknappen/ec\ectt1000.tfm
2022-10-11 11:45:07,968+0200 WARN xelatex.core - still open: C:\Users\abc\AppData\Local\Programs\MiKTeX\fonts/tfm/public/latex-fonts\lasy6.tfm
通过 TeXnicCenter 运行 XeLaTeX 时,两个文件都可以顺利编译,因此我认为这是 Texmaker 安装的一些问题。我猜测可能是之前安装的一些残留文件干扰了该过程。我尝试过重新安装所有内容、清理寄存器等,但毫无效果。如果您能提供任何提示,我将不胜感激:我已经为此苦苦挣扎了几天,真的不知道还能尝试什么。
编辑:我注意到,虽然全新安装的 TeXnicCenter 可以很好地编译这些文件,但过了一段时间 - 大概是尝试使用 Texmaker 进行编译几次之后 - 通过 TexnicCenter 的 XeLaTeX 工具也会失败(出现相同的 dvipdfmx:fatal 提示)。
也许此主题有某种关联(日志类似),但我没有在我的字体目录中发现任何杂散的 Type 1 字体,因为那里存在问题。