I'm new to LaTeX and I want to use it for my homeworks.
Before asking help here, I opened a issue on minted's github, and the guy suggested to go here. So here is my problem :
I'm trying to use tcolorbox with minted,
Here is a test code :
\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{minted}
\begin{document}
\begin{tcblisting}{minted language=java, listing only}
String s = "abc";
\end{tcblisting}
\end{document}
It don't want to compile it, because it doesn't find Python. I have a full portable installation of MiKTeX, VS Code (LaTeX Workshop) and of Python 3.8
By the way, I tried minted without tcolorbox and it worked perfectly.
Test code :
\documentclass{article}
\usepackage{minted}
\begin{document}
\begin{minted}{java}
String s = "abc";
\end{minted}
\end{document}
Here is compilation's log of tcolorbox + minted tex file : test.log
And compilation's log of minted tex file : test_2.log
-shell-escapeflag enabled? https://tex.stackexchange.com/questions/99475/how-to-invoke-latex-with-the-shell-escape-flag-in-texstudio-former-texmakerx/99476 – Alan Xiang Dec 22 '20 at 01:06-shell-escapeflag and I tried--enable-write18too – Danks Meme Dec 22 '20 at 06:42\begin{minted}[autogobble]{java}? – Ulrike Fischer Dec 22 '20 at 10:00\begin{minted}[autogobble]{java}and checked the output and I found the same error on my problem :r:\LaTeX\Cours\test>set /p x= 0<nul: 1>>test.aex (R:\LaTeX\MiKTeX\texmfs\install\tex/latex/l3backend\l3backend-xetex.def) (test.aux) (R:\LaTeX\MiKTeX\texmfs\install\tex/latex/base\ts1cmr.fd) (_minted-test/default-pyg-prefix.pygstyle) (_minted-test/default.pygstyle)Python est introuvable. Ex�cutez sans argument pour proc�der � l (_minted-test/EA71F2074989B1673C1B5B01EDA200D266859B547044602182DB085823A77966.pygtex) [1] (test.aux), but the compilation is working. – Danks Meme Dec 22 '20 at 15:35python --helpon a command line? Is it found? – Ulrike Fischer Dec 22 '20 at 20:17minted options={autogobble=false,linenos,breaklines}and now it works... What is autogobble ? – Danks Meme Dec 22 '20 at 21:10xelatex --shell-escape test.texwithtest.texcontaining\documentclass{article} \begin{document} \write18{python --version} \end{document}? – muzimuzhi Z Dec 22 '20 at 21:19It's probably from Windows with App Execution Aliases, when you type python in a CMD, it redirect to the Windows Store.
By the way, I tried your code and it give log but not the Python version
EDIT : My first code is still not working on Github
– Danks Meme Dec 22 '20 at 21:49xelatex --shell-escape test.texused, It will read sth like(/usr/local/texlive/2020basic/texmf-dist/tex/latex/base/ts1cmr.fd) [1Python 2.7.16 ] (./test.aux) ). – muzimuzhi Z Dec 22 '20 at 22:06Standard output
Full log
– Danks Meme Dec 23 '20 at 12:38\writeis not executed, because there is no page shipout. Try this one:\documentclass{article} \begin{document} text\write18{python --version}text \end{document}. – muzimuzhi Z Dec 23 '20 at 16:45