diff options
author | Fred Drake <fdrake@acm.org> | 1999-01-13 17:09:06 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-01-13 17:09:06 (GMT) |
commit | da94374a86065d5da7802c4e862dd8f611326551 (patch) | |
tree | 23c28f27b3fcc388139d43a489bf1cbca363c2bd /Doc/texinputs/python.sty | |
parent | 2581704dfa339e586d6e3cc3b1abcf5bbebb4dfc (diff) | |
download | cpython-da94374a86065d5da7802c4e862dd8f611326551.zip cpython-da94374a86065d5da7802c4e862dd8f611326551.tar.gz cpython-da94374a86065d5da7802c4e862dd8f611326551.tar.bz2 |
\seemodule: Fix so that each \seemodule entry gets its own paragraph,
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.
Diffstat (limited to 'Doc/texinputs/python.sty')
-rw-r--r-- | Doc/texinputs/python.sty | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty index c579adc..904e971 100644 --- a/Doc/texinputs/python.sty +++ b/Doc/texinputs/python.sty @@ -228,6 +228,19 @@ \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 @@ -784,12 +797,14 @@ \@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}% |