forum
forum copied to clipboard
在运行程序时会提示第85行maketitle出现错误
检查
- [ ] 已在 issues 中进行搜索(包括已关闭的问题)
编译环境
-
操作系统
- [x] Windows 10
- [ ] Windows 8/8.1
- [ ] Windows 7
- [ ] 更早版本的 Windows
- [ ] macOS
- [ ] Linux(请附发行版)
-
TeX 发行版
- [x] TeX Live <!2022>
- [ ] MiKTeX
- [ ] CTeX 套装 2.9.2.164
- [ ] 更早版本的 CTeX 套装
描述问题
最小工作示例(MWE)
\title{数值分析: 实验报告}
\author{{\kaishu 张三} \quad 学号: 2020000222 \quad 班级: 2020000001}
%\institute{\href{https://elegantlatex.org/}{Elegant\LaTeX{} 项目组}}
%\version{0.08}
\date{\zhtoday}
\begin{document}
\maketitle
\hrule
\section{数值稳定性}
\subsection{问题}
讨论两种算法计算积分 $I_k=e^{-1}\int_{0}^{1}x^ke^x\mathdx, $ $(k=0,1,\cdots,7.)$ 的数值稳定性 \\
(用 XeLaTeX 编译后)输出
! Package fontspec Error: The font "KaiTi" cannot be found.
For immediate help type H <return>.
...
l.85 ^^I\maketitle
?
链接
- TeX.SX:
- GitHub:
我还做了这些尝试
附件
从\documentclass到\end{document}都要。另外,注意你的代码环境。
! Package fontspec Error: The font "KaiTi" cannot be found.
win10 下,Kaiti 由补充字体包提供,包名为 Chinese (Simplified) Supplemental Fonts/中文(简体)补充字体 [1],试着装一下它 [2, 3]。
[1] Windows 10 font list https://docs.microsoft.com/en-us/typography/fonts/windows_10_font_list#chinese-simplified-supplemental-fonts [2] 如何安装升级到Windows客户端后缺少的字体 https://docs.microsoft.com/zh-cn/windows/deployment/windows-10-missing-fonts [3] 如何通过官方渠道为Windows 10 添加具有中国特色的字体 https://www.cnblogs.com/mannyzhoug/p/how-to-get-Chinese-fonts-with-offical-channel-on-Windows-10-client.html
大胆猜测一波是用了 newtxtext 宏包
从
\documentclass到\end{document}都要。另外,注意你的代码环境。
@meonfriday 如果你还是只给一部分,我们只能猜测原因。已经说过了,从\documentclass到\end{document}都要。你怕不是对最小工作示例有误解,你目前给的代码没有人能够复现问题。
长时间无人回复,故关闭本 issue。