]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Change the look of \seemodule output to fit in better.
authorFred Drake <fdrake@acm.org>
Tue, 11 May 1999 15:42:51 +0000 (15:42 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 11 May 1999 15:42:51 +0000 (15:42 +0000)
Doc/perl/python.perl
Doc/texinputs/python.sty

index 2b6fa189f2fee95f1b4a5955e973d49252ac3c7e..67bac7262fe07a7f1f74f74805598f8b18f1149e 100644 (file)
@@ -1081,12 +1081,16 @@ sub do_cmd_seemodule{
     my $key = next_optional_argument();
     my $module = next_argument();
     my $text = next_argument();
+    my $period = '.';
     $key = $module
         unless $key;
-    return '<div class=seemodule>'
-      . "\n<p>Module <b><tt class=module><a href=\"module-$key.html\">"
-      . "$module</a></tt></b>"
-      . "&nbsp;&nbsp;&nbsp;($text)</p>\n</div>"
+    if ($text =~ /\.$/) {
+       $period = '';
+    }
+    return '<dl compact class=seemodule>'
+      . "\n    <dt>Module <b><tt class=module><a href=\"module-$key.html\">"
+      . "$module</a></tt>:</b>"
+      . "\n    <dd>$text$period\n  </dl>"
       . $_;
 }
 
index 30fef216ed4e4ef8987e16ed980dcc4526feffd8..c8d3691f746a38af5842b6e0bf9c7ec32063f2b6 100644 (file)
 % Cross-referencing (AMK, new impl. FLD)
 % Sample usage:
 %  \begin{seealso}
-%    \seemodule{rand}{Uniform random number generator}; % Module xref
-%    \seetext{\emph{Encyclopedia Britannica}}.          % Ref to a book
+%    \seemodule{rand}{Uniform random number generator.}; % Module xref
+%    \seetext{\emph{Encyclopedia Britannica}}.           % Ref to a book
 % 
 %    % A funky case: module name contains '_'; have to supply an optional key
-%    \seemodule[copyreg]{copy_reg}{pickle interface constructor registration}
-%
+%    \seemodule[copyreg]{copy_reg}{Interface constructor registration for
+%                                  \module{pickle}.}
 %  \end{seealso}
+%
+% Note that the last parameter for \seemodule and \seetext should be complete
+% sentences and be terminated with the proper punctuation.
 
 \@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)%
+    \begin{fulllineitems}
+      \item[Module \module{#2} (section \ref{module-\py@modulekey}):]
+      #3
+    \end{fulllineitems}
   }
 }{\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 %
-    \py@linkToName{label-module-\py@modulekey}{ Module \module{#2} }
-    \quad (#3)%
+    \begin{fulllineitems}
+      \item[\py@linkToName{label-module-\py@modulekey}{Module \module{#2}}
+            (section \ref{module-\py@modulekey}):]
+      #3
+    \end{fulllineitems}
   }
 }
 \newenvironment{seealso}[0]{