]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
\seemodule: Fix so that each \seemodule entry gets its own paragraph,
authorFred Drake <fdrake@acm.org>
Wed, 13 Jan 1999 17:09:06 +0000 (17:09 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 13 Jan 1999 17:09:06 +0000 (17:09 +0000)
so they don't get run together when there's no blank line
between them in the source.  The HTML conversion already did
the right thing.

\refmodule:  Refer to a module, using a hyperlink in the PDF version.
Visually the same as \module.

Doc/texinputs/python.sty

index c579adc7e9ec6e82d822518efbec9e8d38a853cf..904e971d39fed9f0981e6bab96f696d29cbd3142 100644 (file)
 \newcommand{\refexmodindex}[1]{\py@refmodule{#1}{extension }}
 \newcommand{\refstmodindex}[1]{\py@refmodule{#1}{standard }}
 
+% Refer to a module's documentation using a hyperlink of the module's
+% name, at least if we're building PDF:
+\@ifundefined{pdfannotlink}{%
+  \newcommand{\refmodule}[2][\py@modulebadkey]{\module{#2}}
+}{\newcommand{\refmodule}[2][\py@modulebadkey]{%
+    \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi%
+    {\pdfannotlink attr{/Border [0 0 0]} goto name{label-module-\py@modulekey}%
+     \py@LinkColor\module{#2}\py@NormalColor%
+     \pdfendlink%
+    }%
+  }
+}
+
 % support for the module index
 \newif\ifpy@UseModuleIndex
 \py@UseModuleIndexfalse
 
 \@ifundefined{pdfannotlink}{%
   \newcommand{\py@seemodule}[3][\py@modulebadkey]{%
+    \par%
     \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi%
     \ref{module-\py@modulekey}:\quad %
     Module \module{#2}%
     \quad (#3)%
   }
 }{\newcommand{\py@seemodule}[3][\py@modulebadkey]{%
+    \par%
     \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi%
     \ref{module-\py@modulekey}:\quad %
     {\pdfannotlink attr{/Border [0 0 0]} goto name{label-module-\py@modulekey}%