
ulalume3@11: %
ulalume3@11: % sphinx.sty
ulalume3@11: %
ulalume3@11: % Adapted from the old python.sty, mostly written by Fred Drake,
ulalume3@11: % by Georg Brandl.
ulalume3@11: %
ulalume3@11: 
ulalume3@11: \NeedsTeXFormat{LaTeX2e}[1995/12/01]
ulalume3@11: \ProvidesPackage{sphinx}[2010/01/15 LaTeX package (Sphinx markup)]
ulalume3@11: 
ulalume3@11: \RequirePackage{textcomp}
ulalume3@11: \RequirePackage{fancyhdr}
ulalume3@11: \RequirePackage{fancybox}
ulalume3@11: \RequirePackage{titlesec}
ulalume3@11: \RequirePackage{tabulary}
ulalume3@11: \RequirePackage{amsmath} % for \text
ulalume3@11: \RequirePackage{makeidx}
ulalume3@11: \RequirePackage{framed}
ulalume3@11: \RequirePackage{ifthen}
ulalume3@11: \RequirePackage{color}
ulalume3@11: % For highlighted code.
ulalume3@11: \RequirePackage{fancyvrb}
ulalume3@11: % For table captions.
ulalume3@11: \RequirePackage{threeparttable}
ulalume3@11: % Handle footnotes in tables.
ulalume3@11: \RequirePackage{footnote}
ulalume3@11: \makesavenoteenv{tabulary}
ulalume3@11: % For floating figures in the text.
ulalume3@11: \RequirePackage{wrapfig}
ulalume3@11: % Separate paragraphs by space by default.
ulalume3@11: \RequirePackage{parskip}
ulalume3@11: 
ulalume3@11: % Redefine these colors to your liking in the preamble.
ulalume3@11: \definecolor{TitleColor}{rgb}{0.126,0.263,0.361}
ulalume3@11: \definecolor{InnerLinkColor}{rgb}{0.208,0.374,0.486}
ulalume3@11: \definecolor{OuterLinkColor}{rgb}{0.216,0.439,0.388}
ulalume3@11: % Redefine these colors to something not white if you want to have colored
ulalume3@11: % background and border for code examples.
ulalume3@11: \definecolor{VerbatimColor}{rgb}{1,1,1}
ulalume3@11: \definecolor{VerbatimBorderColor}{rgb}{1,1,1}
ulalume3@11: 
ulalume3@11: % Uncomment these two lines to ignore the paper size and make the page 
ulalume3@11: % size more like a typical published manual.
ulalume3@11: %\renewcommand{\paperheight}{9in}
ulalume3@11: %\renewcommand{\paperwidth}{8.5in}   % typical squarish manual
ulalume3@11: %\renewcommand{\paperwidth}{7in}     % O'Reilly ``Programmming Python''
ulalume3@11: 
ulalume3@11: % For graphicx, check if we are compiling under latex or pdflatex.
ulalume3@11: \ifx\pdftexversion\undefined
ulalume3@11:   \usepackage{graphicx}
ulalume3@11: \else
ulalume3@11:   \usepackage[pdftex]{graphicx}
ulalume3@11: \fi
ulalume3@11: 
ulalume3@11: % for PDF output, use colors and maximal compression
ulalume3@11: \newif\ifsphinxpdfoutput\sphinxpdfoutputfalse
ulalume3@11: \ifx\pdfoutput\undefined\else\ifcase\pdfoutput
ulalume3@11:   \let\py@NormalColor\relax
ulalume3@11:   \let\py@TitleColor\relax
ulalume3@11: \else
ulalume3@11:   \sphinxpdfoutputtrue
ulalume3@11:   \input{pdfcolor}
ulalume3@11:   \def\py@NormalColor{\color[rgb]{0.0,0.0,0.0}}
ulalume3@11:   \def\py@TitleColor{\color{TitleColor}}
ulalume3@11:   \pdfcompresslevel=9
ulalume3@11: \fi\fi
ulalume3@11: 
ulalume3@11: % XeLaTeX can do colors, too
ulalume3@11: \ifx\XeTeXrevision\undefined\else
ulalume3@11:   \def\py@NormalColor{\color[rgb]{0.0,0.0,0.0}}
ulalume3@11:   \def\py@TitleColor{\color{TitleColor}}
ulalume3@11: \fi
ulalume3@11: 
ulalume3@11: % Increase printable page size (copied from fullpage.sty)
ulalume3@11: \topmargin 0pt
ulalume3@11: \advance \topmargin by -\headheight
ulalume3@11: \advance \topmargin by -\headsep
ulalume3@11: 
ulalume3@11: % attempt to work a little better for A4 users
ulalume3@11: \textheight \paperheight
ulalume3@11: \advance\textheight by -2in
ulalume3@11: 
ulalume3@11: \oddsidemargin 0pt
ulalume3@11: \evensidemargin 0pt
ulalume3@11: %\evensidemargin -.25in  % for ``manual size'' documents
ulalume3@11: \marginparwidth 0.5in
ulalume3@11: 
ulalume3@11: \textwidth \paperwidth
ulalume3@11: \advance\textwidth by -2in
ulalume3@11: 
ulalume3@11: 
ulalume3@11: % Style parameters and macros used by most documents here
ulalume3@11: \raggedbottom
ulalume3@11: \sloppy
ulalume3@11: \hbadness = 5000                % don't print trivial gripes
ulalume3@11: 
ulalume3@11: \pagestyle{empty}               % start this way; change for
ulalume3@11: \pagenumbering{roman}           % ToC & chapters
ulalume3@11: 
ulalume3@11: % Use this to set the font family for headers and other decor:
ulalume3@11: \newcommand{\py@HeaderFamily}{\sffamily\bfseries}
ulalume3@11: 
ulalume3@11: % Redefine the 'normal' header/footer style when using "fancyhdr" package:
ulalume3@11: \@ifundefined{fancyhf}{}{
ulalume3@11:   % Use \pagestyle{normal} as the primary pagestyle for text.
ulalume3@11:   \fancypagestyle{normal}{
ulalume3@11:     \fancyhf{}
ulalume3@11:     \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}}
ulalume3@11:     \fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}}
ulalume3@11:     \fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}}
ulalume3@11:     \fancyhead[LE,RO]{{\py@HeaderFamily \@title, \py@release}}
ulalume3@11:     \renewcommand{\headrulewidth}{0.4pt}
ulalume3@11:     \renewcommand{\footrulewidth}{0.4pt}
ulalume3@11:   }
ulalume3@11:   % Update the plain style so we get the page number & footer line,
ulalume3@11:   % but not a chapter or section title.  This is to keep the first
ulalume3@11:   % page of a chapter and the blank page between chapters `clean.'
ulalume3@11:   \fancypagestyle{plain}{
ulalume3@11:     \fancyhf{}
ulalume3@11:     \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}}
ulalume3@11:     \renewcommand{\headrulewidth}{0pt}
ulalume3@11:     \renewcommand{\footrulewidth}{0.4pt}
ulalume3@11:   }
ulalume3@11: }
ulalume3@11: 
ulalume3@11: % Some custom font markup commands.
ulalume3@11: %
ulalume3@11: \newcommand{\strong}[1]{{\bf #1}}
ulalume3@11: \newcommand{\code}[1]{\texttt{#1}}
ulalume3@11: \newcommand{\bfcode}[1]{\code{\bfseries#1}}
ulalume3@11: \newcommand{\email}[1]{\textsf{#1}}
ulalume3@11: 
ulalume3@11: % Redefine the Verbatim environment to allow border and background colors.
ulalume3@11: % The original environment is still used for verbatims within tables.
ulalume3@11: \let\OriginalVerbatim=\Verbatim
ulalume3@11: \let\endOriginalVerbatim=\endVerbatim
ulalume3@11: 
ulalume3@11: % Play with vspace to be able to keep the indentation.
ulalume3@11: \newlength\distancetoright
ulalume3@11: \def\mycolorbox#1{%
ulalume3@11:   \setlength\distancetoright{\linewidth}%
ulalume3@11:   \advance\distancetoright -\@totalleftmargin %
ulalume3@11:   \fcolorbox{VerbatimBorderColor}{VerbatimColor}{%
ulalume3@11:   \begin{minipage}{\distancetoright}%
ulalume3@11:     #1
ulalume3@11:   \end{minipage}%
ulalume3@11:   }%
ulalume3@11: }
ulalume3@11: \def\FrameCommand{\mycolorbox}
ulalume3@11: 
ulalume3@11: \renewcommand{\Verbatim}[1][1]{%
ulalume3@11:   % list starts new par, but we don't want it to be set apart vertically
ulalume3@11:   \bgroup\parskip=0pt%
ulalume3@11:   \smallskip%
ulalume3@11:   % The list environement is needed to control perfectly the vertical
ulalume3@11:   % space.
ulalume3@11:   \list{}{%
ulalume3@11:   \setlength\parskip{0pt}%
ulalume3@11:   \setlength\itemsep{0ex}%
ulalume3@11:   \setlength\topsep{0ex}%
ulalume3@11:   \setlength\partopsep{0pt}%
ulalume3@11:   \setlength\leftmargin{0pt}%
ulalume3@11:   }%
ulalume3@11:   \item\MakeFramed {\FrameRestore}%
ulalume3@11:      \small%
ulalume3@11:     \OriginalVerbatim[#1]%
ulalume3@11: }
ulalume3@11: \renewcommand{\endVerbatim}{%
ulalume3@11:     \endOriginalVerbatim%
ulalume3@11:   \endMakeFramed%
ulalume3@11:   \endlist%
ulalume3@11:   % close group to restore \parskip
ulalume3@11:   \egroup%
ulalume3@11: }
ulalume3@11: 
ulalume3@11: 
ulalume3@11: % \moduleauthor{name}{email}
ulalume3@11: \newcommand{\moduleauthor}[2]{}
ulalume3@11: 
ulalume3@11: % \sectionauthor{name}{email}
ulalume3@11: \newcommand{\sectionauthor}[2]{}
ulalume3@11: 
ulalume3@11: % Augment the sectioning commands used to get our own font family in place,
ulalume3@11: % and reset some internal data items:
ulalume3@11: \titleformat{\section}{\Large\py@HeaderFamily}%
ulalume3@11:             {\py@TitleColor\thesection}{0.5em}{\py@TitleColor}{\py@NormalColor}
ulalume3@11: \titleformat{\subsection}{\large\py@HeaderFamily}%
ulalume3@11:             {\py@TitleColor\thesubsection}{0.5em}{\py@TitleColor}{\py@NormalColor}
ulalume3@11: \titleformat{\subsubsection}{\py@HeaderFamily}%
ulalume3@11:             {\py@TitleColor\thesubsubsection}{0.5em}{\py@TitleColor}{\py@NormalColor}
ulalume3@11: \titleformat{\paragraph}{\small\py@HeaderFamily}%
ulalume3@11:             {\py@TitleColor}{0em}{\py@TitleColor}{\py@NormalColor}
ulalume3@11: 
ulalume3@11: % {fulllineitems} is the main environment for object descriptions.
ulalume3@11: %
ulalume3@11: \newcommand{\py@itemnewline}[1]{%
ulalume3@11:   \@tempdima\linewidth%
ulalume3@11:   \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}%
ulalume3@11: }
ulalume3@11: 
ulalume3@11: \newenvironment{fulllineitems}{
ulalume3@11:   \begin{list}{}{\labelwidth \leftmargin \labelsep 0pt
ulalume3@11:                  \rightmargin 0pt \topsep -\parskip \partopsep \parskip
ulalume3@11:                  \itemsep -\parsep
ulalume3@11:                  \let\makelabel=\py@itemnewline}
ulalume3@11: }{\end{list}}
ulalume3@11: 
ulalume3@11: % \optional is used for ``[, arg]``, i.e. desc_optional nodes.
ulalume3@11: \newcommand{\optional}[1]{%
ulalume3@11:   {\textnormal{\Large[}}{#1}\hspace{0.5mm}{\textnormal{\Large]}}}
ulalume3@11: 
ulalume3@11: \newlength{\py@argswidth}
ulalume3@11: \newcommand{\py@sigparams}[2]{%
ulalume3@11:   \parbox[t]{\py@argswidth}{#1\code{)}#2}}
ulalume3@11: \newcommand{\pysigline}[1]{\item[#1]\nopagebreak}
ulalume3@11: \newcommand{\pysiglinewithargsret}[3]{%
ulalume3@11:   \settowidth{\py@argswidth}{#1\code{(}}%
ulalume3@11:   \addtolength{\py@argswidth}{-2\py@argswidth}%
ulalume3@11:   \addtolength{\py@argswidth}{\linewidth}%
ulalume3@11:   \item[#1\code{(}\py@sigparams{#2}{#3}]}
ulalume3@11: 
ulalume3@11: % Production lists
ulalume3@11: %
ulalume3@11: \newenvironment{productionlist}{
ulalume3@11: %  \def\optional##1{{\Large[}##1{\Large]}}
ulalume3@11:   \def\production##1##2{\\\code{##1}&::=&\code{##2}}
ulalume3@11:   \def\productioncont##1{\\& &\code{##1}}
ulalume3@11:   \parindent=2em
ulalume3@11:   \indent
ulalume3@11:   \begin{tabular}{lcl}
ulalume3@11: }{%
ulalume3@11:   \end{tabular}
ulalume3@11: }
ulalume3@11: 
ulalume3@11: % Notices / Admonitions
ulalume3@11: %
ulalume3@11: \newlength{\py@noticelength}
ulalume3@11: 
ulalume3@11: \newcommand{\py@heavybox}{
ulalume3@11:   \setlength{\fboxrule}{1pt}
ulalume3@11:   \setlength{\fboxsep}{6pt}
ulalume3@11:   \setlength{\py@noticelength}{\linewidth}
ulalume3@11:   \addtolength{\py@noticelength}{-2\fboxsep}
ulalume3@11:   \addtolength{\py@noticelength}{-2\fboxrule}
ulalume3@11:   %\setlength{\shadowsize}{3pt}
ulalume3@11:   \Sbox
ulalume3@11:   \minipage{\py@noticelength}
ulalume3@11: }
ulalume3@11: \newcommand{\py@endheavybox}{
ulalume3@11:   \endminipage
ulalume3@11:   \endSbox
ulalume3@11:   \fbox{\TheSbox}
ulalume3@11: }
ulalume3@11: 
ulalume3@11: \newcommand{\py@lightbox}{{%
ulalume3@11:   \setlength\parskip{0pt}\par
ulalume3@11:   \rule[0ex]{\linewidth}{0.5pt}%
ulalume3@11:   \par\vspace{-0.5ex}%
ulalume3@11:   }}
ulalume3@11: \newcommand{\py@endlightbox}{{%
ulalume3@11:   \setlength{\parskip}{0pt}%
ulalume3@11:   \par\rule[0.5ex]{\linewidth}{0.5pt}%
ulalume3@11:   \par\vspace{-0.5ex}%
ulalume3@11:   }}
ulalume3@11: 
ulalume3@11: % Some are quite plain:
ulalume3@11: \newcommand{\py@noticestart@note}{\py@lightbox}
ulalume3@11: \newcommand{\py@noticeend@note}{\py@endlightbox}
ulalume3@11: \newcommand{\py@noticestart@hint}{\py@lightbox}
ulalume3@11: \newcommand{\py@noticeend@hint}{\py@endlightbox}
ulalume3@11: \newcommand{\py@noticestart@important}{\py@lightbox}
ulalume3@11: \newcommand{\py@noticeend@important}{\py@endlightbox}
ulalume3@11: \newcommand{\py@noticestart@tip}{\py@lightbox}
ulalume3@11: \newcommand{\py@noticeend@tip}{\py@endlightbox}
ulalume3@11: 
ulalume3@11: % Others gets more visible distinction:
ulalume3@11: \newcommand{\py@noticestart@warning}{\py@heavybox}
ulalume3@11: \newcommand{\py@noticeend@warning}{\py@endheavybox}
ulalume3@11: \newcommand{\py@noticestart@caution}{\py@heavybox}
ulalume3@11: \newcommand{\py@noticeend@caution}{\py@endheavybox}
ulalume3@11: \newcommand{\py@noticestart@attention}{\py@heavybox}
ulalume3@11: \newcommand{\py@noticeend@attention}{\py@endheavybox}
ulalume3@11: \newcommand{\py@noticestart@danger}{\py@heavybox}
ulalume3@11: \newcommand{\py@noticeend@danger}{\py@endheavybox}
ulalume3@11: \newcommand{\py@noticestart@error}{\py@heavybox}
ulalume3@11: \newcommand{\py@noticeend@error}{\py@endheavybox}
ulalume3@11: 
ulalume3@11: \newenvironment{notice}[2]{
ulalume3@11:   \def\py@noticetype{#1}
ulalume3@11:   \csname py@noticestart@#1\endcsname
ulalume3@11:   \strong{#2}
ulalume3@11: }{\csname py@noticeend@\py@noticetype\endcsname}
ulalume3@11: 
ulalume3@11: % Allow the release number to be specified independently of the
ulalume3@11: % \date{}.  This allows the date to reflect the document's date and
ulalume3@11: % release to specify the release that is documented.
ulalume3@11: %
ulalume3@11: \newcommand{\py@release}{}
ulalume3@11: \newcommand{\version}{}
ulalume3@11: \newcommand{\shortversion}{}
ulalume3@11: \newcommand{\releaseinfo}{}
ulalume3@11: \newcommand{\releasename}{Release}
ulalume3@11: \newcommand{\release}[1]{%
ulalume3@11:   \renewcommand{\py@release}{\releasename\space\version}%
ulalume3@11:   \renewcommand{\version}{#1}}
ulalume3@11: \newcommand{\setshortversion}[1]{%
ulalume3@11:   \renewcommand{\shortversion}{#1}}
ulalume3@11: \newcommand{\setreleaseinfo}[1]{%
ulalume3@11:   \renewcommand{\releaseinfo}{#1}}
ulalume3@11: 
ulalume3@11: % Allow specification of the author's address separately from the
ulalume3@11: % author's name.  This can be used to format them differently, which
ulalume3@11: % is a good thing.
ulalume3@11: %
ulalume3@11: \newcommand{\py@authoraddress}{}
ulalume3@11: \newcommand{\authoraddress}[1]{\renewcommand{\py@authoraddress}{#1}}
ulalume3@11: 
ulalume3@11: % This sets up the fancy chapter headings that make the documents look
ulalume3@11: % at least a little better than the usual LaTeX output.
ulalume3@11: %
ulalume3@11: \@ifundefined{ChTitleVar}{}{
ulalume3@11:   \ChNameVar{\raggedleft\normalsize\py@HeaderFamily}
ulalume3@11:   \ChNumVar{\raggedleft \bfseries\Large\py@HeaderFamily}
ulalume3@11:   \ChTitleVar{\raggedleft \rm\Huge\py@HeaderFamily}
ulalume3@11:   % This creates chapter heads without the leading \vspace*{}:
ulalume3@11:   \def\@makechapterhead#1{%
ulalume3@11:     {\parindent \z@ \raggedright \normalfont
ulalume3@11:       \ifnum \c@secnumdepth >\m@ne
ulalume3@11:         \DOCH
ulalume3@11:       \fi
ulalume3@11:       \interlinepenalty\@M
ulalume3@11:       \DOTI{#1}
ulalume3@11:     }
ulalume3@11:   }
ulalume3@11: }
ulalume3@11: 
ulalume3@11: % Redefine description environment so that it is usable inside fulllineitems.
ulalume3@11: %
ulalume3@11: \renewcommand{\description}{%
ulalume3@11:   \list{}{\labelwidth\z@%
ulalume3@11:           \itemindent-\leftmargin%
ulalume3@11: 	  \labelsep5pt%
ulalume3@11:           \let\makelabel=\descriptionlabel}}
ulalume3@11: 
ulalume3@11: % Definition lists; requested by AMK for HOWTO documents.  Probably useful
ulalume3@11: % elsewhere as well, so keep in in the general style support.
ulalume3@11: %
ulalume3@11: \newenvironment{definitions}{%
ulalume3@11:   \begin{description}%
ulalume3@11:   \def\term##1{\item[##1]\mbox{}\\*[0mm]}
ulalume3@11: }{%
ulalume3@11:   \end{description}%
ulalume3@11: }
ulalume3@11: 
ulalume3@11: % Tell TeX about pathological hyphenation cases:
ulalume3@11: \hyphenation{Base-HTTP-Re-quest-Hand-ler}
ulalume3@11: 
ulalume3@11: 
ulalume3@11: % The following is stuff copied from docutils' latex writer.
ulalume3@11: %
ulalume3@11: \newcommand{\optionlistlabel}[1]{\bf #1 \hfill}
ulalume3@11: \newenvironment{optionlist}[1]
ulalume3@11: {\begin{list}{}
ulalume3@11:   {\setlength{\labelwidth}{#1}
ulalume3@11:    \setlength{\rightmargin}{1cm}
ulalume3@11:    \setlength{\leftmargin}{\rightmargin}
ulalume3@11:    \addtolength{\leftmargin}{\labelwidth}
ulalume3@11:    \addtolength{\leftmargin}{\labelsep}
ulalume3@11:    \renewcommand{\makelabel}{\optionlistlabel}}
ulalume3@11: }{\end{list}}
ulalume3@11: 
ulalume3@11: \newlength{\lineblockindentation}
ulalume3@11: \setlength{\lineblockindentation}{2.5em}
ulalume3@11: \newenvironment{lineblock}[1]
ulalume3@11: {\begin{list}{}
ulalume3@11:   {\setlength{\partopsep}{\parskip}
ulalume3@11:    \addtolength{\partopsep}{\baselineskip}
ulalume3@11:    \topsep0pt\itemsep0.15\baselineskip\parsep0pt
ulalume3@11:    \leftmargin#1}
ulalume3@11:  \raggedright}
ulalume3@11: {\end{list}}
ulalume3@11: 
ulalume3@11: % Redefine includgraphics for avoiding images larger than the screen size
ulalume3@11: % If the size is not specified.
ulalume3@11: \let\py@Oldincludegraphics\includegraphics
ulalume3@11: 
ulalume3@11: \newbox\image@box%
ulalume3@11: \newdimen\image@width%
ulalume3@11: \renewcommand\includegraphics[2][\@empty]{%
ulalume3@11:   \ifx#1\@empty%
ulalume3@11:     \setbox\image@box=\hbox{\py@Oldincludegraphics{#2}}%
ulalume3@11:     \image@width\wd\image@box%
ulalume3@11:     \ifdim \image@width>\linewidth%
ulalume3@11:       \setbox\image@box=\hbox{\py@Oldincludegraphics[width=\linewidth]{#2}}%
ulalume3@11:       \box\image@box%
ulalume3@11:     \else%
ulalume3@11:       \py@Oldincludegraphics{#2}%
ulalume3@11:     \fi%
ulalume3@11:   \else%
ulalume3@11:     \py@Oldincludegraphics[#1]{#2}%
ulalume3@11:   \fi%
ulalume3@11: }
ulalume3@11: 
ulalume3@11: 
ulalume3@11: % Fix the index and bibliography environments to add an entry to the Table of
ulalume3@11: % Contents; this is much nicer than just having to jump to the end of the book
ulalume3@11: % and flip around, especially with multiple indexes.
ulalume3@11: %
ulalume3@11: \let\py@OldTheindex=\theindex
ulalume3@11: \renewcommand{\theindex}{
ulalume3@11:   \cleardoublepage
ulalume3@11:   \phantomsection
ulalume3@11:   \py@OldTheindex
ulalume3@11:   \addcontentsline{toc}{chapter}{\indexname}
ulalume3@11: }
ulalume3@11: 
ulalume3@11: \let\py@OldThebibliography=\thebibliography
ulalume3@11: \renewcommand{\thebibliography}[1]{
ulalume3@11:   \cleardoublepage
ulalume3@11:   \phantomsection
ulalume3@11:   \py@OldThebibliography{1}
ulalume3@11:   \addcontentsline{toc}{chapter}{\bibname}
ulalume3@11: }
ulalume3@11: 
ulalume3@11: % Include hyperref last.
ulalume3@11: \RequirePackage[colorlinks,breaklinks,
ulalume3@11:                 linkcolor=InnerLinkColor,filecolor=OuterLinkColor,
ulalume3@11:                 menucolor=OuterLinkColor,urlcolor=OuterLinkColor,
ulalume3@11:                 citecolor=InnerLinkColor]{hyperref}
ulalume3@11: % Fix anchor placement for figures with captions.
ulalume3@11: % (Note: we don't use a package option here; instead, we give an explicit
ulalume3@11: % \capstart for figures that actually have a caption.)
ulalume3@11: \RequirePackage{hypcap}
ulalume3@11: 
ulalume3@11: % From docutils.writers.latex2e
ulalume3@11: \providecommand{\DUspan}[2]{%
ulalume3@11:   {% group ("span") to limit the scope of styling commands
ulalume3@11:     \@for\node@class@name:=#1\do{%
ulalume3@11:     \ifcsname docutilsrole\node@class@name\endcsname%
ulalume3@11:       \csname docutilsrole\node@class@name\endcsname%
ulalume3@11:     \fi%
ulalume3@11:     }%
ulalume3@11:     {#2}% node content
ulalume3@11:   }% close "span"
ulalume3@11: }
ulalume3@11: 
ulalume3@11: \providecommand*{\DUprovidelength}[2]{
ulalume3@11:   \ifthenelse{\isundefined{#1}}{\newlength{#1}\setlength{#1}{#2}}{}
ulalume3@11: }
ulalume3@11: 
ulalume3@11: \DUprovidelength{\DUlineblockindent}{2.5em}
ulalume3@11: \ifthenelse{\isundefined{\DUlineblock}}{
ulalume3@11:   \newenvironment{DUlineblock}[1]{%
ulalume3@11:     \list{}{\setlength{\partopsep}{\parskip}
ulalume3@11:             \addtolength{\partopsep}{\baselineskip}
ulalume3@11:             \setlength{\topsep}{0pt}
ulalume3@11:             \setlength{\itemsep}{0.15\baselineskip}
ulalume3@11:             \setlength{\parsep}{0pt}
ulalume3@11:             \setlength{\leftmargin}{#1}}
ulalume3@11:     \raggedright
ulalume3@11:   }
ulalume3@11:   {\endlist}
ulalume3@11: }{}
ulalume3@11: 
ulalume3@11: 
ulalume3@11: % From footmisc.sty: allows footnotes in titles
ulalume3@11: \let\FN@sf@@footnote\footnote
ulalume3@11: \def\footnote{\ifx\protect\@typeset@protect
ulalume3@11:     \expandafter\FN@sf@@footnote
ulalume3@11:   \else
ulalume3@11:     \expandafter\FN@sf@gobble@opt
ulalume3@11:   \fi
ulalume3@11: }
ulalume3@11: \edef\FN@sf@gobble@opt{\noexpand\protect
ulalume3@11:   \expandafter\noexpand\csname FN@sf@gobble@opt \endcsname}
ulalume3@11: \expandafter\def\csname FN@sf@gobble@opt \endcsname{%
ulalume3@11:   \@ifnextchar[%]
ulalume3@11:     \FN@sf@gobble@twobracket
ulalume3@11:     \@gobble
ulalume3@11: }
ulalume3@11: \def\FN@sf@gobble@twobracket[#1]#2{}




