137,153d136 < % Set up abstract ways to get the normal and smaller font sizes that < % work even in footnote context. < \newif\ifpy@infootnote \py@infootnotefalse < \let\py@oldmakefntext\@makefntext < \def\@makefntext#1{% < \bgroup% < \py@infootnotetrue < \py@oldmakefntext{#1}% < \egroup% < } < \def\py@defaultsize{% < \ifpy@infootnote\footnotesize\else\normalsize\fi% < } < \def\py@smallsize{% < \ifpy@infootnote\scriptsize\else\small\fi% < } < 201,208c184,187 < \setlength{\parindent}{1cm}% < % Calculate the text width for the minipage: < \setlength{\py@codewidth}{\linewidth}% < \addtolength{\py@codewidth}{-\parindent}% < % < \par\indent% < \begin{minipage}[t]{\py@codewidth}% < \small% --- > \begingroup% > \small% > \begin{list}{}{\setlength{\leftmargin}{1cm}} > \item% 213c192,193 < \end{minipage}% --- > \end{list}% > \endgroup 216,221c196 < {\setlength{\parindent}{1cm}% < % Calculate the text width for the minipage: < \setlength{\py@codewidth}{\linewidth}% < \addtolength{\py@codewidth}{-\parindent}% < % < \small% --- > {\small% 601,610d575 < < \newlength{\py@argswidth} < \newcommand{\py@sigparams}[1]{% < \parbox[t]{\py@argswidth}{\py@varvars{#1}\code{)}}} < \newcommand{\py@sigline}[2]{% < \settowidth{\py@argswidth}{#1\code{(}}% < \addtolength{\py@argswidth}{-2\py@argswidth}% < \addtolength{\py@argswidth}{\textwidth}% < \item[#1\code{(}\py@sigparams{#2}]} < 615,618d579 < \newcommand{\cfuncline}[3]{ < \py@sigline{\code{#1 \bfcode{#2}}}{#3}% < \index{#2@{\py@idxcode{#2()}}} < } 621c582 < \cfuncline{#2}{#3}{#4} --- > \item[\code{#2 \bfcode{#3}(\py@varvars{#4})}\index{#3@{\py@idxcode{#3()}}}] 646,656d606 < % C type fields ---------------------------------------------------------- < % \begin{cmemberdesc}{container type}{ctype}{membername} < \newcommand{\cmemberline}[3]{ < \item[\code{#2 \bfcode{#3}}] < \index{#3@{\py@idxcode{#3}} (#1 member)} < } < \newenvironment{cmemberdesc}[3]{ < \begin{fulllineitems} < \cmemberline{#1}{#2}{#3} < }{\end{fulllineitems}} < 658c608 < % \begin{csimplemacrodesc}{name} --- > % \begin{csimplemacro}{name} 676,677c626 < \newcommand{\funclineni}[2]{% < \py@sigline{\bfcode{#1}}{#2}} --- > \newcommand{\funclineni}[2]{\item[\code{\bfcode{#1}(\py@varvars{#2})}]} 689,690c638,639 < \py@sigline{\strong{class }\bfcode{#1}}{#2}% < \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)} --- > \item[\strong{class }\code{\bfcode{#1}(\py@varvars{#2})}% > \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}] 708,709c657,658 < \py@sigline{\strong{exception }\bfcode{#1}}{#2}% < \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)} --- > \item[\strong{exception }\code{\bfcode{#1}(\py@varvars{#2})}% > \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}] 741c690 < \py@sigline{\bfcode{#2}}{#3}} --- > \item[\code{\bfcode{#2}(\py@varvars{#3})}]} 824d772 < % \menuselection{Start \sub Programs \sub Python} 834d781 < \newcommand{\csimplemacro}[1]{\code{#1}} 836a784,786 > % This weird definition of \var{} allows it to always appear in roman > % italics, and won't get funky in code fragments when we play around > % with fonts. This also works directly in math mode. 839c789 < \hbox{\py@defaultsize\textrm{\textit{#1\/}}}% --- > \hbox{\normalsize\textrm{\textit{#1\/}}}% 841c791 < \py@defaultsize\textrm{\textit{#1\/}}% --- > \normalsize\textrm{\textit{#1\/}}% 848,849c798,799 < \newcommand{\file}[1]{`\filenq{#1}'} < \newcommand{\filenq}[1]{{\py@smallsize\textsf{#1}}} --- > \newcommand{\file}[1]{`{\textsf{#1}}'} > \newcommand{\filenq}[1]{{\textsf{#1}}} 858c808 < \py@smallsize\sf #1% --- > \small\sf #1% 863c813 < \newcommand{\url}[1]{\mbox{\py@smallsize\textsf{#1}}} --- > \newcommand{\url}[1]{\mbox{\small\textsf{#1}}} 865,866c815,816 < \newcommand{\email}[1]{{\py@smallsize\textsf{#1}}} < \newcommand{\newsgroup}[1]{{\py@smallsize\textsf{#1}}} --- > \newcommand{\email}[1]{{\small\textsf{#1}}} > \newcommand{\newsgroup}[1]{{\small\textsf{#1}}} 902,903c852,853 < \newcommand{\mailheader}[1]{{\py@smallsize\textsf{#1:}}} < \newcommand{\mimetype}[1]{{\py@smallsize\textsf{#1}}} --- > \newcommand{\mailheader}[1]{{\small\textsf{#1:}}} > \newcommand{\mimetype}[1]{{\small\textsf{#1}}} 907c857 < {\py@defaultsize\code{#1}}% --- > {\normalsize\code{#1}}% 1105,1125d1054 < < % XXX Don't think we can use this yet, though it cleans up some < % tedious markup. There's no equivalent for the HTML transform yet, < % and that needs to exist. I don't know how to write it. < % < % This should really have something that makes it easier to bind a < % table's ``Notes'' column and an associated tablenotes environment, < % and generates the right magic for getting the numbers right in the < % table. < % < % So this is quite incomplete. < % < \newcounter{py@tablenotescounter} < \newenvironment{tablenotes}{% < \noindent Notes: < \par < \setcounter{py@tablenotescounter}{0} < \begin{list}{(\arabic{py@tablenotescounter})}% < {\usecounter{py@tablenotescounter}} < }{\end{list}} <