# Tag Info

1

The in January released 2.0 version of minted allows you to use the newfloat-package instead of the (rather old) float-package. If you want to use newfloat, the method for positioning the caption above the source is not the same as Jonas's but rather the following. \documentclass[a4paper]{scrartcl} \usepackage{caption} \usepackage[newfloat]{minted} ...

1

You can encapsulate the minted environment into a breakable tcolorbox environment. This allows to use some options from the tcolorbox package to influence the breaking. The minimal effect of the following code is that at least one line will be broken to the next page, if any. Since that may be not pleasing enough, I encluded an option enlargepage ...

0

If possible, you could use the package listings instead of minted. It provides lots of options to customize the listings style. And in case of a page break, it puts the last line of the code block on the next page. \documentclass{scrartcl} \usepackage{blindtext} \usepackage{xcolor} \definecolor{dkgreen}{rgb}{0,.6,0} \definecolor{ltblue}{rgb}{.0,.4,.6} ...

6

You can do this with \newminted command \documentclass{article} \usepackage{minted} \newminted[lstlisting]{scala}{} \begin{document} \begin{lstlisting} #include <stdio.h> #define N 10 /* Block * comment */ int main() { int i; // Line comment. puts("Hello world!"); for (i = 0; i < N; i++) { puts("LaTeX is also ...

0

It looks like method=direct for slides containing the computer code material (see Section 6.4 Verbatim on slides of the powerdot documentation) solves my problem. I really got a clue from Gonzalo Medina and his answer to a similar question.

0

You can define a non-floating environment which can break over pages and put the minted environment in that one. This is a documented feature: 8 FAQ and Troubleshooting I need a listing environment that supports page breaks. The built-in listing environment is a standard float; it doesn’t support page breaks. You will probably want to ...

Top 50 recent answers are included