网上下载模板用中文编译出错,字体缺失,但自己写的中文却编译成功?

发布于 2022-08-07 12:06:21

模板文件,从latextemplate上下载的,原来是英文,但是我想用中文写

LaTeXTemplates_lachaise-assignment_v2.0.zip

错误报告

行 189: Option clash for package fontspec. fi
行 40: Package fontspec Error: The font "楷体" cannot be found. maketitle
行 40: Package fontspec Error: The font "楷体" cannot be found. maketitle
行 40: Package fontspec Error: The font "楷体" cannot be found. maketitle
行 147: Font TU/楷体(0)/m/n/10.53937=[楷体.otf]/OT at 10.53937pt not loadable: Metric (TFM) file or installed font not found. ^^Ibegin{verbatim}
行 153: Package fontspec Error: The font "黑体" cannot be found. end{commandline}
行 153: Package fontspec Error: The font "黑体" cannot be found. end{commandline}
行 153: Package fontspec Error: The font "黑体" cannot be found. end{commandline}
: Font "楷体" does not contain requested Script "CJK".
行 51: Font shape `U/stmry/m/n' in size <10.53937> not available(Font) size <10.95> substituted
: Font "黑体" does not contain requested Script "CJK".
: Size substitutions with differences(Font) up to 0.41063pt have occurred.

image.png

一些尝试
我自己查了很多,包括下载字体,然后对所有用户安装,和尝试修改_ctex-fontset-windows.def_里面的东西,但均没有用。接着我自己使用中文写了简单的文档,编译竟然成功了。接着我又尝试了,把模板中structure.tex代码复制到main.tex中,编译也不行,请教一下大佬解决办法

查看更多

关注者
0
被浏览
1.6k
雾月
雾月 2022-08-07
这家伙很懒,什么也没写!

structure.tex 文件中,注释掉这一行即可:

%\usepackage{XCharter} % Use the XCharter fonts

使用 XeTeX 编译时,上面两行也可注释掉:

%\usepackage[utf8]{inputenc} % Required for inputting international characters
%\usepackage[T1]{fontenc} % Output font encoding for international characters
1 个回答

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览