Mercurial > cpython-lru_cache-weakref
annotate Doc/perl/python.perl @ 7995:daffde7a6891 legacy-trunk
do_env_memberdesc(): Fix argument parsing for {memberdesc} environments.
(The bug was detected by the Q/A team -- me! Please, help review the docs!)
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Sat, 11 Apr 1998 03:12:06 +0000 |
| parents | f223bf61b4ee |
| children | 011ae71fea96 |
| 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 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
12 # 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
|
13 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
14 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
|
15 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
|
16 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
|
17 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
|
18 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
|
19 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
|
20 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
|
21 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
|
22 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
23 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
|
24 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
25 $AUTHOR_ADDRESS = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
26 $PYTHON_VERSION = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
27 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
28 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
|
29 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
|
30 local($_) = @_; |
| 7711 | 31 s/$next_pair_pr_rx//; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
32 $PYTHON_VERSION = "$2"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
33 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
34 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
35 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
36 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
|
37 local($_) = @_; |
| 7711 | 38 s/$next_pair_pr_rx//; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
39 $AUTHOR_ADDRESS = "$2"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
40 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
41 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
42 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
43 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
|
44 local($_) = @_; |
| 7711 | 45 s/$next_pair_pr_rx/_/; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
46 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
47 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
48 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
49 sub do_cmd_optional{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
50 local($_) = @_; |
| 7711 | 51 s|$next_pair_pr_rx|</var><big>\[</big><var>\2</var><big>\]</big><var>|; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
52 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
53 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
54 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
55 sub do_cmd_varvars{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
56 local($_) = @_; |
| 7711 | 57 s|$next_pair_pr_rx|<var>\2</var>|; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
58 $_; |
|
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 |
| 7858 | 61 sub use_current{ |
|
7802
dffe1e470e6c
Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents:
7798
diff
changeset
|
62 local($_) = @_; |
|
dffe1e470e6c
Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents:
7798
diff
changeset
|
63 s|$next_pair_pr_rx|\2|; |
|
dffe1e470e6c
Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents:
7798
diff
changeset
|
64 $_; |
|
dffe1e470e6c
Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents:
7798
diff
changeset
|
65 } |
|
dffe1e470e6c
Match python.sty a little better.
Fred Drake <fdrake@acm.org>
parents:
7798
diff
changeset
|
66 |
| 7858 | 67 sub do_cmd_pytype{ use_current(); } |
| 68 sub do_cmd_makevar{ use_current(); } | |
| 69 | |
| 7711 | 70 # Logical formatting (some based on texinfo), needs to be converted to |
| 71 # minimalist HTML. The "minimalist" is primarily to reduce the size of | |
| 72 # output files for users that read them over the network rather than | |
| 73 # 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
|
74 |
|
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_code{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
76 local($_) = @_; |
| 7711 | 77 s|$next_pair_pr_rx|<tt>\2</tt>|; |
| 78 $_; | |
| 79 } | |
| 80 | |
| 81 sub use_sans_serif{ | |
| 82 local($_) = @_; | |
| 83 s|$next_pair_pr_rx|<font face=sans-serif>\2</font>|; | |
| 84 $_; | |
| 85 } | |
| 86 | |
| 87 sub use_italics{ | |
| 88 local($_) = @_; | |
| 89 s|$next_pair_pr_rx|<i>\2</i>|; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
90 $_; |
|
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 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
93 sub do_cmd_sectcode{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
94 sub do_cmd_module{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
95 sub do_cmd_keyword{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
96 sub do_cmd_exception{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
97 sub do_cmd_class{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
98 sub do_cmd_function{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
99 sub do_cmd_constant{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
100 sub do_cmd_member{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
101 sub do_cmd_method{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
102 sub do_cmd_cfunction{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
103 sub do_cmd_cdata{ &do_cmd_code(@_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
104 sub do_cmd_ctype{ &do_cmd_code(@_); } |
| 7711 | 105 sub do_cmd_regexp{ &do_cmd_code(@_); } |
| 106 sub do_cmd_key{ &do_cmd_code(@_); } | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
107 |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
108 sub do_cmd_character{ &do_cmd_samp(@_); } |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
109 |
| 7711 | 110 sub do_cmd_program{ &do_cmd_strong(@_); } |
| 111 | |
| 112 sub do_cmd_email{ &use_sans_serif(@_); } | |
| 113 sub do_cmd_mimetype{ &use_sans_serif(@_); } | |
| 114 | |
| 115 sub do_cmd_var{ &use_italics(@_); } | |
| 7760 | 116 sub do_cmd_dfn{ &use_italics(@_); } # make an index entry? |
| 7711 | 117 sub do_cmd_emph{ &use_italics(@_); } |
| 118 | |
|
7779
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
119 sub do_cmd_newsgroup{ |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
120 local($_) = @_; |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
121 s/$next_pair_pr_rx//o; |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
122 my $newsgroup = $2; |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
123 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
|
124 . "$newsgroup</font></a>"; |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
125 $stuff . $_; |
|
1c420699d58a
Implemented one more special markup item.
Fred Drake <fdrake@acm.org>
parents:
7760
diff
changeset
|
126 } |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
127 |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
128 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
|
129 local($_) = @_; |
| 7760 | 130 s/$next_pair_pr_rx//; |
| 131 my($br_id,$envvar) = ($1, $2); | |
| 132 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
|
133 # 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
|
134 # 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
|
135 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
|
136 $ahref); |
| 7760 | 137 add_index_entry("$envvar@\$$envvar", $ahref); |
| 138 "$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
|
139 } |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
140 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
141 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
|
142 # 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
|
143 local($_) = @_; |
| 7711 | 144 s/$next_pair_pr_rx//; |
| 145 my $url = $2; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
146 $url =~ s/~/~/g; |
| 7711 | 147 "<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
|
148 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
149 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
150 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
|
151 # 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
|
152 local($_) = @_; |
| 7760 | 153 my $rx = "$next_pair_pr_rx$any_next_pair_pr_rx3"; |
| 154 s|$rx|<i>\2</i>(\4)|; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
155 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
156 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
157 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
158 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
|
159 local($_) = @_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
160 s/$next_pair_pr_rx//; |
| 7711 | 161 my($br_id,$rfcnumber) = ($1, $2); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
162 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
163 # Save the reference |
| 7711 | 164 my $nstr = &gen_index_id("RFC!RFC $rfcnumber", ''); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
165 $index{$nstr} .= &make_half_href("$CURRENT_FILE#$br_id"); |
| 7711 | 166 "<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
|
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_kbd{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
170 local($_) = @_; |
| 7711 | 171 s|$next_pair_pr_rx|<kbd>\2</kbd>|; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
172 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
173 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
174 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
175 sub do_cmd_strong{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
176 local($_) = @_; |
| 7711 | 177 s|$next_pair_pr_rx|<b>\2</b>|; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
178 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
179 } |
|
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 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
|
182 # 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
|
183 local($_) = @_; |
| 7760 | 184 my $rx = "$next_pair_pr_rx$any_next_pair_pr_rx3"; |
| 185 s|$rx|<b>Deprecated since release \2.</b>\n\4<p>|; | |
| 186 $_; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
187 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
188 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
189 # 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
|
190 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
191 # index commands |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
192 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
193 $INDEX_SUBITEM = ""; |
|
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 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
|
196 #$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
|
197 ''; |
|
7527
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 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
200 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
|
201 local($_) = @_; |
| 7711 | 202 s/$next_pair_pr_rx//; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
203 $INDEX_SUBITEM = $2; |
|
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 |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
207 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
|
208 # 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
|
209 # 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
|
210 # 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
|
211 # |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
212 local($_) = @_; |
| 7711 | 213 my $any_next_pair_pr_rx3 = "$OP(\\d+)$CP([\\s\\S]*)$OP\\3$CP"; |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
214 s/$next_pair_pr_rx$any_next_pair_pr_rx3/\4/; |
| 7760 | 215 $INDEX_SUBITEM = $2; |
|
7671
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 } |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
218 |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
219 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
|
220 |
| 7760 | 221 # 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
|
222 # |
| 7760 | 223 open(IDXFILE, ">index.dat") || die "\n$!\n"; |
| 224 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
|
225 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
|
226 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
|
227 |
|
5eafd3eda0af
Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents:
7906
diff
changeset
|
228 # 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
|
229 # 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
|
230 # |
|
5eafd3eda0af
Remove option to strip out <tt>...</tt> from index entry text; this is now
Fred Drake <fdrake@acm.org>
parents:
7906
diff
changeset
|
231 $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
|
232 |
| 7760 | 233 |
| 234 sub gen_target_name{ | |
| 235 "l2h-" . @_[0]; | |
| 236 } | |
| 237 | |
| 238 sub gen_target{ | |
| 239 "<a name=\"" . @_[0] . "\">"; | |
| 240 } | |
| 241 | |
| 242 sub gen_link{ | |
| 243 my($node,$target) = @_; | |
| 244 print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n"; | |
| 245 "<a href=\"$node#$target\">"; | |
| 246 } | |
| 247 | |
| 248 sub make_index_entry{ | |
| 249 my($br_id,$str) = @_; | |
| 250 my($name,$aname,$ahref) = link_info($br_id); | |
| 251 add_index_entry($str, $ahref); | |
| 252 "$aname$anchor_invisible_mark</a>"; | |
| 253 } | |
| 254 | |
| 255 sub add_index_entry{ | |
| 256 # add an entry to the index structures; ignore the return value | |
| 257 my($str,$ahref) = @_; | |
| 258 $str = gen_index_id($str, ''); | |
| 259 $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
|
260 print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n"; |
| 7760 | 261 } |
| 262 | |
| 263 sub link_info{ | |
| 264 my $name = gen_target_name(@_[0]); | |
| 265 my $aname = gen_target($name); | |
| 266 my $ahref = gen_link($CURRENT_FILE, $name); | |
| 267 return ($name, $aname, $ahref); | |
| 268 } | |
| 269 | |
| 270 sub do_cmd_index{ | |
| 271 local($_) = @_; | |
| 272 s/$next_pair_pr_rx[\n]?//o; | |
| 273 my($br_id,$str) = ($1, $2); | |
| 274 # | |
| 275 my($name,$aname,$ahref) = link_info($br_id); | |
| 276 add_index_entry("$str", $ahref); | |
| 277 "$aname$anchor_invisible_mark</a>" . $_; | |
| 278 } | |
| 279 | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
280 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
|
281 local($_) = @_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
282 s/$next_pair_pr_rx//o; |
| 7711 | 283 my($br_id1,$str1) = ($1, $2); |
| 7760 | 284 s/$next_pair_pr_rx[\n]?//o; |
| 7711 | 285 my($br_id2,$str2) = ($1, $2); |
| 7760 | 286 # |
| 287 my($name,$aname,$ahref) = link_info($br_id1); | |
| 288 add_index_entry("$str1!$str2", $ahref); | |
| 289 add_index_entry("$str2!$str1", $ahref); | |
| 290 "$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
|
291 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
292 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
293 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
|
294 local($_) = @_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
295 s/$next_pair_pr_rx//o; |
| 7711 | 296 my($br_id1,$str1) = ($1, $2); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
297 s/$next_pair_pr_rx//o; |
| 7711 | 298 my($br_id2,$str2) = ($1, $2); |
| 7760 | 299 s/$next_pair_pr_rx[\n]?//o; |
| 7711 | 300 my($br_id3,$str3) = ($1, $2); |
| 7760 | 301 # |
| 302 my($name,$aname,$ahref) = link_info($br_id1); | |
| 303 add_index_entry("$str1!$str2 $str3", $ahref); | |
| 304 add_index_entry("$str2!$str3, $str1", $ahref); | |
| 305 add_index_entry("$str3!$str1 $str2", $ahref); | |
| 306 "$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
|
307 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
308 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
309 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
|
310 local($_) = @_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
311 s/$next_pair_pr_rx//o; |
| 7711 | 312 my($br_id1,$str1) = ($1, $2); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
313 s/$next_pair_pr_rx//o; |
| 7711 | 314 my($br_id2,$str2) = ($1, $2); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
315 s/$next_pair_pr_rx//o; |
| 7711 | 316 my($br_id3,$str3) = ($1, $2); |
| 7760 | 317 s/$next_pair_pr_rx[\n]?//o; |
| 7711 | 318 my($br_id4,$str4) = ($1, $2); |
| 7760 | 319 # |
| 320 my($name,$aname,$ahref) = link_info($br_id1); | |
| 321 add_index_entry("$str1!$str2 $str3 $str4", $ahref); | |
| 322 add_index_entry("$str2!$str3 $str4, $str1", $ahref); | |
| 323 add_index_entry("$str3!$str4, $str1 $str2", $ahref); | |
| 324 add_index_entry("$str4!$$str1 $str2 $str3", $ahref); | |
| 325 "$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
|
326 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
327 |
| 7711 | 328 sub do_cmd_ttindex{ |
| 329 local($_) = @_; | |
| 7760 | 330 s/$next_pair_pr_rx[\n]?//; |
| 7711 | 331 my($br_id,$str) = ($1, $2); |
| 332 &make_index_entry($br_id, $str . &get_indexsubitem) . $_; | |
| 333 } | |
|
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 sub my_typed_index_helper{ |
| 7711 | 336 local($word,$_) = @_; |
| 7760 | 337 s/$next_pair_pr_rx[\n]?//o; |
| 7711 | 338 my($br_id,$str) = ($1, $2); |
| 7760 | 339 # |
| 340 my($name,$aname,$ahref) = link_info($br_id1); | |
| 341 add_index_entry("$str $word", $ahref); | |
| 342 add_index_entry("$word!$str", $ahref); | |
| 343 "$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
|
344 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
345 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
346 sub do_cmd_stindex{ &my_typed_index_helper('statement', @_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
347 sub do_cmd_opindex{ &my_typed_index_helper('operator', @_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
348 sub do_cmd_exindex{ &my_typed_index_helper('exception', @_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
349 sub do_cmd_obindex{ &my_typed_index_helper('object', @_); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
350 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
351 sub my_parword_index_helper{ |
| 7711 | 352 local($word,$_) = @_; |
| 7760 | 353 s/$next_pair_pr_rx[\n]?//o; |
| 7711 | 354 my($br_id,$str) = ($1, $2); |
| 7760 | 355 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
|
356 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
357 |
|
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 make_mod_index_entry{ |
| 7711 | 360 my($br_id,$str,$define) = @_; |
| 7760 | 361 my($name,$aname,$ahref) = link_info($br_id); |
| 362 # equivalent of add_index_entry() using $define instead of '' | |
| 363 $str = gen_index_id($str, $define); | |
| 364 $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
|
365 print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n"; |
| 7760 | 366 |
| 7711 | 367 if ($define eq 'DEF') { |
| 7760 | 368 # add to the module index |
| 7711 | 369 my($nstr,$garbage) = split / /, $str, 2; |
| 7760 | 370 $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
|
371 } |
| 7760 | 372 "$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
|
373 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
374 |
| 7711 | 375 $THIS_MODULE = ''; |
| 7760 | 376 $THIS_CLASS = ''; |
| 7711 | 377 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
378 sub 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
|
379 local($word, $_) = @_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
380 s/$next_pair_pr_rx[\n]*//o; |
| 7711 | 381 my($br_id, $str) = ($1, $2); |
| 382 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
|
383 $word = "$word " if $word; |
| 7711 | 384 $THIS_MODULE = "$str"; |
| 7760 | 385 make_mod_index_entry("SECTION$section_tag", |
| 386 "<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
|
387 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
388 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
389 sub 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
|
390 local($word, $_) = @_; |
| 7760 | 391 s/$next_pair_pr_rx[\n]?//o; |
| 7711 | 392 my($br_id, $str) = ($1, $2); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
393 $word = "$word " if $word; |
| 7760 | 394 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
|
395 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
396 |
| 7711 | 397 sub do_cmd_bifuncindex{ |
| 398 local($_) = @_; | |
| 7760 | 399 s/$next_pair_pr_rx[\n]?//o; |
| 7711 | 400 my($br_id,$str,$fname) = ($1, $2, "<tt>$2()</tt>"); |
| 7760 | 401 make_index_entry($br_id, "$fname (built-in function)") . $_; |
| 7711 | 402 } |
| 403 | |
| 7760 | 404 sub do_cmd_modindex{ my_module_index_helper('', @_); } |
| 405 sub do_cmd_bimodindex{ my_module_index_helper('built-in', @_); } | |
| 406 sub do_cmd_exmodindex{ my_module_index_helper('extension', @_); } | |
| 407 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
|
408 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
409 # these should be adjusted a bit.... |
| 7760 | 410 sub do_cmd_refmodindex{ ref_module_index_helper('', @_); } |
| 411 sub do_cmd_refbimodindex{ ref_module_index_helper('built-in', @_); } | |
| 412 sub do_cmd_refexmodindex{ ref_module_index_helper('extension', @_); } | |
| 413 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
|
414 |
| 7760 | 415 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
|
416 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
417 sub init_myformat{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
418 # XXX need some way for this to be called after &initialise; ??? |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
419 $anchor_mark = ''; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
420 $icons{'anchor_mark'} = ''; |
| 7760 | 421 my $cmark = "(?:$comment_mark)?"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
422 # <<2>>...<<2>> |
| 7760 | 423 $next_pair_rx = "^[\\s\n%]*$O(\\d+)$C([\\s\\S]*)$O\\1$C"; |
| 424 $any_next_pair_rx3 = "[\\s\n%]*$O(\\d+)$C([\\s\\S]*)$O\\3$C"; | |
| 425 $any_next_pair_rx5 = "[\\s\n%]*$O(\\d+)$C([\\s\\S]*)$O\\5$C"; | |
| 426 $any_next_pair_rx7 = "[\\s\n%]*$O(\\d+)$C([\\s\\S]*)$O\\7$C"; | |
| 427 $any_next_pair_rx9 = "[\\s\n%]*$O(\\d+)$C([\\s\\S]*)$O\\9$C"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
428 # <#2#>...<#2#> |
| 7760 | 429 $next_pair_pr_rx = "^[\\s\n%]*$OP(\\d+)$CP([\\s\\S]*)$OP\\1$CP$cmark"; |
| 430 $any_next_pair_pr_rx3 = "[\\s\n%]*$OP(\\d+)$CP([\\s\\S]*)$OP\\3$CP$cmark"; | |
| 431 $any_next_pair_pr_rx5 = "[\\s\n%]*$OP(\\d+)$CP([\\s\\S]*)$OP\\5$CP$cmark"; | |
| 432 $any_next_pair_pr_rx7 = "[\\s\n%]*$OP(\\d+)$CP([\\s\\S]*)$OP\\7$CP$cmark"; | |
| 433 $any_next_pair_pr_rx9 = "[\\s\n%]*$OP(\\d+)$CP([\\s\\S]*)$OP\\9$CP$cmark"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
434 } |
| 7760 | 435 init_myformat(); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
436 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
437 # 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
|
438 # 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
|
439 # |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
440 sub make_str_index_entry{ |
| 7711 | 441 my($br_id,$str) = @_; |
| 7760 | 442 my($name,$aname,$ahref) = link_info($br_id); |
| 443 add_index_entry($str, $ahref); | |
| 444 "$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
|
445 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
446 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
447 # Changed from the stock version to indent {verbatim} sections, |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
448 # and make them smaller, to better match the LaTeX version: |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
449 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
450 # (Used with LaTeX2HTML 96.1*) |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
451 sub replace_verbatim { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
452 # Modifies $_ |
| 7711 | 453 my($prefix,$suffix) = ("\n<p><dl><dd><pre>\n", "</pre></dl>"); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
454 s/$verbatim_mark(verbatim)(\d+)/$prefix$verbatim{$2}$suffix/go; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
455 s/$verbatim_mark(rawhtml)(\d+)/$verbatim{$2}/ego; # Raw HTML |
|
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 # (Used with LaTeX2HTML 98.1) |
| 7760 | 459 # The HTML this produces is bad; the <PRE> is on the outside of the <dl>, |
| 460 # but I haven't found a workaround yet. | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
461 sub replace_verbatim_hook{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
462 # Modifies $_ |
| 7711 | 463 my($prefix,$suffix) = ("\n<p><dl><dd>", "</dl>"); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
464 s/$math_verbatim_rx/&put_comment("MATH: ".$verbatim{$1})/eg; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
465 s/$verbatim_mark(\w*[vV]erbatim\*?)(\d+)\#/$prefix$verbatim{$2}$suffix/go; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
466 # Raw HTML, but replacements may have protected characters |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
467 s/$verbatim_mark(rawhtml)(\d+)#/&unprotect_raw_html($verbatim{$2})/eg; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
468 s/$verbatim_mark$keepcomments(\d+)#/$verbatim{$2}/ego; # Raw TeX |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
469 s/$unfinished_mark$keepcomments(\d+)#/$verbatim{$2}/ego; # Raw TeX |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
470 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
471 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
472 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
|
473 local($_) = @_; |
| 7711 | 474 my($return_type,$function_name,$arg_list,$idx) = ('', '', '', ''); |
| 475 my $any_next_pair_rx3 = "$O(\\d+)$C([\\s\\S]*)$O\\3$C"; | |
| 476 my $any_next_pair_rx5 = "$O(\\d+)$C([\\s\\S]*)$O\\5$C"; | |
| 477 my $cfuncdesc_rx = "$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
478 if (/$cfuncdesc_rx/o) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
479 $return_type = "$2"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
480 $function_name = "$4"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
481 $arg_list = "$6"; |
| 7760 | 482 $idx = make_str_index_entry($3, |
| 7711 | 483 "<tt>$function_name()</tt>" . &get_indexsubitem); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
484 $idx =~ s/ \(.*\)//; |
| 7711 | 485 $idx =~ s/\(\)//; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
486 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
487 "<dl><dt>$return_type <b>$idx</b>" |
| 7760 | 488 . "(<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
|
489 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
490 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
491 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
|
492 local($_) = @_; |
| 7711 | 493 my $type_name = (''); |
| 494 my $cfuncdesc_rx = "$next_pair_rx"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
495 if (/$cfuncdesc_rx/o) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
496 $type_name = "$2"; |
| 7760 | 497 $idx = make_str_index_entry($1, |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
498 "<tt>$type_name</tt>" . &get_indexsubitem); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
499 $idx =~ s/ \(.*\)//; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
500 } |
| 7760 | 501 "<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
|
502 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
503 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
504 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
|
505 local($_) = @_; |
| 7711 | 506 my($var_type,$var_name,$idx) = ('', '', ''); |
| 507 my $cfuncdesc_rx = "$next_pair_rx$any_next_pair_rx3"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
508 if (/$cfuncdesc_rx/o) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
509 $var_type = "$2"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
510 $var_name = "$4"; |
| 7760 | 511 $idx = make_str_index_entry($3, |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
512 "<tt>$var_name</tt>" . &get_indexsubitem); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
513 $idx =~ s/ \(.*\)//; |
|
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 "<dl><dt>$var_type <b>$idx</b>\n" |
| 7760 | 516 . "<dd>$'</dl>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
517 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
518 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
519 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
|
520 local($_) = @_; |
| 7711 | 521 my($function_name,$arg_list,$idx) = ('', '', ''); |
| 522 my $funcdesc_rx = "$next_pair_rx$any_next_pair_rx3"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
523 if (/$funcdesc_rx/o) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
524 $function_name = "$2"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
525 $arg_list = "$4"; |
| 7760 | 526 $idx = make_str_index_entry($3, "<tt>$function_name()</tt>" |
| 7711 | 527 . &get_indexsubitem); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
528 $idx =~ s/ \(.*\)//; |
| 7711 | 529 $idx =~ s/\(\)//; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
530 } |
| 7760 | 531 "<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
|
532 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
533 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
534 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
|
535 local($_) = @_; |
| 7711 | 536 my($function_name,$arg_list,$idx) = ('', '', ''); |
| 537 my $funcdesc_rx = "$next_pair_rx$any_next_pair_rx3"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
538 if (/$funcdesc_rx/o) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
539 $function_name = "$2"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
540 $arg_list = "$4"; |
|
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
|
541 $idx = "<tt>$function_name</tt>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
542 } |
| 7760 | 543 "<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
|
544 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
545 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
546 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
|
547 local($_) = @_; |
| 7711 | 548 my $any_next_pair_pr_rx3 = "$OP(\\d+)$CP([\\s\\S]*)$OP\\3$CP"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
549 |
| 7711 | 550 s/$next_pair_pr_rx//o; |
| 551 my $function_name = $2; | |
| 552 s/$next_pair_pr_rx//o; | |
| 553 my($br_id,$arg_list) = ($1, $2); | |
| 7760 | 554 my $idx = make_str_index_entry($br_id, "<tt>$function_name()</tt>" |
| 555 . &get_indexsubitem); | |
| 7711 | 556 $idx =~ s/\(\)//; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
557 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
558 "<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
|
559 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
560 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
561 # 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
|
562 # 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
|
563 # module. |
|
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 $INDEX_OPCODES = 0; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
566 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
567 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
|
568 local($_) = @_; |
| 7711 | 569 my($opcode_name,$arg_list,$stuff,$idx) = ('', '', '', ''); |
| 570 my $opcodedesc_rx = "$next_pair_rx$any_next_pair_rx3"; | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
571 if (/$opcodedesc_rx/o) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
572 $opcode_name = "$2"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
573 $arg_list = "$4"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
574 if ($INDEX_OPCODES) { |
| 7760 | 575 $idx = make_str_index_entry($3, |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
576 "<tt>$opcode_name</tt> (byte code instruction)"); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
577 $idx =~ s/ \(byte code instruction\)//; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
578 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
579 else { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
580 $idx = "<tt>$opcode_name</tt>"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
581 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
582 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
583 $stuff = "<dl><dt><b>$idx</b>"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
584 if ($arg_list) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
585 $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
|
586 } |
| 7760 | 587 $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
|
588 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
589 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
590 sub do_env_datadesc{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
591 local($_) = @_; |
| 7711 | 592 my $idx = ''; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
593 if (/$next_pair_rx/o) { |
| 7760 | 594 $idx = make_str_index_entry($1, "<tt>$2</tt>" . &get_indexsubitem); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
595 $idx =~ s/ \(.*\)//; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
596 } |
| 7760 | 597 "<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
|
598 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
599 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
600 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
|
601 local($_) = @_; |
| 7711 | 602 my $idx = ''; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
603 if (/$next_pair_rx/o) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
604 if ($STRING_INDEX_TT) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
605 $idx = "$2"; } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
606 else { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
607 $idx = "<tt>$2</tt>"; } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
608 } |
| 7760 | 609 "<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
|
610 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
611 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
612 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
|
613 local($_) = @_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
614 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
615 s/$next_pair_pr_rx//o; |
| 7711 | 616 my($br_id, $data_name) = ($1, $2); |
| 7760 | 617 my $idx = make_str_index_entry($br_id, "<tt>$data_name</tt>" |
| 618 . &get_indexsubitem); | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
619 $idx =~ s/ \(.*\)//; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
620 |
| 7760 | 621 "<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
|
622 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
623 |
| 7760 | 624 sub do_env_excdesc{ |
| 625 local($_) = @_; | |
| 626 /$next_pair_rx/o; | |
| 627 my($br_id,$excname,$rest) = ($1, $2, $'); | |
|
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
|
628 my $idx = make_str_index_entry($br_id, "<tt>$excname</tt>"); |
| 7760 | 629 "<dl><dt><b>$idx</b>\n<dd>$rest</dl>" |
| 630 } | |
| 631 | |
| 632 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
|
633 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
634 |
| 7711 | 635 sub do_env_classdesc{ |
| 636 local($_) = @_; | |
| 7760 | 637 my($class_name,$arg_list,$idx) = ('', '', ''); |
| 7711 | 638 my $funcdesc_rx = "$next_pair_rx$any_next_pair_rx3"; |
| 639 if (/$funcdesc_rx/o) { | |
| 7760 | 640 $class_name = "$2"; |
| 7711 | 641 $arg_list = "$4"; |
| 7760 | 642 $THIS_CLASS = $class_name; |
| 643 $idx = make_str_index_entry($3, | |
| 644 "<tt>$class_name</tt> (class in $THIS_MODULE)" ); | |
| 7711 | 645 $idx =~ s/ \(.*\)//; |
| 646 } | |
| 7760 | 647 "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>$'</dl>"; |
| 648 } | |
| 649 | |
| 650 | |
| 651 sub do_env_methoddesc{ | |
| 652 local($_) = @_; | |
| 653 my($class_name,$arg_list,$idx,$extra); | |
| 654 # Predefined $opt_arg_rx & $optional_arg_rx don't work because they | |
| 655 # require the argument to be there. | |
| 656 my $opt_arg_rx = "^\\s*(\\[([^]]*)\\])?"; | |
| 657 my $funcdesc_rx = "$opt_arg_rx$any_next_pair_rx3$any_next_pair_rx5"; | |
| 658 if (/$funcdesc_rx/o) { | |
| 659 $class_name = $2; | |
| 660 $class_name = $THIS_CLASS | |
| 661 unless $class_name; | |
| 662 $method_name = $4; | |
| 663 $arg_list = $6; | |
| 664 if ($class_name) { | |
| 665 $extra = " ($class_name method)"; | |
| 666 } | |
| 667 $idx = make_str_index_entry($3, "<tt>$method_name()</tt>$extra"); | |
| 668 $idx =~ s/ \(.*\)//; | |
| 669 $idx =~ s/\(\)//; | |
| 670 } | |
| 671 "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>$'</dl>"; | |
| 7711 | 672 } |
| 673 | |
| 7760 | 674 |
| 675 sub do_env_methoddescni{ | |
| 676 local($_) = @_; | |
| 677 # Predefined $opt_arg_rx & $optional_arg_rx don't work because they | |
| 678 # require the argument to be there. | |
| 679 my $opt_arg_rx = "^\\s*(\\[([^]]*)\\])?"; | |
| 680 my $funcdesc_rx = "$opt_arg_rx$any_next_pair_rx3$any_next_pair_rx5"; | |
| 681 /$funcdesc_rx/o; | |
| 682 my $method = $4; | |
| 683 my $arg_list = $6; | |
| 684 "<dl><dt><b>$method</b> (<var>$arg_list</var>)\n<dd>$'</dl>"; | |
| 685 } | |
| 686 | |
| 687 | |
| 688 sub do_env_memberdesc{ | |
| 689 local($_) = @_; | |
| 690 # Predefined $opt_arg_rx & $optional_arg_rx don't work because they | |
| 691 # require the argument to be there. | |
| 692 my $opt_arg_rx = "^\\s*(\\[([^]]*)\\])?"; | |
|
7995
daffde7a6891
do_env_memberdesc(): Fix argument parsing for {memberdesc} environments.
Fred Drake <fdrake@acm.org>
parents:
7937
diff
changeset
|
693 my $funcdesc_rx = "$opt_arg_rx$any_next_pair_rx3"; |
|
daffde7a6891
do_env_memberdesc(): Fix argument parsing for {memberdesc} environments.
Fred Drake <fdrake@acm.org>
parents:
7937
diff
changeset
|
694 s/$funcdesc_rx//o; |
|
daffde7a6891
do_env_memberdesc(): Fix argument parsing for {memberdesc} environments.
Fred Drake <fdrake@acm.org>
parents:
7937
diff
changeset
|
695 my($class,$member) = ($2, $4); |
| 7760 | 696 $class = $THIS_CLASS |
| 697 unless $class; | |
| 698 $extra = " ($class_name attribute)" | |
| 699 if $class; | |
| 700 my $idx = make_str_index_entry($3, "<tt>$member()</tt>$extra"); | |
| 701 $idx =~ s/ \(.*\)//; | |
| 702 $idx =~ s/\(\)//; | |
|
7995
daffde7a6891
do_env_memberdesc(): Fix argument parsing for {memberdesc} environments.
Fred Drake <fdrake@acm.org>
parents:
7937
diff
changeset
|
703 "<dl><dt><b>$idx</b>\n<dd>" . $_ . "</dl>"; |
| 7760 | 704 } |
| 705 | |
| 706 | |
| 707 sub do_env_memberdescni{ | |
| 708 local($_) = @_; | |
| 709 # Predefined $opt_arg_rx & $optional_arg_rx don't work because they | |
| 710 # require the argument to be there. | |
| 711 my $opt_arg_rx = "^\\s*(\\[([^]]*)\\])?"; | |
| 712 my $funcdesc_rx = "$opt_arg_rx$any_next_pair_rx3"; | |
| 713 /$funcdesc_rx/o; | |
| 714 my $member = $4; | |
| 715 "<dl><dt><b>$member</b>\n<dd>$'</dl>"; | |
| 716 } | |
| 717 | |
| 718 | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
719 @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
|
720 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
721 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
|
722 local($_) = @_; |
| 7711 | 723 my($j1,$a1,$a2,$a3,$j4) = split(/[|]/,$_); |
| 724 my($th1,$th2,$th3) = ('<th>', '<th>', '<th>'); | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
725 $col_aligns[0] = (($a1 eq "c") ? "<td align=center>" : "<td>"); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
726 $col_aligns[1] = (($a2 eq "c") ? "<td align=center>" : "<td>"); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
727 $col_aligns[2] = (($a3 eq "c") ? "<td align=center>" : "<td>"); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
728 # return the aligned header start tags; only used for \begin{tableiii?} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
729 $th1 = (($a1 eq "l") ? "<th align=left>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
730 : ($a1 eq "r" ? "<th align=right>" : "<th>")); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
731 $th2 = (($a2 eq "l") ? "<th align=left>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
732 : ($a2 eq "r" ? "<th align=right>" : "<th>")); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
733 $th3 = (($a3 eq "l") ? "<th align=left>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
734 : ($a3 eq "r" ? "<th align=right>" : "<th>")); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
735 ($th1, $th2, $th3); |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
736 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
737 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
738 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
|
739 local($_) = @_; |
| 7711 | 740 my($font,$h1,$h2) = ('', '', ''); |
| 741 my $tableiii_rx = | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
742 "$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5$any_next_pair_rx7"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
743 if (/$tableiii_rx/o) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
744 $font = $4; |
|
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
|
745 $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
|
746 if ($font eq 'textrm'); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
747 $h1 = $6; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
748 $h2 = $8; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
749 } |
| 7760 | 750 my($th1,$th2,$th3) = setup_column_alignments($2); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
751 $globals{"lineifont"} = $font; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
752 "<table border align=center>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
753 . "\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
|
754 . "\n $th2<b>$h2</b></th>$'" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
755 . "\n</table>"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
756 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
757 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
758 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
|
759 local($_) = @_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
760 s/$next_pair_pr_rx//o; |
| 7711 | 761 my $c1 = $2; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
762 s/$next_pair_pr_rx//o; |
| 7937 | 763 my($c2,$font,$sfont,$efont) = ($2, $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
|
764 if ($font) { |
| 7937 | 765 $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
|
766 $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
|
767 } |
| 7711 | 768 my($c1align,$c2align) = @col_aligns[0,1]; |
| 7937 | 769 "<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
|
770 . " $c2align$c2</td>$'"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
771 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
772 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
773 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
|
774 local($_) = @_; |
| 7711 | 775 my($font,$h1,$h2,$h3) = ('', '', '', ''); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
776 |
| 7711 | 777 my $tableiii_rx = |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
778 "$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5$any_next_pair_rx7" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
779 . "$any_next_pair_rx9"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
780 if (/$tableiii_rx/o) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
781 $font = $4; |
|
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
|
782 $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
|
783 if ($font eq 'textrm'); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
784 $h1 = $6; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
785 $h2 = $8; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
786 $h3 = $10; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
787 } |
| 7760 | 788 my($th1,$th2,$th3) = setup_column_alignments($2); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
789 $globals{"lineifont"} = $font; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
790 "<table border align=center>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
791 . "\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
|
792 . "\n $th2<b>$h2</b></th>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
793 . "\n $th3<b>$h3</b></th>$'" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
794 . "\n</table>"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
795 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
796 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
797 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
|
798 local($_) = @_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
799 s/$next_pair_pr_rx//o; |
| 7711 | 800 my $c1 = $2; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
801 s/$next_pair_pr_rx//o; |
| 7711 | 802 my $c2 = $2; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
803 s/$next_pair_pr_rx//o; |
| 7937 | 804 my($c3,$font,$sfont,$efont) = ($2, $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
|
805 if ($font) { |
| 7937 | 806 $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
|
807 $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
|
808 } |
| 7711 | 809 my($c1align, $c2align, $c3align) = @col_aligns; |
| 7937 | 810 "<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
|
811 . " $c2align$c2</td>\n" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
812 . " $c3align$c3</td>$'"; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
813 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
814 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
815 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
|
816 "<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
|
817 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
818 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
819 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
|
820 # 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
|
821 # 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
|
822 local($_) = @_; |
| 7711 | 823 my $any_next_pair_pr_rx3 = "$OP(\\d+)$CP([\\s\\S]*)$OP\\3$CP"; |
| 824 my $any_next_pair_pr_rx5 = "$OP(\\d+)$CP([\\s\\S]*)$OP\\5$CP"; | |
| 825 # Predefined $opt_arg_rx & $optional_arg_rx don't work because they | |
| 826 # require the argument to be there. | |
| 827 my $opt_arg_rx = "^\\s*(\\[([^]]*)\\])?"; | |
| 828 s/$opt_arg_rx$any_next_pair_pr_rx3$any_next_pair_pr_rx5//; | |
| 829 my($key,$module,$text) = ($2, $4, $6); | |
| 830 $key = $module unless $key; | |
|
7581
0f565c7fe4bb
Misc. revisions to LaTeX2HTML support.
Fred Drake <fdrake@acm.org>
parents:
7563
diff
changeset
|
831 "<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
|
832 . " ($text)</p>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
833 . $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
834 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
835 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
836 sub do_cmd_seetext{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
837 "<p>" . @_[0]; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
838 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
839 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
840 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
841 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
|
842 local($_) = @_; |
| 7711 | 843 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
|
844 if ($t_title) { |
| 7711 | 845 $the_title .= "<h1 align=center>$t_title</h1>"; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
846 } else { &write_warnings("\nThis document has no title."); } |
| 7711 | 847 $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
|
848 if ($t_author) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
849 if ($t_authorURL) { |
| 7711 | 850 my $href = &translate_commands($t_authorURL); |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
851 $href = &make_named_href('author', $href, "<strong>${t_author}</strong>"); |
| 7711 | 852 $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
|
853 } else { |
| 7711 | 854 $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
|
855 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
856 } else { &write_warnings("\nThere is no author for this document."); } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
857 if ($t_institute) { |
| 7711 | 858 $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
|
859 if ($AUTHOR_ADDRESS) { |
| 7711 | 860 $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
|
861 if ($t_affil) { |
| 7711 | 862 $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
|
863 if ($t_date) { |
| 7711 | 864 $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
|
865 if ($PYTHON_VERSION) { |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
866 $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
|
867 $the_title .= "</p>" |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
868 } |
| 7711 | 869 $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
|
870 if ($t_address) { |
| 7711 | 871 $the_title .= "\n<p>$t_address</p>"; |
| 872 } 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
|
873 if ($t_email) { |
| 7711 | 874 $the_title .= "\n<p>$t_email</p>"; |
| 875 }# else { $the_title .= "</p>" } | |
| 876 $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
|
877 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
878 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
879 |
| 7760 | 880 # sub do_cmd_indexlabel{ |
| 881 # "genindex" . @_[0]; | |
| 882 # } | |
| 7711 | 883 |
|
7671
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
884 |
|
0cf2ffaf4bd7
Bring this up to date. Some things still don't work right.
Fred Drake <fdrake@acm.org>
parents:
7581
diff
changeset
|
885 # These are located down here since they screw up fontlock. -- used to. |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
886 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
887 sub do_cmd_file{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
888 # This uses a weird HTML construct to adjust the font to be |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
889 # reasonable match that used in the printed form as much as |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
890 # possible. The expected behavior is that a browser that doesn't |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
891 # understand "<font face=...>" markup will use courier (or whatever |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
892 # the font is for <tt>). |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
893 local($_) = @_; |
| 7711 | 894 s|$next_pair_pr_rx|\"<tt>\2</tt>\"|; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
895 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
896 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
897 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
898 sub do_cmd_samp{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
899 local($_) = @_; |
| 7711 | 900 s|$next_pair_pr_rx|\"<tt>\2</tt>\"|; |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
901 $_; |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
902 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
903 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
904 1; # This must be the last line |
