Mercurial > cpython-lru_cache-weakref
annotate Doc/perl/python.perl @ 10846:b7378df3db56 legacy-trunk
Change the look of \seemodule output to fit in better.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Tue, 11 May 1999 15:42:51 +0000 |
| parents | 966594c6b1e2 |
| children | 4da76f838a5e |
| 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 | 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 | 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 | 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 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
55 # 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
|
56 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
57 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
|
58 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
|
59 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
|
60 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
|
61 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
|
62 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
|
63 sub do_cmd_EOF{ 'EOF' . @_[0]; } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
64 sub do_cmd_NULL{ '<tt>NULL</tt>' . @_[0]; } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
65 |
|
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_e{ '\' . @_[0]; } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
67 |
|
8342
22815a0b1267
Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents:
8294
diff
changeset
|
68 $DEVELOPER_ADDRESS = ''; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
69 $PYTHON_VERSION = ''; |
|
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_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
|
72 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
|
73 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
74 $PYTHON_VERSION = next_argument(); |
| 8917 | 75 return $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
76 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
77 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
78 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
|
79 local($_) = @_; |
|
8342
22815a0b1267
Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents:
8294
diff
changeset
|
80 $DEVELOPER_ADDRESS = next_argument(); |
| 8917 | 81 return $_; |
|
7527
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 |
|
8344
d2d82f7b419a
do_cmd_let(): Simple implementation to allow \let to be used to establish
Fred Drake <fdrake@acm.org>
parents:
8342
diff
changeset
|
84 #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
|
85 #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
|
86 #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
|
87 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
88 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
|
89 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
90 next_argument(); |
| 8917 | 91 return '_' . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
92 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
93 |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
94 sub use_wrappers{ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
95 local($_,$before,$after) = @_; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
96 my $stuff = next_argument(); |
| 8917 | 97 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
|
98 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
99 |
| 8917 | 100 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
|
101 return use_wrappers(@_[0], '<font face="sans-serif">', '</font>'); |
| 8917 | 102 } |
| 103 sub use_italics{ | |
| 104 return use_wrappers(@_[0], '<i>', '</i>'); | |
| 105 } | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
106 |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
107 sub do_cmd_optional{ |
| 8917 | 108 return use_wrappers(@_[0], "</var><big>\[</big><var>", |
| 109 "</var><big>\]</big><var>"); | |
|
7802
dffe1e470e6c
Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents:
7798
diff
changeset
|
110 } |
|
dffe1e470e6c
Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents:
7798
diff
changeset
|
111 |
| 7711 | 112 # Logical formatting (some based on texinfo), needs to be converted to |
| 113 # minimalist HTML. The "minimalist" is primarily to reduce the size of | |
| 114 # output files for users that read them over the network rather than | |
| 115 # 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
|
116 |
|
10464
f74ef1971bd1
Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents:
10327
diff
changeset
|
117 # \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
|
118 |
|
10100
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
119 sub do_cmd_pytype{ return @_[0]; } |
|
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
120 sub do_cmd_makevar{ return @_[0]; } |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
121 sub do_cmd_code{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
122 return use_wrappers(@_[0], '<tt>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
123 sub do_cmd_module{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
124 return use_wrappers(@_[0], '<tt class=module>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
125 sub do_cmd_keyword{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
126 return use_wrappers(@_[0], '<tt class=keyword>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
127 sub do_cmd_exception{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
128 return use_wrappers(@_[0], '<tt class=exception>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
129 sub do_cmd_class{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
130 return use_wrappers(@_[0], '<tt class=class>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
131 sub do_cmd_function{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
132 return use_wrappers(@_[0], '<tt class=function>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
133 sub do_cmd_constant{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
134 return use_wrappers(@_[0], '<tt class=constant>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
135 sub do_cmd_member{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
136 return use_wrappers(@_[0], '<tt class=member>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
137 sub do_cmd_method{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
138 return use_wrappers(@_[0], '<tt class=method>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
139 sub do_cmd_cfunction{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
140 return use_wrappers(@_[0], '<tt class=cfunction>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
141 sub do_cmd_cdata{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
142 return use_wrappers(@_[0], '<tt class=cdata>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
143 sub do_cmd_ctype{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
144 return use_wrappers(@_[0], '<tt class=ctype>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
145 sub do_cmd_regexp{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
146 return use_wrappers(@_[0], '<tt class=regexp>', '</tt>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
147 sub do_cmd_character{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
148 return use_wrappers(@_[0], '"<tt class=character>', '</tt>"'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
149 sub do_cmd_program{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
150 return use_wrappers(@_[0], '<b class=program>', '</b>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
151 sub do_cmd_email{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
152 return use_wrappers(@_[0], '<span class=email>', '</span>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
153 sub do_cmd_mimetype{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
154 return use_wrappers(@_[0], '<span class=mimetype>', '</span>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
155 sub do_cmd_var{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
156 return use_wrappers(@_[0], "<var>", "</var>"); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
157 sub do_cmd_dfn{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
158 return use_wrappers(@_[0], '<i class=dfn>', '</i>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
159 sub do_cmd_emph{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
160 return use_italics(@_); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
161 sub do_cmd_file{ |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
162 return use_wrappers(@_[0], '<tt class=file>', '</tt>'); } |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
163 sub do_cmd_filenq{ |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
164 return use_wrappers(@_[0], '<tt class=file>', '</tt>'); } |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
165 sub do_cmd_samp{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
166 return use_wrappers(@_[0], '"<tt class=samp>', '</tt>"'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
167 sub do_cmd_kbd{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
168 return use_wrappers(@_[0], '<kbd>', '</kbd>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
169 sub do_cmd_strong{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
170 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
|
171 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
|
172 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
|
173 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
|
174 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
|
175 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
176 |
|
9867
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
177 sub do_cmd_refmodule{ |
|
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
178 # 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
|
179 local($_) = @_; |
|
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
180 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
|
181 my $module = next_argument(); |
|
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
182 $key = $module |
|
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
183 unless $key; |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
184 return "<tt class=module><a href=\"module-$key.html\">$module</a></tt>" . $_; |
|
9867
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
185 } |
|
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
186 |
|
7779
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
187 sub do_cmd_newsgroup{ |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
188 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
189 my $newsgroup = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
190 my $stuff = "<span class=newsgroup><a href=\"news:$newsgroup\">" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
191 . "$newsgroup</a></span>"; |
| 8917 | 192 return $stuff . $_; |
|
7779
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
193 } |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
194 |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
195 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
|
196 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
197 my $envvar = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
198 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
|
199 # 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
|
200 # 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
|
201 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
|
202 $ahref); |
| 7760 | 203 add_index_entry("$envvar@\$$envvar", $ahref); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
204 return "<span class=envvar>$aname\$$envvar</a></span>" . $_; |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
205 } |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
206 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
207 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
|
208 # 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
|
209 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
210 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
|
211 $url =~ s/~/~/g; |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
212 return "<span class=url><a href=\"$url\">$url</a></span>" . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
213 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
214 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
215 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
|
216 # 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
|
217 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
218 my $page = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
219 my $section = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
220 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
|
221 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
222 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
223 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
|
224 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
225 my $rfcnumber = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
226 my $id = "rfcref-" . ++$global{'max_id'}; |
|
9700
9701c50c6946
do_cmd_rfc(): Make the "RFC ###" a hyperlink to the master RFC
Fred Drake <fdrake@acm.org>
parents:
9404
diff
changeset
|
227 my $href = |
|
9701c50c6946
do_cmd_rfc(): Make the "RFC ###" a hyperlink to the master RFC
Fred Drake <fdrake@acm.org>
parents:
9404
diff
changeset
|
228 "http://info.internet.isi.edu/in-notes/rfc/files/rfc$rfcnumber.txt"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
229 # Save the reference |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
230 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
|
231 $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
232 return ("<span class=rfc><a name=\"$id\"\nhref=\"$href\">" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
233 . "RFC $rfcnumber</a></span>" .$_); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
234 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
235 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
236 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
|
237 # 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
|
238 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
239 my $release = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
240 my $reason = next_argument(); |
| 8917 | 241 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
|
242 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
243 |
| 8763 | 244 sub do_cmd_versionadded{ |
| 245 # one parameter: \versionadded{version} | |
| 246 local($_) = @_; | |
| 247 my $release = next_argument(); | |
|
10077
80b215249b17
Make \versionadded and \versionchanged less prominant -- neither bold
Fred Drake <fdrake@acm.org>
parents:
9867
diff
changeset
|
248 return "\nNew in version $release.\n" . $_; |
| 8763 | 249 } |
| 250 | |
| 251 sub do_cmd_versionchanged{ | |
| 252 # one parameter: \versionchanged{version} | |
| 253 local($_) = @_; | |
| 254 my $release = next_argument(); | |
|
10077
80b215249b17
Make \versionadded and \versionchanged less prominant -- neither bold
Fred Drake <fdrake@acm.org>
parents:
9867
diff
changeset
|
255 return "\nChanged in version $release.\n" . $_; |
| 8763 | 256 } |
| 257 | |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
258 # |
|
10464
f74ef1971bd1
Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents:
10327
diff
changeset
|
259 # 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
|
260 # |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
261 sub do_cmd_platform{ |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
262 local($_) = @_; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
263 my $platform = next_argument(); |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
264 $ModulePlatforms{$THIS_MODULE} = $platform; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
265 $platform = "Macintosh" |
|
10637
bed15a015c1c
Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents:
10598
diff
changeset
|
266 if $platform eq 'Mac'; |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
267 return "\n<p class=availability>Availability: <span" |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
268 . "\n class=platform>$platform</span>.</p>\n" . $_; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
269 } |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
270 |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
271 $IGNORE_PLATFORM_ANNOTATION = ''; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
272 sub do_cmd_ignorePlatformAnnotation{ |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
273 local($_) = @_; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
274 $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
|
275 return $_; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
276 } |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
277 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
278 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
279 # index commands |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
280 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
281 $INDEX_SUBITEM = ""; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
282 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
283 sub get_indexsubitem{ |
|
9769
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
284 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
|
285 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
286 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
287 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
|
288 local($_) = @_; |
|
10138
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
289 $INDEX_SUBITEM = next_argument(); |
| 8917 | 290 return $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
291 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
292 |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
293 sub do_cmd_withsubitem{ |
|
9769
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
294 # 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
|
295 # 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
|
296 # 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
|
297 # |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
298 local($_) = @_; |
|
9769
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
299 my $oldsubitem = $INDEX_SUBITEM; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
300 $INDEX_SUBITEM = next_argument(); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
301 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
|
302 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
|
303 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
|
304 return |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
305 $stuff |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
306 . "\\setindexsubitem$marker$oldsubitem$marker" |
|
9769
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
307 . $_; |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
308 } |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
309 |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
310 # This is the prologue macro which is required to start writing the |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
311 # mod\jobname.idx file; we can just ignore it. |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
312 # |
| 8917 | 313 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
|
314 |
| 7760 | 315 # 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
|
316 # |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
317 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
|
318 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
|
319 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
|
320 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
|
321 |
|
5eafd3eda0af
Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents:
7906
diff
changeset
|
322 # 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
|
323 # 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
|
324 # |
|
5eafd3eda0af
Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents:
7906
diff
changeset
|
325 $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
|
326 |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
327 sub write_idxfile{ |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
328 my ($ahref, $str) = @_; |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
329 print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n"; |
| 7760 | 330 } |
| 331 | |
| 332 | |
| 333 sub gen_link{ | |
| 334 my($node,$target) = @_; | |
| 335 print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n"; | |
| 8917 | 336 return "<a href=\"$node#$target\">"; |
| 7760 | 337 } |
| 338 | |
| 339 sub make_index_entry{ | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
340 my($str) = @_; |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
341 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 342 add_index_entry($str, $ahref); |
| 8917 | 343 return "$aname$anchor_invisible_mark</a>"; |
| 7760 | 344 } |
| 345 | |
| 346 sub add_index_entry{ | |
| 347 # add an entry to the index structures; ignore the return value | |
| 348 my($str,$ahref) = @_; | |
| 349 $str = gen_index_id($str, ''); | |
| 350 $index{$str} .= $ahref; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
351 write_idxfile($ahref, $str); |
| 7760 | 352 } |
| 353 | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
354 sub new_link_info{ |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
355 my $name = "l2h-" . ++$globals{'max_id'}; |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
356 my $aname = '<a name="' . $name . '">'; |
| 7760 | 357 my $ahref = gen_link($CURRENT_FILE, $name); |
| 358 return ($name, $aname, $ahref); | |
| 359 } | |
| 360 | |
| 361 sub do_cmd_index{ | |
| 362 local($_) = @_; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
363 my $str = next_argument(); |
| 7760 | 364 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
365 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 366 add_index_entry("$str", $ahref); |
| 8917 | 367 return "$aname$anchor_invisible_mark</a>" . $_; |
| 7760 | 368 } |
| 369 | |
|
8294
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
370 sub do_cmd_kwindex{ |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
371 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
372 my $str = next_argument(); |
|
8294
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
373 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
374 my($name,$aname,$ahref) = new_link_info(); |
|
8294
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
375 add_index_entry("<tt>$str</tt>!keyword", $ahref); |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
376 add_index_entry("keyword!<tt>$str</tt>", $ahref); |
| 8917 | 377 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
|
378 } |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
379 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
380 sub do_cmd_indexii{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
381 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
382 my $str1 = next_argument(); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
383 my $str2 = next_argument(); |
| 7760 | 384 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
385 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 386 add_index_entry("$str1!$str2", $ahref); |
| 387 add_index_entry("$str2!$str1", $ahref); | |
| 8917 | 388 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
|
389 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
390 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
391 sub do_cmd_indexiii{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
392 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
393 my $str1 = next_argument(); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
394 my $str2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
395 my $str3 = next_argument(); |
| 7760 | 396 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
397 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 398 add_index_entry("$str1!$str2 $str3", $ahref); |
| 399 add_index_entry("$str2!$str3, $str1", $ahref); | |
| 400 add_index_entry("$str3!$str1 $str2", $ahref); | |
| 8917 | 401 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
|
402 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
403 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
404 sub do_cmd_indexiv{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
405 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
406 my $str1 = next_argument(); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
407 my $str2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
408 my $str3 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
409 my $str4 = next_argument(); |
| 7760 | 410 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
411 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 412 add_index_entry("$str1!$str2 $str3 $str4", $ahref); |
| 413 add_index_entry("$str2!$str3 $str4, $str1", $ahref); | |
| 414 add_index_entry("$str3!$str4, $str1 $str2", $ahref); | |
| 415 add_index_entry("$str4!$$str1 $str2 $str3", $ahref); | |
| 8917 | 416 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
|
417 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
418 |
| 7711 | 419 sub do_cmd_ttindex{ |
| 420 local($_) = @_; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
421 my $str = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
422 my $entry = $str . get_indexsubitem(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
423 return make_index_entry($entry) . $_; |
| 7711 | 424 } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
425 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
426 sub my_typed_index_helper{ |
| 7711 | 427 local($word,$_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
428 my $str = next_argument(); |
| 7760 | 429 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
430 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 431 add_index_entry("$str $word", $ahref); |
| 432 add_index_entry("$word!$str", $ahref); | |
| 8917 | 433 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
|
434 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
435 |
| 8917 | 436 sub do_cmd_stindex{ return my_typed_index_helper('statement', @_); } |
| 437 sub do_cmd_opindex{ return my_typed_index_helper('operator', @_); } | |
| 438 sub do_cmd_exindex{ return my_typed_index_helper('exception', @_); } | |
| 439 sub do_cmd_obindex{ return my_typed_index_helper('object', @_); } | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
440 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
441 sub my_parword_index_helper{ |
| 7711 | 442 local($word,$_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
443 my $str = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
444 return make_index_entry("$str ($word)") . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
445 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
446 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
447 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
448 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
|
449 my($str,$define) = @_; |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
450 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 451 # 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
|
452 $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
|
453 if ($define eq 'DEF'); |
| 7760 | 454 $str = gen_index_id($str, $define); |
| 455 $index{$str} .= $ahref; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
456 write_idxfile($ahref, $str); |
| 7760 | 457 |
| 7711 | 458 if ($define eq 'DEF') { |
| 7760 | 459 # add to the module index |
| 7711 | 460 my($nstr,$garbage) = split / /, $str, 2; |
| 7760 | 461 $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
|
462 } |
| 8917 | 463 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
|
464 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
465 |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
466 |
| 7711 | 467 $THIS_MODULE = ''; |
| 7760 | 468 $THIS_CLASS = ''; |
| 7711 | 469 |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
470 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
|
471 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
|
472 my $section_tag = join('', @curr_sec_id); |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
473 $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
|
474 $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
|
475 $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
|
476 print "[$name]"; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
477 return make_mod_index_entry("<tt>$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
|
478 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
479 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
480 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
|
481 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
|
482 my $name = next_argument(); |
| 8917 | 483 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
|
484 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
485 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
486 sub ref_module_index_helper{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
487 local($word, $_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
488 my $str = next_argument(); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
489 $word = "$word " if $word; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
490 return make_mod_index_entry("<tt>$str</tt> (${word}module)", 'REF') . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
491 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
492 |
| 7711 | 493 sub do_cmd_bifuncindex{ |
| 494 local($_) = @_; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
495 my $str = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
496 my $fname = "<tt>$str()</tt>"; |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
497 return make_index_entry("$fname (built-in function)") . $_; |
| 7711 | 498 } |
| 499 | |
| 8917 | 500 sub do_cmd_modindex{ return my_module_index_helper('', @_); } |
| 501 sub do_cmd_bimodindex{ return my_module_index_helper('built-in', @_); } | |
| 502 sub do_cmd_exmodindex{ return my_module_index_helper('extension', @_); } | |
| 503 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
|
504 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
505 # these should be adjusted a bit.... |
| 8917 | 506 sub do_cmd_refmodindex{ return ref_module_index_helper('', @_); } |
| 507 sub do_cmd_refbimodindex{ return ref_module_index_helper('built-in', @_); } | |
| 508 sub do_cmd_refexmodindex{ return ref_module_index_helper('extension', @_); } | |
| 509 sub do_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
|
510 |
| 8917 | 511 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
|
512 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
513 sub init_myformat{ |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
514 # $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
|
515 $anchor_mark = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
516 $icons{'anchor_mark'} = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
517 } |
| 7760 | 518 init_myformat(); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
519 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
520 # similar to make_index_entry(), but includes the string in the result |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
521 # 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
|
522 # |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
523 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
|
524 my($str) = @_; |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
525 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 526 add_index_entry($str, $ahref); |
| 8917 | 527 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
|
528 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
529 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
530 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
|
531 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
532 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
|
533 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
|
534 my $arg_list = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
535 my $idx = make_str_index_entry("<tt class=cfunction>$function_name()</tt>" |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
536 . get_indexsubitem()); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
537 $idx =~ s/ \(.*\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
538 $idx =~ s/\(\)//; # ???? |
|
10138
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
539 return "<dl><dt>$return_type <b>$idx</b> (<var>$arg_list</var>)\n<dd>" |
| 8917 | 540 . $_ |
| 541 . '</dl>'; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
542 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
543 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
544 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
|
545 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
546 my $type_name = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
547 my $idx = make_str_index_entry("<tt class=ctype>$type_name</tt>" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
548 . get_indexsubitem()); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
549 $idx =~ s/ \(.*\)//; |
| 8917 | 550 return "<dl><dt><b>$idx</b>\n<dd>" |
| 551 . $_ | |
| 552 . '</dl>' | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
553 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
554 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
555 sub do_env_cvardesc{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
556 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
557 my $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
|
558 my $var_name = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
559 my $idx = make_str_index_entry("<tt class=cdata>$var_name</tt>" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
560 . get_indexsubitem()); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
561 $idx =~ s/ \(.*\)//; |
| 8917 | 562 return "<dl><dt>$var_type <b>$idx</b>\n" |
| 563 . '<dd>' | |
| 564 . $_ | |
| 565 . '</dl>'; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
566 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
567 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
568 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
|
569 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
570 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
|
571 my $arg_list = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
572 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
|
573 . get_indexsubitem()); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
574 $idx =~ s/ \(.*\)//; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
575 $idx =~ s/\(\)<\/tt>/<\/tt>/; |
| 8917 | 576 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
|
577 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
578 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
579 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
|
580 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
581 my $function_name = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
582 my $arg_list = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
583 return "<dl><dt><b><tt class=function>$function_name</tt></b>" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
584 . " (<var>$arg_list</var>)\n" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
585 . '<dd>' |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
586 . $_ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
587 . '</dl>'; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
588 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
589 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
590 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
|
591 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
592 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
|
593 my $arg_list = next_argument(); |
|
10641
f6ec4a9cb0b3
do_cmd_funcline(): Remove some bogus generated stuff from the output
Fred Drake <fdrake@acm.org>
parents:
10637
diff
changeset
|
594 my $prefix = "<tt class=function>$function_name()</tt>"; |
|
f6ec4a9cb0b3
do_cmd_funcline(): Remove some bogus generated stuff from the output
Fred Drake <fdrake@acm.org>
parents:
10637
diff
changeset
|
595 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
|
596 $prefix =~ s/\(\)//; |
|
f6ec4a9cb0b3
do_cmd_funcline(): Remove some bogus generated stuff from the output
Fred Drake <fdrake@acm.org>
parents:
10637
diff
changeset
|
597 |
|
f6ec4a9cb0b3
do_cmd_funcline(): Remove some bogus generated stuff from the output
Fred Drake <fdrake@acm.org>
parents:
10637
diff
changeset
|
598 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
|
599 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
600 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
601 # 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
|
602 # 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
|
603 # module. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
604 # |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
605 $INDEX_OPCODES = 0; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
606 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
607 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
|
608 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
609 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
|
610 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
|
611 my $idx; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
612 if ($INDEX_OPCODES) { |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
613 $idx = make_str_index_entry( |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
614 "<tt class=opcode>$opcode_name</tt> (byte code instruction)"); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
615 $idx =~ s/ \(byte code instruction\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
616 } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
617 else { |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
618 $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
|
619 } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
620 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
|
621 if ($arg_list) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
622 $stuff .= " <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
|
623 } |
| 8917 | 624 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
|
625 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
626 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
627 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
|
628 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
629 my $dataname = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
630 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
|
631 $idx =~ s/ \(.*\)//; |
| 8917 | 632 return "<dl><dt><b>$idx</b>\n<dd>" |
| 633 . $_ | |
| 634 . '</dl>'; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
635 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
636 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
637 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
|
638 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
639 my $idx = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
640 if (! $STRING_INDEX_TT) { |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
641 $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
|
642 } |
| 8917 | 643 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
|
644 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
645 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
646 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
|
647 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
648 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
|
649 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
|
650 $idx =~ s/ \(.*\)//; |
| 8917 | 651 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
|
652 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
653 |
| 7760 | 654 sub do_env_excdesc{ |
| 655 local($_) = @_; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
656 my $excname = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
657 my $idx = make_str_index_entry("<tt class=exception>$excname</tt>"); |
| 8917 | 658 return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>' |
| 7760 | 659 } |
| 660 | |
| 8917 | 661 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
|
662 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
663 |
| 7711 | 664 sub do_env_classdesc{ |
| 665 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
666 $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
|
667 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
|
668 $idx = make_str_index_entry( |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
669 "<tt class=class>$THIS_CLASS</tt> (class in $THIS_MODULE)" ); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
670 $idx =~ s/ \(.*\)//; |
| 8917 | 671 return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; |
| 7760 | 672 } |
| 673 | |
| 674 | |
| 675 sub do_env_methoddesc{ | |
| 676 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
677 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
|
678 $class_name = $THIS_CLASS |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
679 unless $class_name; |
|
9848
e19cd8ec20a2
do_cmd_methodline(): Fixed reference to method name when generating
Fred Drake <fdrake@acm.org>
parents:
9775
diff
changeset
|
680 my $method = next_argument(); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
681 my $arg_list = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
682 my $extra = ''; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
683 if ($class_name) { |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
684 $extra = " ($class_name method)"; |
| 7760 | 685 } |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
686 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
|
687 $idx =~ s/ \(.*\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
688 $idx =~ s/\(\)//; |
| 8917 | 689 return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; |
| 7711 | 690 } |
| 691 | |
| 7760 | 692 |
|
9769
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
693 sub do_cmd_methodline{ |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
694 local($_) = @_; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
695 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
|
696 $class_name = $THIS_CLASS |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
697 unless $class_name; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
698 my $method = next_argument(); |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
699 my $arg_list = next_argument(); |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
700 my $extra = ''; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
701 if ($class_name) { |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
702 $extra = " ($class_name method)"; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
703 } |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
704 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
|
705 $idx =~ s/ \(.*\)//; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
706 $idx =~ s/\(\)//; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
707 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
|
708 . $_; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
709 } |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
710 |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
711 |
|
9085
e943f9c09901
do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents:
8917
diff
changeset
|
712 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
|
713 local($_) = @_; |
|
e943f9c09901
do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents:
8917
diff
changeset
|
714 next_optional_argument(); |
|
e943f9c09901
do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents:
8917
diff
changeset
|
715 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
|
716 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
|
717 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
|
718 . $_; |
|
e943f9c09901
do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents:
8917
diff
changeset
|
719 } |
|
e943f9c09901
do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents:
8917
diff
changeset
|
720 |
| 7760 | 721 sub do_env_methoddescni{ |
| 722 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
723 next_optional_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
724 my $method = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
725 my $arg_list = next_argument(); |
| 8917 | 726 return "<dl><dt><b>$method</b> (<var>$arg_list</var>)\n<dd>" |
| 727 . $_ | |
| 728 . '</dl>'; | |
| 7760 | 729 } |
| 730 | |
| 731 | |
| 732 sub do_env_memberdesc{ | |
| 733 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
734 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
|
735 my $member = next_argument(); |
| 7760 | 736 $class = $THIS_CLASS |
| 737 unless $class; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
738 my $extra = ''; |
|
10637
bed15a015c1c
Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents:
10598
diff
changeset
|
739 $extra = " ($class attribute)" |
|
bed15a015c1c
Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents:
10598
diff
changeset
|
740 if ($class ne ''); |
|
bed15a015c1c
Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents:
10598
diff
changeset
|
741 my $idx = make_str_index_entry("<tt class=member>$member</tt>$extra"); |
| 7760 | 742 $idx =~ s/ \(.*\)//; |
| 743 $idx =~ s/\(\)//; | |
| 8917 | 744 return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'; |
| 7760 | 745 } |
| 746 | |
| 747 | |
|
8086
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
748 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
|
749 local($_) = @_; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
750 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
|
751 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
|
752 $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
|
753 unless $class; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
754 my $extra = ''; |
|
10637
bed15a015c1c
Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents:
10598
diff
changeset
|
755 $extra = " ($class attribute)" |
|
bed15a015c1c
Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents:
10598
diff
changeset
|
756 if ($class ne ''); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
757 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
|
758 $idx =~ s/ \(.*\)//; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
759 $idx =~ s/\(\)//; |
| 8917 | 760 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
|
761 } |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
762 |
| 7760 | 763 sub do_env_memberdescni{ |
| 764 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
765 next_optional_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
766 my $member = next_argument(); |
|
10637
bed15a015c1c
Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents:
10598
diff
changeset
|
767 return "<dl><dt><b><tt class=member>$member</tt></b>\n<dd>" . $_ . '</dl>'; |
| 7760 | 768 } |
| 769 | |
| 770 | |
|
8086
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
771 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
|
772 local($_) = @_; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
773 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
|
774 my $member = next_argument(); |
|
10637
bed15a015c1c
Fix some remaining index & consistency nits. (Many data member
Fred Drake <fdrake@acm.org>
parents:
10598
diff
changeset
|
775 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
|
776 } |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
777 |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
778 @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
|
779 |
|
10149
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
780 $TABLE_HEADER_BGCOLOR = $NAV_BGCOLOR; |
|
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
781 |
|
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
|
782 sub get_th{ |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
783 my $a = @_[0]; |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
784 my $r = '<th>'; |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
785 if ($a eq 'l') |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
786 { $r = '<th align=left>'; } |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
787 elsif (substr($a, 0, 1) eq 'p') |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
788 { $r = '<th align=left>'; } |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
789 elsif ($a eq 'r') |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
790 { $r = '<th align=right>'; } |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
791 return $r; |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
792 } |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
793 |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
794 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
|
795 # 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
|
796 # 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
|
797 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
|
798 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
|
799 $font = ''; |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
800 } |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
801 elsif ($font eq 'file' || $font eq 'filenq') { |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
802 $font = 'tt class=file'; |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
803 } |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
804 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
|
805 } |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
806 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
807 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
|
808 local($_) = @_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
809 my($a1,$a2,$a3,$a4) = split(/[|]/,$_); |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
810 my($th1,$th2,$th3,$th4) = ('<th>', '<th>', '<th>', '<th>'); |
|
10777
966594c6b1e2
setup_column_alignments(): Adding valign=baseline to the <td> tag
Fred Drake <fdrake@acm.org>
parents:
10769
diff
changeset
|
811 $col_aligns[0] = (($a1 eq 'c') ? '<td align=center valign=baseline>' |
|
966594c6b1e2
setup_column_alignments(): Adding valign=baseline to the <td> tag
Fred Drake <fdrake@acm.org>
parents:
10769
diff
changeset
|
812 : '<td valign=baseline>'); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
813 $col_aligns[1] = (($a2 eq 'c') ? '<td align=center>' : '<td>'); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
814 $col_aligns[2] = (($a3 eq 'c') ? '<td align=center>' : '<td>'); |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
815 $col_aligns[3] = (($a4 eq 'c') ? '<td align=center>' : '<td>'); |
|
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
|
816 # return the aligned header start tags |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
817 return (get_th($a1), get_th($a2), get_th($a3), get_th($a4)); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
818 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
819 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
820 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
|
821 local($_) = @_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
822 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
|
823 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
|
824 my $h1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
825 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
|
826 s/[\s\n]+//; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
827 $globals{'lineifont'} = $font; |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
828 return '<table border align=center>' |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
829 . "\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
|
830 . "\n <tr$TABLE_HEADER_BGCOLOR>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
831 . "\n $th1<b>$h1</b></th>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
832 . "\n $th2<b>$h2</b></th>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
833 . "\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
|
834 . "\n <tbody valign=baseline>" |
| 8917 | 835 . $_ |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
836 . "\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
|
837 . "\n</table>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
838 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
839 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
840 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
|
841 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
842 my $c1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
843 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
|
844 s/[\s\n]+//; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
845 my($font,$sfont,$efont) = ($globals{'lineifont'}, '', ''); |
|
7798
49f11eb4eb9a
This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents:
7779
diff
changeset
|
846 if ($font) { |
| 7937 | 847 $sfont = "<$font>"; |
|
7798
49f11eb4eb9a
This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents:
7779
diff
changeset
|
848 $efont = "</$font>"; |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
849 $efont =~ s/ .*>/>/; |
|
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
|
850 } |
| 7711 | 851 my($c1align,$c2align) = @col_aligns[0,1]; |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
852 return "\n <tr>$c1align$sfont$c1$efont</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
|
853 . " $c2align$c2\ </td>" |
| 8917 | 854 . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
855 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
856 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
857 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
|
858 local($_) = @_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
859 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
|
860 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
|
861 my $h1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
862 my $h2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
863 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
|
864 s/[\s\n]+//; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
865 $globals{'lineifont'} = $font; |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
866 return '<table border align=center>' |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
867 . "\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
|
868 . "\n <tr$TABLE_HEADER_BGCOLOR>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
869 . "\n $th1<b>$h1</b></th>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
870 . "\n $th2<b>$h2</b></th>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
871 . "\n $th3<b>$h3</b></th>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
872 . "\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
|
873 . "\n <tbody valign=baseline>" |
| 8917 | 874 . $_ |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
875 . "\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
|
876 . "\n</table>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
877 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
878 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
879 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
|
880 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
881 my $c1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
882 my $c2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
883 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
|
884 s/[\s\n]+//; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
885 my($font,$sfont,$efont) = ($globals{'lineifont'}, '', ''); |
|
7798
49f11eb4eb9a
This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents:
7779
diff
changeset
|
886 if ($font) { |
| 7937 | 887 $sfont = "<$font>"; |
|
7798
49f11eb4eb9a
This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents:
7779
diff
changeset
|
888 $efont = "</$font>"; |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
889 $efont =~ s/ .*>/>/; |
|
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
|
890 } |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
891 my($c1align,$c2align,$c3align) = @col_aligns[0,1,2]; |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
892 return "\n <tr>$c1align$sfont$c1$efont</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
|
893 . " $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
|
894 . " $c3align$c3\ </td>" |
| 8917 | 895 . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
896 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
897 |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
898 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
|
899 local($_) = @_; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
900 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
|
901 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
|
902 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
|
903 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
|
904 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
|
905 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
|
906 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
|
907 $globals{'lineifont'} = $font; |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
908 return '<table border align=center>' |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
909 . "\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
|
910 . "\n <tr$TABLE_HEADER_BGCOLOR>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
911 . "\n $th1<b>$h1</b></th>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
912 . "\n $th2<b>$h2</b></th>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
913 . "\n $th3<b>$h3</b></th>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
914 . "\n $th4<b>$h4</b></th>" |
|
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
915 . "\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
|
916 . "\n <tbody valign=baseline>" |
| 8917 | 917 . $_ |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
918 . "\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
|
919 . "\n</table>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
920 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
921 |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
922 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
|
923 local($_) = @_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
924 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
|
925 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
|
926 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
|
927 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
|
928 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
|
929 my($font,$sfont,$efont) = ($globals{'lineifont'}, '', ''); |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
930 if ($font) { |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
931 $sfont = "<$font>"; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
932 $efont = "</$font>"; |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
933 $efont =~ s/ .*>/>/; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
934 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
935 my($c1align,$c2align,$c3align,$c4align) = @col_aligns; |
|
10769
1af7a1467088
Control the layout of output tables a little better so they're easier
Fred Drake <fdrake@acm.org>
parents:
10767
diff
changeset
|
936 return "\n <tr>$c1align$sfont$c1$efont</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
|
937 . " $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
|
938 . " $c3align$c3</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
|
939 . " $c4align$c4\ </td>" |
| 8917 | 940 . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
941 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
942 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
943 sub do_cmd_maketitle { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
944 local($_) = @_; |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
945 my $the_title = "\n<div class=titlepage><center>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
946 if ($t_title) { |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
947 $the_title .= "\n<h1>$t_title</h1>"; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
948 } else { write_warnings("\nThis document has no title."); } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
949 if ($t_author) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
950 if ($t_authorURL) { |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
951 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
|
952 $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
|
953 "<b><font size='+2'>$t_author</font></b>"); |
| 7711 | 954 $the_title .= "\n<p>$href</p>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
955 } else { |
|
10128
0dd4fafefd6c
do_cmd_maketitle(): Small nit in creating the "title page".
Fred Drake <fdrake@acm.org>
parents:
10127
diff
changeset
|
956 $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
|
957 } |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
958 } else { write_warnings("\nThere is no author for this document."); } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
959 if ($t_institute) { |
| 7711 | 960 $the_title .= "\n<p>$t_institute</p>";} |
|
8342
22815a0b1267
Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents:
8294
diff
changeset
|
961 if ($DEVELOPER_ADDRESS) { |
|
22815a0b1267
Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents:
8294
diff
changeset
|
962 $the_title .= "\n<p>$DEVELOPER_ADDRESS</p>";} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
963 if ($t_affil) { |
| 7711 | 964 $the_title .= "\n<p><i>$t_affil</i></p>";} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
965 if ($t_date) { |
| 7711 | 966 $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
|
967 if ($PYTHON_VERSION) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
968 $the_title .= "<br><strong>Release $PYTHON_VERSION</strong>";} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
969 $the_title .= "</p>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
970 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
971 if ($t_address) { |
| 7711 | 972 $the_title .= "\n<p>$t_address</p>"; |
| 973 } else { $the_title .= "\n<p>"} | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
974 if ($t_email) { |
| 7711 | 975 $the_title .= "\n<p>$t_email</p>"; |
| 976 }# else { $the_title .= "</p>" } | |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
977 $the_title .= "\n</center></div>"; |
| 8917 | 978 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
|
979 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
980 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
981 |
|
8397
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
982 # |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
983 # 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
|
984 # |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
985 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
986 require SynopsisTable; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
987 |
|
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
|
988 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
|
989 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
|
990 $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
|
991 $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
|
992 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
|
993 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
994 |
|
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
|
995 %ModuleSynopses = ('chapter' => 'SynopsisTable instance'); |
|
fba8455dcb54
Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents:
8754
diff
changeset
|
996 |
|
fba8455dcb54
Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents:
8754
diff
changeset
|
997 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
|
998 my($chap) = @_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
999 my $st = $ModuleSynopses{$chap}; |
|
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
|
1000 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
|
1001 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
|
1002 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
|
1003 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
|
1004 } |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1005 } |
|
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
|
1006 $st = SynopsisTable->new(); |
|
fba8455dcb54
Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents:
8754
diff
changeset
|
1007 $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
|
1008 return $st; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1009 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1010 |
| 8917 | 1011 sub do_cmd_moduleauthor{ |
| 1012 local($_) = @_; | |
| 1013 next_argument(); | |
| 1014 next_argument(); | |
| 1015 return $_; | |
| 1016 } | |
| 1017 | |
| 1018 sub do_cmd_sectionauthor{ | |
| 1019 local($_) = @_; | |
| 1020 next_argument(); | |
| 1021 next_argument(); | |
| 1022 return $_; | |
| 1023 } | |
| 1024 | |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1025 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
|
1026 local($_) = @_; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1027 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
|
1028 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
|
1029 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
|
1030 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
|
1031 # |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1032 $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
|
1033 $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
|
1034 $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
|
1035 define_module($type, $name); |
| 8917 | 1036 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
|
1037 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1038 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1039 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
|
1040 local($_) = @_; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1041 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
|
1042 $st->set_synopsis($THIS_MODULE, translate_commands(next_argument())); |
| 8917 | 1043 return $_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1044 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1045 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1046 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
|
1047 local($_) = @_; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1048 my $chap = get_chapter_id(); |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
1049 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
|
1050 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1051 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1052 sub process_all_localmoduletables{ |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
1053 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
|
1054 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
|
1055 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
|
1056 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
|
1057 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
|
1058 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
|
1059 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1060 } |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
1061 sub process_python_state{ |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
1062 process_all_localmoduletables(); |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
1063 } |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1064 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1065 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1066 # |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1067 # "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
|
1068 # |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1069 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1070 sub do_env_seealso{ |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1071 return "<div class=seealso>\n " |
|
10464
f74ef1971bd1
Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents:
10327
diff
changeset
|
1072 . "<p class=heading><b>See Also:</b></p>\n" |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1073 . @_[0] |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1074 . '</div>'; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1075 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1076 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1077 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
|
1078 # 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
|
1079 # 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
|
1080 local($_) = @_; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1081 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
|
1082 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
|
1083 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
|
1084 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
|
1085 $key = $module |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1086 unless $key; |
|
10846
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10777
diff
changeset
|
1087 if ($text =~ /\.$/) { |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10777
diff
changeset
|
1088 $period = ''; |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10777
diff
changeset
|
1089 } |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10777
diff
changeset
|
1090 return '<dl compact class=seemodule>' |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10777
diff
changeset
|
1091 . "\n <dt>Module <b><tt class=module><a href=\"module-$key.html\">" |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10777
diff
changeset
|
1092 . "$module</a></tt>:</b>" |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10777
diff
changeset
|
1093 . "\n <dd>$text$period\n </dl>" |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1094 . $_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1095 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1096 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1097 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
|
1098 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
|
1099 my $content = next_argument(); |
|
e37074b6e78c
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
Fred Drake <fdrake@acm.org>
parents:
10641
diff
changeset
|
1100 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
|
1101 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1102 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1103 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1104 # |
|
8397
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1105 # Definition list support. |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1106 # |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1107 |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1108 sub do_env_definitions{ |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1109 local($_) = @_; |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1110 return "<dl class=definitions>$_</dl>\n"; |
|
8397
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1111 } |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1112 |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1113 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
|
1114 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
1115 my $term = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
1116 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
|
1117 # could easily add an index entry here... |
| 8917 | 1118 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
|
1119 } |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1120 |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1121 |
|
10100
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
1122 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
|
1123 code # {} |
|
10138
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
1124 declaremodule # [] # {} # {} |
|
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
1125 memberline # [] # {} |
|
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
1126 methodline # [] # {} # {} |
|
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
1127 modulesynopsis # {} |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
1128 platform # {} |
|
10100
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
1129 samp # {} |
|
10138
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
1130 setindexsubitem # {} |
|
10157
13239b48c469
Minor fix that helps out with the index.
Fred Drake <fdrake@acm.org>
parents:
10149
diff
changeset
|
1131 withsubitem # {} # {} |
|
10100
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
1132 _RAW_ARG_DEFERRED_CMDS_ |
|
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
1133 |
|
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
1134 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1135 1; # This must be the last line |
