![本地 LaTeX 无法编译:发生致命错误,没有生成输出 PDF 文件!](https://linux22.com/image/474003/%E6%9C%AC%E5%9C%B0%20LaTeX%20%E6%97%A0%E6%B3%95%E7%BC%96%E8%AF%91%EF%BC%9A%E5%8F%91%E7%94%9F%E8%87%B4%E5%91%BD%E9%94%99%E8%AF%AF%EF%BC%8C%E6%B2%A1%E6%9C%89%E7%94%9F%E6%88%90%E8%BE%93%E5%87%BA%20PDF%20%E6%96%87%E4%BB%B6%EF%BC%81.png)
因此,在我用完 overleaf 中的编译时间后,我开始使用 pycharm 和 textify 创建 latex 文档。但是,当我运行代码时,我得到了这个:发生致命错误,没有生成输出 PDF 文件!当将 -shell-escape 作为自定义编译命令传递时,pdf 会编译,但不显示任何代码。简化示例
\documentclass[11pt]{article}
\usepackage{minted}
% Document
\begin{document}
python code:
\begin{minted}{python}
print("Hello world"
\end{minted}
\end{document}
日志档案:
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (MiKTeX 24.1) (preloaded format=pdflatex 2024.2.21) 21 FEB 2024 19:43
entering extended mode
\write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**./main.tex
(main.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-02-13>
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/base\article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/base\size11.clo
File: size11.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
)
\c@part=\count188
\c@section=\count189
\c@subsection=\count190
\c@subsubsection=\count191
\c@paragraph=\count192
\c@subparagraph=\count193
\c@figure=\count194
\c@table=\count195
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/minted\minted.sty
Package: minted 2023/12/18 v2.9 Yet another Pygments shim for LaTeX
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks17
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/kvoptions\kvoptions.sty
Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/generic/ltxcmds\ltxcmds.sty
Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO)
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/kvsetkeys\kvsetkeys.sty
Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO)
)) (C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/fvextra\fvextra.sty
Package: fvextra 2023/11/28 v1.6.1 fvextra - extensions and patches for fancyvr
b
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/etoolbox\etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count196
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/fancyvrb\fancyvrb.sty
Package: fancyvrb 2024/01/20 4.5c verbatim text (tvz,hv)
\FV@CodeLineNo=\count197
\FV@InFile=\read2
\FV@TabBox=\box51
\c@FancyVerbLine=\count198
\FV@StepNumber=\count199
\FV@OutFile=\write3
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/upquote\upquote.sty
Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba
tim
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/lineno\lineno.sty
Package: lineno 2023/05/20 line numbers on paragraphs v5.3
\linenopenalty=\count266
\output=\toks18
\linenoprevgraf=\count267
\linenumbersep=\dimen141
\linenumberwidth=\dimen142
\c@linenumber=\count268
\c@pagewiselinenumber=\count269
\c@LN@truepage=\count270
\c@internallinenumber=\count271
\c@internallinenumbers=\count272
\quotelinenumbersep=\dimen143
\bframerule=\dimen144
\bframesep=\dimen145
\bframebox=\box52
LaTeX Info: Redefining \\ on input line 3180.
)
\c@FancyVerbWriteLine=\count273
\c@FancyVerbBufferIndex=\count274
\c@FancyVerbBufferLength=\count275
\c@FancyVerbBufferLine=\count276
\c@FV@oldbufferlength=\count277
\c@FV@TrueTabGroupLevel=\count278
\c@FV@TrueTabCounter=\count279
\FV@TabBox@Group=\box53
\FV@TmpLength=\skip50
\c@FV@HighlightLinesStart=\count280
\c@FV@HighlightLinesStop=\count281
\FV@LoopCount=\count282
\FV@NCharsBox=\box54
\FV@BreakIndent=\dimen146
\FV@BreakIndentNChars=\count283
\FV@BreakSymbolSepLeft=\dimen147
\FV@BreakSymbolSepLeftNChars=\count284
\FV@BreakSymbolSepRight=\dimen148
\FV@BreakSymbolSepRightNChars=\count285
\FV@BreakSymbolIndentLeft=\dimen149
\FV@BreakSymbolIndentLeftNChars=\count286
\FV@BreakSymbolIndentRight=\dimen150
\FV@BreakSymbolIndentRightNChars=\count287
\c@FancyVerbLineBreakLast=\count288
\FV@LineBox=\box55
\FV@LineIndentBox=\box56
\c@FV@BreakBufferDepth=\count289
\FV@LineWidth=\dimen151
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/base\ifthen.sty
Package: ifthen 2022/04/13 v1.1d Standard LaTeX ifthen package (DPC)
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/tools\shellesc.sty
Package: shellesc 2023/07/08 v1.0d unified shell escape interface for LaTeX
Package shellesc Info: Unrestricted shell escape enabled on input line 75.
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/ifplatform\ifplatform.sty
Package: ifplatform 2017/10/13 v0.4a Testing for the operating system
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/generic/pdftexcmds\pdftexcmds.s
ty
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/generic/infwarerr\infwarerr.sty
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
) (C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/generic/iftex\iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/generic/catchfile\catchfile.sty
Package: catchfile 2019/12/09 v1.8 Catch the contents of a file (HO)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/generic/etexcmds\etexcmds.sty
Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
)) (C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/generic/iftex\ifluatex.sty
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
))
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/xstring\xstring.sty
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/generic/xstring\xstring.tex
\xs_counta=\count290
\xs_countb=\count291
)
Package: xstring 2023/08/22 v1.86 String manipulations (CT)
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/framed\framed.sty
Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
\OuterFrameSep=\skip51
\fb@frw=\dimen152
\fb@frh=\dimen153
\FrameRule=\dimen154
\FrameSep=\dimen155
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/float\float.sty
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count292
\float@exts=\toks19
\float@box=\box57
\@float@everytoks=\toks20
\@floatcapt=\box58
)
\minted@appexistsfile=\read3
\minted@bgbox=\box59
\minted@code=\write4
\c@minted@FancyVerbLineTemp=\count293
\c@minted@pygmentizecounter=\count294
\@float@every@listing=\toks21
\c@listing=\count295
)
runsystem(if not exist _minted-main mkdir _minted-main)...executed.
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/xcolor\xcolor.sty
Package: xcolor 2023/11/15 v3.01 LaTeX color extensions (UK)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 274.
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/graphics-def\pdftex.def
File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex
)
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/graphics\mathcolor.ltx)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1350.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1354.
Package xcolor Info: Model `RGB' extended on input line 1366.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1368.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1370.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1371.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1372.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1373.
)
runsystem(for ^%i in (pygmentize.exe pygmentize.bat pygmentize.cmd) do set > ma
in.aex <nul: /p x=^%~$PATH:i>> main.aex)...executed.
runsystem(del main.aex)...executed.
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3backend-pdfte
x.def
File: l3backend-pdftex.def 2024-01-04 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count296
\l__pdf_internal_box=\box60
)
No file main.aux.
\openout1 = `main.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
(C:\Users\Tim\AppData\Local\Programs\MiKTeX\tex/context/base/mkii\supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count297
\scratchdimen=\dimen156
\scratchbox=\box61
\nofMPsegments=\count298
\nofMParguments=\count299
\everyMPshowfont=\toks22
\MPscratchCnt=\count300
\MPscratchDim=\dimen157
\MPnumerator=\count301
\makeMPintoPDFobject=\count302
\everyMPtoPDFconversion=\toks23
)
\openout3 = `main.pyg'.
runsystem(pygmentize -S default -f latex -P commandprefix=PYG > _minted-main\de
fault.pygstyle)...executed.
(_minted-main/default.pygstyle)
runsystem(pygmentize -l "python" -f latex -P commandprefix=PYG -F tokenmerge -P
stripnl="False" -o _minted-main/2042BCAD511CB8D98EF4C00660333E43CF33289265490C
C72470AF6FAFE9A294.pygtex main.pyg)...executed.
main.tex:9: Package minted Error: Missing Pygments output; \inputminted was
probably given a file that does not exist--otherwise, you may need
the outputdir package option, or may be using an incompatible build tool,
or may be using frozencache with a missing file.
See the minted package documentation for explanation.
Type H <return> for immediate help.
...
l.9 \end{minted}
This could be caused by using -output-directory or -aux-directory
without setting minted's outputdir, or by using a build tool that
changes paths in ways minted cannot detect,
or using frozencache with a missing file.
[1
{C:/Users/Tim/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}]
(C:/Users\Tim\Desktop\Code\LaTeX\minted test\auxil\main.aux)
***********
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-02-13>
***********
runsystem(del main.pyg)...executed.
)
Here is how much of TeX's memory you used:
5322 strings out of 474461
104171 string characters out of 5743806
1924998 words of memory out of 5000000
27599 multiletter control sequences out of 15000+600000
558369 words of font info for 37 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
77i,5n,79p,252b,214s stack positions out of 10000i,1000n,20000p,200000b,200000s
<C:/Users/Tim/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cm
r10.pfb>
Output written on "C:/Users\Tim\Desktop\Code\LaTeX\minted test\out\main.pdf" (1
page, 13597 bytes).
PDF statistics:
11 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)