如果框超出页面,则脚注规则会出错

如果框超出页面,则脚注规则会出错

我的代码如下:

\documentclass{book}
\RequirePackage[normalem]{ulem}%
\usepackage{framed}
\usepackage[framed,final]{mcode}
\usepackage{xcolor,textcomp}%
\usepackage{listings}%
\makeatletter
\renewcommand\footnoterule{\noindent\hspace*{-24\p@}\uwave{\hspace{138\p@}}\par\removelastskip\nointerlineskip\vskip5.65pt\nointerlineskip}%
\lstnewenvironment{ssmallpython}[1][]{%
\lstset{%
language=python,%
basicstyle=\ttfamily\footnotesize,%
otherkeywords={1, 2, 3, 4, 5, 6, 7, 8 ,9 , 0, -, =, +, [, ], (, ), \{, \}, :, *, !},%
keywordstyle=\color{blue},%
stringstyle=\color{red},%
showstringspaces=false,%
emph={class, pass, in, for, while, if, is, elif, else, not, and, or,%
def, print, exec, break, continue, return},%
emphstyle=\color{black}\bfseries,%
emph={[2]True, False, None, self},%
emphstyle=[2]\color{black!10},%
emph={[3]from, import, as},%
emphstyle=[3]\color{blue},%
upquote=true,%
mathescape=false,%
morecomment=[s]{"""}{"""},%
commentstyle=\color{gray}\slshape,%
aboveskip=12pt,belowskip=12pt,xleftmargin=-2pt,xrightmargin=3pt,framexleftmargin=20pt,framextopmargin=1pt,%
rulesepcolor=\color{gray},#1%
}}{}%
\makeatother

\begin{document}

This is for test. 
While the above imaging data set has been downloaded in advance due to its
size, it is also possible to access the SDSS Data Archive Server directly and in real time.
In astroML.datasets, the function fetch\_sdss\_spectrum
provides an
\index{data set tools!fetch\_sdss\_spectrum}
interface to the FITS (Flexible Image Transport System; a standard file format in
astronomy for manipulating images and tables\footnote{See http://fits.gsfc.nasa.gov/iaufwg/iaufwg.html})
files located on the SDSS spectral server.  This operation is done
in the background using the built-in python module urllib2.
\index{software packages!urllib2}
 For details on how this is accomplished, see the source code of
fetch\_sdss\_spectrum.

This is for test. 
While the above imaging data set has been downloaded in advance due to its
size, it is also possible to access the SDSS Data Archive Server directly and in real time.
In astroML.datasets, the function fetch\_sdss\_spectrum
provides an
\index{data set tools!fetch\_sdss\_spectrum}
interface to the FITS (Flexible Image Transport System; a standard file format in
astronomy for manipulating images and tables\footnote{See http://fits.gsfc.nasa.gov/iaufwg/iaufwg.html})
files located on the SDSS spectral server.  This operation is done
in the background using the built-in python module urllib2.
\index{software packages!urllib2}
 For details on how this is accomplished, see the source code of
fetch\_sdss\_spectrum.

This is for test. 
While the above imaging data set has been downloaded in advance due to its
size, it is also possible to access the SDSS Data Archive Server directly and in real time.
In astroML.datasets, the function fetch\_sdss\_spectrum
provides an
\index{data set tools!fetch\_sdss\_spectrum}
interface to the FITS (Flexible Image Transport System; a standard file format in
astronomy for manipulating images and tables\footnote{See http://fits.gsfc.nasa.gov/iaufwg/iaufwg.html})
files located on the SDSS spectral server.  This operation is done
in the background using the built-in python module urllib2.
\index{software packages!urllib2}
 For details on how this is accomplished, see the source code of
fetch\_sdss\_spectrum.

This is for test. 
While the above imaging data set has been downloaded in advance due to its
size, it is also possible to access the SDSS Data Archive Server directly and in real time.
In astroML.datasets, the function fetch\_sdss\_spectrum
provides an
\index{data set tools!fetch\_sdss\_spectrum}
interface to the FITS (Flexible Image Transport System; a standard file format in
astronomy for manipulating images and tables\footnote{See http://fits.gsfc.nasa.gov/iaufwg/iaufwg.html})
files located on the SDSS spectral server.  This operation is done
in the background using the built-in python module urllib2.
\index{software packages!urllib2}
 For details on how this is accomplished, see the source code of
fetch\_sdss\_spectrum.

\begin{ssmallpython}
In [1]: %pylab
Using matplotlib backend: TkAgg
Populating the interactive namespace from numpy and matplotlib

In [2]: from astroML.datasets import fetch_sdss_spectrum
In [3]: plate = 1615  # plate number of the spectrum
In [4]: mjd = 53166  # modified Julian date
In [5]: fiber = 513  # fiber ID on a given plate
In [6]: data = fetch_sdss_spectrum(plate, mjd, fiber)
In [7]: ax = plt.axes()
In [8]: ax.plot(data.wavelength(), data.spectrum, '-k')
In [9]: ax.set_xlabel(r'$\lambda (\AA)$')
In [10]: ax.set_ylabel('Flux')
\end{ssmallpython}

\end{document}

输出结果为:

在此处输入图片描述

如果框超出页面范围,则脚注的左侧和右侧会出现一些不必要的垂直线(标记为红色)。请建议我如何解决这个问题...

相关内容