diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl index 3f345398b04..7af19094705 100644 --- a/Doc/perl/python.perl +++ b/Doc/perl/python.perl @@ -416,15 +416,20 @@ sub make_mod_index_entry{ $THIS_MODULE = ''; $THIS_CLASS = ''; -sub my_module_index_helper{ - local($word, $_) = @_; - my($str,$br_id) = next_argument_id(); - swallow_newline(); +sub define_module{ + my($word,$name) = @_; my $section_tag = join('', @curr_sec_id); $word = "$word " if $word; - $THIS_MODULE = "$str"; + $THIS_MODULE = "$name"; make_mod_index_entry("SECTION$section_tag", - "$str (${word}module)", 'DEF') . $_; + "$name (${word}module)", 'DEF'); +} + +sub my_module_index_helper{ + local($word, $_) = @_; + my $name = next_argument(); + swallow_newline(); + define_module($word, $name) . $_; } sub ref_module_index_helper{ @@ -690,15 +695,16 @@ sub do_cmd_memberlineni{ "
See Also:
\n" . @_[0]; +sub do_env_tableiv{ + local($_) = @_; + my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument()); + my $font = next_argument(); + my $h1 = next_argument(); + my $h2 = next_argument(); + my $h3 = next_argument(); + my $h4 = next_argument(); + $font = '' + if ($font eq 'textrm'); + $globals{'lineifont'} = $font; + 'Module $module" - . " ($text)
" + my $c1 = next_argument(); + my $c2 = next_argument(); + my $c3 = next_argument(); + my $c4 = next_argument(); + my($font,$sfont,$efont) = ($globals{'lineifont'}, '', ''); + if ($font) { + $sfont = "<$font>"; + $efont = "$font>"; + } + my($c1align,$c2align,$c3align,$c4align) = @col_aligns; + "' . @_[0];
-}
-
-
sub do_cmd_maketitle {
local($_) = @_;
my $the_title = '';
@@ -837,6 +861,94 @@ sub do_cmd_maketitle {
}
+#
+# Module synopsis support
+#
+
+require SynopsisTable;
+
+$MY_CHAPTER_COUNTER = 0;
+
+sub get_chapter_id{
+ return $MY_CHAPTER_COUNTER;
+}
+
+sub get_synopsis_table{
+ my $chap = @_;
+ my $st = $ModuleSynopses{$chap};
+ if (!$st) {
+ $st = SynopsisTable->new();
+ $ModuleSynopses{$chap} = $st;
+ }
+ return $st;
+}
+
+sub do_cmd_declaremodule{
+ local($_) = @_;
+ my $key = next_optional_argument();
+ my $type = next_argument();
+ my $name = next_argument();
+ my $st = get_synopsis_table(get_chapter_id());
+ #
+ $key = $name unless $key;
+ $type = 'built-in' if $type eq 'builtin';
+ $st->declare($name, $key, $type);
+ define_module($type, $name);
+ anchor_label("module-$key",$CURRENT_FILE,$_)
+}
+
+sub do_cmd_modulesynopsis{
+ local($_) = @_;
+ my $st = get_synopsis_table(get_chapter_id());
+ $st->set_synopsis($THIS_MODULE, next_argument());
+ swallow_newline();
+ $_;
+}
+
+sub do_cmd_localmoduletable{
+ local($_) = @_;
+ $MY_CHAPTER_COUNTER = $MY_CHAPTER_COUNTER + 1;
+ my $chap = get_chapter_id();
+ " See Also: Module $module"
+ . " ($text) ' . @_[0];
+}
+
+
#
# Definition list support.
#