<div dir="ltr">hi,<br><br> 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:<br>
<br> Underfull \vbox (badness 10000) has occurred while \output is active [2]<br><br> 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.<br>
<br> I tried several ways such as changing the line spacing, adding and changing the parameters of lstlisting environment, none of them worked.<br><br> I also searched in the internet, but found no related pages.<br><br>
Here's the .tex file (I removed the source code to keep the mail clean):<br><br>%%%%%%%%<br><br>\documentclass[a4paper]{book}<br><br>\usepackage{listings}<br>\usepackage{fontspec}<br>\usepackage{xunicode}<br>\usepackage{xltxtra}<br>
<br>\setmonofont{Courier New}<br><br>\begin{document}<br><br>\mainmatter<br><br>\chapter{code listing}<br><br>code below:<br><br>\lstset{language=C,<br> basicstyle=\ttfamily\scriptsize,commentstyle=\itshape,<br> numbers=left,stepnumber=1,numberstyle=\tiny,<br>
escapeinside={(*@}{@*)}}%<br>\begin{lstlisting}[language=C]<br><br>... ... ... <--- Here's the fairly long source code<br><br>\end{lstlisting}<br><br>The end.<br><br>\end{document}<br><br>%%%%%%%%<br><br> I used XeLaTeX in TeX Live 2007 to compile the tex source. My OS is Debian Etch.<br>
<br> Thank you very much for your attention. Any suggestion will be very appreciated.<br><br>Best Regards,<br>Forrest (YYu)<br clear="all"><br>-- <br>Stupid is as stupid does.<br>
</div>