xelatex/latex找不到字体

在Windows操作系统中,遇到字体预览和使用正常,但在fontspec中无法找到的问题。尝试了字体重装和系统重启无效,最终通过设置为所有用户安装字体解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Windows下,如题,想要用到某些字体,然后预览后安装字体,在fonts文件夹下能找到,使用word编辑也能找到,但是就是fontspec找不到。

整挺久,字体重装 、系统重启也不行。

后来改了下安装方式为所有用户安装,完毕。

This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2024) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode (./yunchou.tex LaTeX2e <2024-11-01> patch level 2 L3 programming layer <2025-01-18> (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/base/book.cls Document Class: book 2024/06/29 v1.4n Standard LaTeX document class (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/base/bk10.clo)) (./package.tex (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/ctex/ctex.sty (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/l3kernel/expl3.sty (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend-xetex.def)) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/ctex/ctexhook.sty) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/ctex/ctexpatch.sty) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/base/fix-cm.sty (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/base/ts1enc.def)) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/ctex/config/ctexopts.cfg) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def (d:/Texlive 2024/texlive/2024/texmf-dist/tex/xelatex/xecjk/xeCJK.sty (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/fontspec/fontspec.sty (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/base/fontenc.sty) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg))) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/zhnumber/zhnumber.sty (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg)) (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def (d:/Texlive 2024/texlive/2024/texmf-dist/tex/latex/cte
03-15
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/ctex/ctex.sty (c:/texlive/2025/texmf-dist/tex/latex/l3kernel/expl3.sty (c:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-xetex.def)) (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/ctex/engine/ctex-engine-xetex.def (c:/texlive/2025/texmf-dist/tex/xelatex/xecjk/xeCJK.sty (c:/texlive/2025/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.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-xetex.sty (c:/texlive/2025/texmf-dist/tex/latex/base/fontenc.sty) (c:/texlive/2025/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (c:/texlive/2025/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg))) (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.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-fandol.def)) (c:/texlive/2025/texmf-dist/tex/latex/ctex/config/ctex.cfg) Package xeCJK Warning: Redefining CJKfamily `\CJKrmdefault' (xeCJK) (FandolSong-Regular(0)). (c:/texlive/2025/texmf-dist/tex/latex/titlesec/titlesec.sty) ! LaTeX Error: The key 'ctex/title' is unknown and is being ignored. For immediate help type H <return>. ... l.16 } ?
最新发布
06-02
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 报错是什么原因?
05-31
This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded format=pdflatex) 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/aps12pt4-2.rtx) (c:/texlive/2025/texmf-dist/tex/latex/textcase/textcase.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/ctex/ctex.sty (c:/texlive/2025/texmf-dist/tex/latex/l3kernel/expl3.sty (c:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)) (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/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.def (c:/texlive/2025/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg)) (c:/texlive/2025/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def ! Critical Package ctex Error: CTeX fontset `fandol' is unavailable in current (ctex) mode. Type <return> to continue. ... l.103 } ?
06-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值