Mercurial > cpython-lru_cache-weakref
comparison Doc/texinputs/python.sty @ 9868:a58f36352c4f legacy-trunk
\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.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Wed, 13 Jan 1999 17:09:06 +0000 |
| parents | 1437c2335b3b |
| children | 2750e1de6829 |
comparison
equal
deleted
inserted
replaced
| 9867:c95fff8f180a | 9868:a58f36352c4f |
|---|---|
| 226 \newcommand{\refmodindex}[1]{\py@refmodule{#1}{}} | 226 \newcommand{\refmodindex}[1]{\py@refmodule{#1}{}} |
| 227 \newcommand{\refbimodindex}[1]{\py@refmodule{#1}{built-in }} | 227 \newcommand{\refbimodindex}[1]{\py@refmodule{#1}{built-in }} |
| 228 \newcommand{\refexmodindex}[1]{\py@refmodule{#1}{extension }} | 228 \newcommand{\refexmodindex}[1]{\py@refmodule{#1}{extension }} |
| 229 \newcommand{\refstmodindex}[1]{\py@refmodule{#1}{standard }} | 229 \newcommand{\refstmodindex}[1]{\py@refmodule{#1}{standard }} |
| 230 | 230 |
| 231 % Refer to a module's documentation using a hyperlink of the module's | |
| 232 % name, at least if we're building PDF: | |
| 233 \@ifundefined{pdfannotlink}{% | |
| 234 \newcommand{\refmodule}[2][\py@modulebadkey]{\module{#2}} | |
| 235 }{\newcommand{\refmodule}[2][\py@modulebadkey]{% | |
| 236 \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% | |
| 237 {\pdfannotlink attr{/Border [0 0 0]} goto name{label-module-\py@modulekey}% | |
| 238 \py@LinkColor\module{#2}\py@NormalColor% | |
| 239 \pdfendlink% | |
| 240 }% | |
| 241 } | |
| 242 } | |
| 243 | |
| 231 % support for the module index | 244 % support for the module index |
| 232 \newif\ifpy@UseModuleIndex | 245 \newif\ifpy@UseModuleIndex |
| 233 \py@UseModuleIndexfalse | 246 \py@UseModuleIndexfalse |
| 234 | 247 |
| 235 \newcommand{\makemodindex}{ | 248 \newcommand{\makemodindex}{ |
| 782 % | 795 % |
| 783 % \end{seealso} | 796 % \end{seealso} |
| 784 | 797 |
| 785 \@ifundefined{pdfannotlink}{% | 798 \@ifundefined{pdfannotlink}{% |
| 786 \newcommand{\py@seemodule}[3][\py@modulebadkey]{% | 799 \newcommand{\py@seemodule}[3][\py@modulebadkey]{% |
| 800 \par% | |
| 787 \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% | 801 \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% |
| 788 \ref{module-\py@modulekey}:\quad % | 802 \ref{module-\py@modulekey}:\quad % |
| 789 Module \module{#2}% | 803 Module \module{#2}% |
| 790 \quad (#3)% | 804 \quad (#3)% |
| 791 } | 805 } |
| 792 }{\newcommand{\py@seemodule}[3][\py@modulebadkey]{% | 806 }{\newcommand{\py@seemodule}[3][\py@modulebadkey]{% |
| 807 \par% | |
| 793 \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% | 808 \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% |
| 794 \ref{module-\py@modulekey}:\quad % | 809 \ref{module-\py@modulekey}:\quad % |
| 795 {\pdfannotlink attr{/Border [0 0 0]} goto name{label-module-\py@modulekey}% | 810 {\pdfannotlink attr{/Border [0 0 0]} goto name{label-module-\py@modulekey}% |
| 796 \py@LinkColor Module \module{#2} \py@NormalColor% | 811 \py@LinkColor Module \module{#2} \py@NormalColor% |
| 797 \pdfendlink% | 812 \pdfendlink% |
