在overleaf上使用LaTeX写中文论文出现错误:The font “XXX” cannot be found

2020/01/17 20:08
阅读数 2.8K

在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

\def\lq{`}\def\rq{'}
\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)的回答者,感谢。



番外:
在LaTeX技术交流群里邂逅了
Dr. LianTze Lim !
马来西亚TeX达人-林莲枝采访记录 :http://blog.sina.com.cn/s/blog_5e16f1770102dx39.html
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部