Closed Explorer-cc closed 1 month ago
Thanks for the question. They are errors of different sources, so should not be merged. If you have a more complete solution, please file a PR.
Just to elaborate a bit on James' comment.
When a package is not found, the latex compiler fails, in the sense that the process returns a non-zero value. When a macro is not found and the latex compiler is called with -interaction=nonstopmode
, the compilation emits an error message but continues and latex logs are available for parsing.
Pre-checks*
Environment*
The Issue*
I found that the latex tools I configured only selectively refer to ternimal error messages. For example, calling an undefined macro \xyzxyz will prompt undefined control sequence in the problem penel; but when calling non-existent packages, such as \usepackage{xyzabc} or just mistyping \usepackage{asmmath}, there will be the video mentioned in the Compile [x] but Error [0] phenomenon, every time you have to command line compile or click the button of view the complie log to see the display back to be able to locate, this workflow is not comfortable enough. I'm not sure if this situation can be made more efficient for debugging by having some settings in latex that allow the problem panel to capture the above error messages.
Reproduction Steps
Expected Behavior
Logs
LaTeX Workshop Output*
This is XeTeX, Version 3.141592653-2.6-0.999994 (TeX Live 2022) (preloaded format=xelatex 2023.12.12) 18 JUL 2024 15:09 entering extended mode restricted \write18 enabled. file:line:error style messages enabled. %&-line parsing enabled. **mwe.tex (./mwe.tex LaTeX2e <2021-11-15> patch level 1 L3 programming layer <2022-02-24> (d:/texlive/2022/texmf-dist/tex/latex/ctex/ctexart.cls (d:/texlive/2022/texmf-dist/tex/latex/ctex/config/ctexbackend.cfg File: ctexbackend.cfg 2021/12/12 v2.5.8 Backend configuration file (CTEX) ) (d:/texlive/2022/texmf-dist/tex/latex/l3kernel/expl3.sty Package: expl3 2022-02-24 L3 programming layer (loader) (d:/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-xetex.def File: l3backend-xetex.def 2022-02-07 L3 backend support: XeTeX (|extractbb --version) \ckernel_sys_dvipdfmx_version_int=\count181 \lcolor_backend_stack_int=\count182 \gcolor_backend_stack_int=\count183 \ggraphics_track_int=\count184 \lpdf_internal_box=\box50 \g__pdf_backend_object_int=\count185 \gpdf_backend_annotation_int=\count186 \gpdf_backend_link_int=\count187 )) Document Class: ctexart 2021/12/12 v2.5.8 Chinese adapter for class article (CTEX) (d:/texlive/2022/texmf-dist/tex/latex/l3packages/xparse/xparse.sty Package: xparse 2022-01-12 L3 Experimental document command parser ) (d:/texlive/2022/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty Package: l3keys2e 2022-01-12 LaTeX2e option processing using LaTeX3 keys ) (d:/texlive/2022/texmf-dist/tex/latex/ctex/ctexhook.sty Package: ctexhook 2021/12/12 v2.5.8 Document and package hooks (CTEX) ) (d:/texlive/2022/texmf-dist/tex/latex/ctex/ctexpatch.sty Package: ctexpatch 2021/12/12 v2.5.8 Patching commands (CTEX) ) (d:/texlive/2022/texmf-dist/tex/latex/base/fix-cm.sty Package: fix-cm 2020/11/24 v1.1t fixes to LaTeX (d:/texlive/2022/texmf-dist/tex/latex/base/ts1enc.def File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file LaTeX Font Info: Redeclaring font encoding TS1 on input line 47. )) \lctex_tmp_int=\count188 \lctex_tmp_box=\box51 \lctex_tmp_dim=\dimen138 \gctex_section_depth_int=\count189 \gctex_font_size_int=\count190 (d:/texlive/2022/texmf-dist/tex/latex/ctex/config/ctexopts.cfg File: ctexopts.cfg 2021/12/12 v2.5.8 Option configuration file (CTEX) ) (d:/texlive/2022/texmf-dist/tex/latex/base/article.cls Document Class: article 2021/10/04 v1.4n Standard LaTeX document class (d:/texlive/2022/texmf-dist/tex/latex/base/size12.clo File: size12.clo 2021/10/04 v1.4n Standard LaTeX file (size option) ) \c@part=\count191 \c@section=\count192 \c@subsection=\count193 \c@subsubsection=\count194 \c@paragraph=\count195 \c@subparagraph=\count196 \c@figure=\count197 \c@table=\count198 \abovecaptionskip=\skip47 \belowcaptionskip=\skip48 \bibindent=\dimen139 ) (d:/texlive/2022/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def File: ctex-engine-xetex.def 2021/12/12 v2.5.8 XeLaTeX adapter (CTEX) (d:/texlive/2022/texmf-dist/tex/xelatex/xecjk/xeCJK.sty Package: xeCJK 2021/12/12 v3.8.8 Typesetting CJK scripts with XeLaTeX (d:/texlive/2022/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty Package: xtemplate 2022-01-12 L3 Experimental prototype document functions \lxtemplate_tmp_dim=\dimen140 \lxtemplate_tmp_int=\count199 \lxtemplate_tmp_muskip=\muskip16 \lxtemplate_tmp_skip=\skip49 ) \lxeCJK_tmp_int=\count266 \lxeCJK_tmp_box=\box52 \lxeCJK_tmp_dim=\dimen141 \lxeCJK_tmp_skip=\skip50 \gxeCJK_space_factor_int=\count267 \lxeCJK_begin_int=\count268 \lxeCJK_end_int=\count269 \c__xeCJK_CJK_class_int=\XeTeXcharclass1 \cxeCJK_FullLeft_class_int=\XeTeXcharclass2 \cxeCJK_FullRight_class_int=\XeTeXcharclass3 \c__xeCJK_HalfLeft_class_int=\XeTeXcharclass4 \cxeCJK_HalfRight_class_int=\XeTeXcharclass5 \cxeCJK_NormalSpace_class_int=\XeTeXcharclass6 \c__xeCJK_CM_class_int=\XeTeXcharclass7 \cxeCJK_HangulJamo_class_int=\XeTeXcharclass8 \lxeCJK_last_skip=\skip51 \gxeCJK_node_int=\count270 \cxeCJK_CJK_node_dim=\dimen142 \c__xeCJK_CJK-space_node_dim=\dimen143 \cxeCJK_default_node_dim=\dimen144 \cxeCJK_default-space_node_dim=\dimen145 \c__xeCJK_CJK-widow_node_dim=\dimen146 \cxeCJK_normalspace_node_dim=\dimen147 \lxeCJK_ccglue_skip=\skip52 \lxeCJK_ecglue_skip=\skip53 \lxeCJK_punct_kern_skip=\skip54 \l__xeCJK_last_penalty_int=\count271 \lxeCJK_last_bound_dim=\dimen148 \l__xeCJK_last_kern_dim=\dimen149 \l__xeCJK_widow_penalty_int=\count272
Package xtemplate Info: Declaring object type 'xeCJK/punctuation' taking 0 (xtemplate) argument(s) on line 2337.
\lxeCJK_fixed_punct_width_dim=\dimen150 \lxeCJK_mixed_punct_width_dim=\dimen151 \lxeCJK_middle_punct_width_dim=\dimen152 \lxeCJK_fixed_margin_width_dim=\dimen153 \lxeCJK_mixed_margin_width_dim=\dimen154 \lxeCJK_middle_margin_width_dim=\dimen155 \lxeCJK_bound_punct_width_dim=\dimen156 \lxeCJK_bound_margin_width_dim=\dimen157 \lxeCJK_margin_minimum_dim=\dimen158 \lxeCJK_kerning_total_width_dim=\dimen159 \lxeCJK_same_align_margin_dim=\dimen160 \lxeCJK_different_align_margin_dim=\dimen161 \lxeCJK_kerning_margin_width_dim=\dimen162 \lxeCJK_kerning_margin_minimum_dim=\dimen163 \lxeCJK_bound_dim=\dimen164 \l__xeCJK_reverse_bound_dim=\dimen165 \lxeCJK_margin_dim=\dimen166 \lxeCJK_minimum_bound_dim=\dimen167 \l__xeCJK_kerning_margin_dim=\dimen168 \gxeCJK_family_int=\count273 \lxeCJK_fam_int=\count274 \gxeCJK_fam_allocation_int=\count275 \lxeCJK_verb_case_int=\count276 \l__xeCJK_verb_exspace_skip=\skip55 (d:/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec.sty Package: fontspec 2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX (d:/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty Package: fontspec-xetex 2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX \lfontspec_script_int=\count277 \lfontspec_language_int=\count278 \lfontspec_strnum_int=\count279 \lfontspec_tmp_int=\count280 \lfontspec_tmpa_int=\count281 \lfontspec_tmpb_int=\count282 \lfontspec_tmpc_int=\count283 \lfontspec_em_int=\count284 \lfontspec_emdef_int=\count285 \lfontspec_strong_int=\count286 \lfontspec_strongdef_int=\count287 \lfontspec_tmpa_dim=\dimen169 \lfontspec_tmpb_dim=\dimen170 \lfontspec_tmpc_dim=\dimen171 (d:/texlive/2022/texmf-dist/tex/latex/base/fontenc.sty Package: fontenc 2021/04/29 v2.0v Standard LaTeX package ) (d:/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (d:/texlive/2022/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg File: xeCJK.cfg 2021/12/12 v3.8.8 Configuration file for xeCJK package )) \ccwd=\dimen172 \lctex_ccglue_skip=\skip56 ) \lctex_ziju_dim=\dimen173 (d:/texlive/2022/texmf-dist/tex/latex/zhnumber/zhnumber.sty Package: zhnumber 2020/05/01 v2.8 Typesetting numbers with Chinese glyphs \lzhnum_scale_int=\count288 (d:/texlive/2022/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg File: zhnumber-utf8.cfg 2020/05/01 v2.8 Chinese numerals with UTF8 encoding )) \l__ctex_heading_skip=\skip57 (d:/texlive/2022/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def File: ctex-scheme-chinese-article.def 2021/12/12 v2.5.8 Chinese scheme for article (CTEX) (d:/texlive/2022/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg File: ctex-name-utf8.cfg 2021/12/12 v2.5.8 Caption with encoding UTF-8 (CTEX) )) (d:/texlive/2022/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def File: ctex-fontset-windows.def 2021/12/12 v2.5.8 Windows fonts definition (CTEX)
Package fontspec Info: Could not resolve font "KaiTi/B" (it probably doesn't (fontspec) exist).
Package fontspec Info: Could not resolve font "SimHei/I" (it probably doesn't (fontspec) exist).
Package fontspec Info: Could not resolve font "SimSun/BI" (it probably doesn't (fontspec) exist).
Package fontspec Info: Font family 'SimSun(0)' created for font 'SimSun' with (fontspec) options (fontspec) [Script={CJK},BoldFont={SimHei},ItalicFont={KaiTi}]. (fontspec)
(fontspec) This font family consists of the following NFSS (fontspec) series/shapes: (fontspec)
(fontspec) - 'normal' (m/n) with NFSS spun/OT:script=hani;language=dflt;" (fontspec) - 'small caps' (m/sc) with NFSS spec.: (fontspec) - 'bold' (b/n) with NFSS spec.: (fontspec) <->"SimHei/OT:script=hani;language=dflt;" (fontspec) - 'bold small caps' (b/sc) with NFSS spec.: (fontspec) - 'italic' (m/it) with NFSS spec.: (fontspec) <->"KaiTi/OT:script=hani;language=dflt;" (fontspec) - 'italic small caps' (m/scit) with NFSS spec.:
)) (d:/texlive/2022/texmf-dist/tex/latex/ctex/config/ctex.cfg File: ctex.cfg 2021/12/12 v2.5.8 Configuration file (CTEX) ) (d:/texlive/2022/texmf-dist/tex/latex/amsmath/amsmath.sty Package: amsmath 2021/10/15 v2.17l AMS math features \@mathmargin=\skip58
For additional information on amsmath, use the `?' option. (d:/texlive/2022/texmf-dist/tex/latex/amsmath/amstext.sty Package: amstext 2021/08/26 v2.01 AMS text
(d:/texlive/2022/texmf-dist/tex/latex/amsmath/amsgen.sty File: amsgen.sty 1999/11/30 v2.0 generic functions \@emptytoks=\toks16 \ex@=\dimen174 )) (d:/texlive/2022/texmf-dist/tex/latex/amsmath/amsbsy.sty Package: amsbsy 1999/11/29 v1.2d Bold Symbols \pmbraise@=\dimen175 ) (d:/texlive/2022/texmf-dist/tex/latex/amsmath/amsopn.sty Package: amsopn 2021/08/26 v2.02 operator names ) \inf@bad=\count289 LaTeX Info: Redefining \frac on input line 234. \uproot@=\count290 \leftroot@=\count291 LaTeX Info: Redefining \overline on input line 399. \classnum@=\count292 \DOTSCASE@=\count293 LaTeX Info: Redefining \ldots on input line 496. LaTeX Info: Redefining \dots on input line 499. LaTeX Info: Redefining \cdots on input line 620. \Mathstrutbox@=\box53 \strutbox@=\box54 \big@size=\dimen176 LaTeX Font Info: Redeclaring font encoding OML on input line 743. LaTeX Font Info: Redeclaring font encoding OMS on input line 744. \macc@depth=\count294 \c@MaxMatrixCols=\count295 \dotsspace@=\muskip17 \c@parentequation=\count296 \dspbrk@lvl=\count297 \tag@help=\toks17 \row@=\count298 \column@=\count299 \maxfields@=\count300 \andhelp@=\toks18 \eqnshift@=\dimen177 \alignsep@=\dimen178 \tagshift@=\dimen179 \tagwidth@=\dimen180 \totwidth@=\dimen181 \lineht@=\dimen182 \@envbody=\toks19 \multlinegap=\skip59 \multlinetaggap=\skip60 \mathdisplay@stack=\toks20 LaTeX Info: Redefining [ on input line 2938. LaTeX Info: Redefining ] on input line 2939. )
! LaTeX Error: File `xyzabc.sty' not found.
Type X to quit or to proceed,
or enter new name. (Default extension: sty)
Enter file name: eX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4. LaTeX Font Info: ... okay on input line 4.
Package fontspec Info: Adjusting the maths setup (use [no-math] to avoid (fontspec) this).
\symlegacymaths=\mathgroup4 LaTeX Font Info: Overwriting symbol font
legacymaths' in version
bold' (Font) OT1/cmr/m/n --> OT1/cmr/bx/n on input line 4. LaTeX Font Info: Redeclaring math accent \acute on input line 4. LaTeX Font Info: Redeclaring math accent \grave on input line 4. LaTeX Font Info: Redeclaring math accent \ddot on input line 4. LaTeX Font Info: Redeclaring math accent \tilde on input line 4. LaTeX Font Info: Redeclaring math accent \bar on input line 4. LaTeX Font Info: Redeclaring math accent \breve on input line 4. LaTeX Font Info: Redeclaring math accent \check on input line 4. LaTeX Font Info: Redeclaring math accent \hat on input line 4. LaTeX Font Info: Redeclaring math accent \dot on input line 4. LaTeX Font Info: Redeclaring math accent \mathring on input line 4. LaTeX Font Info: Redeclaring math symbol \Gamma on input line 4. LaTeX Font Info: Redeclaring math symbol \Delta on input line 4. LaTeX Font Info: Redeclaring math symbol \Theta on input line 4. LaTeX Font Info: Redeclaring math symbol \Lambda on input line 4. LaTeX Font Info: Redeclaring math symbol \Xi on input line 4. LaTeX Font Info: Redeclaring math symbol \Pi on input line 4. LaTeX Font Info: Redeclaring math symbol \Sigma on input line 4. LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 4. LaTeX Font Info: Redeclaring math symbol \Phi on input line 4. LaTeX Font Info: Redeclaring math symbol \Psi on input line 4. LaTeX Font Info: Redeclaring math symbol \Omega on input line 4. LaTeX Font Info: Redeclaring math symbol \mathdollar on input line 4. LaTeX Font Info: Redeclaring symbol fontoperators' on input line 4. LaTeX Font Info: Encoding
OT1' has changed toTU' for symbol font (Font)
operators' in the math versionnormal' on input line 4. LaTeX Font Info: Overwriting symbol font
operators' in versionnormal' (Font) OT1/cmr/m/n --> TU/lmr/m/n on input line 4. LaTeX Font Info: Encoding
OT1' has changed toTU' for symbol font (Font)
operators' in the math versionbold' on input line 4. LaTeX Font Info: Overwriting symbol font
operators' in versionbold' (Font) OT1/cmr/bx/n --> TU/lmr/m/n on input line 4. LaTeX Font Info: Overwriting symbol font
operators' in versionnormal' (Font) TU/lmr/m/n --> TU/lmr/m/n on input line 4. LaTeX Font Info: Overwriting math alphabet
\mathit' in versionnormal' (Font) OT1/cmr/m/it --> TU/lmr/m/it on input line 4. LaTeX Font Info: Overwriting math alphabet
\mathbf' in versionnormal' (Font) OT1/cmr/bx/n --> TU/lmr/b/n on input line 4. LaTeX Font Info: Overwriting math alphabet
\mathsf' in versionnormal' (Font) OT1/cmss/m/n --> TU/lmss/m/n on input line 4. LaTeX Font Info: Overwriting math alphabet
\mathtt' in versionnormal' (Font) OT1/cmtt/m/n --> TU/lmtt/m/n on input line 4. LaTeX Font Info: Overwriting symbol font
operators' in versionbold' (Font) TU/lmr/m/n --> TU/lmr/b/n on input line 4. LaTeX Font Info: Overwriting math alphabet
\mathit' in versionbold' (Font) OT1/cmr/bx/it --> TU/lmr/b/it on input line 4. LaTeX Font Info: Overwriting math alphabet
\mathsf' in versionbold' (Font) OT1/cmss/bx/n --> TU/lmss/b/n on input line 4. LaTeX Font Info: Overwriting math alphabet
\mathtt' in version `bold' (Font) OT1/cmtt/m/n --> TU/lmtt/b/n on input line 4. [1] (./mwe.aux) ) Here is how much of TeX's memory you used: 7274 strings out of 476179 206346 string characters out of 5813071 536764 words of memory out of 5000000 27973 multiletter control sequences out of 15000+600000 474439 words of font info for 58 fonts, out of 8000000 for 9000 1348 hyphenation exceptions out of 8191 89i,5n,97p,362b,275s stack positions out of 10000i,1000n,20000p,200000b,200000s
Output written on mwe.xdv (1 page, 1204 bytes).
[Paste the log here. Do not remove the surrounding backquotes (`).]