在overleaf上使用LaTeX写中文论文出现错误:The font “XXX” cannot be found
Posted shenxiaolin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在overleaf上使用LaTeX写中文论文出现错误:The font “XXX” cannot be found相关的知识,希望对你有一定的参考价值。
在overleaf上使用LaTeX写中文论文,编译时报错:The font “XXX” cannot be found
首先:确保compiler编译器是选择 “XeLaTeX”
其次:了解到
诸如:
{Times New Roman PS Std} 、{Mosquito Formal Std} 、{Lucida Sans Typewriter Std}、{Lucida Sans Typewriter} 等这些英文字体
和 {Adobe Song Std} 、{Adobe Song Std}、{Adobe Heiti Std}、{Adobe Kaiti Std} 等这些中文字体
都是受版权保护,没法在overleaf服务器上使用的。
最后,在LaTeX技术交流群的管理员的建议(写信给 support 询问解决方案,它们24小时都有人值班,全球各个州都有人 )下,向 overleaf 的 support 团队发了求助信息,
很快就得到了回复:(我没想到效率这么高,真的给力!)
Hello,
Thanks for getting in touch. SimSun is loaded by the zhfont package. It is a commercial font, and therefore not present on Overleaf‘s servers. (Neither are the Adobe Chinese fonts available on Overleaf, for the same reason.)
To get this project compiled on Overleaf, you would therefore need to remove lines 100–107 in headinfo.tex, and then add usepackage{ctex}. This package uses the Fandol fonts as default, and already includes facilities of zhfonts and zhspacing.
You should also remove the lines
deflq{`}def
q{‘}
zhspacing
in main.tex. This template also makes it compulsory to have a chairman and appraiser.
I hope this helps.
Best,
LianTze
—
Dr. LianTze Lim
Overleaf TeXpert
按照这个建议提示修改之后,就可以编译成功了,即使还是会有error,不影响编译就行……
附:
Dr. LianTze Lim 也是这个问题(https://tex.stackexchange.com/questions/377749/trouble-setting-new-font-in-overleaf)的回答者,感谢。
以上是关于在overleaf上使用LaTeX写中文论文出现错误:The font “XXX” cannot be found的主要内容,如果未能解决你的问题,请参考以下文章
Overleaf—LaTeX初使用(标题、目录及段落的编辑)
科研丨Overleaf打开LaTeX编译报错:PDF渲染错误已解决