minted works well when the code snippet is short, or fit into one page. The problem occurs when I pasted a code snippet with several hundred lines. Sometimes it processed but the output was truncated; other times it produced a bunch of errors. And if I break it into pages, the amount of characters in each page matter, i.e. it could yield a blank page after the \end{minted}. For example:
....
\begin{minted}[bgcolor=bg,mathescape]{c++}
code here
\end{minted}
... -> a blank page sometimes appear
\begin{minted}[bgcolor=bg,mathescape]{c++}
code here
\end{minted}
....
Has anyone encountered this awkward behavior with minted package? Any idea or suggestion would be greatly appreciated. Thanks.
mintedpackage with no problems and errors, each resulting pdf files several pages long. For each source file, a.texfile was generated, and the source code was inserted with\inputminted[opts...]{c++}{file}. – guillem Nov 26 '12 at 09:59mintedto theverbmentspackage, written by themintedmaintainer: http://tex.stackexchange.com/a/103471/8666 – 0 _ May 29 '16 at 03:15listingenvironment. Flat is better than nested. – 0 _ May 29 '16 at 03:23