Ok so basically I am just trying to get some code shown in my document. I usually use windows but i have been trying to get latex to work properly on my debian install. I have created a minimal working example to demonstrate my problem.
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{minted}
\usepackage{tcolorbox}
\tcbuselibrary{listings, minted, breakable}
\usemintedstyle{emacs}
\newenvironment{testbox}
{\tcblisting{listing only,colback=blue!10, breakable, colframe=blue!10, width = 1.1\textwidth, center, top=0pt, bottom=0pt, left=25pt,listing engine=minted, minted language=python, minted style=emacs, minted options={autogobble, fontsize=\footnotesize, python3, tabsize=2, linenos, frame=none
}}}
{\endtcblisting}
\begin{document}
\par\noindent This one doesn't work...
\begin{testbox}
a = 10
print('hello world')
print(a)
\end{testbox}
\end{document}
When this is compiled with --shell-escape, I get the following error:
The documentation here is less than helpful, it says that a file is missing but I'm not sure this applies here. This exact code does compile on my windows install of latex, so not sure why its not working here.
For added confusion, when I replace the testbox with
\begin{minted}{python}
print('hello world')
\end{minted}
it compiles just fine no errors whatsoever. If it helps I have some extra information about my tex installs:
On windows I have miktex installed, where I had a lot of errors with minted as well (other errors) related to the path of my python install.
On debian I have texlive installed, but because the standard minted environment runs fine I dont think its a path issue.
All help is greatly appreciated! I also wouldn't mind changing the way I display the code in the document, I just want a way to add a background color, line numbers and have working page breaks etc.
testbox
by\newtcblisting
instead of\newenvironment
. Like all otherverbatim
-like envs,\end{tcblisting}
is so special that it cannot be used in replacement text of other macros.