annotate Doc/perl/python.perl @ 8754:e88d4e6e4622 legacy-trunk

Added module synopsis support with one (big) caveat: All the modules are listed in each chapter that has a \localmoduletable. This will be fixed, and everything else seems to be working fine.
author Fred Drake <fdrake@acm.org>
date Fri, 24 Jul 1998 22:16:04 +0000
parents c9b7e926fd86
children fba8455dcb54
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1 # python.perl by Fred L. Drake, Jr. <fdrake@acm.org> -*- perl -*-
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
2 #
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
3 # Heavily based on Guido van Rossum's myformat.perl (now obsolete).
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
4 #
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
5 # Extension to LaTeX2HTML for documents using myformat.sty.
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
6 # Subroutines of the form do_cmd_<name> here define translations
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
7 # for LaTeX commands \<name> defined in the corresponding .sty file.
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
8
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
9 package main;
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
10
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
11
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
12 sub next_argument_id{
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
13 my ($param,$br_id);
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
14 $param = missing_braces()
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
15 unless ((s/$next_pair_pr_rx/$br_id=$1;$param=$2;''/eo)
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
16 ||(s/$next_pair_rx/$br_id=$1;$param=$2;''/eo));
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
17 ($param, $br_id);
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
18 }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
19
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
20 sub next_argument{
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
21 my ($param,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
22 $param;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
23 }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
24
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
25 sub next_optional_argument{
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
26 my($param,$rx) = ('', "^\\s*(\\[([^]]*)\\])?");
8086
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
27 s/$rx/$param=$2;''/eo;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
28 $param;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
29 }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
30
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
31 sub swallow_newline{
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
32 s/[\n]?//o;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
33 }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
34
8086
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
35 sub ArabictoRoman {
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
36 # Written by Robert Donohue <donahue@cfassp48.harvard.edu>,
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
37 # fixed by Fred Drake <fdrake@acm.org>,
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
38 # kept around in case it becomes useful.
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
39 my $a = @_;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
40 my($b,@c,$i);
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
41 my(@D0,@D1,@D2);
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
42
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
43 @D0 = ("", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX");
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
44 @D1 = ("", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC");
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
45 @D2 = ("", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM");
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
46
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
47 $b = $a;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
48 $i = 0;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
49 while($b > 0) {
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
50 $c[$i] = ($b % 10);
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
51 $b -= ($b % 10);
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
52 $b /= 10;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
53 $i++;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
54 }
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
55 $D2[$c[2]] . $D1[$c[1]] . $D0[$c[0]];
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
56 }
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
57
8344
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
58
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
59 # This is a fairly simple hack; it supports \let when it is used to create
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
60 # (or redefine) a macro to exactly be some other macro: \let\newname=\oldname.
8349
4172da91441a Revise comment about \let support a little to more accurately reflect the
Fred Drake <fdrake@acm.org>
parents: 8346
diff changeset
61 # Many possible uses of \let aren't supported or aren't supported correctly.
8344
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
62 #
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
63 sub do_cmd_let{
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
64 local($_) = @_;
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
65 my $matched = 0;
8346
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
66 s/[\\]([a-zA-Z]+)\s*(=\s*)?[\\]([a-zA-Z]*)/$matched=1; ''/e;
8344
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
67 if ($matched) {
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
68 my($new, $old) = ($1, $3);
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
69 eval "sub do_cmd_$new { do_cmd_$old" . '(@_); }';
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
70 print "\ndefining handler for \\$new using \\$old\n";
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
71 }
8346
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
72 else {
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
73 s/[\\]([a-zA-Z]+)\s*(=\s*)?([^\\])/$matched=1; ''/es;
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
74 if ($matched) {
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
75 my($new, $char) = ($1, $3);
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
76 eval "sub do_cmd_$new { \"\\$char\" . \@_[0]; }";
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
77 print "\ndefining handler for \\$new to insert '$char'\n";
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
78 }
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
79 else {
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
80 write_warnings("Could not interpret \\let construct...");
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
81 }
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
82 }
8344
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
83 $_;
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
84 }
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
85
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
86
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
87 # words typeset in a special way (not in HTML though)
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
88
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
89 sub do_cmd_ABC{ 'ABC' . @_[0]; }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
90 sub do_cmd_UNIX{ 'Unix'. @_[0]; }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
91 sub do_cmd_ASCII{ 'ASCII' . @_[0]; }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
92 sub do_cmd_POSIX{ 'POSIX' . @_[0]; }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
93 sub do_cmd_C{ 'C' . @_[0]; }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
94 sub do_cmd_Cpp{ 'C++' . @_[0]; }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
95 sub do_cmd_EOF{ 'EOF' . @_[0]; }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
96 sub do_cmd_NULL{ '<tt>NULL</tt>' . @_[0]; }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
97
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
98 sub do_cmd_e{ '&#92;' . @_[0]; }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
99
8342
22815a0b1267 Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents: 8294
diff changeset
100 $DEVELOPER_ADDRESS = '';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
101 $PYTHON_VERSION = '';
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
102
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
103 sub do_cmd_version{ $PYTHON_VERSION . @_[0]; }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
104 sub do_cmd_release{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
105 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
106 $PYTHON_VERSION = next_argument();
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
107 $_;
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
108 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
109
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
110 sub do_cmd_authoraddress{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
111 local($_) = @_;
8342
22815a0b1267 Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents: 8294
diff changeset
112 $DEVELOPER_ADDRESS = next_argument();
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
113 $_;
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
114 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
115
8344
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
116 #sub do_cmd_developer{ do_cmd_author(@_[0]); }
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
117 #sub do_cmd_developers{ do_cmd_author(@_[0]); }
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
118 #sub do_cmd_developersaddress{ do_cmd_authoraddress(@_[0]); }
8342
22815a0b1267 Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents: 8294
diff changeset
119
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
120 sub do_cmd_hackscore{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
121 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
122 next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
123 '_' . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
124 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
125
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
126 sub use_wrappers{
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
127 local($_,$before,$after) = @_;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
128 my $stuff = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
129 $before . $stuff . $after . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
130 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
131
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
132 sub use_current{ use_wrappers(@_[0], '', ''); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
133 sub use_sans_serif{ use_wrappers(@_[0], '<font face=sans-serif>', '</font>'); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
134 sub use_italics{ use_wrappers(@_[0], '<i>', '</i>'); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
135
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
136 sub do_cmd_optional{
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
137 use_wrappers(@_[0], "</var><big>\[</big><var>",
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
138 "</var><big>\]</big><var>");
7802
dffe1e470e6c Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents: 7798
diff changeset
139 }
dffe1e470e6c Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents: 7798
diff changeset
140
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
141 # Logical formatting (some based on texinfo), needs to be converted to
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
142 # minimalist HTML. The "minimalist" is primarily to reduce the size of
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
143 # output files for users that read them over the network rather than
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
144 # from local repositories.
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
145
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
146 sub do_cmd_pytype{ use_current(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
147 sub do_cmd_makevar{ use_current(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
148 sub do_cmd_code{ use_wrappers(@_[0], '<tt>', '</tt>'); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
149 sub do_cmd_module{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
150 sub do_cmd_keyword{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
151 sub do_cmd_exception{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
152 sub do_cmd_class{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
153 sub do_cmd_function{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
154 sub do_cmd_constant{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
155 sub do_cmd_member{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
156 sub do_cmd_method{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
157 sub do_cmd_cfunction{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
158 sub do_cmd_cdata{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
159 sub do_cmd_ctype{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
160 sub do_cmd_regexp{ do_cmd_code(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
161 sub do_cmd_character{ do_cmd_samp(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
162 sub do_cmd_program{ do_cmd_strong(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
163 sub do_cmd_email{ use_sans_serif(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
164 sub do_cmd_mimetype{ use_sans_serif(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
165 sub do_cmd_var{ use_italics(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
166 sub do_cmd_dfn{ use_italics(@_); } # make an index entry?
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
167 sub do_cmd_emph{ use_italics(@_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
168 sub do_cmd_file{ use_wrappers(@_[0], '"<tt>', '</tt>"'); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
169 sub do_cmd_samp{ use_wrappers(@_[0], '"<tt>', '</tt>"'); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
170 sub do_cmd_kbd{ use_wrappers(@_[0], '<kbd>', '</kbd>'); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
171 sub do_cmd_strong{ use_wrappers(@_[0], '<b>', '</b>'); }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
172
7779
1c420699d58a Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents: 7760
diff changeset
173 sub do_cmd_newsgroup{
1c420699d58a Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents: 7760
diff changeset
174 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
175 my $newsgroup = next_argument();
7779
1c420699d58a Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents: 7760
diff changeset
176 my $stuff = "<a href=\"news:$newsgroup\"><font face=sans-serif>"
1c420699d58a Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents: 7760
diff changeset
177 . "$newsgroup</font></a>";
1c420699d58a Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents: 7760
diff changeset
178 $stuff . $_;
1c420699d58a Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents: 7760
diff changeset
179 }
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
180
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
181 sub do_cmd_envvar{
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
182 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
183 my($envvar,$br_id) = next_argument_id();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
184 my($name,$aname,$ahref) = link_info($br_id);
7909
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
185 # The <tt> here is really to keep buildindex.py from making
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
186 # the variable name case-insensitive.
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
187 add_index_entry("environment variables!$envvar@<tt>\$$envvar</tt>",
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
188 $ahref);
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
189 add_index_entry("$envvar@\$$envvar", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
190 "$aname\$$envvar</a>" . $_;
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
191 }
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
192
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
193
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
194 sub do_cmd_url{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
195 # use the URL as both text and hyperlink
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
196 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
197 my $url = next_argument();
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
198 $url =~ s/~/&#126;/g;
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
199 "<a href=\"$url\"><font face=sans-serif>$url</font></a>" . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
200 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
201
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
202 sub do_cmd_manpage{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
203 # two parameters: \manpage{name}{section}
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
204 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
205 my $page = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
206 my $section = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
207 "<i>$page</i>($section)" . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
208 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
209
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
210 sub do_cmd_rfc{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
211 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
212 my($rfcnumber,$br_id) = next_argument();
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
213
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
214 # Save the reference
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
215 my $nstr = gen_index_id("RFC!RFC $rfcnumber", '');
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
216 $index{$nstr} .= make_half_href("$CURRENT_FILE#$br_id");
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
217 "<a name=$br_id>RFC $rfcnumber</a>" .$_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
218 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
219
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
220 sub do_cmd_deprecated{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
221 # two parameters: \deprecated{version}{whattodo}
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
222 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
223 my $release = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
224 my $reason = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
225 "<b>Deprecated since release $release.</b>\n$reason<p>" . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
226 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
227
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
228 # file and samp are at the end of this file since they screw up fontlock.
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
229
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
230 # index commands
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
231
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
232 $INDEX_SUBITEM = "";
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
233
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
234 sub get_indexsubitem{
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
235 #$INDEX_SUBITEM ? " $INDEX_SUBITEM" : '';
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
236 '';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
237 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
238
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
239 sub do_cmd_setindexsubitem{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
240 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
241 $INDEX_SUBITEM = next_argument();
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
242 $_;
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
243 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
244
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
245 sub do_cmd_withsubitem{
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
246 # We can't really do the right right thing, because LaTeX2HTML doesn't
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
247 # do things in the right order, but we need to at least strip this stuff
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
248 # out, and leave anything that the second argument expanded out to.
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
249 #
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
250 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
251 next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
252 my $stuff = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
253 $stuff . $_;
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
254 }
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
255
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
256 # This is the prologue macro which is required to start writing the
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
257 # mod\jobname.idx file; we can just ignore it.
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
258 #
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
259 sub do_cmd_makemodindex{ @_[0]; }
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
260
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
261 # We're in the document subdirectory when this happens!
7909
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
262 #
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
263 open(IDXFILE, '>index.dat') || die "\n$!\n";
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
264 open(INTLABELS, '>intlabels.pl') || die "\n$!\n";
7909
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
265 print INTLABELS "%internal_labels = ();\n";
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
266 print INTLABELS "1; # hack in case there are no entries\n\n";
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
267
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
268 # Using \0 for this is bad because we can't use common tools to work with the
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
269 # resulting files. Things like grep can be useful with this stuff!
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
270 #
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
271 $IDXFILE_FIELD_SEP = "\1";
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
272
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
273
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
274 sub gen_target_name{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
275 "l2h-" . @_[0];
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
276 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
277
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
278 sub gen_target{
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
279 '<a name="' . @_[0] . '">';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
280 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
281
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
282 sub gen_link{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
283 my($node,$target) = @_;
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
284 print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n";
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
285 "<a href=\"$node#$target\">";
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
286 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
287
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
288 sub make_index_entry{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
289 my($br_id,$str) = @_;
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
290 my($name,$aname,$ahref) = link_info($br_id);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
291 add_index_entry($str, $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
292 "$aname$anchor_invisible_mark</a>";
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
293 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
294
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
295 sub add_index_entry{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
296 # add an entry to the index structures; ignore the return value
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
297 my($str,$ahref) = @_;
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
298 $str = gen_index_id($str, '');
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
299 $index{$str} .= $ahref;
7909
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
300 print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n";
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
301 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
302
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
303 sub link_info{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
304 my $name = gen_target_name(@_[0]);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
305 my $aname = gen_target($name);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
306 my $ahref = gen_link($CURRENT_FILE, $name);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
307 return ($name, $aname, $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
308 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
309
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
310 sub do_cmd_index{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
311 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
312 my($str,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
313 swallow_newline();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
314 #
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
315 my($name,$aname,$ahref) = link_info($br_id);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
316 add_index_entry("$str", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
317 "$aname$anchor_invisible_mark</a>" . $_;
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
318 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
319
8294
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
320 sub do_cmd_kwindex{
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
321 local($_) = @_;
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
322 my($str,$br_id) = next_argument_id();
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
323 #
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
324 my($name,$aname,$ahref) = link_info($br_id);
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
325 add_index_entry("<tt>$str</tt>!keyword", $ahref);
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
326 add_index_entry("keyword!<tt>$str</tt>", $ahref);
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
327 "$aname$anchor_invisible_mark</a>" . $_;
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
328 }
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
329
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
330 sub do_cmd_indexii{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
331 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
332 my($str1,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
333 my $str2 = next_argument();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
334 #
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
335 my($name,$aname,$ahref) = link_info($br_id);
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
336 add_index_entry("$str1!$str2", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
337 add_index_entry("$str2!$str1", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
338 "$aname$anchor_invisible_mark</a>" . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
339 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
340
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
341 sub do_cmd_indexiii{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
342 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
343 my($str1,$br_id) = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
344 my $str2 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
345 my $str3 = next_argument();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
346 #
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
347 my($name,$aname,$ahref) = link_info($br_id);
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
348 add_index_entry("$str1!$str2 $str3", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
349 add_index_entry("$str2!$str3, $str1", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
350 add_index_entry("$str3!$str1 $str2", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
351 "$aname$anchor_invisible_mark</a>" . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
352 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
353
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
354 sub do_cmd_indexiv{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
355 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
356 my($str1,$br_id) = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
357 my $str2 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
358 my $str3 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
359 my $str4 = next_argument();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
360 #
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
361 my($name,$aname,$ahref) = link_info($br_id);
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
362 add_index_entry("$str1!$str2 $str3 $str4", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
363 add_index_entry("$str2!$str3 $str4, $str1", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
364 add_index_entry("$str3!$str4, $str1 $str2", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
365 add_index_entry("$str4!$$str1 $str2 $str3", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
366 "$aname$anchor_invisible_mark</a>" . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
367 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
368
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
369 sub do_cmd_ttindex{
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
370 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
371 my($str,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
372 swallow_newline();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
373 make_index_entry($br_id, $str . get_indexsubitem()) . $_;
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
374 }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
375
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
376 sub my_typed_index_helper{
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
377 local($word,$_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
378 my($str,$br_id) = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
379 swallow_newline();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
380 #
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
381 my($name,$aname,$ahref) = link_info($br_id1);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
382 add_index_entry("$str $word", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
383 add_index_entry("$word!$str", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
384 "$aname$anchor_invisible_mark</a>" . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
385 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
386
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
387 sub do_cmd_stindex{ my_typed_index_helper('statement', @_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
388 sub do_cmd_opindex{ my_typed_index_helper('operator', @_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
389 sub do_cmd_exindex{ my_typed_index_helper('exception', @_); }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
390 sub do_cmd_obindex{ my_typed_index_helper('object', @_); }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
391
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
392 sub my_parword_index_helper{
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
393 local($word,$_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
394 my($str,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
395 swallow_newline();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
396 make_index_entry($br_id, "$str ($word)") . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
397 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
398
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
399
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
400 sub make_mod_index_entry{
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
401 my($br_id,$str,$define) = @_;
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
402 my($name,$aname,$ahref) = link_info($br_id);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
403 # equivalent of add_index_entry() using $define instead of ''
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
404 $str = gen_index_id($str, $define);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
405 $index{$str} .= $ahref;
7909
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
406 print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n";
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
407
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
408 if ($define eq 'DEF') {
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
409 # add to the module index
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
410 my($nstr,$garbage) = split / /, $str, 2;
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
411 $Modules{$nstr} .= $ahref;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
412 }
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
413 "$aname$anchor_invisible_mark</a>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
414 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
415
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
416 $THIS_MODULE = '';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
417 $THIS_CLASS = '';
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
418
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
419 sub define_module{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
420 my($word,$name) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
421 my $section_tag = join('', @curr_sec_id);
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
422 $word = "$word " if $word;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
423 $THIS_MODULE = "$name";
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
424 make_mod_index_entry("SECTION$section_tag",
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
425 "<tt>$name</tt> (${word}module)", 'DEF');
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
426 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
427
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
428 sub my_module_index_helper{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
429 local($word, $_) = @_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
430 my $name = next_argument();
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
431 swallow_newline();
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
432 define_module($word, $name) . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
433 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
434
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
435 sub ref_module_index_helper{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
436 local($word, $_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
437 my($str,$br_id) = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
438 swallow_newline();
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
439 $word = "$word " if $word;
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
440 make_mod_index_entry($br_id, "<tt>$str</tt> (${word}module)", 'REF') . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
441 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
442
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
443 sub do_cmd_bifuncindex{
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
444 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
445 my($str,$br_id) = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
446 swallow_newline();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
447 my $fname = "<tt>$str()</tt>";
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
448 make_index_entry($br_id, "$fname (built-in function)") . $_;
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
449 }
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
450
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
451 sub do_cmd_modindex{ my_module_index_helper('', @_); }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
452 sub do_cmd_bimodindex{ my_module_index_helper('built-in', @_); }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
453 sub do_cmd_exmodindex{ my_module_index_helper('extension', @_); }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
454 sub do_cmd_stmodindex{ my_module_index_helper('standard', @_); }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
455
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
456 # these should be adjusted a bit....
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
457 sub do_cmd_refmodindex{ ref_module_index_helper('', @_); }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
458 sub do_cmd_refbimodindex{ ref_module_index_helper('built-in', @_); }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
459 sub do_cmd_refexmodindex{ ref_module_index_helper('extension', @_); }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
460 sub do_cmd_refstmodindex{ ref_module_index_helper('standard', @_); }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
461
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
462 sub do_cmd_nodename{ do_cmd_label(@_); }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
463
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
464 sub init_myformat{
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
465 # $anchor_invisible_mark = '';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
466 $anchor_mark = '';
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
467 $icons{'anchor_mark'} = '';
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
468 }
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
469 init_myformat();
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
470
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
471 # similar to make_index_entry(), but includes the string in the result
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
472 # instead of the dummy filler.
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
473 #
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
474 sub make_str_index_entry{
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
475 my($br_id,$str) = @_;
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
476 my($name,$aname,$ahref) = link_info($br_id);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
477 add_index_entry($str, $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
478 "$aname$str</a>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
479 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
480
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
481 sub do_env_cfuncdesc{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
482 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
483 my $return_type = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
484 my($function_name,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
485 my $arg_list = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
486 my $idx = make_str_index_entry($br_id,
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
487 "<tt>$function_name()</tt>" . get_indexsubitem());
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
488 $idx =~ s/ \(.*\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
489 $idx =~ s/\(\)//; # ????
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
490 "<dl><dt>$return_type <b>$idx</b>"
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
491 . "(<var>$arg_list</var>)\n<dd>"
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
492 . $_
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
493 . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
494 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
495
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
496 sub do_env_ctypedesc{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
497 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
498 my($type_name,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
499 my $idx = make_str_index_entry($br_id,
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
500 "<tt>$type_name</tt>" . get_indexsubitem());
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
501 $idx =~ s/ \(.*\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
502 "<dl><dt><b>$idx</b>\n<dd>"
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
503 . $_
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
504 . '</dl>'
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
505 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
506
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
507 sub do_env_cvardesc{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
508 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
509 my $var_type = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
510 my($var_name,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
511 my $idx = make_str_index_entry($br_id,
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
512 "<tt>$var_name</tt>" . get_indexsubitem());
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
513 $idx =~ s/ \(.*\)//;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
514 "<dl><dt>$var_type <b>$idx</b>\n"
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
515 . '<dd>'
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
516 . $_
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
517 . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
518 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
519
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
520 sub do_env_funcdesc{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
521 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
522 my $function_name = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
523 my($arg_list,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
524 my $idx = make_str_index_entry($br_id, "<tt>$function_name()</tt>"
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
525 . get_indexsubitem());
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
526 $idx =~ s/ \(.*\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
527 $idx =~ s/\(\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
528 "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
529 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
530
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
531 sub do_env_funcdescni{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
532 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
533 my $function_name = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
534 my $arg_list = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
535 "<dl><dt><b><tt>$function_name</tt></b> (<var>$arg_list</var>)\n<dd>"
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
536 . $_ . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
537 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
538
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
539 sub do_cmd_funcline{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
540 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
541 my $function_name = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
542 my($arg_list,$br_id) = next_argument_id();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
543 my $idx = make_str_index_entry($br_id, "<tt>$function_name()</tt>"
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
544 . get_indexsubitem());
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
545 $idx =~ s/\(\)//;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
546 "<dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_;
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
547 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
548
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
549 # Change this flag to index the opcode entries. I don't think it's very
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
550 # useful to index them, since they're only presented to describe the dis
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
551 # module.
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
552 #
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
553 $INDEX_OPCODES = 0;
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
554
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
555 sub do_env_opcodedesc{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
556 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
557 my $opcode_name = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
558 my($arg_list,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
559 my $idx;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
560 if ($INDEX_OPCODES) {
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
561 $idx = make_str_index_entry($br_id,
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
562 "<tt>$opcode_name</tt> (byte code instruction)");
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
563 $idx =~ s/ \(byte code instruction\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
564 }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
565 else {
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
566 $idx = "<tt>$opcode_name</tt>";
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
567 }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
568 my $stuff = "<dl><dt><b>$idx</b>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
569 if ($arg_list) {
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
570 $stuff .= "&nbsp;&nbsp;&nbsp;&nbsp;<var>$arg_list</var>";
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
571 }
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
572 $stuff . "\n<dd>" . $_ . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
573 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
574
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
575 sub do_env_datadesc{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
576 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
577 my($dataname,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
578 my $idx = make_str_index_entry($br_id,
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
579 "<tt>$dataname</tt>" . get_indexsubitem());
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
580 $idx =~ s/ \(.*\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
581 "<dl><dt><b>$idx</b>\n<dd>"
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
582 . $_
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
583 . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
584 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
585
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
586 sub do_env_datadescni{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
587 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
588 my $idx = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
589 if (! $STRING_INDEX_TT) {
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
590 $idx = "<tt>$idx</tt>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
591 }
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
592 "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
593 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
594
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
595 sub do_cmd_dataline{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
596 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
597 my($data_name,$br_id) = next_argument_id();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
598 my $idx = make_str_index_entry($br_id, "<tt>$data_name</tt>"
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
599 . get_indexsubitem());
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
600 $idx =~ s/ \(.*\)//;
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
601 "<dt><b>$idx</b><dd>" . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
602 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
603
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
604 sub do_env_excdesc{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
605 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
606 my($excname,$br_id) = next_argument_id();
7909
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
607 my $idx = make_str_index_entry($br_id, "<tt>$excname</tt>");
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
608 "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
609 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
610
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
611 sub do_env_fulllineitems{ do_env_itemize(@_); }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
612
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
613
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
614 sub do_env_classdesc{
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
615 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
616 $THIS_CLASS = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
617 my($arg_list,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
618 $idx = make_str_index_entry($br_id,
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
619 "<tt>$THIS_CLASS</tt> (class in $THIS_MODULE)" );
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
620 $idx =~ s/ \(.*\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
621 "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
622 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
623
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
624
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
625 sub do_env_methoddesc{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
626 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
627 my $class_name = next_optional_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
628 $class_name = $THIS_CLASS
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
629 unless $class_name;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
630 my($method_name,$br_id) = next_argument_id();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
631 my $arg_list = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
632 my $extra = '';
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
633 if ($class_name) {
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
634 $extra = " ($class_name method)";
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
635 }
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
636 my $idx = make_str_index_entry($br_id, "<tt>$method_name()</tt>$extra");
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
637 $idx =~ s/ \(.*\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
638 $idx =~ s/\(\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
639 "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
640 }
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
641
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
642
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
643 sub do_env_methoddescni{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
644 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
645 next_optional_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
646 my $method = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
647 my $arg_list = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
648 "<dl><dt><b>$method</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
649 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
650
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
651
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
652 sub do_env_memberdesc{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
653 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
654 my $class = next_optional_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
655 my($member,$br_id) = next_argument();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
656 $class = $THIS_CLASS
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
657 unless $class;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
658 my $extra = '';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
659 $extra = " ($class_name attribute)"
8027
f5326d358662 Fix typo. (What I get for trying to fix bugs at home and running conversions
Fred Drake <fdrake@acm.org>
parents: 8026
diff changeset
660 if (!($class eq ''));
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
661 my $idx = make_str_index_entry($br_id, "<tt>$member</tt>$extra");
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
662 $idx =~ s/ \(.*\)//;
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
663 $idx =~ s/\(\)//;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
664 "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
665 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
666
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
667
8086
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
668 sub do_cmd_memberline{
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
669 local($_) = @_;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
670 my $class = next_optional_argument();
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
671 my($member,$br_id) = next_argument_id();
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
672 $class = $THIS_CLASS
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
673 unless $class;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
674 my $extra = '';
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
675 $extra = " ($class_name attribute)"
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
676 if (!($class eq ''));
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
677 my $idx = make_str_index_entry($br_id, "<tt>$member</tt>$extra");
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
678 $idx =~ s/ \(.*\)//;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
679 $idx =~ s/\(\)//;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
680 "<dt><b>$idx</b><dd>" . $_;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
681 }
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
682
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
683 sub do_env_memberdescni{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
684 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
685 next_optional_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
686 my $member = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
687 "<dl><dt><b>$member</b>\n<dd>" . $_ . '</dl>';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
688 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
689
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
690
8086
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
691 sub do_cmd_memberlineni{
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
692 local($_) = @_;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
693 next_optional_argument();
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
694 my $member = next_argument();
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
695 "<dt><b>$member</b><dd>" . $_;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
696 }
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
697
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
698 @col_aligns = ("<td>", "<td>", "<td>", "<td>");
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
699
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
700 sub setup_column_alignments{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
701 local($_) = @_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
702 my($a1,$a2,$a3,$a4) = split(/[|]/,$_);
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
703 my($th1,$th2,$th3,$th4) = ('<th>', '<th>', '<th>', '<th>');
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
704 $col_aligns[0] = (($a1 eq 'c') ? '<td align=center>' : '<td>');
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
705 $col_aligns[1] = (($a2 eq 'c') ? '<td align=center>' : '<td>');
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
706 $col_aligns[2] = (($a3 eq 'c') ? '<td align=center>' : '<td>');
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
707 $col_aligns[3] = (($a4 eq 'c') ? '<td align=center>' : '<td>');
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
708 # return the aligned header start tags; only used for \begin{tableiii?}
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
709 $th1 = (($a1 eq 'l') ? '<th align=left>'
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
710 : ($a1 eq 'r' ? '<th align=right>' : '<th>'));
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
711 $th2 = (($a2 eq 'l') ? '<th align=left>'
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
712 : ($a2 eq 'r' ? '<th align=right>' : '<th>'));
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
713 $th3 = (($a3 eq 'l') ? '<th align=left>'
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
714 : ($a3 eq 'r' ? '<th align=right>' : '<th>'));
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
715 $th4 = (($a4 eq 'l') ? '<th align=left>'
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
716 : ($a4 eq 'r' ? '<th align=right>' : '<th>'));
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
717 ($th1, $th2, $th3, $th4);
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
718 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
719
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
720 sub do_env_tableii{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
721 local($_) = @_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
722 my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument());
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
723 my $font = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
724 my $h1 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
725 my $h2 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
726 $font = ''
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
727 if ($font eq 'textrm');
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
728 $globals{'lineifont'} = $font;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
729 '<table border align=center>'
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
730 . "\n <tr>$th1<b>$h1</b></th>"
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
731 . "\n $th2<b>$h2</b></th>"
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
732 . $_
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
733 . "\n</table>";
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
734 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
735
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
736 sub do_cmd_lineii{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
737 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
738 my $c1 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
739 my $c2 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
740 my($font,$sfont,$efont) = ($globals{'lineifont'}, '', '');
7798
49f11eb4eb9a This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents: 7779
diff changeset
741 if ($font) {
7937
f223bf61b4ee do_cmd_lineii(),
Fred Drake <fdrake@acm.org>
parents: 7909
diff changeset
742 $sfont = "<$font>";
7798
49f11eb4eb9a This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents: 7779
diff changeset
743 $efont = "</$font>";
49f11eb4eb9a This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents: 7779
diff changeset
744 }
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
745 my($c1align,$c2align) = @col_aligns[0,1];
7937
f223bf61b4ee do_cmd_lineii(),
Fred Drake <fdrake@acm.org>
parents: 7909
diff changeset
746 "<tr>$c1align$sfont$c1$efont</td>\n"
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
747 . " $c2align$c2</td>"
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
748 . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
749 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
750
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
751 sub do_env_tableiii{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
752 local($_) = @_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
753 my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument());
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
754 my $font = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
755 my $h1 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
756 my $h2 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
757 my $h3 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
758 $font = ''
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
759 if ($font eq 'textrm');
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
760 $globals{'lineifont'} = $font;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
761 '<table border align=center>'
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
762 . "\n <tr>$th1<b>$h1</b></th>"
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
763 . "\n $th2<b>$h2</b></th>"
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
764 . "\n $th3<b>$h3</b></th>"
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
765 . $_
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
766 . "\n</table>";
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
767 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
768
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
769 sub do_cmd_lineiii{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
770 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
771 my $c1 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
772 my $c2 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
773 my $c3 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
774 my($font,$sfont,$efont) = ($globals{'lineifont'}, '', '');
7798
49f11eb4eb9a This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents: 7779
diff changeset
775 if ($font) {
7937
f223bf61b4ee do_cmd_lineii(),
Fred Drake <fdrake@acm.org>
parents: 7909
diff changeset
776 $sfont = "<$font>";
7798
49f11eb4eb9a This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents: 7779
diff changeset
777 $efont = "</$font>";
49f11eb4eb9a This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents: 7779
diff changeset
778 }
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
779 my($c1align,$c2align,$c3align) = @col_aligns[0,1,2];
7937
f223bf61b4ee do_cmd_lineii(),
Fred Drake <fdrake@acm.org>
parents: 7909
diff changeset
780 "<tr>$c1align$sfont$c1$efont</td>\n"
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
781 . " $c2align$c2</td>\n"
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
782 . " $c3align$c3</td>"
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
783 . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
784 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
785
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
786 sub do_env_tableiv{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
787 local($_) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
788 my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument());
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
789 my $font = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
790 my $h1 = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
791 my $h2 = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
792 my $h3 = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
793 my $h4 = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
794 $font = ''
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
795 if ($font eq 'textrm');
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
796 $globals{'lineifont'} = $font;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
797 '<table border align=center>'
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
798 . "\n <tr>$th1<b>$h1</b></th>"
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
799 . "\n $th2<b>$h2</b></th>"
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
800 . "\n $th3<b>$h3</b></th>"
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
801 . "\n $th4<b>$h4</b></th>"
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
802 . $_
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
803 . "\n</table>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
804 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
805
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
806 sub do_cmd_lineiv{
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
807 local($_) = @_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
808 my $c1 = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
809 my $c2 = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
810 my $c3 = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
811 my $c4 = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
812 my($font,$sfont,$efont) = ($globals{'lineifont'}, '', '');
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
813 if ($font) {
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
814 $sfont = "<$font>";
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
815 $efont = "</$font>";
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
816 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
817 my($c1align,$c2align,$c3align,$c4align) = @col_aligns;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
818 "<tr>$c1align$sfont$c1$efont</td>\n"
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
819 . " $c2align$c2</td>\n"
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
820 . " $c3align$c3</td>\n"
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
821 . " $c4align$c4</td>"
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
822 . $_;
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
823 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
824
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
825 sub do_cmd_maketitle {
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
826 local($_) = @_;
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
827 my $the_title = '';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
828 if ($t_title) {
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
829 $the_title .= "<h1 align=center>$t_title</h1>";
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
830 } else { write_warnings("\nThis document has no title."); }
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
831 $the_title .= "\n<center>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
832 if ($t_author) {
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
833 if ($t_authorURL) {
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
834 my $href = translate_commands($t_authorURL);
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
835 $href = make_named_href('author', $href, "<strong>${t_author}</strong>");
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
836 $the_title .= "\n<p>$href</p>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
837 } else {
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
838 $the_title .= "\n<p><strong>$t_author</strong></p>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
839 }
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
840 } else { write_warnings("\nThere is no author for this document."); }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
841 if ($t_institute) {
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
842 $the_title .= "\n<p>$t_institute</p>";}
8342
22815a0b1267 Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents: 8294
diff changeset
843 if ($DEVELOPER_ADDRESS) {
22815a0b1267 Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents: 8294
diff changeset
844 $the_title .= "\n<p>$DEVELOPER_ADDRESS</p>";}
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
845 if ($t_affil) {
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
846 $the_title .= "\n<p><i>$t_affil</i></p>";}
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
847 if ($t_date) {
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
848 $the_title .= "\n<p><strong>$t_date</strong>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
849 if ($PYTHON_VERSION) {
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
850 $the_title .= "<br><strong>Release $PYTHON_VERSION</strong>";}
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
851 $the_title .= "</p>"
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
852 }
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
853 $the_title .= "\n</center>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
854 if ($t_address) {
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
855 $the_title .= "\n<p>$t_address</p>";
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
856 } else { $the_title .= "\n<p>"}
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
857 if ($t_email) {
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
858 $the_title .= "\n<p>$t_email</p>";
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
859 }# else { $the_title .= "</p>" }
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
860 $the_title . "<hr>\n" . $_ ;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
861 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
862
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
863
8397
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
864 #
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
865 # Module synopsis support
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
866 #
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
867
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
868 require SynopsisTable;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
869
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
870 $MY_CHAPTER_COUNTER = 0;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
871
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
872 sub get_chapter_id{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
873 return $MY_CHAPTER_COUNTER;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
874 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
875
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
876 sub get_synopsis_table{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
877 my $chap = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
878 my $st = $ModuleSynopses{$chap};
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
879 if (!$st) {
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
880 $st = SynopsisTable->new();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
881 $ModuleSynopses{$chap} = $st;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
882 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
883 return $st;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
884 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
885
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
886 sub do_cmd_declaremodule{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
887 local($_) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
888 my $key = next_optional_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
889 my $type = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
890 my $name = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
891 my $st = get_synopsis_table(get_chapter_id());
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
892 #
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
893 $key = $name unless $key;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
894 $type = 'built-in' if $type eq 'builtin';
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
895 $st->declare($name, $key, $type);
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
896 define_module($type, $name);
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
897 anchor_label("module-$key",$CURRENT_FILE,$_)
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
898 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
899
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
900 sub do_cmd_modulesynopsis{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
901 local($_) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
902 my $st = get_synopsis_table(get_chapter_id());
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
903 $st->set_synopsis($THIS_MODULE, next_argument());
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
904 swallow_newline();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
905 $_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
906 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
907
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
908 sub do_cmd_localmoduletable{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
909 local($_) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
910 $MY_CHAPTER_COUNTER = $MY_CHAPTER_COUNTER + 1;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
911 my $chap = get_chapter_id();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
912 "<tex2htmllocalmoduletable><$chap>" . $_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
913 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
914
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
915 sub process_all_localmoduletables{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
916 while (/<tex2htmllocalmoduletable><(\d+)>/) {
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
917 my $chap = $1;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
918 my $st = get_synopsis_table($chap);
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
919 my $data = $st->tohtml();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
920 s/$&/$data/;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
921 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
922 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
923
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
924
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
925 #
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
926 # "See also:" -- references placed at the end of a \section
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
927 #
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
928
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
929 sub do_env_seealso{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
930 "<p><b>See Also:</b></p>\n" . @_[0];
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
931 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
932
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
933 sub do_cmd_seemodule{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
934 # Insert the right magic to jump to the module definition. This should
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
935 # work most of the time, at least for repeat builds....
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
936 local($_) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
937 my $key = next_optional_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
938 my $module = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
939 my $text = next_argument();
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
940 $key = $module
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
941 unless $key;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
942 "<p>Module <tt><b><a href=\"module-$key.html\">$module</a></b></tt>"
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
943 . "&nbsp;&nbsp;&nbsp;($text)</p>"
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
944 . $_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
945 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
946
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
947 sub do_cmd_seetext{
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
948 '<p>' . @_[0];
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
949 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
950
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
951
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
952 #
8397
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
953 # Definition list support.
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
954 #
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
955
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
956 sub do_env_definitions{
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
957 local($_) = @_;
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
958 swallow_newline();
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
959 "<dl>$_</dl>\n";
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
960 }
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
961
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
962 sub do_cmd_term{
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
963 local($_) = @_;
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
964 my($term, $id) = next_argument_id();
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
965 my($name,$aname,$ahref) = link_info($id);
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
966 swallow_newline();
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
967 # could easily add an index entry here...
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
968 "<dt><b>$aname" . $term . "</a></b>\n<dd>" . $_;
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
969 }
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
970
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
971
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
972 1; # This must be the last line