Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 5 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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