summaryrefslogtreecommitdiff
path: root/sphinx/texinputs/sphinx.sty
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/texinputs/sphinx.sty')
-rw-r--r--sphinx/texinputs/sphinx.sty18
1 files changed, 18 insertions, 0 deletions
diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty
index c799d688..a2bc3dbf 100644
--- a/sphinx/texinputs/sphinx.sty
+++ b/sphinx/texinputs/sphinx.sty
@@ -17,11 +17,15 @@
\RequirePackage{makeidx}
\RequirePackage{framed}
\RequirePackage{color}
+% For highlighted code.
\RequirePackage{fancyvrb}
+% For table captions.
\RequirePackage{threeparttable}
% Handle footnotes in tables.
\RequirePackage{footnote}
\makesavenoteenv{tabulary}
+% For floating figures in the text.
+\RequirePackage{wrapfig}
% Redefine these colors to your liking in the preamble.
\definecolor{TitleColor}{rgb}{0.126,0.263,0.361}
@@ -454,6 +458,20 @@
\fi
}{\end{fulllineitems}}
+% class method ----------------------------------------------------------
+% \begin{classmethoddesc}[classname]{methodname}{args}
+\newcommand{\classmethodline}[3][\@undefined]{
+ \py@sigline{class \bfcode{#2}}{#3}}
+\newenvironment{classmethoddesc}[3][\@undefined]{
+ \begin{fulllineitems}
+ \ifx\@undefined#1\relax
+ \classmethodline{#2}{#3}
+ \else
+ \def\py@thisclass{#1}
+ \classmethodline{#2}{#3}
+ \fi
+}{\end{fulllineitems}}
+
% object data attribute --------------------------------------------------
% \begin{memberdesc}[classname]{membername}
\newcommand{\memberline}[2][\py@classbadkey]{%