Mercurial > cpython-lru_cache-weakref
annotate Doc/perl/python.perl @ 10464:f74ef1971bd1 legacy-trunk
Remove \platformof support, since it's been removed from the LaTeX
style sheet.
Small nits.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 25 Mar 1999 16:57:04 +0000 |
| parents | 66a7d61cfd84 |
| children | c8759ba83552 |
| 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{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
162 return use_wrappers(@_[0], '"<tt class=file>', '</tt>"'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
163 sub do_cmd_samp{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
164 return use_wrappers(@_[0], '"<tt class=samp>', '</tt>"'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
165 sub do_cmd_kbd{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
166 return use_wrappers(@_[0], '<kbd>', '</kbd>'); } |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
167 sub do_cmd_strong{ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
168 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
|
169 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
|
170 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
|
171 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
|
172 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
|
173 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
174 |
|
9867
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
175 sub do_cmd_refmodule{ |
|
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
176 # 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
|
177 local($_) = @_; |
|
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
178 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
|
179 my $module = next_argument(); |
|
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
180 $key = $module |
|
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
181 unless $key; |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
182 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
|
183 } |
|
c95fff8f180a
do_cmd_refmodule(): New function to support new \refmodule macro.
Fred Drake <fdrake@acm.org>
parents:
9848
diff
changeset
|
184 |
|
7779
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
185 sub do_cmd_newsgroup{ |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
186 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
187 my $newsgroup = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
188 my $stuff = "<span class=newsgroup><a href=\"news:$newsgroup\">" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
189 . "$newsgroup</a></span>"; |
| 8917 | 190 return $stuff . $_; |
|
7779
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
191 } |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
192 |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
193 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
|
194 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
195 my $envvar = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
196 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
|
197 # 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
|
198 # 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
|
199 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
|
200 $ahref); |
| 7760 | 201 add_index_entry("$envvar@\$$envvar", $ahref); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
202 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
|
203 } |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
204 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
205 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
|
206 # 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
|
207 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
208 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
|
209 $url =~ s/~/~/g; |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
210 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
|
211 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
212 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
213 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
|
214 # 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
|
215 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
216 my $page = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
217 my $section = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
218 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
|
219 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
220 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
221 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
|
222 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
223 my $rfcnumber = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
224 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
|
225 my $href = |
|
9701c50c6946
do_cmd_rfc(): Make the "RFC ###" a hyperlink to the master RFC
Fred Drake <fdrake@acm.org>
parents:
9404
diff
changeset
|
226 "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
|
227 # Save the reference |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
228 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
|
229 $index{$nstr} .= make_half_href("$CURRENT_FILE#$id"); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
230 return ("<span class=rfc><a name=\"$id\"\nhref=\"$href\">" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
231 . "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
|
232 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
233 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
234 sub do_cmd_deprecated{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
235 # 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
|
236 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
237 my $release = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
238 my $reason = next_argument(); |
| 8917 | 239 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
|
240 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
241 |
| 8763 | 242 sub do_cmd_versionadded{ |
| 243 # one parameter: \versionadded{version} | |
| 244 local($_) = @_; | |
| 245 my $release = next_argument(); | |
|
10077
80b215249b17
Make \versionadded and \versionchanged less prominant -- neither bold
Fred Drake <fdrake@acm.org>
parents:
9867
diff
changeset
|
246 return "\nNew in version $release.\n" . $_; |
| 8763 | 247 } |
| 248 | |
| 249 sub do_cmd_versionchanged{ | |
| 250 # one parameter: \versionchanged{version} | |
| 251 local($_) = @_; | |
| 252 my $release = next_argument(); | |
|
10077
80b215249b17
Make \versionadded and \versionchanged less prominant -- neither bold
Fred Drake <fdrake@acm.org>
parents:
9867
diff
changeset
|
253 return "\nChanged in version $release.\n" . $_; |
| 8763 | 254 } |
| 255 | |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
256 # |
|
10464
f74ef1971bd1
Remove \platformof support, since it's been removed from the LaTeX
Fred Drake <fdrake@acm.org>
parents:
10327
diff
changeset
|
257 # 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
|
258 # |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
259 sub do_cmd_platform{ |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
260 local($_) = @_; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
261 my $platform = next_argument(); |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
262 $ModulePlatforms{$THIS_MODULE} = $platform; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
263 $platform = "Macintosh" |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
264 if $platform eq "Mac"; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
265 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
|
266 . "\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
|
267 } |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
268 |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
269 $IGNORE_PLATFORM_ANNOTATION = ''; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
270 sub do_cmd_ignorePlatformAnnotation{ |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
271 local($_) = @_; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
272 $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
|
273 return $_; |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
274 } |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
275 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
276 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
277 # index commands |
|
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_SUBITEM = ""; |
|
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 sub get_indexsubitem{ |
|
9769
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
282 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
|
283 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
284 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
285 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
|
286 local($_) = @_; |
|
10138
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
287 $INDEX_SUBITEM = next_argument(); |
| 8917 | 288 return $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
289 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
290 |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
291 sub do_cmd_withsubitem{ |
|
9769
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
292 # 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
|
293 # 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
|
294 # 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
|
295 # |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
296 local($_) = @_; |
|
9769
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
297 my $oldsubitem = $INDEX_SUBITEM; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
298 $INDEX_SUBITEM = next_argument(); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
299 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
|
300 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
|
301 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
|
302 return |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
303 $stuff |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
304 . "\\setindexsubitem$marker$oldsubitem$marker" |
|
9769
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
305 . $_; |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
306 } |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
307 |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
308 # 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
|
309 # 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
|
310 # |
| 8917 | 311 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
|
312 |
| 7760 | 313 # 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
|
314 # |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
315 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
|
316 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
|
317 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
|
318 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
|
319 |
|
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 # 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
|
321 # 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
|
322 # |
|
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 $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
|
324 |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
325 sub write_idxfile{ |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
326 my ($ahref, $str) = @_; |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
327 print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n"; |
| 7760 | 328 } |
| 329 | |
| 330 | |
| 331 sub gen_link{ | |
| 332 my($node,$target) = @_; | |
| 333 print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n"; | |
| 8917 | 334 return "<a href=\"$node#$target\">"; |
| 7760 | 335 } |
| 336 | |
| 337 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
|
338 my($str) = @_; |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
339 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 340 add_index_entry($str, $ahref); |
| 8917 | 341 return "$aname$anchor_invisible_mark</a>"; |
| 7760 | 342 } |
| 343 | |
| 344 sub add_index_entry{ | |
| 345 # add an entry to the index structures; ignore the return value | |
| 346 my($str,$ahref) = @_; | |
| 347 $str = gen_index_id($str, ''); | |
| 348 $index{$str} .= $ahref; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
349 write_idxfile($ahref, $str); |
| 7760 | 350 } |
| 351 | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
352 sub new_link_info{ |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
353 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
|
354 my $aname = '<a name="' . $name . '">'; |
| 7760 | 355 my $ahref = gen_link($CURRENT_FILE, $name); |
| 356 return ($name, $aname, $ahref); | |
| 357 } | |
| 358 | |
| 359 sub do_cmd_index{ | |
| 360 local($_) = @_; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
361 my $str = next_argument(); |
| 7760 | 362 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
363 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 364 add_index_entry("$str", $ahref); |
| 8917 | 365 return "$aname$anchor_invisible_mark</a>" . $_; |
| 7760 | 366 } |
| 367 | |
|
8294
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
368 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
|
369 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
370 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
|
371 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
372 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
|
373 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
|
374 add_index_entry("keyword!<tt>$str</tt>", $ahref); |
| 8917 | 375 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
|
376 } |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
377 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
378 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
|
379 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
380 my $str1 = next_argument(); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
381 my $str2 = next_argument(); |
| 7760 | 382 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
383 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 384 add_index_entry("$str1!$str2", $ahref); |
| 385 add_index_entry("$str2!$str1", $ahref); | |
| 8917 | 386 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
|
387 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
388 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
389 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
|
390 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
391 my $str1 = next_argument(); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
392 my $str2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
393 my $str3 = next_argument(); |
| 7760 | 394 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
395 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 396 add_index_entry("$str1!$str2 $str3", $ahref); |
| 397 add_index_entry("$str2!$str3, $str1", $ahref); | |
| 398 add_index_entry("$str3!$str1 $str2", $ahref); | |
| 8917 | 399 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
|
400 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
401 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
402 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
|
403 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
404 my $str1 = next_argument(); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
405 my $str2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
406 my $str3 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
407 my $str4 = next_argument(); |
| 7760 | 408 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
409 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 410 add_index_entry("$str1!$str2 $str3 $str4", $ahref); |
| 411 add_index_entry("$str2!$str3 $str4, $str1", $ahref); | |
| 412 add_index_entry("$str3!$str4, $str1 $str2", $ahref); | |
| 413 add_index_entry("$str4!$$str1 $str2 $str3", $ahref); | |
| 8917 | 414 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
|
415 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
416 |
| 7711 | 417 sub do_cmd_ttindex{ |
| 418 local($_) = @_; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
419 my $str = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
420 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
|
421 return make_index_entry($entry) . $_; |
| 7711 | 422 } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
423 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
424 sub my_typed_index_helper{ |
| 7711 | 425 local($word,$_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
426 my $str = next_argument(); |
| 7760 | 427 # |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
428 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 429 add_index_entry("$str $word", $ahref); |
| 430 add_index_entry("$word!$str", $ahref); | |
| 8917 | 431 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
|
432 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
433 |
| 8917 | 434 sub do_cmd_stindex{ return my_typed_index_helper('statement', @_); } |
| 435 sub do_cmd_opindex{ return my_typed_index_helper('operator', @_); } | |
| 436 sub do_cmd_exindex{ return my_typed_index_helper('exception', @_); } | |
| 437 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
|
438 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
439 sub my_parword_index_helper{ |
| 7711 | 440 local($word,$_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
441 my $str = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
442 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
|
443 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
444 |
|
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 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
|
447 my($str,$define) = @_; |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
448 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 449 # 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
|
450 $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
|
451 if ($define eq 'DEF'); |
| 7760 | 452 $str = gen_index_id($str, $define); |
| 453 $index{$str} .= $ahref; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
454 write_idxfile($ahref, $str); |
| 7760 | 455 |
| 7711 | 456 if ($define eq 'DEF') { |
| 7760 | 457 # add to the module index |
| 7711 | 458 my($nstr,$garbage) = split / /, $str, 2; |
| 7760 | 459 $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
|
460 } |
| 8917 | 461 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
|
462 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
463 |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
464 |
| 7711 | 465 $THIS_MODULE = ''; |
| 7760 | 466 $THIS_CLASS = ''; |
| 7711 | 467 |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
468 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
|
469 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
|
470 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
|
471 $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
|
472 $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
|
473 $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
|
474 print "[$name]"; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
475 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
|
476 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
477 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
478 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
|
479 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
|
480 my $name = next_argument(); |
| 8917 | 481 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
|
482 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
483 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
484 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
|
485 local($word, $_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
486 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
|
487 $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
|
488 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
|
489 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
490 |
| 7711 | 491 sub do_cmd_bifuncindex{ |
| 492 local($_) = @_; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
493 my $str = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
494 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
|
495 return make_index_entry("$fname (built-in function)") . $_; |
| 7711 | 496 } |
| 497 | |
| 8917 | 498 sub do_cmd_modindex{ return my_module_index_helper('', @_); } |
| 499 sub do_cmd_bimodindex{ return my_module_index_helper('built-in', @_); } | |
| 500 sub do_cmd_exmodindex{ return my_module_index_helper('extension', @_); } | |
| 501 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
|
502 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
503 # these should be adjusted a bit.... |
| 8917 | 504 sub do_cmd_refmodindex{ return ref_module_index_helper('', @_); } |
| 505 sub do_cmd_refbimodindex{ return ref_module_index_helper('built-in', @_); } | |
| 506 sub do_cmd_refexmodindex{ return ref_module_index_helper('extension', @_); } | |
| 507 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
|
508 |
| 8917 | 509 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
|
510 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
511 sub init_myformat{ |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
512 # $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
|
513 $anchor_mark = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
514 $icons{'anchor_mark'} = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
515 } |
| 7760 | 516 init_myformat(); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
517 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
518 # 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
|
519 # 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
|
520 # |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
521 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
|
522 my($str) = @_; |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
523 my($name,$aname,$ahref) = new_link_info(); |
| 7760 | 524 add_index_entry($str, $ahref); |
| 8917 | 525 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
|
526 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
527 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
528 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
|
529 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
530 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
|
531 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
|
532 my $arg_list = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
533 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
|
534 . get_indexsubitem()); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
535 $idx =~ s/ \(.*\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
536 $idx =~ s/\(\)//; # ???? |
|
10138
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
537 return "<dl><dt>$return_type <b>$idx</b> (<var>$arg_list</var>)\n<dd>" |
| 8917 | 538 . $_ |
| 539 . '</dl>'; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
540 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
541 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
542 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
|
543 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
544 my $type_name = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
545 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
|
546 . get_indexsubitem()); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
547 $idx =~ s/ \(.*\)//; |
| 8917 | 548 return "<dl><dt><b>$idx</b>\n<dd>" |
| 549 . $_ | |
| 550 . '</dl>' | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
551 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
552 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
553 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
|
554 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
555 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
|
556 my $var_name = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
557 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
|
558 . get_indexsubitem()); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
559 $idx =~ s/ \(.*\)//; |
| 8917 | 560 return "<dl><dt>$var_type <b>$idx</b>\n" |
| 561 . '<dd>' | |
| 562 . $_ | |
| 563 . '</dl>'; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
564 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
565 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
566 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
|
567 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
568 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
|
569 my $arg_list = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
570 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
|
571 . get_indexsubitem()); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
572 $idx =~ s/ \(.*\)//; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
573 $idx =~ s/\(\)<\/tt>/<\/tt>/; |
| 8917 | 574 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
|
575 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
576 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
577 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
|
578 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
579 my $function_name = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
580 my $arg_list = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
581 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
|
582 . " (<var>$arg_list</var>)\n" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
583 . '<dd>' |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
584 . $_ |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
585 . '</dl>'; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
586 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
587 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
588 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
|
589 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
590 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
|
591 my $arg_list = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
592 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
|
593 . get_indexsubitem()); |
| 7711 | 594 $idx =~ s/\(\)//; |
| 8917 | 595 return "<dt><b>$idx</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
|
596 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
597 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
598 # 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
|
599 # 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
|
600 # module. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
601 # |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
602 $INDEX_OPCODES = 0; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
603 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
604 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
|
605 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
606 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
|
607 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
|
608 my $idx; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
609 if ($INDEX_OPCODES) { |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
610 $idx = make_str_index_entry( |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
611 "<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
|
612 $idx =~ s/ \(byte code instruction\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
613 } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
614 else { |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
615 $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
|
616 } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
617 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
|
618 if ($arg_list) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
619 $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
|
620 } |
| 8917 | 621 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
|
622 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
623 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
624 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
|
625 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
626 my $dataname = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
627 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
|
628 $idx =~ s/ \(.*\)//; |
| 8917 | 629 return "<dl><dt><b>$idx</b>\n<dd>" |
| 630 . $_ | |
| 631 . '</dl>'; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
632 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
633 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
634 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
|
635 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
636 my $idx = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
637 if (! $STRING_INDEX_TT) { |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
638 $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
|
639 } |
| 8917 | 640 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
|
641 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
642 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
643 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
|
644 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
645 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
|
646 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
|
647 $idx =~ s/ \(.*\)//; |
| 8917 | 648 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
|
649 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
650 |
| 7760 | 651 sub do_env_excdesc{ |
| 652 local($_) = @_; | |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
653 my $excname = next_argument(); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
654 my $idx = make_str_index_entry("<tt class=exception>$excname</tt>"); |
| 8917 | 655 return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>' |
| 7760 | 656 } |
| 657 | |
| 8917 | 658 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
|
659 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
660 |
| 7711 | 661 sub do_env_classdesc{ |
| 662 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
663 $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
|
664 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
|
665 $idx = make_str_index_entry( |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
666 "<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
|
667 $idx =~ s/ \(.*\)//; |
| 8917 | 668 return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; |
| 7760 | 669 } |
| 670 | |
| 671 | |
| 672 sub do_env_methoddesc{ | |
| 673 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
674 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
|
675 $class_name = $THIS_CLASS |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
676 unless $class_name; |
|
9848
e19cd8ec20a2
do_cmd_methodline(): Fixed reference to method name when generating
Fred Drake <fdrake@acm.org>
parents:
9775
diff
changeset
|
677 my $method = next_argument(); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
678 my $arg_list = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
679 my $extra = ''; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
680 if ($class_name) { |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
681 $extra = " ($class_name method)"; |
| 7760 | 682 } |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
683 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
|
684 $idx =~ s/ \(.*\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
685 $idx =~ s/\(\)//; |
| 8917 | 686 return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; |
| 7711 | 687 } |
| 688 | |
| 7760 | 689 |
|
9769
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
690 sub do_cmd_methodline{ |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
691 local($_) = @_; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
692 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
|
693 $class_name = $THIS_CLASS |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
694 unless $class_name; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
695 my $method = next_argument(); |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
696 my $arg_list = next_argument(); |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
697 my $extra = ''; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
698 if ($class_name) { |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
699 $extra = " ($class_name method)"; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
700 } |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
701 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
|
702 $idx =~ s/ \(.*\)//; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
703 $idx =~ s/\(\)//; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
704 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
|
705 . $_; |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
706 } |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
707 |
|
e1508f72c610
do_cmd_methodline(): New function, implements indexing version of
Fred Drake <fdrake@acm.org>
parents:
9718
diff
changeset
|
708 |
|
9085
e943f9c09901
do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents:
8917
diff
changeset
|
709 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
|
710 local($_) = @_; |
|
e943f9c09901
do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents:
8917
diff
changeset
|
711 next_optional_argument(); |
|
e943f9c09901
do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents:
8917
diff
changeset
|
712 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
|
713 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
|
714 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
|
715 . $_; |
|
e943f9c09901
do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents:
8917
diff
changeset
|
716 } |
|
e943f9c09901
do_cmd_methodlineni(): New function, needed because the ref. manual now
Fred Drake <fdrake@acm.org>
parents:
8917
diff
changeset
|
717 |
| 7760 | 718 sub do_env_methoddescni{ |
| 719 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
720 next_optional_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
721 my $method = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
722 my $arg_list = next_argument(); |
| 8917 | 723 return "<dl><dt><b>$method</b> (<var>$arg_list</var>)\n<dd>" |
| 724 . $_ | |
| 725 . '</dl>'; | |
| 7760 | 726 } |
| 727 | |
| 728 | |
| 729 sub do_env_memberdesc{ | |
| 730 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
731 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
|
732 my $member = next_argument(); |
| 7760 | 733 $class = $THIS_CLASS |
| 734 unless $class; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
735 my $extra = ''; |
| 7760 | 736 $extra = " ($class_name attribute)" |
|
8027
f5326d358662
Fix typo. (What I get for trying to fix bugs at home and running conversions
Fred Drake <fdrake@acm.org>
parents:
8026
diff
changeset
|
737 if (!($class eq '')); |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
738 my $idx = make_str_index_entry("<tt>$member</tt>$extra"); |
| 7760 | 739 $idx =~ s/ \(.*\)//; |
| 740 $idx =~ s/\(\)//; | |
| 8917 | 741 return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'; |
| 7760 | 742 } |
| 743 | |
| 744 | |
|
8086
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
745 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
|
746 local($_) = @_; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
747 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
|
748 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
|
749 $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
|
750 unless $class; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
751 my $extra = ''; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
752 $extra = " ($class_name attribute)" |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
753 if (!($class eq '')); |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
754 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
|
755 $idx =~ s/ \(.*\)//; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
756 $idx =~ s/\(\)//; |
| 8917 | 757 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
|
758 } |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
759 |
| 7760 | 760 sub do_env_memberdescni{ |
| 761 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
762 next_optional_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
763 my $member = next_argument(); |
| 8917 | 764 return "<dl><dt><b>$member</b>\n<dd>" . $_ . '</dl>'; |
| 7760 | 765 } |
| 766 | |
| 767 | |
|
8086
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
768 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
|
769 local($_) = @_; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
770 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
|
771 my $member = next_argument(); |
| 8917 | 772 return "<dt><b>$member</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
|
773 } |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
774 |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
775 @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
|
776 |
|
10149
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
777 $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
|
778 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
779 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
|
780 local($_) = @_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
781 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
|
782 my($th1,$th2,$th3,$th4) = ('<th>', '<th>', '<th>', '<th>'); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
783 $col_aligns[0] = (($a1 eq 'c') ? '<td align=center>' : '<td>'); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
784 $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
|
785 $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
|
786 $col_aligns[3] = (($a4 eq 'c') ? '<td align=center>' : '<td>'); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
787 # return the aligned header start tags; only used for \begin{tableiii?} |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
788 $th1 = (($a1 eq 'l') ? '<th align=left>' |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
789 : ($a1 eq 'r' ? '<th align=right>' : '<th>')); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
790 $th2 = (($a2 eq 'l') ? '<th align=left>' |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
791 : ($a2 eq 'r' ? '<th align=right>' : '<th>')); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
792 $th3 = (($a3 eq 'l') ? '<th align=left>' |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
793 : ($a3 eq 'r' ? '<th align=right>' : '<th>')); |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
794 $th4 = (($a4 eq 'l') ? '<th align=left>' |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
795 : ($a4 eq 'r' ? '<th align=right>' : '<th>')); |
| 8917 | 796 return ($th1, $th2, $th3, $th4); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
797 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
798 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
799 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
|
800 local($_) = @_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
801 my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument()); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
802 my $font = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
803 my $h1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
804 my $h2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
805 $font = '' |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
806 if ($font eq 'textrm'); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
807 $globals{'lineifont'} = $font; |
| 8917 | 808 return '<table border align=center>' |
|
10149
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
809 . "\n <tr$TABLE_HEADER_BGCOLOR>" |
|
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
810 . "\n $th1<b>$h1</b></th>" |
|
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
811 . "\n $th2<b>$h2</b></th>" |
| 8917 | 812 . $_ |
| 813 . "\n</table>"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
814 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
815 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
816 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
|
817 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
818 my $c1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
819 my $c2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
820 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
|
821 if ($font) { |
| 7937 | 822 $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
|
823 $efont = "</$font>"; |
|
49f11eb4eb9a
This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents:
7779
diff
changeset
|
824 } |
| 7711 | 825 my($c1align,$c2align) = @col_aligns[0,1]; |
| 8917 | 826 return "<tr>$c1align$sfont$c1$efont</td>\n" |
|
10149
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
827 . " $c2align$c2\ </td>" |
| 8917 | 828 . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
829 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
830 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
831 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
|
832 local($_) = @_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
833 my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument()); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
834 my $font = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
835 my $h1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
836 my $h2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
837 my $h3 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
838 $font = '' |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
839 if ($font eq 'textrm'); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
840 $globals{'lineifont'} = $font; |
| 8917 | 841 return '<table border align=center>' |
|
10149
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
842 . "\n <tr$TABLE_HEADER_BGCOLOR>" |
|
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
843 . "\n $th1<b>$h1</b></th>" |
|
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
844 . "\n $th2<b>$h2</b></th>" |
|
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
845 . "\n $th3<b>$h3</b></th>" |
| 8917 | 846 . $_ |
| 847 . "\n</table>"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
848 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
849 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
850 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
|
851 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
852 my $c1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
853 my $c2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
854 my $c3 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
855 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
|
856 if ($font) { |
| 7937 | 857 $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
|
858 $efont = "</$font>"; |
|
49f11eb4eb9a
This fixes a (minor) problem discovered by AMK when you don't want any
Fred Drake <fdrake@acm.org>
parents:
7779
diff
changeset
|
859 } |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
860 my($c1align,$c2align,$c3align) = @col_aligns[0,1,2]; |
| 8917 | 861 return "<tr>$c1align$sfont$c1$efont</td>\n" |
| 862 . " $c2align$c2</td>\n" | |
|
10149
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
863 . " $c3align$c3\ </td>" |
| 8917 | 864 . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
865 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
866 |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
867 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
|
868 local($_) = @_; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
869 my($th1,$th2,$th3,$th4) = setup_column_alignments(next_argument()); |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
870 my $font = next_argument(); |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
871 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
|
872 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
|
873 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
|
874 my $h4 = next_argument(); |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
875 $font = '' |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
876 if ($font eq 'textrm'); |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
877 $globals{'lineifont'} = $font; |
| 8917 | 878 return '<table border align=center>' |
|
10149
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
879 . "\n <tr$TABLE_HEADER_BGCOLOR>" |
|
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
880 . "\n $th1<b>$h1</b></th>" |
|
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
881 . "\n $th2<b>$h2</b></th>" |
|
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
882 . "\n $th3<b>$h3</b></th>" |
|
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
883 . "\n $th4<b>$h4</b></th>" |
| 8917 | 884 . $_ |
| 885 . "\n</table>"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
886 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
887 |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
888 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
|
889 local($_) = @_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
890 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
|
891 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
|
892 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
|
893 my $c4 = next_argument(); |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
894 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
|
895 if ($font) { |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
896 $sfont = "<$font>"; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
897 $efont = "</$font>"; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
898 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
899 my($c1align,$c2align,$c3align,$c4align) = @col_aligns; |
| 8917 | 900 return "<tr>$c1align$sfont$c1$efont</td>\n" |
| 901 . " $c2align$c2</td>\n" | |
| 902 . " $c3align$c3</td>\n" | |
|
10149
959e81b39b81
Make table headers the same color as the navigation bars so they stand
Fred Drake <fdrake@acm.org>
parents:
10138
diff
changeset
|
903 . " $c4align$c4\ </td>" |
| 8917 | 904 . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
905 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
906 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
907 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
|
908 local($_) = @_; |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
909 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
|
910 if ($t_title) { |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
911 $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
|
912 } 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
|
913 if ($t_author) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
914 if ($t_authorURL) { |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
915 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
|
916 $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
|
917 "<b><font size='+2'>$t_author</font></b>"); |
| 7711 | 918 $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
|
919 } else { |
|
10128
0dd4fafefd6c
do_cmd_maketitle(): Small nit in creating the "title page".
Fred Drake <fdrake@acm.org>
parents:
10127
diff
changeset
|
920 $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
|
921 } |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
922 } 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
|
923 if ($t_institute) { |
| 7711 | 924 $the_title .= "\n<p>$t_institute</p>";} |
|
8342
22815a0b1267
Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents:
8294
diff
changeset
|
925 if ($DEVELOPER_ADDRESS) { |
|
22815a0b1267
Added support for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents:
8294
diff
changeset
|
926 $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
|
927 if ($t_affil) { |
| 7711 | 928 $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
|
929 if ($t_date) { |
| 7711 | 930 $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
|
931 if ($PYTHON_VERSION) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
932 $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
|
933 $the_title .= "</p>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
934 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
935 if ($t_address) { |
| 7711 | 936 $the_title .= "\n<p>$t_address</p>"; |
| 937 } 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
|
938 if ($t_email) { |
| 7711 | 939 $the_title .= "\n<p>$t_email</p>"; |
| 940 }# else { $the_title .= "</p>" } | |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
941 $the_title .= "\n</center></div>"; |
| 8917 | 942 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
|
943 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
944 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
945 |
|
8397
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
946 # |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
947 # 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
|
948 # |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
949 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
950 require SynopsisTable; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
951 |
|
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
|
952 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
|
953 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
|
954 $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
|
955 $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
|
956 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
|
957 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
958 |
|
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
|
959 %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
|
960 |
|
fba8455dcb54
Fix up the synopsis table stuff so it gets things right at each chapter,
Fred Drake <fdrake@acm.org>
parents:
8754
diff
changeset
|
961 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
|
962 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
|
963 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
|
964 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
|
965 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
|
966 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
|
967 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
|
968 } |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
969 } |
|
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
|
970 $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
|
971 $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
|
972 return $st; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
973 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
974 |
| 8917 | 975 sub do_cmd_moduleauthor{ |
| 976 local($_) = @_; | |
| 977 next_argument(); | |
| 978 next_argument(); | |
| 979 return $_; | |
| 980 } | |
| 981 | |
| 982 sub do_cmd_sectionauthor{ | |
| 983 local($_) = @_; | |
| 984 next_argument(); | |
| 985 next_argument(); | |
| 986 return $_; | |
| 987 } | |
| 988 | |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
989 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
|
990 local($_) = @_; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
991 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
|
992 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
|
993 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
|
994 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
|
995 # |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
996 $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
|
997 $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
|
998 $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
|
999 define_module($type, $name); |
| 8917 | 1000 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
|
1001 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1002 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1003 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
|
1004 local($_) = @_; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1005 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
|
1006 $st->set_synopsis($THIS_MODULE, next_argument()); |
| 8917 | 1007 return $_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1008 } |
|
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 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
|
1011 local($_) = @_; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1012 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
|
1013 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
|
1014 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1015 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1016 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
|
1017 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
|
1018 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
|
1019 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
|
1020 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
|
1021 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
|
1022 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
|
1023 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1024 } |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
1025 sub process_python_state{ |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
1026 process_all_localmoduletables(); |
|
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
1027 } |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1028 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1029 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1030 # |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1031 # "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
|
1032 # |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1033 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1034 sub do_env_seealso{ |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1035 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
|
1036 . "<p class=heading><b>See Also:</b></p>\n" |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1037 . @_[0] |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1038 . '</div>'; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1039 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1040 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1041 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
|
1042 # 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
|
1043 # 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
|
1044 local($_) = @_; |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1045 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
|
1046 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
|
1047 my $text = next_argument(); |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1048 $key = $module |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1049 unless $key; |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1050 return '<div class=seemodule>' |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1051 . "\n<p>Module <b><tt class=module><a href=\"module-$key.html\">" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1052 . "$module</a></tt></b>" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1053 . " ($text)</p>\n</div>" |
|
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1054 . $_; |
|
8754
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1055 } |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1056 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1057 sub do_cmd_seetext{ |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1058 return '<div class=seetext><p>' . @_[0] . '</div>'; |
|
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 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1061 |
|
e88d4e6e4622
Added module synopsis support with one (big) caveat: All the modules are
Fred Drake <fdrake@acm.org>
parents:
8397
diff
changeset
|
1062 # |
|
8397
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1063 # Definition list support. |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1064 # |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1065 |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1066 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
|
1067 local($_) = @_; |
|
10197
de7c0003578f
Become more stylesheet-friendly.
Fred Drake <fdrake@acm.org>
parents:
10157
diff
changeset
|
1068 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
|
1069 } |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1070 |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1071 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
|
1072 local($_) = @_; |
|
9775
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
1073 my $term = next_argument(); |
|
b116afb81732
write_idxfile(): New function. Isolate format of the external index
Fred Drake <fdrake@acm.org>
parents:
9769
diff
changeset
|
1074 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
|
1075 # could easily add an index entry here... |
| 8917 | 1076 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
|
1077 } |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1078 |
|
c9b7e926fd86
Added support for AMK's {definitions} environment; thanks for the reminder!
Fred Drake <fdrake@acm.org>
parents:
8349
diff
changeset
|
1079 |
|
10100
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
1080 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
|
1081 code # {} |
|
10138
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
1082 declaremodule # [] # {} # {} |
|
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
1083 memberline # [] # {} |
|
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
1084 methodline # [] # {} # {} |
|
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
1085 modulesynopsis # {} |
|
10327
66a7d61cfd84
swallow_newline(): Removed function; not really needed. Modified all call
Fred Drake <fdrake@acm.org>
parents:
10197
diff
changeset
|
1086 platform # {} |
|
10100
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
1087 samp # {} |
|
10138
b21915e6589e
Fix up some routines to coordinate the "indexsubitem" stuff so that
Fred Drake <fdrake@acm.org>
parents:
10128
diff
changeset
|
1088 setindexsubitem # {} |
|
10157
13239b48c469
Minor fix that helps out with the index.
Fred Drake <fdrake@acm.org>
parents:
10149
diff
changeset
|
1089 withsubitem # {} # {} |
|
10100
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
1090 _RAW_ARG_DEFERRED_CMDS_ |
|
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
1091 |
|
9184862bd8d1
More magic to tighten up a little of the formatting.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
1092 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1093 1; # This must be the last line |
