使用texlive 2025
3月8号的版本
tex文件内容
\documentclass{ctexart}
\begin{document}
你好 \LaTeX\ 世界!
\end{document}
错误:
ctex-fontset-windows.def: 错误: : Package fontspec Error:
ctex-fontset-windows.def: 错误: 101: Cannot use \XeTeXOTcountfeatures with nullfont; not an OpenType Layout font. }
ctex-fontset-windows.def: 错误: 101: Missing = inserted for \ifnum. }
win10 22h2 打了最新的更新
请问有什么解决办法吗?
完整的日志文件:
! Package fontspec Error:
(fontspec) The font "SimHei" cannot be found; this may be but
(fontspec) usually is not a fontspec bug. Either there is a
(fontspec) typo in the font name/file, the font is not
(fontspec) installed (correctly), or there is a bug in the
(fontspec) underlying font loading engine (XeTeX/luaotfload).
For immediate help type H <return>.
...
安装正常关闭,关闭按钮出现时点击关闭的。pdflatex可以正常构建和预览。使用xeCJK时用xelatex可以正常构建和预览,pdflatex就不行了。总之,使用ctex时用pdflatex,使用xeCJK时用xelatex,才能正常编译通过。
请问,现在哪个包制作中文tex文件比较好?
@u151315 使用
ctex
时不推荐用pdflatex
,要排版中文,请用xelatex
或lualatex
.推荐阅读: lshort
另外,请提供你用
xelatex
编译我给出的『最简测试代码』的结果。另外最重要的是,请⚠⚠⚠⚠⚠⚠删除你的上一个
ctex-fontset-windows.def
的评论,没有任何可读性,同时网页变得太长了....,需要用markdown的行内代码块。使用ctex,用xelatex编译通不过呀。使用lualatex编译ctex报错ctex-fontset-windows.def: 错误: : Package fontspec Error:。
@u151315 你是如何编译的,是在命令行编译的吗?
你提到的测试代码是:
你又提到『不管是用ctex还是xeCJK』(?)似乎是有矛盾的。
@u151315
这句话的逻辑没处理好,
ctex
是一个宏集会根据不同的引擎采用不同的中文处理方式,xeCJK
只是提供了一种中文处理技术。具体来说,使用
ctex
宏集,如果使用:pdflatex
编译,使用的是老旧的CJK
宏包处理中文xelatex
编译,默认使用的是xeCJK
来处理lualatex
编译,使用的是luatex-ja
来处理在中文版操作系统且正常安装TL2025的情况下,用
xelatex
编译上面的『最简测试代码』,是可以顺利得到PDF的。@u151315 如果问题还是没解决,建议你进QQ群『91940767』交流并作及时回复。