Mercurial > cpython-lru_cache-weakref
annotate Doc/perl/python.perl @ 8294:35ea0c073ea3 legacy-trunk
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Mon, 11 May 1998 18:31:17 +0000 |
| parents | b6686f753798 |
| children | 22815a0b1267 |
| rev | line source |
|---|---|
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1 # python.perl by Fred L. Drake, Jr. <fdrake@acm.org> -*- perl -*- |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
2 # |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
3 # Heavily based on Guido van Rossum's myformat.perl (now obsolete). |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
4 # |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
5 # Extension to LaTeX2HTML for documents using myformat.sty. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
6 # Subroutines of the form do_cmd_<name> here define translations |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
7 # for LaTeX commands \<name> defined in the corresponding .sty file. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
8 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
9 package main; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
10 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
11 |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
12 sub next_argument_id{ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
13 my ($param,$br_id); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
14 $param = missing_braces() |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
15 unless ((s/$next_pair_pr_rx/$br_id=$1;$param=$2;''/eo) |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
16 ||(s/$next_pair_rx/$br_id=$1;$param=$2;''/eo)); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
17 ($param, $br_id); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
18 } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
19 |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
20 sub next_argument{ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
21 my ($param,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
22 $param; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
23 } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
24 |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
25 sub next_optional_argument{ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
26 my($param,$rx) = ('', "^\\s*(\\[([^]]*)\\])?"); |
|
8086
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
27 s/$rx/$param=$2;''/eo; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
28 $param; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
29 } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
30 |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
31 sub swallow_newline{ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
32 s/[\n]?//o; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
33 } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
34 |
|
8086
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
35 sub ArabictoRoman { |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
36 # Written by Robert Donohue <donahue@cfassp48.harvard.edu>, |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
37 # fixed by Fred Drake <fdrake@acm.org>, |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
38 # kept around in case it becomes useful. |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
39 my $a = @_; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
40 my($b,@c,$i); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
41 my(@D0,@D1,@D2); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
42 |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
43 @D0 = ("", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
44 @D1 = ("", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
45 @D2 = ("", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
46 |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
47 $b = $a; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
48 $i = 0; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
49 while($b > 0) { |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
50 $c[$i] = ($b % 10); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
51 $b -= ($b % 10); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
52 $b /= 10; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
53 $i++; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
54 } |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
55 $D2[$c[2]] . $D1[$c[1]] . $D0[$c[0]]; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
56 } |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
57 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
58 # 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
|
59 |
|
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_ABC{ 'ABC' . @_[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_UNIX{ 'Unix'. @_[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_ASCII{ 'ASCII' . @_[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_POSIX{ 'POSIX' . @_[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_C{ 'C' . @_[0]; } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
65 sub do_cmd_Cpp{ 'C++' . @_[0]; } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
66 sub do_cmd_EOF{ 'EOF' . @_[0]; } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
67 sub do_cmd_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
|
68 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
69 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
|
70 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
71 $AUTHOR_ADDRESS = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
72 $PYTHON_VERSION = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
73 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
74 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
|
75 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
|
76 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
77 $PYTHON_VERSION = next_argument(); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
78 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
79 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
80 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
81 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
|
82 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
83 $AUTHOR_ADDRESS = next_argument(); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
84 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
85 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
86 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
87 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
|
88 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
89 next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
90 '_' . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
91 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
92 |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
93 sub use_wrappers{ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
94 local($_,$before,$after) = @_; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
95 my $stuff = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
96 $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
|
97 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
98 |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
99 sub use_current{ use_wrappers(@_[0], '', ''); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
100 sub use_sans_serif{ use_wrappers(@_[0], '<font face=sans-serif>', '</font>'); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
101 sub use_italics{ use_wrappers(@_[0], '<i>', '</i>'); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
102 |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
103 sub do_cmd_optional{ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
104 use_wrappers(@_[0], "</var><big>\[</big><var>", |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
105 "</var><big>\]</big><var>"); |
|
7802
dffe1e470e6c
Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents:
7798
diff
changeset
|
106 } |
|
dffe1e470e6c
Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents:
7798
diff
changeset
|
107 |
| 7711 | 108 # Logical formatting (some based on texinfo), needs to be converted to |
| 109 # minimalist HTML. The "minimalist" is primarily to reduce the size of | |
| 110 # output files for users that read them over the network rather than | |
| 111 # 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
|
112 |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
113 sub do_cmd_pytype{ use_current(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
114 sub do_cmd_makevar{ use_current(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
115 sub do_cmd_code{ use_wrappers(@_[0], '<tt>', '</tt>'); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
116 sub do_cmd_module{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
117 sub do_cmd_keyword{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
118 sub do_cmd_exception{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
119 sub do_cmd_class{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
120 sub do_cmd_function{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
121 sub do_cmd_constant{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
122 sub do_cmd_member{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
123 sub do_cmd_method{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
124 sub do_cmd_cfunction{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
125 sub do_cmd_cdata{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
126 sub do_cmd_ctype{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
127 sub do_cmd_regexp{ do_cmd_code(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
128 sub do_cmd_character{ do_cmd_samp(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
129 sub do_cmd_program{ do_cmd_strong(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
130 sub do_cmd_email{ use_sans_serif(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
131 sub do_cmd_mimetype{ use_sans_serif(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
132 sub do_cmd_var{ use_italics(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
133 sub do_cmd_dfn{ use_italics(@_); } # make an index entry? |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
134 sub do_cmd_emph{ use_italics(@_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
135 sub do_cmd_file{ use_wrappers(@_[0], '"<tt>', '</tt>"'); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
136 sub do_cmd_samp{ use_wrappers(@_[0], '"<tt>', '</tt>"'); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
137 sub do_cmd_kbd{ use_wrappers(@_[0], '<kbd>', '</kbd>'); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
138 sub do_cmd_strong{ use_wrappers(@_[0], '<b>', '</b>'); } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
139 |
|
7779
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
140 sub do_cmd_newsgroup{ |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
141 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
142 my $newsgroup = next_argument(); |
|
7779
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
143 my $stuff = "<a href=\"news:$newsgroup\"><font face=sans-serif>" |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
144 . "$newsgroup</font></a>"; |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
145 $stuff . $_; |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
146 } |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
147 |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
148 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
|
149 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
150 my($envvar,$br_id) = next_argument_id(); |
| 7760 | 151 my($name,$aname,$ahref) = link_info($br_id); |
|
7909
5eafd3eda0af
Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents:
7906
diff
changeset
|
152 # 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
|
153 # 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
|
154 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
|
155 $ahref); |
| 7760 | 156 add_index_entry("$envvar@\$$envvar", $ahref); |
| 157 "$aname\$$envvar</a>" . $_; | |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
158 } |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
159 |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
160 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
161 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
|
162 # 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
|
163 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
164 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
|
165 $url =~ s/~/~/g; |
| 7711 | 166 "<a href=\"$url\"><font face=sans-serif>$url</font></a>" . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
167 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
168 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
169 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
|
170 # 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
|
171 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
172 my $page = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
173 my $section = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
174 "<i>$page</i>($section)" . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
175 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
176 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
177 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
|
178 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
179 my($rfcnumber,$br_id) = next_argument(); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
180 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
181 # Save the reference |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
182 my $nstr = gen_index_id("RFC!RFC $rfcnumber", ''); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
183 $index{$nstr} .= make_half_href("$CURRENT_FILE#$br_id"); |
| 7711 | 184 "<a name=$br_id>RFC $rfcnumber</a>" .$_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
185 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
186 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
187 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
|
188 # 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
|
189 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
190 my $release = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
191 my $reason = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
192 "<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
|
193 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
194 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
195 # file and samp are at the end of this file since they screw up fontlock. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
196 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
197 # index commands |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
198 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
199 $INDEX_SUBITEM = ""; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
200 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
201 sub get_indexsubitem{ |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
202 #$INDEX_SUBITEM ? " $INDEX_SUBITEM" : ''; |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
203 ''; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
204 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
205 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
206 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
|
207 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
208 $INDEX_SUBITEM = next_argument(); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
209 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
210 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
211 |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
212 sub do_cmd_withsubitem{ |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
213 # We can't really do the right right thing, because LaTeX2HTML doesn't |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
214 # 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
|
215 # 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
|
216 # |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
217 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
218 next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
219 my $stuff = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
220 $stuff . $_; |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
221 } |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
222 |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
223 # 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
|
224 # 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
|
225 # |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
226 sub do_cmd_makemodindex{ @_[0]; } |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
227 |
| 7760 | 228 # 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
|
229 # |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
230 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
|
231 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
|
232 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
|
233 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
|
234 |
|
5eafd3eda0af
Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents:
7906
diff
changeset
|
235 # 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
|
236 # 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
|
237 # |
|
5eafd3eda0af
Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents:
7906
diff
changeset
|
238 $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
|
239 |
| 7760 | 240 |
| 241 sub gen_target_name{ | |
| 242 "l2h-" . @_[0]; | |
| 243 } | |
| 244 | |
| 245 sub gen_target{ | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
246 '<a name="' . @_[0] . '">'; |
| 7760 | 247 } |
| 248 | |
| 249 sub gen_link{ | |
| 250 my($node,$target) = @_; | |
| 251 print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n"; | |
| 252 "<a href=\"$node#$target\">"; | |
| 253 } | |
| 254 | |
| 255 sub make_index_entry{ | |
| 256 my($br_id,$str) = @_; | |
| 257 my($name,$aname,$ahref) = link_info($br_id); | |
| 258 add_index_entry($str, $ahref); | |
| 259 "$aname$anchor_invisible_mark</a>"; | |
| 260 } | |
| 261 | |
| 262 sub add_index_entry{ | |
| 263 # add an entry to the index structures; ignore the return value | |
| 264 my($str,$ahref) = @_; | |
| 265 $str = gen_index_id($str, ''); | |
| 266 $index{$str} .= $ahref; | |
|
7909
5eafd3eda0af
Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents:
7906
diff
changeset
|
267 print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n"; |
| 7760 | 268 } |
| 269 | |
| 270 sub link_info{ | |
| 271 my $name = gen_target_name(@_[0]); | |
| 272 my $aname = gen_target($name); | |
| 273 my $ahref = gen_link($CURRENT_FILE, $name); | |
| 274 return ($name, $aname, $ahref); | |
| 275 } | |
| 276 | |
| 277 sub do_cmd_index{ | |
| 278 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
279 my($str,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
280 swallow_newline(); |
| 7760 | 281 # |
| 282 my($name,$aname,$ahref) = link_info($br_id); | |
| 283 add_index_entry("$str", $ahref); | |
| 284 "$aname$anchor_invisible_mark</a>" . $_; | |
| 285 } | |
| 286 | |
|
8294
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
287 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
|
288 local($_) = @_; |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
289 my($str,$br_id) = next_argument_id(); |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
290 # |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
291 my($name,$aname,$ahref) = link_info($br_id); |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
292 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
|
293 add_index_entry("keyword!<tt>$str</tt>", $ahref); |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
294 "$aname$anchor_invisible_mark</a>" . $_; |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
295 } |
|
35ea0c073ea3
do_cmd_kwindex(): Re-implement now that \kwindex is used again (ref man).
Fred Drake <fdrake@acm.org>
parents:
8194
diff
changeset
|
296 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
297 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
|
298 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
299 my($str1,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
300 my $str2 = next_argument(); |
| 7760 | 301 # |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
302 my($name,$aname,$ahref) = link_info($br_id); |
| 7760 | 303 add_index_entry("$str1!$str2", $ahref); |
| 304 add_index_entry("$str2!$str1", $ahref); | |
| 305 "$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
|
306 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
307 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
308 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
|
309 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
310 my($str1,$br_id) = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
311 my $str2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
312 my $str3 = next_argument(); |
| 7760 | 313 # |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
314 my($name,$aname,$ahref) = link_info($br_id); |
| 7760 | 315 add_index_entry("$str1!$str2 $str3", $ahref); |
| 316 add_index_entry("$str2!$str3, $str1", $ahref); | |
| 317 add_index_entry("$str3!$str1 $str2", $ahref); | |
| 318 "$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
|
319 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
320 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
321 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
|
322 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
323 my($str1,$br_id) = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
324 my $str2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
325 my $str3 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
326 my $str4 = next_argument(); |
| 7760 | 327 # |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
328 my($name,$aname,$ahref) = link_info($br_id); |
| 7760 | 329 add_index_entry("$str1!$str2 $str3 $str4", $ahref); |
| 330 add_index_entry("$str2!$str3 $str4, $str1", $ahref); | |
| 331 add_index_entry("$str3!$str4, $str1 $str2", $ahref); | |
| 332 add_index_entry("$str4!$$str1 $str2 $str3", $ahref); | |
| 333 "$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
|
334 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
335 |
| 7711 | 336 sub do_cmd_ttindex{ |
| 337 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
338 my($str,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
339 swallow_newline(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
340 make_index_entry($br_id, $str . get_indexsubitem()) . $_; |
| 7711 | 341 } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
342 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
343 sub my_typed_index_helper{ |
| 7711 | 344 local($word,$_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
345 my($str,$br_id) = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
346 swallow_newline(); |
| 7760 | 347 # |
| 348 my($name,$aname,$ahref) = link_info($br_id1); | |
| 349 add_index_entry("$str $word", $ahref); | |
| 350 add_index_entry("$word!$str", $ahref); | |
| 351 "$aname$anchor_invisible_mark</a>" . $_; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
352 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
353 |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
354 sub do_cmd_stindex{ my_typed_index_helper('statement', @_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
355 sub do_cmd_opindex{ my_typed_index_helper('operator', @_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
356 sub do_cmd_exindex{ my_typed_index_helper('exception', @_); } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
357 sub do_cmd_obindex{ my_typed_index_helper('object', @_); } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
358 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
359 sub my_parword_index_helper{ |
| 7711 | 360 local($word,$_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
361 my($str,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
362 swallow_newline(); |
| 7760 | 363 make_index_entry($br_id, "$str ($word)") . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
364 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
365 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
366 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
367 sub make_mod_index_entry{ |
| 7711 | 368 my($br_id,$str,$define) = @_; |
| 7760 | 369 my($name,$aname,$ahref) = link_info($br_id); |
| 370 # equivalent of add_index_entry() using $define instead of '' | |
| 371 $str = gen_index_id($str, $define); | |
| 372 $index{$str} .= $ahref; | |
|
7909
5eafd3eda0af
Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents:
7906
diff
changeset
|
373 print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n"; |
| 7760 | 374 |
| 7711 | 375 if ($define eq 'DEF') { |
| 7760 | 376 # add to the module index |
| 7711 | 377 my($nstr,$garbage) = split / /, $str, 2; |
| 7760 | 378 $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
|
379 } |
| 7760 | 380 "$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
|
381 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
382 |
| 7711 | 383 $THIS_MODULE = ''; |
| 7760 | 384 $THIS_CLASS = ''; |
| 7711 | 385 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
386 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
|
387 local($word, $_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
388 my($str,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
389 swallow_newline(); |
| 7711 | 390 my $section_tag = join('', @curr_sec_id); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
391 $word = "$word " if $word; |
| 7711 | 392 $THIS_MODULE = "$str"; |
| 7760 | 393 make_mod_index_entry("SECTION$section_tag", |
| 394 "<tt>$str</tt> (${word}module)", 'DEF') . $_; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
395 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
396 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
397 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
|
398 local($word, $_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
399 my($str,$br_id) = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
400 swallow_newline(); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
401 $word = "$word " if $word; |
| 7760 | 402 make_mod_index_entry($br_id, "<tt>$str</tt> (${word}module)", 'REF') . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
403 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
404 |
| 7711 | 405 sub do_cmd_bifuncindex{ |
| 406 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
407 my($str,$br_id) = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
408 swallow_newline(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
409 my $fname = "<tt>$str()</tt>"; |
| 7760 | 410 make_index_entry($br_id, "$fname (built-in function)") . $_; |
| 7711 | 411 } |
| 412 | |
| 7760 | 413 sub do_cmd_modindex{ my_module_index_helper('', @_); } |
| 414 sub do_cmd_bimodindex{ my_module_index_helper('built-in', @_); } | |
| 415 sub do_cmd_exmodindex{ my_module_index_helper('extension', @_); } | |
| 416 sub do_cmd_stmodindex{ my_module_index_helper('standard', @_); } | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
417 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
418 # these should be adjusted a bit.... |
| 7760 | 419 sub do_cmd_refmodindex{ ref_module_index_helper('', @_); } |
| 420 sub do_cmd_refbimodindex{ ref_module_index_helper('built-in', @_); } | |
| 421 sub do_cmd_refexmodindex{ ref_module_index_helper('extension', @_); } | |
| 422 sub do_cmd_refstmodindex{ ref_module_index_helper('standard', @_); } | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
423 |
| 7760 | 424 sub do_cmd_nodename{ do_cmd_label(@_); } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
425 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
426 sub init_myformat{ |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
427 # $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
|
428 $anchor_mark = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
429 $icons{'anchor_mark'} = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
430 } |
| 7760 | 431 init_myformat(); |
|
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 # 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
|
434 # 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
|
435 # |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
436 sub make_str_index_entry{ |
| 7711 | 437 my($br_id,$str) = @_; |
| 7760 | 438 my($name,$aname,$ahref) = link_info($br_id); |
| 439 add_index_entry($str, $ahref); | |
| 440 "$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
|
441 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
442 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
443 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
|
444 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
445 my $return_type = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
446 my($function_name,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
447 my $arg_list = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
448 my $idx = make_str_index_entry($br_id, |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
449 "<tt>$function_name()</tt>" . get_indexsubitem()); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
450 $idx =~ s/ \(.*\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
451 $idx =~ s/\(\)//; # ???? |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
452 "<dl><dt>$return_type <b>$idx</b>" |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
453 . "(<var>$arg_list</var>)\n<dd>" |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
454 . $_ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
455 . '</dl>'; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
456 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
457 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
458 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
|
459 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
460 my($type_name,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
461 my $idx = make_str_index_entry($br_id, |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
462 "<tt>$type_name</tt>" . get_indexsubitem()); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
463 $idx =~ s/ \(.*\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
464 "<dl><dt><b>$idx</b>\n<dd>" |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
465 . $_ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
466 . '</dl>' |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
467 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
468 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
469 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
|
470 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
471 my $var_type = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
472 my($var_name,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
473 my $idx = make_str_index_entry($br_id, |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
474 "<tt>$var_name</tt>" . get_indexsubitem()); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
475 $idx =~ s/ \(.*\)//; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
476 "<dl><dt>$var_type <b>$idx</b>\n" |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
477 . '<dd>' |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
478 . $_ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
479 . '</dl>'; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
480 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
481 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
482 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
|
483 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
484 my $function_name = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
485 my($arg_list,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
486 my $idx = make_str_index_entry($br_id, "<tt>$function_name()</tt>" |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
487 . get_indexsubitem()); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
488 $idx =~ s/ \(.*\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
489 $idx =~ s/\(\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
490 "<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
|
491 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
492 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
493 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
|
494 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
495 my $function_name = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
496 my $arg_list = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
497 "<dl><dt><b><tt>$function_name</tt></b> (<var>$arg_list</var>)\n<dd>" |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
498 . $_ . '</dl>'; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
499 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
500 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
501 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
|
502 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
503 my $function_name = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
504 my($arg_list,$br_id) = next_argument_id(); |
| 7760 | 505 my $idx = make_str_index_entry($br_id, "<tt>$function_name()</tt>" |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
506 . get_indexsubitem()); |
| 7711 | 507 $idx =~ s/\(\)//; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
508 "<dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
509 } |
|
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 # 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
|
512 # 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
|
513 # module. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
514 # |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
515 $INDEX_OPCODES = 0; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
516 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
517 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
|
518 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
519 my $opcode_name = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
520 my($arg_list,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
521 my $idx; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
522 if ($INDEX_OPCODES) { |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
523 $idx = make_str_index_entry($br_id, |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
524 "<tt>$opcode_name</tt> (byte code instruction)"); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
525 $idx =~ s/ \(byte code instruction\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
526 } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
527 else { |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
528 $idx = "<tt>$opcode_name</tt>"; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
529 } |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
530 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
|
531 if ($arg_list) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
532 $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
|
533 } |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
534 $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
|
535 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
536 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
537 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
|
538 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
539 my($dataname,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
540 my $idx = make_str_index_entry($br_id, |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
541 "<tt>$dataname</tt>" . get_indexsubitem()); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
542 $idx =~ s/ \(.*\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
543 "<dl><dt><b>$idx</b>\n<dd>" |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
544 . $_ |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
545 . '</dl>'; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
546 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
547 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
548 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
|
549 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
550 my $idx = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
551 if (! $STRING_INDEX_TT) { |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
552 $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
|
553 } |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
554 "<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
|
555 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
556 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
557 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
|
558 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
559 my($data_name,$br_id) = next_argument_id(); |
| 7760 | 560 my $idx = make_str_index_entry($br_id, "<tt>$data_name</tt>" |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
561 . get_indexsubitem()); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
562 $idx =~ s/ \(.*\)//; |
| 7760 | 563 "<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
|
564 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
565 |
| 7760 | 566 sub do_env_excdesc{ |
| 567 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
568 my($excname,$br_id) = next_argument_id(); |
|
7909
5eafd3eda0af
Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents:
7906
diff
changeset
|
569 my $idx = make_str_index_entry($br_id, "<tt>$excname</tt>"); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
570 "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>' |
| 7760 | 571 } |
| 572 | |
| 573 sub do_env_fulllineitems{ do_env_itemize(@_); } | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
574 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
575 |
| 7711 | 576 sub do_env_classdesc{ |
| 577 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
578 $THIS_CLASS = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
579 my($arg_list,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
580 $idx = make_str_index_entry($br_id, |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
581 "<tt>$THIS_CLASS</tt> (class in $THIS_MODULE)" ); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
582 $idx =~ s/ \(.*\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
583 "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; |
| 7760 | 584 } |
| 585 | |
| 586 | |
| 587 sub do_env_methoddesc{ | |
| 588 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
589 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
|
590 $class_name = $THIS_CLASS |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
591 unless $class_name; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
592 my($method_name,$br_id) = next_argument_id(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
593 my $arg_list = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
594 my $extra = ''; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
595 if ($class_name) { |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
596 $extra = " ($class_name method)"; |
| 7760 | 597 } |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
598 my $idx = make_str_index_entry($br_id, "<tt>$method_name()</tt>$extra"); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
599 $idx =~ s/ \(.*\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
600 $idx =~ s/\(\)//; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
601 "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; |
| 7711 | 602 } |
| 603 | |
| 7760 | 604 |
| 605 sub do_env_methoddescni{ | |
| 606 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
607 next_optional_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
608 my $method = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
609 my $arg_list = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
610 "<dl><dt><b>$method</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; |
| 7760 | 611 } |
| 612 | |
| 613 | |
| 614 sub do_env_memberdesc{ | |
| 615 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
616 my $class = next_optional_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
617 my($member,$br_id) = next_argument(); |
| 7760 | 618 $class = $THIS_CLASS |
| 619 unless $class; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
620 my $extra = ''; |
| 7760 | 621 $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
|
622 if (!($class eq '')); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
623 my $idx = make_str_index_entry($br_id, "<tt>$member</tt>$extra"); |
| 7760 | 624 $idx =~ s/ \(.*\)//; |
| 625 $idx =~ s/\(\)//; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
626 "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'; |
| 7760 | 627 } |
| 628 | |
| 629 | |
|
8086
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
630 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
|
631 local($_) = @_; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
632 my $class = next_optional_argument(); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
633 my($member,$br_id) = next_argument_id(); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
634 $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
|
635 unless $class; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
636 my $extra = ''; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
637 $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
|
638 if (!($class eq '')); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
639 my $idx = make_str_index_entry($br_id, "<tt>$member</tt>$extra"); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
640 $idx =~ s/ \(.*\)//; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
641 $idx =~ s/\(\)//; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
642 "<dt><b>$idx</b><dd>" . $_; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
643 } |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
644 |
| 7760 | 645 sub do_env_memberdescni{ |
| 646 local($_) = @_; | |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
647 next_optional_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
648 my $member = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
649 "<dl><dt><b>$member</b>\n<dd>" . $_ . '</dl>'; |
| 7760 | 650 } |
| 651 | |
| 652 | |
|
8086
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
653 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
|
654 local($_) = @_; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
655 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
|
656 my $member = next_argument(); |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
657 "<dt><b>$member</b><dd>" . $_; |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
658 } |
|
692be123f547
next_optional_argument(): Don't include the square brackets in the return
Fred Drake <fdrake@acm.org>
parents:
8074
diff
changeset
|
659 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
660 @col_aligns = ("<td>", "<td>", "<td>"); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
661 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
662 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
|
663 local($_) = @_; |
| 8018 | 664 my($a1,$a2,$a3) = split(/[|]/,$_); |
| 7711 | 665 my($th1,$th2,$th3) = ('<th>', '<th>', '<th>'); |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
666 $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
|
667 $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
|
668 $col_aligns[2] = (($a3 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
|
669 # 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
|
670 $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
|
671 : ($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
|
672 $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
|
673 : ($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
|
674 $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
|
675 : ($a3 eq 'r' ? '<th align=right>' : '<th>')); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
676 ($th1, $th2, $th3); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
677 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
678 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
679 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
|
680 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
681 my($th1,$th2,$th3) = setup_column_alignments(next_argument()); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
682 my $font = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
683 my $h1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
684 my $h2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
685 $font = '' |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
686 if ($font eq 'textrm'); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
687 $globals{'lineifont'} = $font; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
688 '<table border align=center>' |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
689 . "\n <tr>$th1<b>$h1</b></th>" |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
690 . "\n $th2<b>$h2</b></th>" |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
691 . $_ |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
692 . "\n</table>"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
693 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
694 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
695 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
|
696 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
697 my $c1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
698 my $c2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
699 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
|
700 if ($font) { |
| 7937 | 701 $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
|
702 $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
|
703 } |
| 7711 | 704 my($c1align,$c2align) = @col_aligns[0,1]; |
| 7937 | 705 "<tr>$c1align$sfont$c1$efont</td>\n" |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
706 . " $c2align$c2</td>" |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
707 . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
708 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
709 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
710 sub do_env_tableiii{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
711 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
712 my($th1,$th2,$th3) = setup_column_alignments(next_argument()); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
713 my $font = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
714 my $h1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
715 my $h2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
716 my $h3 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
717 $font = '' |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
718 if ($font eq 'textrm'); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
719 $globals{'lineifont'} = $font; |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
720 '<table border align=center>' |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
721 . "\n <tr>$th1<b>$h1</b></th>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
722 . "\n $th2<b>$h2</b></th>" |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
723 . "\n $th3<b>$h3</b></th>" |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
724 . $_ |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
725 . "\n</table>"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
726 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
727 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
728 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
|
729 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
730 my $c1 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
731 my $c2 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
732 my $c3 = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
733 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
|
734 if ($font) { |
| 7937 | 735 $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
|
736 $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
|
737 } |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
738 my($c1align,$c2align,$c3align) = @col_aligns; |
| 7937 | 739 "<tr>$c1align$sfont$c1$efont</td>\n" |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
740 . " $c2align$c2</td>\n" |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
741 . " $c3align$c3</td>" |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
742 . $_; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
743 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
744 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
745 sub do_env_seealso{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
746 "<p><b>See Also:</b></p>\n" . @_[0]; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
747 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
748 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
749 sub do_cmd_seemodule{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
750 # Insert the right magic to jump to the module definition. This should |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
751 # work most of the time, at least for repeat builds.... |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
752 local($_) = @_; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
753 my $key = next_optional_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
754 my $module = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
755 my $text = next_argument(); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
756 $key = $module |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
757 unless $key; |
|
7581
0f565c7fe4bb
Misc. revisions to LaTeX2HTML support.
Fred Drake <fdrake@acm.org>
parents:
7563
diff
changeset
|
758 "<p>Module <tt><b><a href=\"module-$key.html\">$module</a></b></tt>" |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
759 . " ($text)</p>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
760 . $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
761 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
762 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
763 sub do_cmd_seetext{ |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
764 '<p>' . @_[0]; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
765 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
766 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
767 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
768 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
|
769 local($_) = @_; |
| 7711 | 770 my $the_title = ''; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
771 if ($t_title) { |
| 7711 | 772 $the_title .= "<h1 align=center>$t_title</h1>"; |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
773 } else { write_warnings("\nThis document has no title."); } |
| 7711 | 774 $the_title .= "\n<center>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
775 if ($t_author) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
776 if ($t_authorURL) { |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
777 my $href = translate_commands($t_authorURL); |
|
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
778 $href = make_named_href('author', $href, "<strong>${t_author}</strong>"); |
| 7711 | 779 $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
|
780 } else { |
| 7711 | 781 $the_title .= "\n<p><strong>$t_author</strong></p>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
782 } |
|
8074
d0ff41746a26
New helper functions to help deal with parameter parsing.
Fred Drake <fdrake@acm.org>
parents:
8031
diff
changeset
|
783 } 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
|
784 if ($t_institute) { |
| 7711 | 785 $the_title .= "\n<p>$t_institute</p>";} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
786 if ($AUTHOR_ADDRESS) { |
| 7711 | 787 $the_title .= "\n<p>$AUTHOR_ADDRESS</p>";} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
788 if ($t_affil) { |
| 7711 | 789 $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
|
790 if ($t_date) { |
| 7711 | 791 $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
|
792 if ($PYTHON_VERSION) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
793 $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
|
794 $the_title .= "</p>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
795 } |
| 7711 | 796 $the_title .= "\n</center>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
797 if ($t_address) { |
| 7711 | 798 $the_title .= "\n<p>$t_address</p>"; |
| 799 } 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
|
800 if ($t_email) { |
| 7711 | 801 $the_title .= "\n<p>$t_email</p>"; |
| 802 }# else { $the_title .= "</p>" } | |
| 803 $the_title . "<hr>\n" . $_ ; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
804 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
805 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
806 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
807 1; # This must be the last line |
