LaTeX Style File: epydoc-boxes.sty
\NeedsTeXFormat
{LaTeX2e}
\ProvidesClass
{epydoc-boxes}[2008/02/26 v3.0.1 Epydoc Python Documentation]
\RequirePackage
{xkeyval}
\DeclareOptionX
*{\PassOptionsToPackage
{\CurrentOption
}{epydoc-base}}
\ProcessOptionsX
\relax
\RequirePackage
{epydoc-base}
\RequirePackage
{longtable}
\setlength
{\fboxrule
}{2\fboxrule
}
\newlength
{\EpydocVariableWidth
}
\setlength
{\EpydocVariableWidth
}{.3\textwidth
}
\renewenvironment
{EpydocFunctionList}{
\def
\@
EpydocSeparator{
\vspace
{-2\EpydocParskip
}
\rule
{\dimexpr
\textwidth
-2\fboxsep
}{0.5\fboxrule
}
\aftergroup
\def
\aftergroup
\@
EpydocSeparator
\aftergroup
{\aftergroup
}}
\newcommand
{\EpydocFunction
}[1]{{
\setkeys
[Epydoc]{function}{##1}
\begin
{boxedminipage}{\dimexpr
\textwidth
-2\fboxsep
}
{\Large
\raggedright
\cmdEpydoc
@function@signature\par
}
\setlength
{\parskip
}{\EpydocParskip
}
\@
ifundefined{cmdEpydoc@function@description}{}{
{\@
EpydocSeparator}
\par
\cmdEpydoc
@function@description}
\@
ifundefined{cmdEpydoc@function@parameters}{}{
{\@
EpydocSeparator}
\par
\cmdEpydoc
@function@parameters}
\@
ifundefined{cmdEpydoc@function@returntype}{
\@
ifundefined{cmdEpydoc@function@returndescr}{}{
{\@
EpydocSeparator}
\par
\textbf
{Return Value}
\par
\vspace
{-\EpydocParskip
}
\begin
{quote}\cmdEpydoc
@function@returndescr\end
{quote}}
}{
{\@
EpydocSeparator}
\par
\textbf
{Return Value}
\par
\vspace
{-\EpydocParskip
}
\begin
{quote}
\@
ifundefined{cmdEpydoc@function@returndescr}{
\textit
{\cmdEpydoc
@function@returntype}
}{
\cmdEpydoc
@function@returndescr
\textit
{(type=\cmdEpydoc
@function@returntype)}}
\end
{quote}
}
\@
ifundefined{cmdEpydoc@function@raises}{}{
{\@
EpydocSeparator}
\par
\cmdEpydoc
@function@raises}
\@
ifundefined{cmdEpydoc@function@overrides}{}{
{\@
EpydocSeparator}
\par
\cmdEpydoc
@function@overrides}
\@
ifundefined{cmdEpydoc@function@metadata}{}{
\ifx
\cmdEpydoc
@property@metadata\empty
\else
{\@
EpydocSeparator}
\par
\cmdEpydoc
@function@metadata
\fi
}
\end
{boxedminipage}\par
}}}
{}
\newenvironment
{@EpydocGeneralList}{
\renewcommand
{\EpydocGroup
}[1]{
\multicolumn
{2}{@{\vrule
width \fboxrule
\hspace
\tabcolsep
}l
@{\hspace
\tabcolsep
\vrule
width \fboxrule
}}
{\textbf
{\textit
{##1}}} \\
\hline
}
\renewcommand
{\EpydocInheritanceList
}[2]{
\multicolumn
{2}{@{\vrule
width \fboxrule
\hspace
\tabcolsep
}
p{\dimexpr
\textwidth
-4\tabcolsep
-7pt}
@{\hspace
\tabcolsep
\vrule
width \fboxrule
}}
{\raggedright
\textbf
{Inherited from {##1}:\\
##2}} \\
\hline
}
\setlength
{\doublerulesep
}{0pt}
\begin
{longtable}[l]{@{\vrule
width \fboxrule
\hspace
\tabcolsep
}
p{\EpydocVariableWidth
}|
p{\dimexpr
\textwidth
-4\tabcolsep
-7pt
-\EpydocVariableWidth
}
@{\hspace
\tabcolsep
\vrule
width \fboxrule
}}
\hline
\hline
\rule
{0pt}{\baselineskip
}
\centering
\Large
\textbf
{Name} &
\centering
\Large
\textbf
{Description}
\tabularnewline
\hline
\hline
\endhead
\hline
\hline
\multicolumn
{2}{r}{
\small
\textit
{continued on next page}}\\
\endfoot
\hline
\hline
\endlastfoot
}
{\end
{longtable}}
\renewenvironment
{EpydocVariableList}{
\newcommand
{\EpydocVariable
}[1]{{
\setkeys
[Epydoc]{variable}{##1}
\raggedright
\cmdEpydoc
@variable@name &
\setkeys
[Epydoc]{variable}{##1}
\setlength
{\parskip
}{\EpydocParskip
}\raggedright
\@
ifundefined{cmdEpydoc@variable@description}{}{
\cmdEpydoc
@variable@description\relax
}
\@
ifundefined{cmdEpydoc@variable@value}{}{
\@
ifundefined{cmdEpydoc@variable@description}{}{\par
}
\textbf
{Value:} \texttt
{\cmdEpydoc
@variable@value}}
\@
ifundefined{cmdEpydoc@variable@type}{}{
\@
ifundefined{cmdEpydoc@variable@description}{
\@
ifundefined{cmdEpydoc@variable@value}{}{ }}{ }
\textit
{(type=\texttt
{\cmdEpydoc
@variable@type})}}
\tabularnewline
\hline
}}
\begin
{@EpydocGeneralList}
}
{\end
{@EpydocGeneralList}}
\renewenvironment
{EpydocPropertyList}{
\def
\@
EpydocSeparator{
\aftergroup
\def
\aftergroup
\@
EpydocSeparator\aftergroup
{
\aftergroup
\par
\aftergroup
}}
\newcommand
{\EpydocProperty
}[1]{{
\setkeys
[Epydoc]{property}{##1}
\raggedright
\cmdEpydoc
@property@name &
\setkeys
[Epydoc]{property}{##1}
\setlength
{\parskip
}{\EpydocParskip
}\raggedright
\@
ifundefined{cmdEpydoc@property@description}{}{
{\@
EpydocSeparator}
\cmdEpydoc
@property@description\relax
}
\@
ifundefined{cmdEpydoc@property@type}{}{
{\@
EpydocSeparator}
\textbf
{Type:} \cmdEpydoc
@property@type\relax
}
\@
ifundefined{cmdEpydoc@property@fget}{}{
{\@
EpydocSeparator}
\textbf
{Get:} \cmdEpydoc
@property@fget\relax
}
\@
ifundefined{cmdEpydoc@property@fset}{}{
{\@
EpydocSeparator}
\textbf
{Set:} \cmdEpydoc
@property@fset\relax
}
\@
ifundefined{cmdEpydoc@property@fdel}{}{
{\@
EpydocSeparator}
\textbf
{Delete:} \cmdEpydoc
@property@fdel\relax
}
\tabularnewline
\hline
}}
\begin
{@EpydocGeneralList}}
{\end
{@EpydocGeneralList}}