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}
link|improve this question

80% accept rate
feedback

1 Answer

up vote 2 down vote accepted

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.