nuaatug / nuaathesis

LaTeX document class for NUAA, supporting bachelor/master/PH.D thesis in Chinese/English/Japanese. 南航本科、硕士、博士学位论文 LaTeX 模板
Apache License 2.0
299 stars 68 forks source link

Package fontspec Error: The font "Microsoft Yahei" cannot be found. #99

Open EstelleYuan opened 1 year ago

EstelleYuan commented 1 year ago

首次配置nuaathesis.rar 点击nuaathesis文件夹下build.bat 自动下载latex package后提示:Package fontspec Error: The font "Microsoft Yahei" cannot be found. 本台式机windows下安装了:texlive2022、MiKTex、WinEdt11 本笔记本windows下安装了:texlive2022、MiKTex 均出现无法找到微软雅黑字体,求助中,望解答啊

yzwduck commented 1 year ago

如果只需要用模板写论文, 可以跳过执行 build.bat 而直接打开 demo_chs 文件夹下的示例文件; 如果示例文件也无法编译, 请试一下 #98 里提到的 global.tex 的改动.

EstelleYuan commented 1 year ago

已经解决啦,两处代码解决,

  1. 添加 fontset=windows \documentclass[ lang=cn, degree=master,%doctor %zhuanshuo, % blindtrail, fontset=windows, openany,oneside % openright,blankleft,twoside ]{nuaathesis}
  2. 楼主所说的添加 \defaultfontfeatures{}

PS:我的系统如果不加 fontset=windows,code无法运行,我是WinEdt11.0运行环境,谢谢楼主解答,respect

wenbinzhai commented 3 weeks ago

我也尝试了添加\defaultfontfeatures{}以及fontset=windows,但是依旧报错Package fontspec: The font "Microsoft YaHei" cannot be found.以及Package fontspec: The font "Microsoft YaHei Bold" cannot be found.本机windows10+vscode+texlive2024。请问还有什么其他解决方案吗?