[XeTeX] Underfull \vbox warning when using `listings'

Forrest Y. Yu forrest.yu at gmail.com
Thu Aug 14 10:33:01 CEST 2008


hi,

  I'm trying to list some source code using the package `listings'. It works
very good when the code is short. However, when the code is long enough to
cover at lease one whole page, XeLaTeX gives a warning like this:

        Underfull \vbox (badness 10000) has occurred while \output is active
[2]

  Actually, every page including source code only will get a badness like
this. For instance, if the code begins from page 1 and ends at page 5, three
badnesses will be given at page 2, 3 and 4.

  I tried several ways such as changing the line spacing, adding and
changing the parameters of lstlisting environment, none of them worked.

  I also searched in the internet, but found no related pages.

  Here's the .tex file (I removed the source code to keep the mail clean):

%%%%%%%%

\documentclass[a4paper]{book}

\usepackage{listings}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}

\setmonofont{Courier New}

\begin{document}

\mainmatter

\chapter{code listing}

code below:

\lstset{language=C,
  basicstyle=\ttfamily\scriptsize,commentstyle=\itshape,
  numbers=left,stepnumber=1,numberstyle=\tiny,
  escapeinside={(*@}{@*)}}%
\begin{lstlisting}[language=C]

... ... ... <--- Here's the fairly long source code

\end{lstlisting}

The end.

\end{document}

%%%%%%%%

  I used XeLaTeX in TeX Live 2007 to compile the tex source. My OS is Debian
Etch.

  Thank you very much for your attention. Any suggestion will be very
appreciated.

Best Regards,
Forrest (YYu)

-- 
Stupid is as stupid does.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20080814/6e865944/attachment.html 


More information about the XeTeX mailing list