Text FormattingFont Size of verbatim Text causes empty Pages

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
elektryk
Posts: 3
Joined: Mon Jun 18, 2012 10:00 pm

Font Size of verbatim Text causes empty Pages

Post by elektryk »

In my document I have the following code.

Code: Select all

{\scriptsize
\begin{verbatim}
bla bla bla (5 pages)
\end{verbatim}
}
The document looks OK, font is smaller (as it was my intention} but whole verbatim environment has size calculated according to original font size. If I put inside {verbatim} few pages of source code and make the font \scriptsize, I got one or two empty pages after verbatim. Also it makes some problem with ToC in PDF, when I select chapter just after verbatim the PDF reader jumps on the empty page, like it knew there should not be empty pages.

Is there a better way to resize font in verbatim?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Font Size of verbatim Text causes empty Pages

Post by localghost »

What exactly is this five pages long verbatim text?

(This question is simply geared towards alternatives.)


Thorsten
elektryk
Posts: 3
Joined: Mon Jun 18, 2012 10:00 pm

Font Size of verbatim Text causes empty Pages

Post by elektryk »

localghost wrote:What exactly is this five pages long verbatim text?
SQL Script.
I solved problem, this was no caused by verbatim ;) After verbatim there was a next chapter which contains only one quite long table. The problem was if table has specific lenght (near to full page lenght) so chapter title and number could not fit on one page, whole block of chapter title and table was moved to the next page, leaving one page empty. After changing tabular environment to longtable, this table was broken into two parts and chapter header return to correct page.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Font Size of verbatim Text causes empty Pages

Post by localghost »

elektryk wrote:SQL Script. […]
For the formatting of code in a certain (programming) language you should take a look at packages like listings or minted.
Post Reply