0

So after i've ran out of compile time in overleaf, i started to use pycharm with textify to create latex documents. However, when i run the code, i get this: Fatal error occurred, no output PDF file produced! When passing the -shell-escape as a custom compile command, the pdf compiles, but shows no code. Simplified example

\documentclass[11pt]{article}
\usepackage{minted}

% Document \begin{document} python code: \begin{minted}{python} print("Hello world" \end{minted}

\end{document}

Log file:

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 bycmy0' on input line 1350. Package xcolor Info: Model hsb' substituted byrgb' on input line 1354. Package xcolor Info: Model RGB' extended on input line 1366. Package xcolor Info: ModelHTML' substituted by rgb' on input line 1368. Package xcolor Info: ModelHsb' substituted by hsb' on input line 1369. Package xcolor Info: ModeltHsb' substituted by hsb' on input line 1370. Package xcolor Info: ModelHSB' substituted by hsb' on input line 1371. Package xcolor Info: ModelGray' substituted by gray' on input line 1372. Package xcolor Info: Modelwave' 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)

David Carlisle
  • 757,742
Tim W
  • 1
  • 3
  • 3
    Welcome to TeX.SE. If the problem is with minted, can't you trim your code down so that it only includes minted and nothing else? That would help make certain that's the problem. – Teepeemm Feb 21 '24 at 14:53
  • 1
    minted requires that you compile with --shell-escape. (That is a security risk as it allow latex to run external applications and so it not enabled by default, on overleaf they don't have a problem as you are in a sandbox anyway.) – Ulrike Fischer Feb 21 '24 at 15:01
  • If i only import minted, it crashes. if i delete al the minted code from the project, i am able to compile again – Tim W Feb 21 '24 at 15:01
  • How do i compile with --shell-escape? i just installed latex local and dont know anything – Tim W Feb 21 '24 at 15:03
  • when passing --shell-escape as a custom compile command, compiling works. But when i open my pdf there is no code – Tim W Feb 21 '24 at 15:31
  • Your example is much too long. Start with a minimal example using minted and try that. If it doesn't work show the example and its log-file – Ulrike Fischer Feb 21 '24 at 17:00
  • note the log would have told you how to call latex, the log would have said: `! Package minted Error: You must invoke LaTeX with the -shell-escape flag.

    See the minted package documentation for explanation. Type H for immediate help. ...

    l.5

    ? h Pass the -shell-escape flag to LaTeX. Refer to the minted.sty documentation for more information. ? `

    – David Carlisle Feb 21 '24 at 18:42
  • Near the end of the log i find this message: 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. Can this be the problem? – Tim W Feb 21 '24 at 18:55
  • Found the problem. the main.pyg file is in the auxil folder. After using ```\usepackage[outputdir=auxil]{minted}''' the code shows up in the pdf. Can this be problematic? – Tim W Feb 21 '24 at 19:07
  • @TimW You can ping people using @, though you can only ping one per message. So you maybe want to ping your questions at Ulrike or David. The answer to your first is 'Yes. One of those is almost certainly the problem.' I do not know the answer to your second. – cfr Feb 21 '24 at 19:18
  • things are always much simpler if you don't redirect tex's output to another directory but as you say if you do, you need to tell minted where to find the file with outputdir= so you have no remaining problems? – David Carlisle Feb 21 '24 at 19:29
  • @DavidCarlisle I didnt have the intention to redirect tex's output. just installed everything and it didnt work. But it works, and that is the most important thing to me. All LaTeX related stuff works now. Thank you so much. The only thing i have to figure out is how to break a line in pycharm after it extends out of my window haha. Is there a way to mark this question is answered? – Tim W Feb 21 '24 at 19:43

0 Answers0