Failed to run "xelatex notebook.tex -quiet" command:

时间: 2025-06-16 12:51:42 AIGC 浏览: 40
<think>好的,我需要解决用户在运行`xelatex notebook.tex -quiet`命令时遇到的问题。根据用户提供的引用信息,可能的原因有几个方面。首先,用户可能没有安装xelatex或者安装不完整。引用[1]和[4]都提到了需要安装texlive-xetex和相关组件,尤其是在Ubuntu系统上可以通过`sudo apt-get install`来安装。其次,路径问题也可能导致命令无法找到xelatex,需要检查环境变量PATH是否包含xelatex的安装路径。另外,引用[3]指出图片路径的问题,如果Notebook中有图片,可能需要手动复制到指定目录,否则编译时会出现找不到图片的错误。用户还需要确认是否在正确的目录下执行命令,并且.tex文件是否存在。还有可能是权限问题,用户是否有权限在目标目录写入文件。此外,检查.tex文件是否有语法错误,比如特殊字符未转义或包缺失,这可能导致编译失败。最后,确保所有依赖项如pandoc已正确安装,引用[4]提到了pandoc的版本问题。综合这些可能性,我应该分步骤引导用户检查安装、路径、文件位置、图片路径、权限和文件内容,并提供相应的解决命令和验证方法。</think>要解决`xelatex notebook.tex -quiet`指令失败问题,请按以下步骤排查: ### 1. 检查xelatex是否安装 **验证方法**:在终端输入: ```bash which xelatex ``` 若无输出或提示未找到,说明未安装 **解决方法**: - **Ubuntu/Debian系统**: ```bash sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-plain-generic ``` - **macOS(通过Homebrew)**: ```bash brew install basictex eval "$(/usr/libexec/path_helper)" ``` ### 2. 检查环境变量配置 若已安装但命令仍不可用,需将TeX路径加入环境变量: ```bash # 典型路径示例(实际路径可能不同) export PATH=/usr/local/texlive/2023/bin/x86_64-linux:$PATH source ~/.bashrc ``` ### 3. 处理图片路径问题 若文档包含本地图片,需确保: 1. 创建latex专用目录 ```bash mkdir -p latex/images ``` 2. 复制所有图片文件 ```bash cp notebook_files/*.png latex/images/ ``` 3. 在编译前进入目录 ```bash cd latex && xelatex notebook.tex ``` ### 4. 检查文件编码与特殊字符 常见问题案例: - **中文未使用UTF-8编码**:用文本编辑器另存为UTF-8格式 - **特殊字符未转义**:将`&`改为`\&`,`%`改为`\%` - **缺失宏包**:在导言区添加 ```latex \usepackage{ctex} % 中文支持 \usepackage{graphicx} % 图片支持 ``` ### 5. 完整操作流程示例 ```bash # 生成tex文件 jupyter nbconvert --to latex notebook.ipynb # 创建编译环境 mkdir latex_output cp notebook.tex latex_output/ cp -r notebook_files/ latex_output/ # 编译文档 cd latex_output xelatex -interaction=nonstopmode notebook.tex ``` ### 验证成功的标志 1. 终端无`Error`级别报错 2. 生成`notebook.pdf`文件 3. PDF内容完整显示中文和公式,如: $$ \int_{a}^{b} x^2 dx = \frac{b^3 - a^3}{3} $$ [^1]: 安装基础TeX环境后仍可能缺少中文字体包,可额外执行`sudo apt-get install fonts-noto-cjk` [^2]: 使用`-interaction=nonstopmode`参数可避免因小错误中断编译 [^3]: 多次编译(通常2-3次)才能正确生成交叉引用和目录
阅读全文

相关推荐

