3

I use latex for my reports. Recently I have got an issue when my verbatim environment was split into several pages, where there were pictures in between. I would like to keep verbatim environment in one page only. Content of verbatim fits one page. Is this possible?

\begin{verbatim}
something unchanged here 
\end{verbatim}
Timofey
  • 1,321

1 Answers1

6

There are packages that provide verbatim environments with more features such as avoiding page breaks. With the fancyvrb package:

\begin{Verbatim}[samepage=true]
...
\end{Verbatim}

A universal way of preventing page breaks is to use a minipage environment, but it's not optimal — see the Tex FAQ.