使用以下描述的 liuthesis 文档类http://www.control.isy.liu.se/student/exjobb/liuthesis/liuthesis.html(下载链接:http://www.control.isy.liu.se/student/exjobb/liuthesis/liuthesis.zip) 在以下示例中,脚注与正文之间的分隔线采用了列表列表(跨越页面边界)的背景颜色:
\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}
有什么想法可能出错了吗?这是 liuthesis 文档类中的错误吗?
\listfiles
输出:
*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
***********
答案1
下面的代码liuthesis.cls
导致了这个问题:
\renewcommand{\footnoterule}{\vspace*{-3\p@}
\noindent\rule{.5\textwidth}{.5\p@}\vspace*{2.6\p@}
}
(原始定义是\kern -3\p@ \hrule \@width .4\columnwidth \kern 2.6\p@
。)
您可以在课堂上将其删除,或者使用以下命令:
\let\savefootnoterule\footnoterule
\documentclass[12pt,ida]{liuthesis}
\let\footnoterule\savefootnoterule
其实,这可能是 的一个错误listings
(或者是 LaTeX 的输出路径?)。 的旧定义\footnoterule
没有额外的高度/深度,因此它看起来很好并隐藏了问题。但我与此无关。