annotate Doc/perl/python.perl @ 14521:9fed4eebc586 legacy-trunk

\seetitle: New macro for building reference list content.
author Fred Drake <fdrake@acm.org>
date Tue, 12 Sep 2000 17:52:33 +0000
parents 334d9aebaaf1
children 4ac09e970828
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
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
12 sub next_argument{
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
13 my $param;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
14 $param = missing_braces()
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
15 unless ((s/$next_pair_pr_rx/$param=$2;''/eo)
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
16 ||(s/$next_pair_rx/$param=$2;''/eo));
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
17 return $param;
8074
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_optional_argument{
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
21 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
22 s/$rx/$param=$2;''/eo;
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
23 return $param;
8074
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
8344
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
26
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
27 # 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
28 # (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
29 # 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
30 #
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
31 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
32 local($_) = @_;
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
33 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
34 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
35 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
36 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
37 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
38 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
39 }
8346
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
40 else {
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
41 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
42 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
43 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
44 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
45 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
46 }
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
47 else {
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
48 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
49 }
1b393db00b1a Extend handling for \let a bit, to also allow \let\something=<character>. We
Fred Drake <fdrake@acm.org>
parents: 8344
diff changeset
50 }
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
51 return $_;
8344
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
52 }
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
53
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
54
12928
59e494c0802f do_cmd_textasciitilde(): New function.
Fred Drake <fdrake@acm.org>
parents: 12637
diff changeset
55 # the older version of LaTeX2HTML we use doesn't support this, but we use it:
59e494c0802f do_cmd_textasciitilde(): New function.
Fred Drake <fdrake@acm.org>
parents: 12637
diff changeset
56
59e494c0802f do_cmd_textasciitilde(): New function.
Fred Drake <fdrake@acm.org>
parents: 12637
diff changeset
57 sub do_cmd_textasciitilde{ '~' . @_[0]; }
59e494c0802f do_cmd_textasciitilde(): New function.
Fred Drake <fdrake@acm.org>
parents: 12637
diff changeset
58
59e494c0802f do_cmd_textasciitilde(): New function.
Fred Drake <fdrake@acm.org>
parents: 12637
diff changeset
59
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
60 # 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
61
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
62 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
63 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
64 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
65 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
66 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
67 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
68 sub do_cmd_EOF{ 'EOF' . @_[0]; }
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
69 sub do_cmd_NULL{ '<tt class="constant">NULL</tt>' . @_[0]; }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
70
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
71 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
72
8342
22815a0b1267 Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents: 8294
diff changeset
73 $DEVELOPER_ADDRESS = '';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
74 $PYTHON_VERSION = '';
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
75
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
76 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
77 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
78 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
79 $PYTHON_VERSION = next_argument();
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
80 return $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
81 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
82
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
83 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
84 local($_) = @_;
8342
22815a0b1267 Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents: 8294
diff changeset
85 $DEVELOPER_ADDRESS = next_argument();
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
86 return $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
87 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
88
8344
d2d82f7b419a do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents: 8342
diff changeset
89 #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
90 #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
91 #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
92
7527
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_hackscore{
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
94 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
95 next_argument();
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
96 return '_' . $_;
7527
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
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
99 sub use_wrappers{
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
100 local($_,$before,$after) = @_;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
101 my $stuff = next_argument();
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
102 return $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
103 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
104
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
105 sub use_sans_serif{
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
106 return use_wrappers(@_[0], '<font face="sans-serif">', '</font>');
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
107 }
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
108 sub use_italics{
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
109 return use_wrappers(@_[0], '<i>', '</i>');
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
110 }
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
111
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
112 sub do_cmd_optional{
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
113 return use_wrappers(@_[0], "</var><big>\[</big><var>",
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
114 "</var><big>\]</big><var>");
7802
dffe1e470e6c Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents: 7798
diff changeset
115 }
dffe1e470e6c Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents: 7798
diff changeset
116
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
117 # Logical formatting (some based on texinfo), needs to be converted to
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
118 # minimalist HTML. The "minimalist" is primarily to reduce the size of
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
119 # output files for users that read them over the network rather than
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
120 # 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
121
10464
f74ef1971bd1 Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents: 10327
diff changeset
122 # \file and \samp are at the end of this file since they screw up fontlock.
f74ef1971bd1 Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents: 10327
diff changeset
123
10100
9184862bd8d1 More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents: 10077
diff changeset
124 sub do_cmd_pytype{ return @_[0]; }
13831
c3783a33f84b do_cmd_moreargs(),
Fred Drake <fdrake@acm.org>
parents: 13077
diff changeset
125 sub do_cmd_makevar{
c3783a33f84b do_cmd_moreargs(),
Fred Drake <fdrake@acm.org>
parents: 13077
diff changeset
126 return use_wrappers(@_[0], '<span class="makevar">', '</span>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
127 sub do_cmd_code{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
128 return use_wrappers(@_[0], '<code>', '</code>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
129 sub do_cmd_module{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
130 return use_wrappers(@_[0], '<tt class="module">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
131 sub do_cmd_keyword{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
132 return use_wrappers(@_[0], '<tt class="keyword">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
133 sub do_cmd_exception{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
134 return use_wrappers(@_[0], '<tt class="exception">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
135 sub do_cmd_class{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
136 return use_wrappers(@_[0], '<tt class="class">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
137 sub do_cmd_function{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
138 return use_wrappers(@_[0], '<tt class="function">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
139 sub do_cmd_constant{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
140 return use_wrappers(@_[0], '<tt class="constant">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
141 sub do_cmd_member{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
142 return use_wrappers(@_[0], '<tt class="member">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
143 sub do_cmd_method{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
144 return use_wrappers(@_[0], '<tt class="method">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
145 sub do_cmd_cfunction{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
146 return use_wrappers(@_[0], '<tt class="cfunction">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
147 sub do_cmd_cdata{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
148 return use_wrappers(@_[0], '<tt class="cdata">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
149 sub do_cmd_ctype{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
150 return use_wrappers(@_[0], '<tt class="ctype">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
151 sub do_cmd_regexp{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
152 return use_wrappers(@_[0], '<tt class="regexp">', '</tt>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
153 sub do_cmd_character{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
154 return use_wrappers(@_[0], '"<tt class="character">', '</tt>"'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
155 sub do_cmd_program{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
156 return use_wrappers(@_[0], '<b class="program">', '</b>'); }
11449
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
157 sub do_cmd_programopt{
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
158 return use_wrappers(@_[0], '<b class="programopt">', '</b>'); }
12376
6ce6c23acd14 do_cmd_longprogramopt(): New function.
Fred Drake <fdrake@acm.org>
parents: 12350
diff changeset
159 sub do_cmd_longprogramopt{
6ce6c23acd14 do_cmd_longprogramopt(): New function.
Fred Drake <fdrake@acm.org>
parents: 12350
diff changeset
160 # note that the --- will be later converted to -- by LaTeX2HTML
6ce6c23acd14 do_cmd_longprogramopt(): New function.
Fred Drake <fdrake@acm.org>
parents: 12350
diff changeset
161 return use_wrappers(@_[0], '<b class="programopt">---', '</b>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
162 sub do_cmd_email{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
163 return use_wrappers(@_[0], '<span class="email">', '</span>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
164 sub do_cmd_mimetype{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
165 return use_wrappers(@_[0], '<span class="mimetype">', '</span>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
166 sub do_cmd_var{
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
167 return use_wrappers(@_[0], "<var>", "</var>"); }
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
168 sub do_cmd_dfn{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
169 return use_wrappers(@_[0], '<i class="dfn">', '</i>'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
170 sub do_cmd_emph{
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
171 return use_italics(@_); }
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
172 sub do_cmd_file{
13831
c3783a33f84b do_cmd_moreargs(),
Fred Drake <fdrake@acm.org>
parents: 13077
diff changeset
173 return use_wrappers(@_[0], '<span class="file">', '</span>'); }
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
174 sub do_cmd_filenq{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
175 return do_cmd_file(@_[0]); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
176 sub do_cmd_samp{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
177 return use_wrappers(@_[0], '"<tt class="samp">', '</tt>"'); }
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
178 sub do_cmd_kbd{
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
179 return use_wrappers(@_[0], '<kbd>', '</kbd>'); }
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
180 sub do_cmd_strong{
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
181 return use_wrappers(@_[0], '<b>', '</b>'); }
10464
f74ef1971bd1 Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents: 10327
diff changeset
182 sub do_cmd_textbf{
f74ef1971bd1 Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents: 10327
diff changeset
183 return use_wrappers(@_[0], '<b>', '</b>'); }
f74ef1971bd1 Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents: 10327
diff changeset
184 sub do_cmd_textit{
f74ef1971bd1 Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents: 10327
diff changeset
185 return use_wrappers(@_[0], '<i>', '</i>'); }
f74ef1971bd1 Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents: 10327
diff changeset
186
13831
c3783a33f84b do_cmd_moreargs(),
Fred Drake <fdrake@acm.org>
parents: 13077
diff changeset
187 sub do_cmd_moreargs{
c3783a33f84b do_cmd_moreargs(),
Fred Drake <fdrake@acm.org>
parents: 13077
diff changeset
188 return '...' . @_[0]; }
c3783a33f84b do_cmd_moreargs(),
Fred Drake <fdrake@acm.org>
parents: 13077
diff changeset
189 sub do_cmd_unspecified{
c3783a33f84b do_cmd_moreargs(),
Fred Drake <fdrake@acm.org>
parents: 13077
diff changeset
190 return '...' . @_[0]; }
c3783a33f84b do_cmd_moreargs(),
Fred Drake <fdrake@acm.org>
parents: 13077
diff changeset
191
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
192
9867
c95fff8f180a do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents: 9848
diff changeset
193 sub do_cmd_refmodule{
c95fff8f180a do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents: 9848
diff changeset
194 # Insert the right magic to jump to the module definition.
c95fff8f180a do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents: 9848
diff changeset
195 local($_) = @_;
c95fff8f180a do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents: 9848
diff changeset
196 my $key = next_optional_argument();
c95fff8f180a do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents: 9848
diff changeset
197 my $module = next_argument();
c95fff8f180a do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents: 9848
diff changeset
198 $key = $module
c95fff8f180a do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents: 9848
diff changeset
199 unless $key;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
200 return "<tt class='module'><a href='module-$key.html'>$module</a></tt>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
201 . $_;
9867
c95fff8f180a do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents: 9848
diff changeset
202 }
c95fff8f180a do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents: 9848
diff changeset
203
7779
1c420699d58a Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents: 7760
diff changeset
204 sub do_cmd_newsgroup{
1c420699d58a Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents: 7760
diff changeset
205 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
206 my $newsgroup = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
207 my $stuff = "<span class='newsgroup'><a href='news:$newsgroup'>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
208 . "$newsgroup</a></span>";
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
209 return $stuff . $_;
7779
1c420699d58a Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents: 7760
diff changeset
210 }
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
211
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
212 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
213 local($_) = @_;
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
214 my $envvar = next_argument();
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
215 my($name,$aname,$ahref) = new_link_info();
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
216 # 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
217 # 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
218 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
219 $ahref);
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
220 add_index_entry("$envvar@\$$envvar", $ahref);
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
221 $aname =~ s/<a/<a class="envvar"/;
11316
00d577e44d34 Remove some <SPAN> elements that were used only to carry a CLASS
Fred Drake <fdrake@acm.org>
parents: 11313
diff changeset
222 return "$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
223 }
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
224
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
225 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
226 # 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
227 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
228 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
229 $url =~ s/~/&#126;/g;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
230 return "<a class=\"url\" href=\"$url\">$url</a>" . $_;
7527
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
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
233 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
234 # 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
235 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
236 my $page = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
237 my $section = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
238 return "<span class='manpage'><i>$page</i>($section)</span>" . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
239 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
240
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
241 sub get_pep_url{
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
242 my $rfcnum = sprintf("%04d", @_[0]);
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
243 return "http://python.sourceforge.net/peps/pep-$rfcnum.html";
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
244 }
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
245
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
246 sub do_cmd_pep{
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
247 local($_) = @_;
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
248 my $rfcnumber = next_argument();
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
249 my $id = "rfcref-" . ++$global{'max_id'};
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
250 my $href = get_pep_url($rfcnumber);
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
251 # Save the reference
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
252 my $nstr = gen_index_id("Python Enhancement Proposals!PEP $rfcnumber", '');
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
253 $index{$nstr} .= make_half_href("$CURRENT_FILE#$id");
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
254 return ("<a class=\"rfc\" name=\"$id\"\nhref=\"$href\">PEP $rfcnumber</a>"
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
255 . $_);
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
256 }
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
257
12499
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
258 sub get_rfc_url{
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
259 my $rfcnum = sprintf("%04d", @_[0]);
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
260 return "http://www.ietf.org/rfc/rfc$rfcnum.txt";
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
261 }
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
262
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
263 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
264 local($_) = @_;
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
265 my $rfcnumber = next_argument();
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
266 my $id = "rfcref-" . ++$global{'max_id'};
12499
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
267 my $href = get_rfc_url($rfcnumber);
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
268 # Save the reference
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
269 my $nstr = gen_index_id("RFC!RFC $rfcnumber", '');
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
270 $index{$nstr} .= make_half_href("$CURRENT_FILE#$id");
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
271 return ("<a class=\"rfc\" name=\"$id\"\nhref=\"$href\">RFC $rfcnumber</a>"
11313
b1bb6d7a335f do_cmd_rfc(): Simplify the generated markup.
Fred Drake <fdrake@acm.org>
parents: 11123
diff changeset
272 . $_);
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
273 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
274
11449
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
275 sub do_cmd_citetitle{
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
276 local($_) = @_;
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
277 my $url = next_optional_argument();
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
278 my $title = next_argument();
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
279 my $repl = '';
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
280 if ($url) {
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
281 $repl = ("<em class='citetitle'><a\n"
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
282 . " href='$url'\n"
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
283 . " title='$title'\n"
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
284 . " >$title</a></em>");
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
285 }
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
286 else {
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
287 $repl = "<em class='citetitle'\n >$title</em>";
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
288 }
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
289 return $repl . $_;
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
290 }
e0fe4c7a9eff do_cmd_programopt(): New function, similar to do_cmd_program().
Fred Drake <fdrake@acm.org>
parents: 11316
diff changeset
291
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
292 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
293 # 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
294 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
295 my $release = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
296 my $reason = next_argument();
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
297 return "<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
298 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
299
8763
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
300 sub do_cmd_versionadded{
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
301 # one parameter: \versionadded{version}
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
302 local($_) = @_;
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
303 my $release = next_argument();
10077
80b215249b17 Make \versionadded and \versionchanged less prominant -- neither bold
Fred Drake <fdrake@acm.org>
parents: 9867
diff changeset
304 return "\nNew in version $release.\n" . $_;
8763
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
305 }
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
306
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
307 sub do_cmd_versionchanged{
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
308 # one parameter: \versionchanged{version}
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
309 local($_) = @_;
12551
bef675dc11cc do_cmd_versionchanged():
Fred Drake <fdrake@acm.org>
parents: 12499
diff changeset
310 my $explanation = next_optional_argument();
8763
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
311 my $release = next_argument();
12551
bef675dc11cc do_cmd_versionchanged():
Fred Drake <fdrake@acm.org>
parents: 12499
diff changeset
312 my $text = "\nChanged in version $release.\n";
bef675dc11cc do_cmd_versionchanged():
Fred Drake <fdrake@acm.org>
parents: 12499
diff changeset
313 if ($release) {
bef675dc11cc do_cmd_versionchanged():
Fred Drake <fdrake@acm.org>
parents: 12499
diff changeset
314 $text = "\nChanged in version $release:\n$explanation.\n";
bef675dc11cc do_cmd_versionchanged():
Fred Drake <fdrake@acm.org>
parents: 12499
diff changeset
315 }
bef675dc11cc do_cmd_versionchanged():
Fred Drake <fdrake@acm.org>
parents: 12499
diff changeset
316 return $text . $_;
8763
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
317 }
55f790a5f64b do_cmd_versionadded(),
Fred Drake <fdrake@acm.org>
parents: 8756
diff changeset
318
10327
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
319 #
10464
f74ef1971bd1 Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents: 10327
diff changeset
320 # These function handle platform dependency tracking.
10327
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
321 #
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
322 sub do_cmd_platform{
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
323 local($_) = @_;
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
324 my $platform = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
325 $ModulePlatforms{"<tt class='module'>$THIS_MODULE</tt>"} = $platform;
10327
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
326 $platform = "Macintosh"
10637
bed15a015c1c Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents: 10598
diff changeset
327 if $platform eq 'Mac';
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
328 return "\n<p class='availability'>Availability: <span"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
329 . "\n class='platform'>$platform</span>.</p>\n" . $_;
10327
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
330 }
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
331
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
332 $IGNORE_PLATFORM_ANNOTATION = '';
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
333 sub do_cmd_ignorePlatformAnnotation{
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
334 local($_) = @_;
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
335 $IGNORE_PLATFORM_ANNOTATION = next_argument();
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
336 return $_;
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
337 }
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
338
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 # index commands
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
341
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
342 $INDEX_SUBITEM = "";
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
343
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
344 sub get_indexsubitem{
9769
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
345 return $INDEX_SUBITEM ? " $INDEX_SUBITEM" : '';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
346 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
347
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
348 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
349 local($_) = @_;
10138
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
350 $INDEX_SUBITEM = next_argument();
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
351 return $_;
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
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
354 sub do_cmd_withsubitem{
9769
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
355 # We can't really do the right thing, because LaTeX2HTML doesn't
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
356 # 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
357 # 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
358 #
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
359 local($_) = @_;
9769
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
360 my $oldsubitem = $INDEX_SUBITEM;
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
361 $INDEX_SUBITEM = next_argument();
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
362 my $stuff = next_argument();
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
363 my $br_id = ++$globals{'max_id'};
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
364 my $marker = "$O$br_id$C";
9769
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
365 return
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
366 $stuff
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
367 . "\\setindexsubitem$marker$oldsubitem$marker"
9769
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
368 . $_;
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
369 }
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
370
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
371 # This is the prologue macro which is required to start writing the
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
372 # mod\jobname.idx file; we can just ignore it. (Defining this suppresses
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
373 # a warning that \makemodindex is unknown.)
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
374 #
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
375 sub do_cmd_makemodindex{ return @_[0]; }
7671
0cf2ffaf4bd7 Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents: 7581
diff changeset
376
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
377 # 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
378 #
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
379 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
380 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
381 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
382 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
383
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
384 # 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
385 # 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
386 #
5eafd3eda0af Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents: 7906
diff changeset
387 $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
388
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
389 sub write_idxfile{
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
390 my ($ahref, $str) = @_;
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
391 print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n";
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
392 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
393
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
394
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
395 sub gen_link{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
396 my($node,$target) = @_;
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
397 print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n";
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
398 return "<a href='$node#$target'>";
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
399 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
400
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
401 sub add_index_entry{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
402 # 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
403 my($str,$ahref) = @_;
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
404 $str = gen_index_id($str, '');
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
405 $index{$str} .= $ahref;
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
406 write_idxfile($ahref, $str);
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
407 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
408
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
409 sub new_link_info{
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
410 my $name = "l2h-" . ++$globals{'max_id'};
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
411 my $aname = "<a name='$name'>";
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
412 my $ahref = gen_link($CURRENT_FILE, $name);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
413 return ($name, $aname, $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
414 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
415
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
416 $IndexMacroPattern = '';
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
417 sub define_indexing_macro{
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
418 my $count = @_;
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
419 my $i = 0;
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
420 for (; $i < $count; ++$i) {
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
421 my $name = @_[$i];
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
422 my $cmd = "idx_cmd_$name";
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
423 die "\nNo function $cmd() defined!\n"
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
424 if (!defined &$cmd);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
425 eval ("sub do_cmd_$name { return process_index_macros("
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
426 . "\@_[0], '$name'); }");
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
427 if (length($IndexMacroPattern) == 0) {
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
428 $IndexMacroPattern = "$name";
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
429 }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
430 else {
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
431 $IndexMacroPattern .= "|$name";
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
432 }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
433 }
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
434 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
435
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
436 $DEBUG_INDEXING = 0;
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
437 sub process_index_macros{
8294
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
438 local($_) = @_;
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
439 my $cmdname = @_[1]; # This is what triggered us in the first place;
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
440 # we know it's real, so just process it.
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
441 my($name,$aname,$ahref) = new_link_info();
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
442 my $cmd = "idx_cmd_$cmdname";
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
443 print "\nIndexing: \\$cmdname"
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
444 if $DEBUG_INDEXING;
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
445 &$cmd($ahref); # modifies $_ and adds index entries
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
446 while (/^[\s\n]*\\($IndexMacroPattern)</) {
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
447 $cmdname = "$1";
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
448 print " \\$cmdname"
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
449 if $DEBUG_INDEXING;
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
450 $cmd = "idx_cmd_$cmdname";
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
451 if (!defined &$cmd) {
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
452 last;
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
453 }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
454 else {
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
455 s/^[\s\n]*\\$cmdname//;
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
456 &$cmd($ahref);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
457 }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
458 }
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
459 return "$aname$anchor_invisible_mark</a>" . $_;
8294
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
460 }
35ea0c073ea3 do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents: 8194
diff changeset
461
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
462 define_indexing_macro('index');
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
463 sub idx_cmd_index{
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
464 my $str = next_argument();
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
465 add_index_entry("$str", @_[0]);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
466 }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
467
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
468 define_indexing_macro('kwindex');
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
469 sub idx_cmd_kwindex{
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
470 my $str = next_argument();
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
471 add_index_entry("<tt>$str</tt>!keyword", @_[0]);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
472 add_index_entry("keyword!<tt>$str</tt>", @_[0]);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
473 }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
474
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
475 define_indexing_macro('indexii');
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
476 sub idx_cmd_indexii{
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
477 my $str1 = next_argument();
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
478 my $str2 = next_argument();
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
479 add_index_entry("$str1!$str2", @_[0]);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
480 add_index_entry("$str2!$str1", @_[0]);
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
481 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
482
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
483 define_indexing_macro('indexiii');
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
484 sub idx_cmd_indexiii{
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
485 my $str1 = next_argument();
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
486 my $str2 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
487 my $str3 = next_argument();
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
488 add_index_entry("$str1!$str2 $str3", @_[0]);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
489 add_index_entry("$str2!$str3, $str1", @_[0]);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
490 add_index_entry("$str3!$str1 $str2", @_[0]);
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
491 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
492
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
493 define_indexing_macro('indexiv');
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
494 sub idx_cmd_indexiv{
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
495 my $str1 = next_argument();
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
496 my $str2 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
497 my $str3 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
498 my $str4 = next_argument();
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
499 add_index_entry("$str1!$str2 $str3 $str4", @_[0]);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
500 add_index_entry("$str2!$str3 $str4, $str1", @_[0]);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
501 add_index_entry("$str3!$str4, $str1 $str2", @_[0]);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
502 add_index_entry("$str4!$$str1 $str2 $str3", @_[0]);
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
503 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
504
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
505 define_indexing_macro('ttindex');
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
506 sub idx_cmd_ttindex{
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
507 my $str = next_argument();
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
508 my $entry = $str . get_indexsubitem();
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
509 add_index_entry($entry, @_[0]);
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
510 }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
511
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
512 sub my_typed_index_helper{
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
513 my($word,$ahref) = @_;
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
514 my $str = next_argument();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
515 add_index_entry("$str $word", $ahref);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
516 add_index_entry("$word!$str", $ahref);
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
517 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
518
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
519 define_indexing_macro('stindex', 'opindex', 'exindex', 'obindex');
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
520 sub idx_cmd_stindex{ my_typed_index_helper('statement', @_[0]); }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
521 sub idx_cmd_opindex{ my_typed_index_helper('operator', @_[0]); }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
522 sub idx_cmd_exindex{ my_typed_index_helper('exception', @_[0]); }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
523 sub idx_cmd_obindex{ my_typed_index_helper('object', @_[0]); }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
524
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
525 define_indexing_macro('bifuncindex');
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
526 sub idx_cmd_bifuncindex{
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
527 my $str = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
528 add_index_entry("<tt class='function'>$str()</tt> (built-in function)",
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
529 @_[0]);
7527
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
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
532
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
533 sub make_mod_index_entry{
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
534 my($str,$define) = @_;
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
535 my($name,$aname,$ahref) = new_link_info();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
536 # equivalent of add_index_entry() using $define instead of ''
10138
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
537 $ahref =~ s/\#[-_a-zA-Z0-9]*\"/\"/
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
538 if ($define eq 'DEF');
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
539 $str = gen_index_id($str, $define);
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
540 $index{$str} .= $ahref;
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
541 write_idxfile($ahref, $str);
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
542
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
543 if ($define eq 'DEF') {
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
544 # add to the module index
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
545 $str =~ /(<tt.*<\/tt>)/;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
546 my $nstr = $1;
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
547 $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
548 }
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
549 return "$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
550 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
551
10327
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
552
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
553 $THIS_MODULE = '';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
554 $THIS_CLASS = '';
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
555
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
556 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
557 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
558 my $section_tag = join('', @curr_sec_id);
10857
1aa80f5bf9ac define_module(): Check the module type for validity before using.
Fred Drake <fdrake@acm.org>
parents: 10849
diff changeset
559 if ($word ne "built-in" && $word ne "extension"
1aa80f5bf9ac define_module(): Check the module type for validity before using.
Fred Drake <fdrake@acm.org>
parents: 10849
diff changeset
560 && $word ne "standard" && $word ne "") {
1aa80f5bf9ac define_module(): Check the module type for validity before using.
Fred Drake <fdrake@acm.org>
parents: 10849
diff changeset
561 write_warnings("Bad module type '$word'"
1aa80f5bf9ac define_module(): Check the module type for validity before using.
Fred Drake <fdrake@acm.org>
parents: 10849
diff changeset
562 . " for \\declaremodule (module $name)");
1aa80f5bf9ac define_module(): Check the module type for validity before using.
Fred Drake <fdrake@acm.org>
parents: 10849
diff changeset
563 $word = "";
1aa80f5bf9ac define_module(): Check the module type for validity before using.
Fred Drake <fdrake@acm.org>
parents: 10849
diff changeset
564 }
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
565 $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
566 $THIS_MODULE = "$name";
10138
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
567 $INDEX_SUBITEM = "(in $name)";
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
568 print "[$name]";
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
569 return make_mod_index_entry(
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
570 "<tt class='module'>$name</tt> (${word}module)", 'DEF');
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
571 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
572
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
573 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
574 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
575 my $name = next_argument();
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
576 return 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
577 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
578
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
579 sub do_cmd_modindex{ return my_module_index_helper('', @_); }
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
580 sub do_cmd_bimodindex{ return my_module_index_helper('built-in', @_); }
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
581 sub do_cmd_exmodindex{ return my_module_index_helper('extension', @_); }
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
582 sub do_cmd_stmodindex{ return 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
583
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
584 sub ref_module_index_helper{
12499
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
585 my($word, $ahref) = @_;
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
586 my $str = next_argument();
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
587 $word = "$word " if $word;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
588 $str = "<tt class='module'>$str</tt> (${word}module)";
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
589 # can't use add_index_entry() since the 2nd arg to gen_index_id() is used;
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
590 # just inline it all here
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
591 $str = gen_index_id($str, 'REF');
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
592 $index{$str} .= $ahref;
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
593 write_idxfile($ahref, $str);
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
594 }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
595
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
596 # these should be adjusted a bit....
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
597 define_indexing_macro('refmodindex', 'refbimodindex',
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
598 'refexmodindex', 'refstmodindex');
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
599 sub idx_cmd_refmodindex{ return ref_module_index_helper('', @_); }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
600 sub idx_cmd_refbimodindex{ return ref_module_index_helper('built-in', @_); }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
601 sub idx_cmd_refexmodindex{ return ref_module_index_helper('extension', @_); }
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
602 sub idx_cmd_refstmodindex{ return 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
603
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
604 sub do_cmd_nodename{ return 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
605
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
606 sub init_myformat{
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
607 # $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
608 $anchor_mark = '';
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
609 $icons{'anchor_mark'} = '';
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
610 }
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
611 init_myformat();
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
612
10849
4da76f838a5e make_index_entry(): Remove. Not only did this override the
Fred Drake <fdrake@acm.org>
parents: 10846
diff changeset
613 # Create an index entry, but include the string in the target anchor
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
614 # 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
615 #
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
616 sub make_str_index_entry{
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
617 my($str) = @_;
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
618 my($name,$aname,$ahref) = new_link_info();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
619 add_index_entry($str, $ahref);
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
620 return "$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
621 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
622
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
623 $REFCOUNTS_LOADED = 0;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
624
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
625 sub load_refcounts{
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
626 $REFCOUNTS_LOADED = 1;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
627
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
628 use File::Basename;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
629 my $myname, $mydir, $myext;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
630 ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
631 chop $mydir; # remove trailing '/'
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
632 ($myname, $mydir, $myext) = fileparse($mydir, '\..*');
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
633 chop $mydir; # remove trailing '/'
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
634 $mydir = getcwd() . "$dd$mydir"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
635 unless $mydir =~ s|^/|/|;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
636 local $_;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
637 my $filename = "$mydir${dd}api${dd}refcounts.dat";
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
638 open(REFCOUNT_FILE, "<$filename") || die "\n$!\n";
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
639 print "[loading API refcount data]";
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
640 while (<REFCOUNT_FILE>) {
12350
c59bdc7fd8a6 load_refcounts(),
Fred Drake <fdrake@acm.org>
parents: 12343
diff changeset
641 if (/([a-zA-Z0-9_]+):PyObject\*:([a-zA-Z0-9_]*):(0|[-+]1|null):(.*)$/) {
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
642 my($func, $param, $count, $comment) = ($1, $2, $3, $4);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
643 #print "\n$func($param) --> $count";
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
644 $REFCOUNTS{"$func:$param"} = $count;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
645 }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
646 }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
647 }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
648
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
649 sub get_refcount{
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
650 my ($func, $param) = @_;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
651 load_refcounts()
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
652 unless $REFCOUNTS_LOADED;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
653 return $REFCOUNTS{"$func:$param"};
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
654 }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
655
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
656 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
657 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
658 my $return_type = next_argument();
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
659 my $function_name = next_argument();
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
660 my $arg_list = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
661 my $idx = make_str_index_entry(
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
662 "<tt class='cfunction'>$function_name()</tt>" . get_indexsubitem());
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
663 $idx =~ s/ \(.*\)//;
13926
b6e07c272487 do_env_cfuncdesc(): Push as much of the generated HTML into one place
Fred Drake <fdrake@acm.org>
parents: 13899
diff changeset
664 $idx =~ s/\(\)//; # ???? - why both of these?
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
665 my $result_rc = get_refcount($function_name, '');
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
666 my $rcinfo = '';
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
667 if ($result_rc eq '+1') {
13926
b6e07c272487 do_env_cfuncdesc(): Push as much of the generated HTML into one place
Fred Drake <fdrake@acm.org>
parents: 13899
diff changeset
668 $rcinfo = 'New reference';
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
669 }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
670 elsif ($result_rc eq '0') {
13926
b6e07c272487 do_env_cfuncdesc(): Push as much of the generated HTML into one place
Fred Drake <fdrake@acm.org>
parents: 13899
diff changeset
671 $rcinfo = 'Borrowed reference';
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
672 }
12350
c59bdc7fd8a6 load_refcounts(),
Fred Drake <fdrake@acm.org>
parents: 12343
diff changeset
673 elsif ($result_rc eq 'null') {
13926
b6e07c272487 do_env_cfuncdesc(): Push as much of the generated HTML into one place
Fred Drake <fdrake@acm.org>
parents: 13899
diff changeset
674 $rcinfo = 'Always <tt class="constant">NULL</tt>';
12350
c59bdc7fd8a6 load_refcounts(),
Fred Drake <fdrake@acm.org>
parents: 12343
diff changeset
675 }
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
676 if ($rcinfo ne '') {
13926
b6e07c272487 do_env_cfuncdesc(): Push as much of the generated HTML into one place
Fred Drake <fdrake@acm.org>
parents: 13899
diff changeset
677 $rcinfo = ( "\n<div class=\"refcount-info\">"
b6e07c272487 do_env_cfuncdesc(): Push as much of the generated HTML into one place
Fred Drake <fdrake@acm.org>
parents: 13899
diff changeset
678 . "\n <span class=\"label\">Return value:</span>"
b6e07c272487 do_env_cfuncdesc(): Push as much of the generated HTML into one place
Fred Drake <fdrake@acm.org>
parents: 13899
diff changeset
679 . "\n <span class=\"value\">$rcinfo.</span>"
b6e07c272487 do_env_cfuncdesc(): Push as much of the generated HTML into one place
Fred Drake <fdrake@acm.org>
parents: 13899
diff changeset
680 . "\n</div>");
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
681 }
10138
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
682 return "<dl><dt>$return_type <b>$idx</b> (<var>$arg_list</var>)\n<dd>"
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
683 . $rcinfo
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
684 . $_
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
685 . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
686 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
687
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
688 sub do_env_csimplemacrodesc{
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
689 local($_) = @_;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
690 my $name = next_argument();
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
691 my $idx = make_str_index_entry("<tt class='macro'>$name</tt>");
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
692 return "<dl><dt><b>$idx</b>\n<dd>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
693 . $_
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
694 . '</dl>'
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
695 }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
696
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
697 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
698 local($_) = @_;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
699 my $index_name = next_optional_argument();
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
700 my $type_name = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
701 $index_name = $type_name
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
702 unless $index_name;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
703 my($name,$aname,$ahref) = new_link_info();
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
704 add_index_entry("<tt class='ctype'>$index_name</tt> (C type)", $ahref);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
705 return "<dl><dt><b><tt class='ctype'>$aname$type_name</a></tt></b>\n<dd>"
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
706 . $_
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
707 . '</dl>'
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
708 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
709
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
710 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
711 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
712 my $var_type = next_argument();
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
713 my $var_name = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
714 my $idx = make_str_index_entry("<tt class='cdata'>$var_name</tt>"
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
715 . get_indexsubitem());
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
716 $idx =~ s/ \(.*\)//;
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
717 return "<dl><dt>$var_type <b>$idx</b>\n"
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
718 . '<dd>'
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
719 . $_
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
720 . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
721 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
722
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
723 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
724 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
725 my $function_name = next_argument();
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
726 my $arg_list = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
727 my $idx = make_str_index_entry("<tt class='function'>$function_name()</tt>"
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
728 . get_indexsubitem());
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
729 $idx =~ s/ \(.*\)//;
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
730 $idx =~ s/\(\)<\/tt>/<\/tt>/;
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
731 return "<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
732 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
733
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
734 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
735 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
736 my $function_name = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
737 my $arg_list = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
738 return "<dl><dt><b><tt class='function'>$function_name</tt></b>"
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
739 . " (<var>$arg_list</var>)\n"
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
740 . '<dd>'
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
741 . $_
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
742 . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
743 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
744
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
745 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
746 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
747 my $function_name = next_argument();
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
748 my $arg_list = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
749 my $prefix = "<tt class='function'>$function_name()</tt>";
10641
f6ec4a9cb0b3 do_cmd_funcline(): Remove some bogus generated stuff from the output
Fred Drake <fdrake@acm.org>
parents: 10637
diff changeset
750 my $idx = make_str_index_entry($prefix . get_indexsubitem());
f6ec4a9cb0b3 do_cmd_funcline(): Remove some bogus generated stuff from the output
Fred Drake <fdrake@acm.org>
parents: 10637
diff changeset
751 $prefix =~ s/\(\)//;
f6ec4a9cb0b3 do_cmd_funcline(): Remove some bogus generated stuff from the output
Fred Drake <fdrake@acm.org>
parents: 10637
diff changeset
752
f6ec4a9cb0b3 do_cmd_funcline(): Remove some bogus generated stuff from the output
Fred Drake <fdrake@acm.org>
parents: 10637
diff changeset
753 return "<dt><b>$prefix</b> (<var>$arg_list</var>)\n<dd>" . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
754 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
755
11123
2eb2879d567f do_cmd_funclineni(): New function; non-indexing form of \funcline.
Fred Drake <fdrake@acm.org>
parents: 10857
diff changeset
756 sub do_cmd_funclineni{
2eb2879d567f do_cmd_funclineni(): New function; non-indexing form of \funcline.
Fred Drake <fdrake@acm.org>
parents: 10857
diff changeset
757 local($_) = @_;
2eb2879d567f do_cmd_funclineni(): New function; non-indexing form of \funcline.
Fred Drake <fdrake@acm.org>
parents: 10857
diff changeset
758 my $function_name = next_argument();
2eb2879d567f do_cmd_funclineni(): New function; non-indexing form of \funcline.
Fred Drake <fdrake@acm.org>
parents: 10857
diff changeset
759 my $arg_list = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
760 my $prefix = "<tt class='function'>$function_name</tt>";
11123
2eb2879d567f do_cmd_funclineni(): New function; non-indexing form of \funcline.
Fred Drake <fdrake@acm.org>
parents: 10857
diff changeset
761
2eb2879d567f do_cmd_funclineni(): New function; non-indexing form of \funcline.
Fred Drake <fdrake@acm.org>
parents: 10857
diff changeset
762 return "<dt><b>$prefix</b> (<var>$arg_list</var>)\n<dd>" . $_;
2eb2879d567f do_cmd_funclineni(): New function; non-indexing form of \funcline.
Fred Drake <fdrake@acm.org>
parents: 10857
diff changeset
763 }
2eb2879d567f do_cmd_funclineni(): New function; non-indexing form of \funcline.
Fred Drake <fdrake@acm.org>
parents: 10857
diff changeset
764
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
765 # 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
766 # 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
767 # module.
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 $INDEX_OPCODES = 0;
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
770
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
771 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
772 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
773 my $opcode_name = next_argument();
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
774 my $arg_list = next_argument();
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
775 my $idx;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
776 if ($INDEX_OPCODES) {
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
777 $idx = make_str_index_entry("<tt class='opcode'>$opcode_name</tt>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
778 . " (byte code instruction)");
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
779 $idx =~ s/ \(byte code instruction\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
780 }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
781 else {
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
782 $idx = "<tt class='opcode'>$opcode_name</tt>";
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
783 }
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
784 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
785 if ($arg_list) {
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
786 $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
787 }
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
788 return $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
789 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
790
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
791 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
792 local($_) = @_;
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
793 my $dataname = next_argument();
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
794 my $idx = make_str_index_entry("<tt>$dataname</tt>" . get_indexsubitem());
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
795 $idx =~ s/ \(.*\)//;
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
796 return "<dl><dt><b>$idx</b>\n<dd>"
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
797 . $_
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
798 . '</dl>';
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
799 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
800
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
801 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
802 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
803 my $idx = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
804 if (! $STRING_INDEX_TT) {
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
805 $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
806 }
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
807 return "<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
808 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
809
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
810 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
811 local($_) = @_;
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
812 my $data_name = next_argument();
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
813 my $idx = make_str_index_entry("<tt>$data_name</tt>" . get_indexsubitem());
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
814 $idx =~ s/ \(.*\)//;
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
815 return "<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
816 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
817
12343
be5100afa1b7 do_cmd_datalineni(): New function, to implement the non-indexing form
Fred Drake <fdrake@acm.org>
parents: 12217
diff changeset
818 sub do_cmd_datalineni{
be5100afa1b7 do_cmd_datalineni(): New function, to implement the non-indexing form
Fred Drake <fdrake@acm.org>
parents: 12217
diff changeset
819 local($_) = @_;
be5100afa1b7 do_cmd_datalineni(): New function, to implement the non-indexing form
Fred Drake <fdrake@acm.org>
parents: 12217
diff changeset
820 my $data_name = next_argument();
be5100afa1b7 do_cmd_datalineni(): New function, to implement the non-indexing form
Fred Drake <fdrake@acm.org>
parents: 12217
diff changeset
821 return "<dt><b><tt>$data_name</tt></b><dd>" . $_;
be5100afa1b7 do_cmd_datalineni(): New function, to implement the non-indexing form
Fred Drake <fdrake@acm.org>
parents: 12217
diff changeset
822 }
be5100afa1b7 do_cmd_datalineni(): New function, to implement the non-indexing form
Fred Drake <fdrake@acm.org>
parents: 12217
diff changeset
823
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
824 sub do_env_excdesc{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
825 local($_) = @_;
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
826 my $excname = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
827 my $idx = make_str_index_entry("<tt class='exception'>$excname</tt>");
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
828 return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
829 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
830
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
831 sub do_env_fulllineitems{ return 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
832
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
833
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
834 sub handle_classlike_descriptor{
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
835 local($_, $what) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
836 $THIS_CLASS = next_argument();
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
837 my $arg_list = next_argument();
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
838 $idx = make_str_index_entry(
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
839 "<tt class='$what'>$THIS_CLASS</tt> ($what in $THIS_MODULE)" );
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
840 $idx =~ s/ \(.*\)//;
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
841 return "<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
842 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
843
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
844 sub do_env_classdesc{
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
845 return handle_classlike_descriptor(@_[0], "class");
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
846 }
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
847
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
848 sub do_env_excclassdesc{
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
849 return handle_classlike_descriptor(@_[0], "exception");
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
850 }
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
851
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
852
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
853 sub do_env_methoddesc{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
854 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
855 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
856 $class_name = $THIS_CLASS
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
857 unless $class_name;
9848
e19cd8ec20a2 do_cmd_methodline(): Fixed reference to method name when generating
Fred Drake <fdrake@acm.org>
parents: 9775
diff changeset
858 my $method = next_argument();
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
859 my $arg_list = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
860 my $extra = '';
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
861 if ($class_name) {
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
862 $extra = " ($class_name method)";
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
863 }
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
864 my $idx = make_str_index_entry("<tt class='method'>$method()</tt>$extra");
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
865 $idx =~ s/ \(.*\)//;
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
866 $idx =~ s/\(\)//;
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
867 return "<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
868 }
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
869
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
870
9769
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
871 sub do_cmd_methodline{
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
872 local($_) = @_;
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
873 my $class_name = next_optional_argument();
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
874 $class_name = $THIS_CLASS
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
875 unless $class_name;
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
876 my $method = next_argument();
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
877 my $arg_list = next_argument();
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
878 my $extra = '';
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
879 if ($class_name) {
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
880 $extra = " ($class_name method)";
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
881 }
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
882 my $idx = make_str_index_entry("<tt class='method'>$method()</tt>$extra");
9769
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
883 $idx =~ s/ \(.*\)//;
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
884 $idx =~ s/\(\)//;
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
885 return "<dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>"
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
886 . $_;
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
887 }
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
888
e1508f72c610 do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents: 9718
diff changeset
889
9085
e943f9c09901 do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents: 8917
diff changeset
890 sub do_cmd_methodlineni{
e943f9c09901 do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents: 8917
diff changeset
891 local($_) = @_;
e943f9c09901 do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents: 8917
diff changeset
892 next_optional_argument();
e943f9c09901 do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents: 8917
diff changeset
893 my $method = next_argument();
e943f9c09901 do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents: 8917
diff changeset
894 my $arg_list = next_argument();
e943f9c09901 do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents: 8917
diff changeset
895 return "<dt><b>$method</b> (<var>$arg_list</var>)\n<dd>"
e943f9c09901 do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents: 8917
diff changeset
896 . $_;
e943f9c09901 do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents: 8917
diff changeset
897 }
e943f9c09901 do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents: 8917
diff changeset
898
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
899 sub do_env_methoddescni{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
900 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
901 next_optional_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
902 my $method = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
903 my $arg_list = next_argument();
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
904 return "<dl><dt><b>$method</b> (<var>$arg_list</var>)\n<dd>"
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
905 . $_
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
906 . '</dl>';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
907 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
908
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
909
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
910 sub do_env_memberdesc{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
911 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
912 my $class = next_optional_argument();
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
913 my $member = next_argument();
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
914 $class = $THIS_CLASS
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
915 unless $class;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
916 my $extra = '';
10637
bed15a015c1c Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents: 10598
diff changeset
917 $extra = " ($class attribute)"
bed15a015c1c Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents: 10598
diff changeset
918 if ($class ne '');
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
919 my $idx = make_str_index_entry("<tt class='member'>$member</tt>$extra");
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
920 $idx =~ s/ \(.*\)//;
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
921 $idx =~ s/\(\)//;
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
922 return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
923 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
924
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
925
8086
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
926 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
927 local($_) = @_;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
928 my $class = next_optional_argument();
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
929 my $member = next_argument();
8086
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
930 $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
931 unless $class;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
932 my $extra = '';
10637
bed15a015c1c Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents: 10598
diff changeset
933 $extra = " ($class attribute)"
bed15a015c1c Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents: 10598
diff changeset
934 if ($class ne '');
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
935 my $idx = make_str_index_entry("<tt class='member'>$member</tt>$extra");
8086
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
936 $idx =~ s/ \(.*\)//;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
937 $idx =~ s/\(\)//;
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
938 return "<dt><b>$idx</b><dd>" . $_;
8086
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
939 }
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
940
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
941 sub do_env_memberdescni{
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
942 local($_) = @_;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
943 next_optional_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
944 my $member = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
945 return "<dl><dt><b><tt class='member'>$member</tt></b>\n<dd>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
946 . $_
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
947 . '</dl>';
7760
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
948 }
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
949
6bfa650f311d Lots and lots and lots.....
Fred Drake <fdrake@acm.org>
parents: 7711
diff changeset
950
8086
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
951 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
952 local($_) = @_;
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
953 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
954 my $member = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
955 return "<dt><b><tt class='member'>$member</tt></b><dd>" . $_;
8086
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
956 }
692be123f547 next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents: 8074
diff changeset
957
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
958 @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
959
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
960 sub fix_font{
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
961 # do a little magic on a font name to get the right behavior in the first
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
962 # column of the output table
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
963 my $font = @_[0];
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
964 if ($font eq 'textrm') {
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
965 $font = '';
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
966 }
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
967 elsif ($font eq 'file' || $font eq 'filenq') {
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
968 $font = 'tt class="file"';
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
969 }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
970 elsif ($font eq 'member') {
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
971 $font = 'tt class="member"';
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
972 }
13077
03b1cc47a86d Support constant as a font name for the first column of a table using the
Fred Drake <fdrake@acm.org>
parents: 12928
diff changeset
973 elsif ($font eq 'constant') {
03b1cc47a86d Support constant as a font name for the first column of a table using the
Fred Drake <fdrake@acm.org>
parents: 12928
diff changeset
974 $font = 'tt class="constant"';
03b1cc47a86d Support constant as a font name for the first column of a table using the
Fred Drake <fdrake@acm.org>
parents: 12928
diff changeset
975 }
13899
25de7193f9fc fix_font(): Handle one more case for the magical first column of tables.
Fred Drake <fdrake@acm.org>
parents: 13831
diff changeset
976 elsif ($font eq 'kbd') {
25de7193f9fc fix_font(): Handle one more case for the magical first column of tables.
Fred Drake <fdrake@acm.org>
parents: 13831
diff changeset
977 $font = 'kbd';
25de7193f9fc fix_font(): Handle one more case for the magical first column of tables.
Fred Drake <fdrake@acm.org>
parents: 13831
diff changeset
978 }
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
979 return $font;
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
980 }
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
981
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
982 sub figure_column_alignment{
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
983 my $a = @_[0];
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
984 my $mark = substr($a, 0, 1);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
985 my $r = '';
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
986 if ($mark eq 'c')
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
987 { $r = ' align="center"'; }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
988 elsif ($mark eq 'r')
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
989 { $r = ' align="right"'; }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
990 elsif ($mark eq 'l')
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
991 { $r = ' align="left"'; }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
992 elsif ($mark eq 'p')
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
993 { $r = ' align="left"'; }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
994 return $r;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
995 }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
996
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
997 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
998 local($_) = @_;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
999 my($s1,$s2,$s3,$s4) = split(/[|]/,$_);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1000 my $a1 = figure_column_alignment($s1);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1001 my $a2 = figure_column_alignment($s2);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1002 my $a3 = figure_column_alignment($s3);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1003 my $a4 = figure_column_alignment($s4);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1004 $col_aligns[0] = "<td$a1 valign=\"baseline\">";
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1005 $col_aligns[1] = "<td$a2>";
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1006 $col_aligns[2] = "<td$a3>";
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1007 $col_aligns[3] = "<td$a4>";
10767
e37074b6e78c do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents: 10641
diff changeset
1008 # return the aligned header start tags
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1009 return ("<th$a1>", "<th$a2>", "<th$a3>", "<th$a4>");
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1010 }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1011
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1012 sub get_table_col1_fonts{
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1013 my $font = $globals{'lineifont'};
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1014 my ($sfont,$efont) = ('', '');
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1015 if ($font) {
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1016 $sfont = "<$font>";
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1017 $efont = "</$font>";
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1018 $efont =~ s/ .*>/>/;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1019 }
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1020 return ($font, $sfont, $efont);
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1021 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1022
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1023 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
1024 local($_) = @_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1025 my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument());
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1026 my $font = fix_font(next_argument());
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1027 my $h1 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1028 my $h2 = next_argument();
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1029 s/[\s\n]+//;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1030 $globals{'lineifont'} = $font;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1031 my $a1 = $col_aligns[0];
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1032 my $a2 = $col_aligns[1];
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1033 s/\\lineii</\\lineii[$a1|$a2]</g;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1034 return '<table border align="center" style="border-collapse: collapse">'
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1035 . "\n <thead>"
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1036 . "\n <tr class=\"tableheader\">"
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1037 . "\n $th1<b>$h1</b>\&nbsp;</th>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1038 . "\n $th2<b>$h2</b>\&nbsp;</th>"
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1039 . "\n </thead>"
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1040 . "\n <tbody valign='baseline'>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1041 . $_
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1042 . "\n </tbody>"
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1043 . "\n</table>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1044 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1045
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1046 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
1047 local($_) = @_;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1048 my $aligns = next_optional_argument();
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1049 my $c1 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1050 my $c2 = next_argument();
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1051 s/[\s\n]+//;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1052 my($font,$sfont,$efont) = get_table_col1_fonts();
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1053 $c2 = '&nbsp;' if ($c2 eq '');
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1054 my($c1align,$c2align) = split('\|', $aligns);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1055 my $padding = '';
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1056 if ($c1align =~ /align="right"/) {
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1057 $padding = '&nbsp;';
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
1058 }
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1059 return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1060 . " $c2align$c2</td>"
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1061 . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1062 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1063
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1064 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
1065 local($_) = @_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1066 my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument());
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1067 my $font = fix_font(next_argument());
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1068 my $h1 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1069 my $h2 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1070 my $h3 = next_argument();
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1071 s/[\s\n]+//;
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1072 $globals{'lineifont'} = $font;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1073 my $a1 = $col_aligns[0];
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1074 my $a2 = $col_aligns[1];
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1075 my $a3 = $col_aligns[2];
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1076 s/\\lineiii</\\lineiii[$a1|$a2|$a3]</g;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1077 return '<table border align="center" style="border-collapse: collapse">'
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1078 . "\n <thead>"
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1079 . "\n <tr$TABLE_HEADER_BGCOLOR>"
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1080 . "\n $th1<b>$h1</b>\&nbsp;</th>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1081 . "\n $th2<b>$h2</b>\&nbsp;</th>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1082 . "\n $th3<b>$h3</b>\&nbsp;</th>"
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1083 . "\n </thead>"
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1084 . "\n <tbody valign='baseline'>"
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1085 . $_
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1086 . "\n </tbody>"
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1087 . "\n</table>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1088 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1089
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1090 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
1091 local($_) = @_;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1092 my $aligns = next_optional_argument();
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1093 my $c1 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1094 my $c2 = next_argument();
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1095 my $c3 = next_argument();
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1096 s/[\s\n]+//;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1097 my($font,$sfont,$efont) = get_table_col1_fonts();
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1098 $c3 = '&nbsp;' if ($c3 eq '');
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1099 my($c1align,$c2align,$c3align) = split('\|', $aligns);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1100 my $padding = '';
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1101 if ($c1align =~ /align="right"/) {
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1102 $padding = '&nbsp;';
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
1103 }
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1104 return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1105 . " $c2align$c2</td>\n"
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1106 . " $c3align$c3</td>"
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1107 . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1108 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1109
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1110 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
1111 local($_) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1112 my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument());
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1113 my $font = fix_font(next_argument());
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1114 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
1115 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
1116 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
1117 my $h4 = next_argument();
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1118 s/[\s\n]+//;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1119 $globals{'lineifont'} = $font;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1120 my $a1 = $col_aligns[0];
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1121 my $a2 = $col_aligns[1];
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1122 my $a3 = $col_aligns[2];
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1123 my $a4 = $col_aligns[3];
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1124 s/\\lineiv</\\lineiv[$a1|$a2|$a3|$a4]</g;
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1125 return '<table border align="center" style="border-collapse: collapse">'
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1126 . "\n <thead>"
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1127 . "\n <tr$TABLE_HEADER_BGCOLOR>"
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1128 . "\n $th1<b>$h1</b>\&nbsp;</th>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1129 . "\n $th2<b>$h2</b>\&nbsp;</th>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1130 . "\n $th3<b>$h3</b>\&nbsp;</th>"
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1131 . "\n $th4<b>$h4</b>\&nbsp;</th>"
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1132 . "\n </thead>"
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1133 . "\n <tbody valign='baseline'>"
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1134 . $_
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1135 . "\n </tbody>"
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1136 . "\n</table>";
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1137 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1138
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1139 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
1140 local($_) = @_;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1141 my $aligns = next_optional_argument();
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1142 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
1143 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
1144 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
1145 my $c4 = next_argument();
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1146 s/[\s\n]+//;
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1147 my($font,$sfont,$efont) = get_table_col1_fonts();
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1148 $c4 = '&nbsp;' if ($c4 eq '');
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1149 my($c1align,$c2align,$c3align,$c4align) = split('\|', $aligns);
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1150 my $padding = '';
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1151 if ($c1align =~ /align="right"/) {
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1152 $padding = '&nbsp;';
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1153 }
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1154 return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
10769
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1155 . " $c2align$c2</td>\n"
1af7a1467088 Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents: 10767
diff changeset
1156 . " $c3align$c3</td>\n"
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1157 . " $c4align$c4</td>"
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1158 . $_;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1159 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1160
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1161
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1162 # These can be used to control the title page appearance;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1163 # they need a little bit of documentation.
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1164 #
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1165 # If $TITLE_PAGE_GRAPHIC is set, it should be the name of a file in the
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1166 # $ICONSERVER directory, or include path information (other than "./"). The
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1167 # default image type will be assumed if an extension is not provided.
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1168 #
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1169 # If specified, the "title page" will contain two colums: one containing the
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1170 # title/author/etc., and the other containing the graphic. Use the other
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1171 # four variables listed here to control specific details of the layout; all
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1172 # are optional.
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1173 #
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1174 # $TITLE_PAGE_GRAPHIC = "my-company-logo";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1175 # $TITLE_PAGE_GRAPHIC_COLWIDTH = "30%";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1176 # $TITLE_PAGE_GRAPHIC_WIDTH = 150;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1177 # $TITLE_PAGE_GRAPHIC_HEIGHT = 150;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1178 # $TITLE_PAGE_GRAPHIC_ON_RIGHT = 0;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1179
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1180 sub make_my_titlepage() {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1181 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
1182 if ($t_title) {
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
1183 $the_title .= "\n<h1>$t_title</h1>";
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1184 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1185 else {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1186 write_warnings("\nThis document has no title.");
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1187 }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1188 if ($t_author) {
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1189 if ($t_authorURL) {
8074
d0ff41746a26 New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents: 8031
diff changeset
1190 my $href = translate_commands($t_authorURL);
10128
0dd4fafefd6c do_cmd_maketitle(): Small nit in creating the "title page".
Fred Drake <fdrake@acm.org>
parents: 10127
diff changeset
1191 $href = make_named_href('author', $href,
0dd4fafefd6c do_cmd_maketitle(): Small nit in creating the "title page".
Fred Drake <fdrake@acm.org>
parents: 10127
diff changeset
1192 "<b><font size='+2'>$t_author</font></b>");
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
1193 $the_title .= "\n<p>$href</p>";
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1194 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1195 else {
10128
0dd4fafefd6c do_cmd_maketitle(): Small nit in creating the "title page".
Fred Drake <fdrake@acm.org>
parents: 10127
diff changeset
1196 $the_title .= ("\n<p><b><font size='+2'>$t_author</font></b></p>");
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1197 }
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1198 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1199 else {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1200 write_warnings("\nThere is no author for this document.");
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1201 }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1202 if ($t_institute) {
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1203 $the_title .= "\n<p>$t_institute</p>";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1204 }
8342
22815a0b1267 Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents: 8294
diff changeset
1205 if ($DEVELOPER_ADDRESS) {
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1206 $the_title .= "\n<p>$DEVELOPER_ADDRESS</p>";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1207 }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1208 if ($t_affil) {
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1209 $the_title .= "\n<p><i>$t_affil</i></p>";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1210 }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1211 if ($t_date) {
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
1212 $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
1213 if ($PYTHON_VERSION) {
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1214 $the_title .= "<br><strong>Release $PYTHON_VERSION</strong>";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1215 }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1216 $the_title .= "</p>"
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1217 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1218 if ($t_address) {
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
1219 $the_title .= "\n<p>$t_address</p>";
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1220 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1221 else {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1222 $the_title .= "\n<p>";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1223 }
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1224 if ($t_email) {
7711
56dcfc27710a Coding cleanups.
Fred Drake <fdrake@acm.org>
parents: 7671
diff changeset
1225 $the_title .= "\n<p>$t_email</p>";
14285
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1226 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1227 return $the_title;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1228 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1229
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1230 use File::Basename;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1231
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1232 sub make_my_titlegraphic() {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1233 my($myname, $mydir, $myext) = fileparse($TITLE_PAGE_GRAPHIC, '\..*');
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1234 chop $mydir;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1235 if ($mydir eq '.') {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1236 $mydir = $ICONSERVER;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1237 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1238 $myext = ".$IMAGE_TYPE"
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1239 unless $myext;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1240 my $graphic = "<td class=\"titlegraphic\"";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1241 $graphic .= " width=\"$TITLE_PAGE_GRAPHIC_COLWIDTH\""
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1242 if ($TITLE_PAGE_GRAPHIC_COLWIDTH);
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1243 $graphic .= "><img";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1244 $graphic .= " width=\"$TITLE_PAGE_GRAPHIC_WIDTH\""
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1245 if ($TITLE_PAGE_GRAPHIC_WIDTH);
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1246 $graphic .= " height=\"$TITLE_PAGE_GRAPHIC_HEIGHT\""
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1247 if ($TITLE_PAGE_GRAPHIC_HEIGHT);
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1248 $graphic .= "\n src=\"$mydir/$myname$myext\"></td>\n";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1249 return $graphic;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1250 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1251
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1252 sub do_cmd_maketitle {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1253 local($_) = @_;
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1254 my $the_title = "\n<div class=\"titlepage\">";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1255 if ($TITLE_PAGE_GRAPHIC) {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1256 if ($TITLE_PAGE_GRAPHIC_ON_RIGHT) {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1257 $the_title .= ("\n<table border=\"0\" width=\"100%\">"
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1258 . "<tr align=\"right\">\n<td>"
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1259 . make_my_titlepage()
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1260 . "</td>\n"
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1261 . make_my_titlegraphic()
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1262 . "</tr>\n</table>");
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1263 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1264 else {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1265 $the_title .= ("\n<table border=\"0\" width=\"100%\"><tr>\n"
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1266 . make_my_titlegraphic()
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1267 . "<td>"
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1268 . make_my_titlepage()
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1269 . "</td></tr>\n</table>");
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1270 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1271 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1272 else {
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1273 $the_title .= ("\n<center>"
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1274 . make_my_titlepage()
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1275 . "\n</center>");
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1276 }
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1277 $the_title .= "\n</div>";
d357ad367f26 Push some table header formatting to the style sheet; this also helps
Fred Drake <fdrake@acm.org>
parents: 13926
diff changeset
1278 return $the_title . $_;
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
1279 $the_title .= "\n</center></div>";
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1280 return $the_title . $_ ;
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1281 }
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1282
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1283
8397
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1284 #
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1285 # 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
1286 #
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1287
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1288 require SynopsisTable;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1289
8756
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1290 sub get_chapter_id(){
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1291 my $id = do_cmd_thechapter('');
8820
9b0dda9a558b get_chapter_id(): Separate two aspects of string replacement to allow the
Fred Drake <fdrake@acm.org>
parents: 8780
diff changeset
1292 $id =~ s/<SPAN CLASS="arabic">(\d+)<\/SPAN>/\1/;
9b0dda9a558b get_chapter_id(): Separate two aspects of string replacement to allow the
Fred Drake <fdrake@acm.org>
parents: 8780
diff changeset
1293 $id =~ s/\.//;
8756
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1294 return $id;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1295 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1296
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1297 # 'chapter' => 'SynopsisTable instance'
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1298 %ModuleSynopses = ();
8756
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1299
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1300 sub get_synopsis_table($){
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1301 my($chap) = @_;
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1302 my $key;
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1303 foreach $key (keys %ModuleSynopses) {
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1304 if ($key eq $chap) {
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1305 return $ModuleSynopses{$chap};
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1306 }
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1307 }
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1308 my $st = SynopsisTable->new();
8756
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1309 $ModuleSynopses{$chap} = $st;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1310 return $st;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1311 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1312
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1313 sub do_cmd_moduleauthor{
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1314 local($_) = @_;
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1315 next_argument();
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1316 next_argument();
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1317 return $_;
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1318 }
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1319
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1320 sub do_cmd_sectionauthor{
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1321 local($_) = @_;
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1322 next_argument();
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1323 next_argument();
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1324 return $_;
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1325 }
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1326
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1327 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
1328 local($_) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1329 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
1330 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
1331 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
1332 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
1333 #
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1334 $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
1335 $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
1336 $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
1337 define_module($type, $name);
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1338 return anchor_label("module-$key",$CURRENT_FILE,$_)
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1339 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1340
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1341 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
1342 local($_) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1343 my $st = get_synopsis_table(get_chapter_id());
10598
c8759ba83552 Fix problem of LaTeX leakage in the module synopsis tables at the
Fred Drake <fdrake@acm.org>
parents: 10464
diff changeset
1344 $st->set_synopsis($THIS_MODULE, translate_commands(next_argument()));
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1345 return $_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1346 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1347
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1348 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
1349 local($_) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1350 my $chap = get_chapter_id();
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1351 my $st = get_synopsis_table($chap);
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1352 $st->set_file("$CURRENT_FILE");
10327
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
1353 return "<tex2html-localmoduletable><$chap>\\tableofchildlinks[off]" . $_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1354 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1355
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1356 sub process_all_localmoduletables{
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1357 my $key;
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1358 my $st, $file;
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1359 foreach $key (keys %ModuleSynopses) {
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1360 $st = $ModuleSynopses{$key};
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1361 $file = $st->get_file();
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1362 if ($file) {
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1363 process_localmoduletables_in_file($file);
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1364 }
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1365 else {
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1366 print "\nsynopsis table $key has no file association";
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1367 }
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1368 }
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1369 }
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1370
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1371 sub process_localmoduletables_in_file{
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1372 my $file = @_[0];
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1373 open(MYFILE, "<$file");
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1374 local($_);
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1375 sysread(MYFILE, $_, 1024*1024);
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1376 close(MYFILE);
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1377 # need to get contents of file in $_
10327
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
1378 while (/<tex2html-localmoduletable><(\d+)>/) {
8756
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1379 my $match = $&;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1380 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
1381 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
1382 my $data = $st->tohtml();
8756
fba8455dcb54 Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents: 8754
diff changeset
1383 s/$match/$data/;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1384 }
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1385 open(MYFILE,">$file");
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1386 print MYFILE $_;
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1387 close(MYFILE);
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1388 }
10327
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
1389 sub process_python_state{
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
1390 process_all_localmoduletables();
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
1391 }
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1392
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1393
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1394 #
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1395 # "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
1396 #
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1397
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1398 sub do_env_seealso{
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1399 return "<div class='seealso'>\n "
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1400 . "<p class='heading'><b>See Also:</b></p>\n"
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
1401 . @_[0]
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
1402 . '</div>';
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1403 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1404
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1405 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
1406 # 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
1407 # 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
1408 local($_) = @_;
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1409 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
1410 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
1411 my $text = next_argument();
10846
b7378df3db56 Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents: 10777
diff changeset
1412 my $period = '.';
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1413 $key = $module
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1414 unless $key;
10846
b7378df3db56 Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents: 10777
diff changeset
1415 if ($text =~ /\.$/) {
b7378df3db56 Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents: 10777
diff changeset
1416 $period = '';
b7378df3db56 Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents: 10777
diff changeset
1417 }
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1418 return '<dl compact class="seemodule">'
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1419 . "\n <dt>Module <b><tt class='module'><a href='module-$key.html'>"
10846
b7378df3db56 Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents: 10777
diff changeset
1420 . "$module</a></tt>:</b>"
b7378df3db56 Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents: 10777
diff changeset
1421 . "\n <dd>$text$period\n </dl>"
10197
de7c0003578f Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents: 10157
diff changeset
1422 . $_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1423 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1424
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1425 sub handle_rfclike_reference{
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1426 local($_, $what) = @_;
12499
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1427 my $rfcnum = next_argument();
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1428 my $title = next_argument();
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1429 my $text = next_argument();
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1430 my $url = get_rfc_url($rfcnum);
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1431 return '<dl compact class="seerfc">'
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1432 . "\n <dt><a href=\"$url\""
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1433 . "\n title=\"$title\""
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1434 . "\n >$what $rfcnum, <em>$title</em></a>:"
12499
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1435 . "\n <dd>$text\n </dl>"
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1436 . $_;
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1437 }
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1438
14491
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1439 sub do_cmd_seepep{
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1440 return handle_rfclike_reference(@_[0], "PEP");
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1441 }
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1442
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1443 sub do_cmd_seerfc{
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1444 return handle_rfclike_reference(@_[0], "RFC");
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1445 }
334d9aebaaf1 Add support for new \pep, \seepep, excclassdesc markup.
Fred Drake <fdrake@acm.org>
parents: 14285
diff changeset
1446
14521
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1447 sub do_cmd_seetitle{
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1448 local($_) = @_;
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1449 my $url = next_optional_argument();
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1450 my $title = next_argument();
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1451 my $text = next_argument();
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1452 if ($url) {
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1453 return '<dl compact class="seetitle">'
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1454 . "\n <dt><em class=\"citetitle\"><a href=\"$url\""
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1455 . "\n class=\"url\">$title</a></em>"
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1456 . "\n <dd>$text\n </dl>"
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1457 . $_;
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1458 }
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1459 return '<dl compact class="seetitle">'
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1460 . "\n <dt><em class=\"citetitle\""
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1461 . "\n >$title</em>"
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1462 . "\n <dd>$text\n </dl>"
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1463 . $_;
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1464 }
9fed4eebc586 \seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents: 14491
diff changeset
1465
12637
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1466 sub do_cmd_seeurl{
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1467 local($_) = @_;
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1468 my $url = next_argument();
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1469 my $text = next_argument();
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1470 return '<dl compact class="seeurl">'
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1471 . "\n <dt><a href=\"$url\""
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1472 . "\n class=\"url\">$url</a>"
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1473 . "\n <dd>$text\n </dl>"
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1474 . $_;
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1475 }
69481cde511d do_cmd_seeurl(): New function.
Fred Drake <fdrake@acm.org>
parents: 12551
diff changeset
1476
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1477 sub do_cmd_seetext{
10767
e37074b6e78c do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents: 10641
diff changeset
1478 local($_) = @_;
e37074b6e78c do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents: 10641
diff changeset
1479 my $content = next_argument();
12217
5ea773413531 Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents: 11449
diff changeset
1480 return '<div class="seetext"><p>' . $content . '</div>' . $_;
8754
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1481 }
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1482
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1483
e88d4e6e4622 Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents: 8397
diff changeset
1484 #
8397
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1485 # Definition list support.
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1486 #
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1487
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1488 sub do_env_definitions{
12499
0780aba97898 ref_module_index_helper(): Use "my" instead of "local".
Fred Drake <fdrake@acm.org>
parents: 12376
diff changeset
1489 return "<dl class='definitions'>" . @_[0] . "</dl>\n";
8397
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1490 }
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1491
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1492 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
1493 local($_) = @_;
9775
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
1494 my $term = next_argument();
b116afb81732 write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents: 9769
diff changeset
1495 my($name,$aname,$ahref) = new_link_info();
8397
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1496 # could easily add an index entry here...
8917
e55a79ff8228 do_cmd_moduleauthor(),
Fred Drake <fdrake@acm.org>
parents: 8820
diff changeset
1497 return "<dt><b>$aname" . $term . "</a></b>\n<dd>" . $_;
8397
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1498 }
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1499
c9b7e926fd86 Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents: 8349
diff changeset
1500
10100
9184862bd8d1 More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents: 10077
diff changeset
1501 process_commands_wrap_deferred(<<_RAW_ARG_DEFERRED_CMDS_);
9184862bd8d1 More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents: 10077
diff changeset
1502 code # {}
10138
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
1503 declaremodule # [] # {} # {}
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
1504 memberline # [] # {}
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
1505 methodline # [] # {} # {}
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
1506 modulesynopsis # {}
10327
66a7d61cfd84 swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents: 10197
diff changeset
1507 platform # {}
10100
9184862bd8d1 More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents: 10077
diff changeset
1508 samp # {}
10138
b21915e6589e Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents: 10128
diff changeset
1509 setindexsubitem # {}
10157
13239b48c469 Minor fix that helps out with the index.
Fred Drake <fdrake@acm.org>
parents: 10149
diff changeset
1510 withsubitem # {} # {}
10100
9184862bd8d1 More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents: 10077
diff changeset
1511 _RAW_ARG_DEFERRED_CMDS_
9184862bd8d1 More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents: 10077
diff changeset
1512
9184862bd8d1 More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents: 10077
diff changeset
1513
7527
26a8771a4cfd Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff changeset
1514 1; # This must be the last line