overleaf中无法使用本模板包
univeryinli opened this issue · comments
你好,不太清楚这个问题,我并不熟悉 overleaf
@univeryinli
overleaf 有「分享项目链接并允许编辑」的功能,可以把项目分享出来(注意删去敏感内容),方便他人帮忙查错。
从截图中不完整的信息推断,你在使用 overleaf 默认的 pdflatex 编译命令。可切换到 xelatex 试试
才发现截图可以加载了
@muzimuzhi 是的,@univeryinli 似乎使用的 pdflatex 而不是 xelatex,然后 overleaf 上的 ctex 推断其系统为 unix,尝试去调用不存在的 fandol 字体导致出错。
@univeryinli 请用 xelatex 编译
https://www.overleaf.com/8377528329rrpxvhprbncx
以上是overleaf的连接,请大佬们解决问题,毕竟overleaf使用越来越多,希望完善
@mohuangrui @muzimuzhi 谢谢了,用xelatex可以编译了,但是编译完了中文生僻字只编译出一半,但是本地用texlive+texmaker编译中文生僻字是全的?
推测你启用了 fondset=fandol,你应该使用 fontset=windows
推测你启用了 fondset=fandol,你应该使用 fontset=windows
没有启用该功能,overleaf里面用的是github上下载的模板。
\documentclass[twoside]{Style/ucasthesis}%
%- Multiple optional arguments:
%- [<oneside|twoside|print>]% oneside eprint, twoside eprint, or paper print
%- [fontset=<adobe|...>]% specify font set to replace automatic detection
%- [scheme=plain]% thesis writing of international students
%- [draftversion]% show draft version information
%- [standard options for ctex book class: draft|paper size|font size|...]%
你的操作系统是什么?
根据你的截图,你的操作系统应该是 linux,这样的话 xelatex 就会调用 fandol 字体,如果需要显示生僻字,你需要配置系统字体,见
你的操作系统是什么?
本地编译使用的是windows系统,overleaf上面编译推测后台应该是Linux,本地正常,Linux上面生僻字无法正常显示。
根据你的截图,你的操作系统应该是 linux,这样的话 xelatex 就会调用 fandol 字体,如果需要显示生僻字,你需要配置系统字体,见
linux下面更改以后生僻字还是无法正常编译,可能是跟overleaf采用的texlive的版本有关系把!
\documentclass[twoside,fontset=fandol]{Style/ucasthesis}%
%- Multiple optional arguments:
%- [<oneside|twoside|print>]% oneside eprint, twoside eprint, or paper print
%- [fontset=<adobe|...>]% specify font set to replace automatic detection
%- [scheme=plain]% thesis writing of international students
%- [draftversion]% show draft version information
%- [standard options for ctex book class: draft|paper size|font size|...]%
那就是的了,overleaf 上为 linux,将调用 fandol 字体(一类开源免费字体,缺乏较多生僻字库),本地 windows 调用 windows 字体可以显示生僻字。
你需要做的就是为 overleaf 配置 windows 字体 或 adobe 字体,见:
根据 overleaf 的说明文档: https://www.overleaf.com/learn/latex/Questions/I_have_a_custom_font_I%27d_like_to_load_to_my_document._How_can_I_do_this%3F
你应该只需要使用即可:
\documentclass[twoside,fontset=windows]{Style/ucasthesis}%
根据 overleaf 的说明文档: https://www.overleaf.com/learn/latex/Questions/I_have_a_custom_font_I%27d_like_to_load_to_my_document._How_can_I_do_this%3F
你应该只需要使用即可:
\documentclass[twoside,fontset=windows]{Style/ucasthesis}%
嗨,我也是想在overleaf上用同样也有这个问题。把fontset设为windows依然报错。不知道后面会不会完善对overleaf的支持啊?谢谢了
根据 overleaf 的说明文档: https://www.overleaf.com/learn/latex/Questions/I_have_a_custom_font_I%27d_like_to_load_to_my_document._How_can_I_do_this%3F
你应该只需要使用即可:\documentclass[twoside,fontset=windows]{Style/ucasthesis}%
嗨,我也是想在overleaf上用同样也有这个问题。把fontset设为windows依然报错。不知道后面会不会完善对overleaf的支持啊?谢谢了
是的,我改过了以后也出现了报错,这个字段貌似在overleaf里面不支持。
错误信息是什么?
https://www.overleaf.com/8377528329rrpxvhprbncx
以上是overleaf的连接,请大佬们解决问题,毕竟overleaf使用越来越多,希望完善
能编译成功,输出正常。所有 warning 都是正常的,无需处理。
@univeryinli @AnblueWang
overleaf 是在 linux 系统下编译 latex 文档,只提供了免费开源字体,例如 Fandol 字体系列。overleaf 一定不包含 windows 和 macOS 等商业操作系统里自带的全套付费商业字体。overleaf 目前支持的中文字体列表为 https://www.overleaf.com/learn/latex/Questions/What_OTF/TTF_fonts_are_supported_via_fontspec%3F#Chinese
https://www.overleaf.com/8377528329rrpxvhprbncx
以上是overleaf的连接,请大佬们解决问题,毕竟overleaf使用越来越多,希望完善能编译成功,输出正常。所有 warning 都是正常的,无需处理。
@univeryinli @AnblueWang
overleaf 是在 linux 系统下编译 latex 文档,只提供了免费开源字体,例如 Fandol 字体系列。overleaf 一定不包含 windows 和 macOS 等商业操作系统里自带的全套付费商业字体。overleaf 目前支持的中文字体列表为 https://www.overleaf.com/learn/latex/Questions/What_OTF/TTF_fonts_are_supported_via_fontspec%3F#Chinese
试了一下确实好了,跟默认的比似乎是14行加了个fontset=fandol 然后编译器换成xelatex。建议可以在readme里面稍微说一句,感觉overleaf现在用的比较多,毕竟不用装环境还自动云储存。
https://www.overleaf.com/8377528329rrpxvhprbncx
以上是overleaf的连接,请大佬们解决问题,毕竟overleaf使用越来越多,希望完善能编译成功,输出正常。所有 warning 都是正常的,无需处理。
@univeryinli @AnblueWang
overleaf 是在 linux 系统下编译 latex 文档,只提供了免费开源字体,例如 Fandol 字体系列。overleaf 一定不包含 windows 和 macOS 等商业操作系统里自带的全套付费商业字体。overleaf 目前支持的中文字体列表为 https://www.overleaf.com/learn/latex/Questions/What_OTF/TTF_fonts_are_supported_via_fontspec%3F#Chinese
谢谢大佬们的帮助和解答!
https://www.overleaf.com/8377528329rrpxvhprbncx
以上是overleaf的连接,请大佬们解决问题,毕竟overleaf使用越来越多,希望完善能编译成功,输出正常。所有 warning 都是正常的,无需处理。
@univeryinli @AnblueWang
overleaf 是在 linux 系统下编译 latex 文档,只提供了免费开源字体,例如 Fandol 字体系列。overleaf 一定不包含 windows 和 macOS 等商业操作系统里自带的全套付费商业字体。overleaf 目前支持的中文字体列表为 https://www.overleaf.com/learn/latex/Questions/What_OTF/TTF_fonts_are_supported_via_fontspec%3F#Chinese试了一下确实好了,跟默认的比似乎是14行加了个fontset=fandol 然后编译器换成xelatex。建议可以在readme里面稍微说一句,感觉overleaf现在用的比较多,毕竟不用装环境还自动云储存。
@AnblueWang 不需要额外加 fontset=fandol,重点是需要使用 xelatex 编译,请认真读说明文档
使用 overleaf 编译 与 在 Linux 环境下编译是等价的,无需额外修改,只需记住:用 xelatex 编译!
@univeryinli 这个问题我和 @muzimuzhi 都回答过了,overleaf 为linux系统,将默认调用缺乏部分繁体字的 fandol 字体,如果你需要正常显示繁体字,你需要为 overleaf 配置 windows 字体 或 adobe 字体:https://github.com/mohuangrui/ucasthesis/wiki/字体配置
@univeryinli 这个问题我和 @muzimuzhi 都回答过了,overleaf 为linux系统,将默认调用缺乏部分繁体字的 fandol 字体,如果你需要正常显示繁体字,你需要为 overleaf 配置 windows 字体 或 adobe 字体:https://github.com/mohuangrui/ucasthesis/wiki/字体配置
明白了,谢谢大佬抽时间回复。
使用 overleaf 编译 与 在 Linux 环境下编译是等价的,无需额外修改,只需记住:用 xelatex 编译!
编译是能成功,使用xelatex编译生僻字还是显示不正常,生僻字显示如下。
也可以使用思源系列字体,字体名列表见 https://www.overleaf.com/learn/latex/Questions/What_OTF/TTF_fonts_are_supported_via_fontspec%3F#Chinese
@univeryinli @muzimuzhi @AnblueWang
已更新并发布到 overleaf (在等待通过中),最新版对 overleaf 上生僻字的支持提供了解决方案,详见更新后的 https://github.com/mohuangrui/ucasthesis/wiki/字体配置
Overleaf 已发布: Overleaf
@tlok666
单独的问题,请在新 issue 里提问。提供时注意描述完整、提供例子。