Tag Info

New answers tagged


You can't have minted environments as arguments to other commands: this is a limitation for every “verbatim” kind of things, so verbatim, lstlisting and minted. You can avoid the argument using a more basic syntax: \documentclass{article} \usepackage {minted} \usepackage {ifthen} \newboolean{printCode} \setboolean{printCode}{true} \begin{document} Text ...


For minted 1.7, in addition to enabling -shell-escape, disable the option to hide the intermediate files. (per Billy.) In minted 2.0alpha3 there is an outputdir option. If you install it (or later), you can use: \usepackage[outputdir=.texpadtmp]{minted}, and still hide intermediate files.


If you don't want to use Malipivo's patch, a workaround could be using tcolorbox package which can produce all kind of framed and breakable boxes, including listings processed with listings and minted. Your original output could be, more or less, reproduced with \documentclass[a5paper]{scrartcl} \usepackage{amssymb, amsmath} % needed for math ...


The minted package is passing typesetting to the fancyvrb package. I guess that the package is missing \penalty\@M in this particular case. It is not easy to get there, but this is the patch. %! *latex mwe.tex % shell escape on \documentclass[a5paper]{scrartcl} \usepackage{amssymb, amsmath} % needed for math \usepackage[utf8]{inputenc} % this is needed ...

Top 50 recent answers are included