CTeX-org / forum

A temporarily alternate forum of `bbs.ctex.org`
https://t.me/chinesetex
Apache License 2.0
210 stars 16 forks source link

使用XeLatex构建中文文档源码时报错: xdvipdfmx:fatal: Unknown coverage format #279

Closed Redish101 closed 1 year ago

Redish101 commented 1 year ago

检查

编译环境

描述问题

我在使用XeLaTex构建中文文档时报错:xdvipdfmx:fatal: Unknown coverage format

最小工作示例(MWE)

\documentclass{ctexart}

\begin{document}
你好,LaTex
\end{document}

(用 XeLaTeX 编译后)输出

(/usr/local/texlive/2023/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macnew.
def))) (/usr/local/texlive/2023/texmf-dist/tex/latex/ctex/config/ctex.cfg)
(./Latex.aux) [1] (./Latex.aux)
xdvipdfmx:fatal: Unknown coverage format

No output PDF file written.
 )
Error 256 (driver return code) generating output;
file Latex.pdf may not be valid.
SyncTeX written on Latex.synctex.gz.
Transcript written on Latex.log.

链接

我还做了这些尝试

我尝试了使用搜索引擎寻找解决方案,但是并未找到结果

附件

完整的构建日志

muzimuzhi commented 1 year ago

github issue 支持直接上传附件,我重传了一份 Latex.log

Package fontspec Info: Font family 'SongtiSCLight(0)' created for font 'Songti    
(fontspec)             SC Light' with options 
(fontspec)             [Script={CJK},BoldItalicFont={Kaiti SC 
(fontspec)             Bold},BoldFont={Songti SC Bold},ItalicFont={Kaiti SC}].    
(fontspec)                
(fontspec)              This font family consists of the following NFSS   
(fontspec)             series/shapes: 
(fontspec)                
(fontspec)             - 'normal' (m/n) with NFSS spec.: <->"Songti SC    
(fontspec)             Light/OT:script=hani;language=dflt;"

最后一行里的 script=hani 不是默认会带的,xecjk 初始设置的是 \defaultCJKfontfeatures{Script=CJK},然后会报如下 warning,

Package fontspec Warning: Font "Songti SC Light" does not contain requested
(fontspec)                Script "CJK".

相关 log 里不会出现 script=hani

(fontspec)             - 'normal' (m/n) with NFSS spec.: <->"Songti SC
(fontspec)             Light/OT:language=dflt;"

安装 macTeX 后,有没有改过什么?

Redish101 commented 1 year ago

github issue 支持直接上传附件,我重传了一份 Latex.log

Package fontspec Info: Font family 'SongtiSCLight(0)' created for font 'Songti  
(fontspec)             SC Light' with options   
(fontspec)             [Script={CJK},BoldItalicFont={Kaiti SC   
(fontspec)             Bold},BoldFont={Songti SC Bold},ItalicFont={Kaiti SC}].  
(fontspec)                  
(fontspec)              This font family consists of the following NFSS 
(fontspec)             series/shapes:   
(fontspec)                  
(fontspec)             - 'normal' (m/n) with NFSS spec.: <->"Songti SC  
(fontspec)             Light/OT:script=hani;language=dflt;"

最后一行里的 script=hani 不是默认会带的,xecjk 初始设置的是 \defaultCJKfontfeatures{Script=CJK},然后会报如下 warning,

Package fontspec Warning: Font "Songti SC Light" does not contain requested
(fontspec)                Script "CJK".

相关 log 里不会出现 script=hani

(fontspec)             - 'normal' (m/n) with NFSS spec.: <->"Songti SC
(fontspec)             Light/OT:language=dflt;"

安装 macTeX 后,有没有改过什么?

并没有,但是我的设备上也安装过MikTex,但因为无法正确读取字体而又安装了MacTex,会不会是这两者冲突导致的?

muzimuzhi commented 1 year ago

有可能。用 "miktex, script=hani" 确实能搜到一些问答/讨论。我没有在 macOS 上使用 MiKTeX 的经验,帮不上

MiKTeX 关于「在 macOS 卸载」的官方文档 https://miktex.org/howto/install-miktex-mac (见网页末尾)

Redish101 commented 1 year ago

有可能。用 "miktex, script=hani" 确实能搜到一些问答/讨论。我没有在 macOS 上使用 MiKTeX 的经验,帮不上

MiKTeX 关于「在 macOS 卸载」的官方文档 https://miktex.org/howto/install-miktex-mac (见网页末尾)

我使用miktexsetup删除了miktex,但是此问题依然存在

Redish101 commented 1 year ago

我将系统字体目录内的宋体删除,成功解决了问题

muzimuzhi commented 1 year ago

你是什么版本的 macOS?

Redish101 commented 1 year ago

13.0