1

Possible Duplicate:
minted truncates the code if it doesn't fit into one page

I am using minted in order to write some Objective-C code inside a report I am trying to create. I use it the following way

\begin{minted}[linenos, fontsize=\footnotesize,
           numbersep=5pt,
           frame=lines,
           framesep=2mm,
    bgcolor=bg]{objective-c}
 ....
  some objective-c code
 ....
\end{minted}         

The problem is that code takes 28 lines of my page. I have 22 available lines on one page and all the lines available from the next page. LaTeX, instead of using that 22 lines from the first page and the first 6 from the other, leaves that space empty and moves all the code to the next page. This is a problem for me because I face this problem a lot of times and a lot of pages have large empty spaces.

Is there any way to allow or tell minted to split the code if possible and use all the available space?

marked as duplicate by Joseph Wright Jan 7 '12 at 8:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Splitting across pages is listed as a defect issue at the minted site. See issue 32. – Sony Jan 7 '12 at 2:41
  • Fundamentally the same question as the link I've used as a dupe: it's all to do with the face that minted cannot split material. – Joseph Wright Jan 7 '12 at 8:58