[Doc-SIG] Long verbatim blocks

Guido van Rossum guido@digicool.com
Fri, 15 Jun 2001 15:18:50 -0400

> I'm using the python-docs TeX setup/build process and I'm having a
> problem with long verbatim blocks. I have a code block that is
> longer than a page and upon generation of PDF or PS, the text runs
> off the page instead of page breaking (the HTML output looks fine).
> I tried \verbatiminput{filename}, which works great for PDF and PS,
> but for the html output, it just displays 'filename' instead of the
> contents of 'filename'.
> I was wondering how the doc-sig group solved this problem.

This is just a wild guess, but it sounds like the TeX macros basically
don't provide for breaking up long blocks -- it's as if you had an
embedded image larger than the page, it just gives up.

What I tend to do in such cases is break the verbatim block up at
natural boundaries such as blank lines.

There is no easy answer -- all publishers and toolsuites typically
struggle with this one way or the other.  (If the tools break the
verbatim block up when it runs out of space, this is rarely where you
would have *wanted* the break, so you end up intervening manually.)

What would you do if you had to include a word that didn't fit on a

--Guido van Rossum (home page: http://www.python.org/~guido/)