Complete L2/L3-lite

本文详细解释了L2与L3交换机的不同级别:L2仅提供二层功能;L3lite增加了静态路由及有限的ACL功能;L3RIP支持RIP动态路由,适用于小型环境;L3高级则全面支持多种动态路由协议及其他高级特性。

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

"The difference between L2 managed, L3 lite, L3 RIP, and L3 advanced is the level of routing they provide (amongst other things):
•L2 - no routing
•L3 lite - L2 features + static routing, usually limited ACL functionality
•L3 RIP - L3 lite + RIP dynamic routing; OK for small environments, but OSPF is a much more flexible and high-performing routing protocol
•L3 advanced - L3 RIP + OSPF & other dynamic routing protocols and many advanced features"
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&#39;ll make a simple one, and require run of *latex. Latexmk: applying rule &#39;pdflatex&#39;... Rule &#39;pdflatex&#39;: Reasons for rerun Category &#39;other&#39;: Rerun of &#39;pdflatex&#39; forced or previously required: Reason or flag: &#39;Initial setup&#39; ------------ Run number 1 of rule &#39;pdflatex&#39; ------------ ------------ Running &#39;pdflatex -synctex=1 -interaction=nonstopmode -file-line-error -recorder "c:/Users/91643/Downloads/CS_structure/template/document.tex"&#39; ------------ 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 &#39;document.log&#39; Latexmk: Examining &#39;document.fls&#39; Latexmk: Examining &#39;document.log&#39; 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&#39;ve corrected the files. Collected error summary (may duplicate other messages): pdflatex: Command for &#39;pdflatex&#39; gave return code 1 Refer to &#39;document.log&#39; 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
<think>好的,我现在需要帮助用户解决在使用pdflatex编译时遇到的fontspec包错误。用户的问题是他们试图在pdflatex中使用fontspec包,结果出现了错误,提示需要XeTeX或LuaTeX引擎。用户希望找到解决方案,可能他们需要继续使用pdflatex,或者转换到其他引擎。首先,我要回忆一下fontspec包的作用。fontspec包主要用于XeLaTeX和LuaLaTeX中,用来管理系统字体,支持OpenType和TrueType字体。而传统的pdflatex使用的是pdfTeX引擎,不支持这些高级字体功能,所以当用户尝试在pdflatex中加载fontspec时,就会报错,因为两者不兼容。 接下来,用户可能的情况有两种:一种是他们确实需要使用fontspec包的功能,比如加载系统字体,这时候必须换引擎;另一种是他们可能误用了fontspec包,其实并不需要,可以改用其他方法。根据用户提供的引用内容,特别是引用[1]和[2],错误信息明确指出必须使用XeLaTeX或LuaLaTeX。因此,解决方案的核心应该是更换编译引擎,而不是继续使用pdflatex。用户可能不清楚如何切换引擎,或者不知道如何调整他们的文档设置。 我需要检查用户可能的文档设置。例如,如果用户的中文文档使用了fontspec来设置中文字体,可能需要使用XeLaTeX配合xeCJK或ctex宏包。引用[3]中的例子显示,用户可能在beamer中使用fontspec来设置楷体,这确实需要XeLaTeX。可能的解决步骤包括: 1.将编译引擎从pdflatex改为xelatex或lualatex。2.检查文档中是否确实需要fontspec,如果不需要,可以移除。 3.如果用户需要处理中文,推荐使用ctex宏包,它自动处理引擎和字体配置。 另外,用户可能遇到的问题是他们的编辑器默认使用pdflatex,需要指导如何更改编译选项。例如,在TeXstudio、VSCode或Overleaf中如何切换引擎。 还需要考虑用户是否在文档中错误地混合了不同引擎的包。例如,同时使用fontspec和inputenc可能会冲突,因为XeLaTeX默认使用UTF-8编码,不需要inputenc。最后,生成相关问题,帮助用户深入理解如何配置LaTeX引擎,处理中文文档,以及优化字体设置。</think>### 解决方案:pdflatex使用fontspec包报错的解决方法 #### 问题定位 出现错误`fontspec requires XeTeX/LuaTeX`的根本原因是:**fontspec包专为支持OpenType字体的XeLaTeX/LuaLaTeX引擎设计**,而pdflatex基于传统PDFTeX引擎,无法处理现代字体系统[^1][^2]。 --- #### 解决方法分步说明 ###### 方案一:更换编译引擎(推荐) 1. **修改编译命令** - **XeLaTeX**:将`pdflatex`替换为`xelatex` ```bash xelatex your_document.tex ``` - **LuaLaTeX**:使用`lualatex`命令 ```bash lualatex your_document.tex ``` *适用场景:需要直接调用系统字体(如微软雅黑、思源宋体)或使用复杂排版功能* 2. **调整文档配置** 在导言区添加引擎适配声明(非必须但建议): ```latex % !TEX program = xelatex % 强制指定编译器(编辑器兼容时生效) \documentclass{article} \usepackage{fontspec} % 此时可正常加载 ``` ###### 方案二:移除fontspec依赖(若无需高级字体) 1. **替换字体设置方案** - 使用`inputenc`+`fontenc`+`pdflatex`标准组合: ```latex \usepackage[UTF8]{inputenc} \usepackage[T1]{fontenc} \usepackage{times} % 使用基本字体包替代 ``` - 中文文档改用`ctex`宏包(自动处理引擎兼容性): ```latex \documentclass{ctexart} % 自动调用xeLaTeX ``` --- #### 配置验证示例 ```latex % 测试文档:test.tex \documentclass{article} \usepackage{fontspec} \setmainfont{Times New Roman} % 需确保字体存在 \begin{document} This is a font test. \end{document} ``` **编译命令**:`xelatex test.tex`(成功) | `pdflatex test.tex`(失败) --- #### 扩展应用场景 1. **中文文档实践** ctex套装已集成XeTeX引擎支持,推荐优先使用: ```latex \documentclass{ctexbeamer} \usetheme{CambridgeUS} \begin{document} \title{中文演示文稿} \frame{\titlepage} \end{document} ``` *编译命令:`xelatex`[^3]* 2. **LuaTeX特性应用** LuaLaTeX支持嵌入式代码执行,适合动态排版: ```latex \usepackage{luacode} \begin{luacode} tex.print("动态生成内容: " .. math.random(100)) \end{luacode} ``` ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值