LaTeX Style File: epydoc-shaded.sty
\NeedsTeXFormat
{LaTeX2e}
\ProvidesClass
{epydoc-shaded}[2008/02/26 v3.0.1 Epydoc Python Documentation]
\RequirePackage
{xkeyval}
\DeclareOptionX
*{\PassOptionsToPackage
{\CurrentOption
}{epydoc-base}}
\ProcessOptionsX
\relax
\RequirePackage
{epydoc-base}
\definecolor
{EpydocNameColor}{gray}{0.95}
\definecolor
{EpydocDetailsColor}{gray}{0.90}
\definecolor
{EpydocValueColor}{gray}{0.85}
\definecolor
{EpydocGroupColor}{gray}{0.8}
\definecolor
{EpydocInheritanceListColor}{gray}{0.95}
\newlength
{\EpydocListsep
}
\setlength
{\EpydocListsep
}{\baselineskip
}
\newlength
{\EpydocSectionHeaderDedent
}
\setlength
{\EpydocSectionHeaderDedent
}{1cm}
\newcommand
{\cmcolor
}{}
\newenvironment
{cminipage}[2][white]{
\renewcommand
{\cmcolor
}{#1}
\begin
{lrbox}{\@
tempboxa}
\begin
{minipage}{#2}
\setlength
{\parskip
}{\EpydocParskip
}
}{
\end
{minipage}
\end
{lrbox}
\colorbox
{\cmcolor
}{\usebox
{\@
tempboxa}}}
\renewenvironment
{EpydocFunctionList}{
\setlength
{\parskip
}{\EpydocListsep
}
\newcommand
{\EpydocFunction
}[1]{{
\setkeys
[Epydoc]{function}{##1}
\newif
\ifEpydoc
@details
\@
ifundefined{cmdEpydoc@function@description}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@function@parameters}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@function@returndescr}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@function@returntype}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@function@raises}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@function@overrides}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@function@metadata}{}{\Epydoc
@detailstrue}
\par
\begin
{minipage}{\textwidth
}
\setlength
{\parskip
}{-1pt}\raggedleft
\begin
{cminipage}[EpydocNameColor]
{\dimexpr
\textwidth
-2\fboxsep
}
\Large
\raggedright
\cmdEpydoc
@function@signature
\end
{cminipage}\par
\ifEpydoc
@details
\begin
{cminipage}[EpydocDetailsColor]
{\dimexpr
0.95\linewidth
-2\fboxsep
}
\@
ifundefined{cmdEpydoc@function@description}{}{
\par
\cmdEpydoc
@function@description}
\@
ifundefined{cmdEpydoc@function@parameters}{}{
\par
\cmdEpydoc
@function@parameters}
\@
ifundefined{cmdEpydoc@function@returntype}{
\@
ifundefined{cmdEpydoc@function@returndescr}{}{
\par
\textbf
{Return Value}
\par
\vspace
{-\EpydocParskip
}
\begin
{quote}\cmdEpydoc
@function@returndescr
\end
{quote}}
}{
\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}{}{
\par
\cmdEpydoc
@function@raises}
\@
ifundefined{cmdEpydoc@function@overrides}{}{
\par
\cmdEpydoc
@function@overrides}
\@
ifundefined{cmdEpydoc@function@metadata}{}{
\par
\cmdEpydoc
@function@metadata}
\end
{cminipage}\par
\fi
\end
{minipage}\par
}}}
{}
\newlength
{\EpydocValueWidth
}
\renewenvironment
{EpydocVariableList}{
\setlength
{\parskip
}{\EpydocListsep
}
\newcommand
{\EpydocVariable
}[1]{{
\setkeys
[Epydoc]{variable}{##1}
\newif
\ifEpydoc
@details
\@
ifundefined{cmdEpydoc@variable@description}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@variable@value}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@variable@type}{}{\Epydoc
@detailstrue}
\begin
{minipage}{\linewidth
}
\setlength
{\parskip
}{-1pt}\raggedleft
\begin
{cminipage}[EpydocNameColor]
{\dimexpr
\textwidth
-2\fboxsep
}
\Large
\bfseries
\cmdEpydoc
@variable@name
\end
{cminipage}\par
\ifEpydoc
@details
\begin
{cminipage}[EpydocDetailsColor]
{\dimexpr
0.95\linewidth
-2\fboxsep
}
\setlength
{\parskip
}{\EpydocParskip
}
\@
ifundefined{cmdEpydoc@variable@description}{}{
\par
\cmdEpydoc
@variable@description}
\@
ifundefined{cmdEpydoc@variable@type}{}{
\par
\textbf
{Type:} \texttt
{\cmdEpydoc
@variable@type}}
\@
ifundefined{cmdEpydoc@variable@value}{}{
\settowidth
{\EpydocValueWidth
}{Value:w}
\par
Value:
\begin
{cminipage}[EpydocValueColor]
{\dimexpr
\textwidth
-2\fboxsep
-\EpydocValueWidth
}
\texttt
{\cmdEpydoc
@variable@value}
\end
{cminipage}}\par
\end
{cminipage}\par
\fi
\end
{minipage}\par
}}}
{}
\renewenvironment
{EpydocPropertyList}{
\setlength
{\parskip
}{\EpydocListsep
}
\newcommand
{\EpydocProperty
}[1]{{
\setkeys
[Epydoc]{property}{##1}
\newif
\ifEpydoc
@details
\@
ifundefined{cmdEpydoc@property@description}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@property@type}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@property@fget}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@property@fset}{}{\Epydoc
@detailstrue}
\@
ifundefined{cmdEpydoc@property@fdel}{}{\Epydoc
@detailstrue}
\begin
{minipage}{\linewidth
}
\setlength
{\parskip
}{-1pt}\raggedleft
\begin
{cminipage}[EpydocNameColor]
{\dimexpr
\textwidth
-2\fboxsep
}
\Large
\bfseries
\cmdEpydoc
@property@name
\end
{cminipage}\par
\ifEpydoc
@details
\begin
{cminipage}[EpydocDetailsColor]
{\dimexpr
0.95\linewidth
-2\fboxsep
}
\setlength
{\parskip
}{\EpydocParskip
}
\@
ifundefined{cmdEpydoc@property@description}{}{
\par
\cmdEpydoc
@property@description}
\@
ifundefined{cmdEpydoc@property@type}{}{
\par
\textbf
{Type:} \cmdEpydoc
@property@type}
\@
ifundefined{cmdEpydoc@property@fget}{}{
\par
\textbf
{Get:} \cmdEpydoc
@property@fget}
\@
ifundefined{cmdEpydoc@property@fset}{}{
\par
\textbf
{Set:} \cmdEpydoc
@property@fset}
\@
ifundefined{cmdEpydoc@property@fdel}{}{
\par
\textbf
{Delete:} \cmdEpydoc
@property@fdel}
\end
{cminipage}\par
\fi
\end
{minipage}\par
}}}
{}
\renewcommand
{\EpydocGroup
}[1]{\par
\begin
{cminipage}[EpydocGroupColor]
{\dimexpr
\linewidth
-2\fboxsep
}
{\Large
\bf
\center
#1\\
}
\end
{cminipage}\par
}
\renewcommand
{\EpydocInheritanceList
}[2]{\par
\begin
{cminipage}[EpydocInheritanceListColor]
{\dimexpr
\textwidth
-2\fboxsep
}
\raggedright
Inherited from {#1}: #2
\end
{cminipage}\par
}
\renewcommand
\section
{\@
startsection {section}{1}
{-\EpydocSectionHeaderDedent
}
{-3.5ex \@
plus -1ex \@
minus -.2ex}
{2.3ex \@
plus.2ex}
{\raggedright
\normalfont
\Large
\bfseries
}}
\renewcommand
\subsection
{\@
startsection{subsection}{2}
{-\EpydocSectionHeaderDedent
}
{-3.25ex\@
plus -1ex \@
minus -.2ex}
{1.5ex \@
plus .2ex}
{\raggedright
\normalfont
\large
\bfseries
}}
\renewcommand
\subsubsection
{\@
startsection{subsubsection}{3}
{-\EpydocSectionHeaderDedent
}
{-3.25ex\@
plus -1ex \@
minus -.2ex}
{1.5ex \@
plus .2ex}
{\raggedright
\normalfont
\normalsize
\bfseries
}}