ElegantLaTeX / ElegantPaper

Elegant LaTeX Template for Working Papers
LaTeX Project Public License v1.3c
1.28k stars 258 forks source link

xelatex编译后的pdf是损坏的,不能打开 #15

Closed qiaokeligege closed 4 years ago

qiaokeligege commented 4 years ago

log 信息见 log.txt

qiaokeligege commented 4 years ago

Package fontspec Warning: Font "FandolHei-Regular" does not contain requested 好像是字体的问题,我是在macos Catalina 上使用的

EthanDeng commented 4 years ago

Mac 上很可能是因为版本和字体版权的原因,你可以尝试修改 elegantlatex.clsctex 包的选项,将其改为 \RequirePackage[UTF8, scheme=plain, fontset=macnew]{ctex}

qiaokeligege commented 4 years ago

谢谢,还是不行 没报错 但是有warning Package fontspec Warning: Font "STFangsong" does not contain requested Script Package fontspec Warning: Font "Kaiti SC" does not contain requested Script Package fontspec Warning: Font "Songti SC Light" does not contain requested 而且pdf还是生成不了 然后我发现我改不了macnew.def

EthanDeng commented 4 years ago

那你把 ctex 宏包直接注释掉,然后引入 xeCJK,设定中文字体,等他们把 ctex 和 mac 的弄好之后再改回来吧。

EthanDeng commented 4 years ago

另外,如果你网络没问题的话,还可以使用在线版本

qiaokeligege commented 4 years ago

鬼鬼,谢谢老哥,我再试,还有老哥你不睡的吗

EthanDeng commented 4 years ago

18

jacknlliu commented 4 years ago

same issue with Fedora system.

$ xelatex  elegantpaper-en.tex
Package natbib Warning: Citation `en1' on page 2 undefined on input line 60.

Package natbib Warning: Citation `en2' on page 2 undefined on input line 60.

Package natbib Warning: Citation `en3' on page 2 undefined on input line 60.

[2] (/usr/share/texlive/texmf-dist/tex/latex/newtx/ts1ntxtlf.fd) [3] [4]

Package natbib Warning: Citation `en1' undefined on input line 177.

Package natbib Warning: Citation `en2' undefined on input line 177.

No file elegantpaper-en.bbl.

Package natbib Warning: There were undefined citations.

[5] (./elegantpaper-en.aux)

Package rerunfilecheck Warning: File `elegantpaper-en.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

xdvipdfmx:fatal: Could not find encoding file "ntxsups_t1.enc".

No output PDF file written.
 )
Error 256 (driver return code) generating output;
file elegantpaper-en.pdf may not be valid.
Transcript written on elegantpaper-en.log.
EthanDeng commented 4 years ago

根据上述的提示信息,可能是 newtx 系列宏包在 linux 上出现的问题,建议重新安装下 newtx 字体,涉及到的宏包有 newtxtext 和 newtxmath。之后我会把这个设置为选项,恢复 computer modern 字体作为默认。

EthanDeng commented 4 years ago

最新版已经将 newtx 字体改为备选数学字体,默认使用 computer modern 字体。