在overleaf/linux环境使用windows字体 #394
mri1998
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
上传你电脑里的C:\Windows\Fonts里的四个文件到overleaf,跟main.tex和ustcthesis.cls在同一层级
simfang.ttf,即仿宋
simhei.ttf,即黑体
simkai.ttf,即楷体
simsun.ttc,即宋体
选择windows字库:在ustcthesis.cls定位以下代码
把
fontset = ubuntu和fontset = fandol改为fontset = windows。引用上传的字体文件:在ustcthesis.cls定位以下代码
里面的
\setCJKmainfont、\setCJKsansfont、\setCJKmonofont后的第一项改成相应的文件名。\setCJKmainfont内的ItalicFont = KaiTi中的KaiTi也要改成文件名。所有\setCJKfamilyfont的第二个中括号也要改成对应文件名,即注意:请下载pdf下来仔细检查。
注意:不同模板版本下可能无法正常工作,请仔细检查。
当然,如果你在用自己搭的overleaf Community的话,参考这篇文章https://www.cnblogs.com/fusluv/p/12536302.html提前把字体文件放进docker就好。
Beta Was this translation helpful? Give feedback.
All reactions