This is XeTeX, Version 3.141592653-2.6-0.999997 (TeX Live 2025) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode (./manuscript.tex LaTeX2e <2024-11-01> patch level 2 L3 programming layer <2025-01-18> (c:/texlive/2025/texmf-dist/tex/latex/revtex/revtex4-2.cls Document Class: revtex4-2 2022/06/05 4.2f (https://journals.aps.org/revtex/ for documentation) ltxutil[2022/06/05 4.2f utilities package (portions licensed from W. E. Baxter web at superscript.com)] ltxfront[2022/06/05 4.2f frontmatter package (AO,DPC,MD)] ltxgrid[2022/06/05 4.2f page grid package (portions licensed from W. E. Baxter web at superscript.com)] (c:/texlive/2025/texmf-dist/tex/latex/revtex/aps4-2.rtx) (c:/texlive/2025/texmf-dist/tex/latex/revtex/aps10pt4-2.rtx) (c:/texlive/2025/texmf-dist/tex/latex/textcase/textcase.sty) (c:/texlive/2025/texmf-dist/tex/latex/amsfonts/amssymb.sty (c:/texlive/2025/texmf-dist/tex/latex/amsfonts/amsfonts.sty)) (c:/texlive/2025/texmf-dist/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the ?' option. (c:/texlive/2025/texmf-dist/tex/latex/amsmath/amstext.sty (c:/texlive/2025/texmf-dist/tex/latex/amsmath/amsgen.sty)) (c:/texlive/2025/texmf-dist/tex/latex/amsmath/amsbsy.sty) (c:/texlive/2025/texmf-dist/tex/latex/amsmath/amsopn.sty)) (c:/texlive/2025/texmf-dist/tex/latex/url/url.sty) (c:/texlive/2025/texmf-dist/tex/latex/natbib/natbib.sty) (c:/texlive/2025/texmf-dist/tex/latex/revtex/revsymb4-2.sty)) (c:/texlive/2025/texmf-dist/tex/latex/xurl/xurl.sty) (c:/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty (c:/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty) (c:/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (c:/texlive/2025/texmf-dist/tex/latex/graphics-def/xetex.def)) (c:/texlive/2025/texmf-dist/tex/latex/tools/dcolumn.sty (c:/texlive/2025/texmf-dist/tex/latex/tools/array.sty)) (c:/texlive/2025/texmf-dist/tex/latex/tools/bm.sty) (c:/texlive/2025/texmf-dist/tex/latex/caption/subcaption.sty (c:/texlive/2025/texmf-dist/tex/latex/caption/caption.sty (c:/texlive/2025/texmf-dist/tex/latex/caption/caption3.sty (c:/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty)) Package caption Warning: Unknown document class (or package), (caption) standard defaults will be used. See the caption package documentation for explanation. )) (c:/texlive/2025/texmf-dist/tex/latex/xcolor/xcolor.sty (c:/texlive/2025/texmf-dist/tex/latex/graphics-cfg/color.cfg) (c:/texlive/2025/texmf-dist/tex/latex/graphics/mathcolor.ltx)) (c:/texlive/2025/texmf-dist/tex/latex/graphics/dvipsnam.def) (c:/texlive/2025/texmf-dist/tex/latex/xcolor/svgnam.def) (c:/texlive/2025/texmf-dist/tex/latex/xcolor/x11nam.def) (c:/texlive/2025/texmf-dist/tex/latex/changes/changes.sty *** changes package 2021/07/15 v4.2.1 *** (c:/texlive/2025/texmf-dist/tex/latex/xkeyval/xkeyval.sty (c:/texlive/2025/texmf-dist/tex/generic/xkeyval/xkeyval.tex (c:/texlive/2025/texmf-dist/tex/generic/xkeyval/xkvutils.tex))) (c:/texlive/2025/texmf-dist/tex/latex/etoolbox/etoolbox.sty) (c:/texlive/2025/texmf-dist/tex/generic/xstring/xstring.sty (c:/texlive/2025/texmf-dist/tex/generic/xstring/xstring.tex)) ulem-option 'normalem,normalbf', passed to package ulem truncate-option 'breakall,fit', passed to package truncate (c:/texlive/2025/texmf-dist/tex/generic/ulem/ulem.sty) (c:/texlive/2025/texmf-dist/tex/latex/todonotes/todonotes.sty (c:/texlive/2025/texmf-dist/tex/latex/base/ifthen.sty) (c:/texlive/2025/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty (c:/texlive/2025/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty (c:/texlive/2025/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (c:/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def) (c:/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex (c:/texlive/2025/texmf-dist/tex/generic/pgf/pgf.revision.tex))) (c:/texlive/2025/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty (c:/texlive/2025/texmf-dist/tex/latex/graphics/graphicx.sty) (c:/texlive/2025/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty (c:/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex (c:/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex (c:/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfkeyslibraryfiltered.co de.tex)) (c:/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg) (c:/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def (c:/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def (c:/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def)) )) (c:/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex ) (c:/texlive/2025/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex )) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.te x) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric .code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.t ex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.co de.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex ) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.te x) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex ) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithm etics.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex)) (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfint.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.cod e.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.te x) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code .tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.c ode.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.co de.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex ) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex ) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code .tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex ) (c:/texlive/2025/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex))) (c:/texlive/2025/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex) (c:/texlive/2025/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.st y) (c:/texlive/2025/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.st y)) (c:/texlive/2025/texmf-dist/tex/latex/pgf/utilities/pgffor.sty (c:/texlive/2025/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty (c:/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex)) (c:/texlive/2025/texmf-dist/tex/latex/pgf/math/pgfmath.sty (c:/texlive/2025/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)) (c:/texlive/2025/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex)) (c:/texlive/2025/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex (c:/texlive/2025/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.co de.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex) (c:/texlive/2025/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli brarytopaths.code.tex))) (c:/texlive/2025/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli brarypositioning.code.tex) (c:/texlive/2025/texmf-dist/tex/latex/tools/calc.sty )) (c:/texlive/2025/texmf-dist/tex/latex/truncate/truncate.sty)) (c:/texlive/2025/texmf-dist/tex/latex/multirow/multirow.sty) (c:/texlive/2025/texmf-dist/tex/latex/hyperref/hyperref.sty (c:/texlive/2025/texmf-dist/tex/generic/iftex/iftex.sty) (c:/texlive/2025/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty) (c:/texlive/2025/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) (c:/texlive/2025/texmf-dist/tex/generic/pdfescape/pdfescape.sty (c:/texlive/2025/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) (c:/texlive/2025/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty (c:/texlive/2025/texmf-dist/tex/generic/infwarerr/infwarerr.sty))) (c:/texlive/2025/texmf-dist/tex/latex/hycolor/hycolor.sty) (c:/texlive/2025/texmf-dist/tex/latex/hyperref/nameref.sty (c:/texlive/2025/texmf-dist/tex/latex/refcount/refcount.sty) (c:/texlive/2025/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty (c:/texlive/2025/texmf-dist/tex/latex/kvoptions/kvoptions.sty)) Package nameref Warning: The definition of \label has changed! (nameref) Check your packages! (nameref) Replacing it with the kernel definition on input line 149. ) (c:/texlive/2025/texmf-dist/tex/generic/stringenc/stringenc.sty) (c:/texlive/2025/texmf-dist/tex/latex/hyperref/pd1enc.def) (c:/texlive/2025/texmf-dist/tex/generic/intcalc/intcalc.sty) (c:/texlive/2025/texmf-dist/tex/latex/hyperref/puenc.def) (c:/texlive/2025/texmf-dist/tex/generic/bitset/bitset.sty (c:/texlive/2025/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) (c:/texlive/2025/texmf-dist/tex/latex/base/atbegshi-ltx.sty)) (c:/texlive/2025/texmf-dist/tex/latex/hyperref/hxetex.def (c:/texlive/2025/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty (c:/texlive/2025/texmf-dist/tex/latex/base/atveryend-ltx.sty) (c:/texlive/2025/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))) (c:/texlive/2025/texmf-dist/tex/latex/base/fontenc.sty (c:/texlive/2025/texmf-dist/tex/latex/lm/t1lmr.fd)) (c:/texlive/2025/texmf-dist/tex/latex/lm/lmodern.sty) ! LaTeX Error: Two \documentclass or \documentstyle commands. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.24 \documentclass[UTF8]{ ctexart} % 支持中文的文档类 ?

Initial Win CP for (console input, console output, system): (CP936, CP936, CP936) I changed them all to CP936 Rc files read: NONE Latexmk: This is Latexmk, John Collins, 27 Dec. 2024. Version 4.86a. No existing .aux file, so I'll make a simple one, and require run of *latex. Latexmk: applying rule 'pdflatex'... Rule 'pdflatex': Reasons for rerun Category 'other': Rerun of 'pdflatex' forced or previously required: Reason or flag: 'Initial setup' ------------ Run number 1 of rule 'pdflatex' ------------ ------------ Running 'pdflatex -synctex=1 -interaction=nonstopmode -file-line-error -recorder "c:/Users/91643/Downloads/CS_structure/template/document.tex"' ------------ This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (c:/Users/91643/Downloads/CS_structure/template/document.tex LaTeX2e <2024-11-01> patch level 2 L3 programming layer <2025-01-18> (./bistuthesis.cls Document Class: bistuthesis 2024/01/01 BISTU Thesis Template (c:/texlive/2025/texmf-dist/tex/latex/tools/array.sty) (c:/texlive/2025/texmf-dist/tex/latex/arydshln/arydshln.sty) (c:/texlive/2025/texmf-dist/tex/latex/adjustbox/adjustbox.sty (c:/texlive/2025/texmf-dist/tex/latex/xkeyval/xkeyval.sty (c:/texlive/2025/texmf-dist/tex/generic/xkeyval/xkeyval.tex (c:/texlive/2025/texmf-dist/tex/generic/xkeyval/xkvutils.tex (c:/texlive/2025/texmf-dist/tex/generic/xkeyval/keyval.tex)))) (c:/texlive/2025/texmf-dist/tex/latex/adjustbox/adjcalc.sty) (c:/texlive/2025/texmf-dist/tex/latex/adjustbox/trimclip.sty (c:/texlive/2025/texmf-dist/tex/latex/graphics/graphicx.sty (c:/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty (c:/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty) (c:/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (c:/texlive/2025/texmf-dist/tex/latex/graphics-def/pdftex.def))) (c:/texlive/2025/texmf-dist/tex/latex/collectbox/collectbox.sty) (c:/texlive/2025/texmf-dist/tex/latex/adjustbox/tc-pdftex.def)) (c:/texlive/2025/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty) (c:/texlive/2025/texmf-dist/tex/latex/varwidth/varwidth.sty)) (c:/texlive/2025/texmf-dist/tex/latex/tools/tabularx.sty) (c:/texlive/2025/texmf-dist/tex/latex/multirow/multirow.sty) (c:/texlive/2025/texmf-dist/tex/latex/tools/calc.sty) (c:/texlive/2025/texmf-dist/tex/latex/amsfonts/amssymb.sty (c:/texlive/2025/texmf-dist/tex/latex/amsfonts/amsfonts.sty)) (c:/texlive/2025/texmf-dist/tex/latex/ragged2e/ragged2e.sty) (c:/texlive/2025/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty) (c:/texlive/2025/texmf-dist/tex/latex/ctex/ctexbook.cls (c:/texlive/2025/texmf-dist/tex/latex/ctex/config/ctexbackend.cfg) (c:/texlive/2025/texmf-dist/tex/latex/l3kernel/expl3.sty (c:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)) Document Class: ctexbook 2022/07/14 v2.5.10 Chinese adapter for class book (CTEX) (c:/texlive/2025/texmf-dist/tex/latex/ctex/ctexhook.sty) (c:/texlive/2025/texmf-dist/tex/latex/ctex/ctexpatch.sty) (c:/texlive/2025/texmf-dist/tex/latex/base/fix-cm.sty (c:/texlive/2025/texmf-dist/tex/latex/base/ts1enc.def)) (c:/texlive/2025/texmf-dist/tex/latex/ctex/config/ctexopts.cfg) (c:/texlive/2025/texmf-dist/tex/latex/base/book.cls Document Class: book 2024/06/29 v1.4n Standard LaTeX document class (c:/texlive/2025/texmf-dist/tex/latex/base/bk10.clo)) (c:/texlive/2025/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def (c:/texlive/2025/texmf-dist/tex/latex/cjk/texinput/CJKutf8.sty (c:/texlive/2025/texmf-dist/tex/generic/iftex/ifpdf.sty (c:/texlive/2025/texmf-dist/tex/generic/iftex/iftex.sty)) (c:/texlive/2025/texmf-dist/tex/latex/base/inputenc.sty) (c:/texlive/2025/texmf-dist/tex/latex/cjk/texinput/CJK.sty (c:/texlive/2025/texmf-dist/tex/latex/cjk/texinput/mule/MULEenc.sty) (c:/texlive/2025/texmf-dist/tex/latex/cjk/texinput/CJK.enc)) (c:/texlive/2025/texmf-dist/tex/latex/base/fontenc.sty)) (c:/texlive/2025/texmf-dist/tex/latex/cjkpunct/CJKpunct.sty (c:/texlive/2025/texmf-dist/tex/latex/cjkpunct/CJKpunct.spa)) (c:/texlive/2025/texmf-dist/tex/latex/cjk/texinput/CJKspace.sty) (c:/texlive/2025/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.bdg) (c:/texlive/2025/texmf-dist/tex/latex/ctex/ctexspa.def)) (c:/texlive/2025/texmf-dist/tex/latex/zhnumber/zhnumber.sty (c:/texlive/2025/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg)) (c:/texlive/2025/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def (c:/texlive/2025/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg)) (c:/texlive/2025/texmf-dist/tex/latex/ctex/ctex-c5size.clo) (c:/texlive/2025/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def)) (c:/texlive/2025/texmf-dist/tex/latex/ctex/config/ctex.cfg) (c:/texlive/2025/texmf-dist/tex/latex/cjk/texinput/CJKfntef.sty (c:/texlive/2025/texmf-dist/tex/latex/cjk/texinput/CJKulem.sty (c:/texlive/2025/texmf-dist/tex/generic/ulem/ulem.sty))) (c:/texlive/2025/texmf-dist/tex/latex/fontspec/fontspec.sty (c:/texlive/2025/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) c:/texlive/2025/texmf-dist/tex/latex/fontspec/fontspec.sty:101: Fatal Package fontspec Error: The fontspec package requires either XeTeX or (fontspec) LuaTeX. (fontspec) (fontspec) You must change your typesetting engine to, (fontspec) e.g., "xelatex" or "lualatex" instead of (fontspec) "latex" or "pdflatex". Type <return> to continue. ... l.101 \msg_fatal:nn {fontspec} {cannot-use-pdftex} Latexmk: Getting log file 'document.log' Latexmk: Examining 'document.fls' Latexmk: Examining 'document.log' Latexmk: Errors, so I did not complete making targets Latexmk: Sometimes, the -f option can be used to get latexmk to try to force complete processing. But normally, you will need to correct the file(s) that caused the error, and then rerun latexmk. In some cases, it is best to clean out generated files before rerunning latexmk after you've corrected the files. Collected error summary (may duplicate other messages): pdflatex: Command for 'pdflatex' gave return code 1 Refer to 'document.log' and/or above output for details C:\texlive\2025\bin\windows\runscript.tlu:922: command failed with exit code 12: perl.exe c:\texlive\2025\texmf-dist\scripts\latexmk\latexmk.pl -synctex=1 -interaction=nonstopmode -file-line-error -pdf -outdir=c:/Users/91643/Downloads/CS_structure/template c:/Users/91643/Downloads/CS_structure/template/document 报错是什么原因?