7

Using the liuthesis document class described at http://www.control.isy.liu.se/student/exjobb/liuthesis/liuthesis.html (download link: http://www.control.isy.liu.se/student/exjobb/liuthesis/liuthesis.zip) the line separating the footnote from the main text picks up the background color of the lstlisting (which crosses a page boundary) in the following example:

\documentclass[12pt,ida]{liuthesis}
\usepackage{listings}
\usepackage{color}

\definecolor{CodeBGColor}{gray}{0.92}
\lstset{
 basicstyle=\Huge,
 backgroundcolor=\color{CodeBGColor}
}

\begin{document}

\footnote{Lorem ipsum...}
\begin{lstlisting}
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
\end{lstlisting}

\end{document}

Any ideas what could be wrong? Is this a bug in the liuthesis document class?

\listfiles output:

 *File List*
liuthesis.cls   2007/01/13 liuthesis Class v. 1.3 
lmodern.sty     2009/10/30 v1.6 Latin Modern Fonts
fontenc.sty
t1enc.def       2005/09/27 v1.99g Standard LaTeX file
inputenc.sty    2008/03/30 v1.1d Input encoding file
latin1.def      2008/03/30 v1.1d Input encoding file  
babel.sty       2008/07/06 v3.8l The Babel package
swedish.ldf     2005/03/31 v2.3d Swedish support from the babel system
english.ldf     2005/03/30 v3.3o English support from the babel system
ida.ltd
book.cls        2007/10/19 v1.4h Standard LaTeX document class
bk12.clo        2007/10/19 v1.4h Standard LaTeX file (size option)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)  
keyval.sty      1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty        1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2009/08/28 v1.8 graphics configuration of TeX Live
pdftex.def      2009/08/25 v0.04m Graphics/color for pdfTeX
geometry.sty    2008/12/21 v4.2 Page Geometry
ifpdf.sty       2009/04/10 v2.0 Provides the ifpdf switch (HO)  
ifvtex.sty      2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)
crop.sty        2003/05/20 v1.9 crop marks (mf)
color.sty       2005/11/14 v1.0j Standard LaTeX Color (DPC)   
color.cfg       2007/01/18 v1.5 color configuration of teTeX/TeXLive 
amsmath.sty     2000/07/18 v2.13 AMS math features
amstext.sty     2000/06/29 v2.01
amsgen.sty      1999/11/30 v2.0
amsbsy.sty      1999/11/29 v1.2d
amsopn.sty      1999/12/14 v2.01 operator names
amsfonts.sty    2009/06/22 v3.00 Basic AMSFonts support
amssymb.sty     2009/06/22 v3.00
theorem.sty     1995/11/23 v2.2c Theorem extension package (FMi)
thp.sty         1995/11/23 v2.2c Theorem extension package (FMi)
listings.sty    2007/02/22 1.4 (Carsten Heinz)
lstmisc.sty     2007/02/22 1.4 (Carsten Heinz)
listings.cfg    2007/02/22 1.4 listings configuration
t1lmr.fd        2009/10/30 v1.6 Font defs for Latin Modern
supp-pdf.mkii
ot1lmr.fd       2009/10/30 v1.6 Font defs for Latin Modern
omllmm.fd       2009/10/30 v1.6 Font defs for Latin Modern
omslmsy.fd      2009/10/30 v1.6 Font defs for Latin Modern
omxlmex.fd      2009/10/30 v1.6 Font defs for Latin Modern
umsa.fd         2009/06/22 v3.00 AMS symbols A
umsb.fd         2009/06/22 v3.00 AMS symbols B
***********
  • Welcome to tex.sx! A tip: If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). – lockstep Apr 12 '11 at 20:59
  • 3
    Can you please add to your question a minimal working example illustrating the problem? – Gonzalo Medina Apr 12 '11 at 21:31
  • 1
    @Gonzalo Medina: After some experimentation I realized this only happens with the liuthesis document class I'm using. I guess this suddenly became a very small-audience type of question :/ – user4840 Apr 12 '11 at 22:18
  • I cannot reproduce this bug, using this example: pastebin.com/HaA63dPJ (Edit: OK, I see that you are using another class) – Víctor Pimentel Apr 12 '11 at 22:36
1

The code in liuthesis.cls below causes the problem:

\renewcommand{\footnoterule}{\vspace*{-3\p@}
  \noindent\rule{.5\textwidth}{.5\p@}\vspace*{2.6\p@}
}

(The original definition is \kern -3\p@ \hrule \@width .4\columnwidth \kern 2.6\p@.)

You can just delete it in the class, or use this:

\let\savefootnoterule\footnoterule
\documentclass[12pt,ida]{liuthesis}
\let\footnoterule\savefootnoterule

Actually, it may be a bug of listings (or output route of LaTeX?). The old definition of \footnoterule has no extra height/depth, thus it looks fine and hide the problem. But I've nothing to do with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy