annotate Doc/myformat.perl @ 5817:48b94de85bf3 legacy-trunk

Extensive changes by AMK.
author Guido van Rossum <guido@python.org>
date Thu, 17 Jul 1997 16:29:42 +0000
parents 7c6802d8620f
children b8e26078d8b1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
1 # myformat.perl by Guido van Rossum <guido@cwi.nl> 25 Jan 1994
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 #
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
3 # Extension to LaTeX2HTML for documents using myformat.sty.
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
4 # Subroutines of the form do_cmd_<name> here define translations
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
5 # for LaTeX commands \<name> defined in the corresponding .sty file.
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
6 #
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
7 # XXX Not complete: \indexii etc.; \funcitem etc.
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
8
4538
65170da1d2ca (myformat.perl): Simplify generated HTML for "\optional{...}".
Fred Drake <fdrake@acm.org>
parents: 4531
diff changeset
9 package main;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
10
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 # \bcode and \ecode brackets around verbatim
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
12
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
13 sub do_cmd_bcode{ @_[0]; }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
14 sub do_cmd_ecode{ @_[0]; }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
15
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
16 # words typeset in a special way (not in HTML though)
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
17
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
18 sub do_cmd_ABC{ join('', 'ABC', @_[0]); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
19 sub do_cmd_UNIX{ join('', 'Unix', @_[0]); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
20 sub do_cmd_ASCII{ join('', 'ASCII', @_[0]); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
21 sub do_cmd_C{ join('', 'C', @_[0]); }
1776
5257af80e161 * Doc/libfuncs.tex: don't use $math$ in description of pow(x,y,z);
Guido van Rossum <guido@python.org>
parents: 1527
diff changeset
22 sub do_cmd_Cpp{ join('', 'C++', @_[0]); }
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
23 sub do_cmd_EOF{ join('', 'EOF', @_[0]); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
24
4540
1f4f1be8a339 (myformat.perl): Fixed handling of "\e" -- argh!
Fred Drake <fdrake@acm.org>
parents: 4538
diff changeset
25 sub do_cmd_e{ local($_) = @_; '&#92;' . $_; }
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
26
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
27 sub do_cmd_optional{
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
28 local($_) = @_;
4602
7c6802d8620f (myformat.perl): Don't italicize the '[]' characters around optional
Fred Drake <fdrake@acm.org>
parents: 4540
diff changeset
29 s/$any_next_pair_pr_rx/<\/VAR><BIG>\[<\/BIG><VAR>\2<\/VAR><BIG>\]<\/BIG><VAR>/;
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
30 $_;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
31 }
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
32
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
33 sub do_cmd_varvars{
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
34 local($_) = @_;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
35 s/$any_next_pair_pr_rx/<VAR>\2<\/VAR>/;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
36 $_;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
37 }
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
38
4540
1f4f1be8a339 (myformat.perl): Fixed handling of "\e" -- argh!
Fred Drake <fdrake@acm.org>
parents: 4538
diff changeset
39 # texinfo-like formatting commands: \code{...} etc.
1f4f1be8a339 (myformat.perl): Fixed handling of "\e" -- argh!
Fred Drake <fdrake@acm.org>
parents: 4538
diff changeset
40
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
41 sub do_cmd_code{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
42 local($_) = @_;
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
43 s/$any_next_pair_pr_rx/<CODE>\2<\/CODE>/;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
44 $_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
45 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
46
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
47 sub do_cmd_sectcode{ &do_cmd_code(@_); }
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
48
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
49 sub do_cmd_kbd{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
50 local($_) = @_;
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
51 s/$any_next_pair_pr_rx/<KBD>\2<\/KBD>/;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
52 $_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
53 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
54
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
55 sub do_cmd_key{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
56 local($_) = @_;
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
57 s/$any_next_pair_pr_rx/<TT>\2<\/TT>/;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
58 $_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
59 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
60
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
61 sub do_cmd_samp{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
62 local($_) = @_;
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
63 s/$any_next_pair_pr_rx/`<SAMP>\2<\/SAMP>'/;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
64 $_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
65 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
66
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
67 sub do_cmd_var{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
68 local($_) = @_;
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
69 s/$any_next_pair_pr_rx/<VAR>\2<\/VAR>/;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
70 $_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
71 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
72
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
73 sub do_cmd_file{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
74 local($_) = @_;
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
75 s/$any_next_pair_pr_rx/`<CODE>\2<\/CODE>'/;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
76 $_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
77 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
78
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
79 sub do_cmd_dfn{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
80 local($_) = @_;
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
81 s/$any_next_pair_pr_rx/<I><DFN>\2<\/DFN><\/I>/;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
82 $_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
83 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
84
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
85 sub do_cmd_emph{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
86 local($_) = @_;
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
87 s/$any_next_pair_pr_rx/<EM>\2<\/EM>/;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
88 $_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
89 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
90
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
91 sub do_cmd_strong{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
92 local($_) = @_;
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
93 s/$any_next_pair_pr_rx/<STRONG>\2<\/STRONG>/;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
94 $_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
95 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
96
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
97 # index commands
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
98
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
99 sub do_cmd_indexii{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
100 local($_) = @_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
101 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
102 local($br_id1, $str1) = ($1, $2);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
103 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
104 local($br_id2, $str2) = ($1, $2);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
105 join('', &make_index_entry($br_id1, "$str1 $str2"),
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
106 &make_index_entry($br_id2, "$str2, $str1"), $_);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
107 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
108
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
109 sub do_cmd_indexiii{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
110 local($_) = @_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
111 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
112 local($br_id1, $str1) = ($1, $2);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
113 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
114 local($br_id2, $str2) = ($1, $2);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
115 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
116 local($br_id3, $str3) = ($1, $2);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
117 join('', &make_index_entry($br_id1, "$str1 $str2 $str3"),
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
118 &make_index_entry($br_id2, "$str2 $str3, $str1"),
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
119 &make_index_entry($br_id3, "$str3, $str1 $str2"),
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
120 $_);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
121 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
122
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
123 sub do_cmd_indexiv{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
124 local($_) = @_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
125 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
126 local($br_id1, $str1) = ($1, $2);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
127 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
128 local($br_id2, $str2) = ($1, $2);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
129 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
130 local($br_id3, $str3) = ($1, $2);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
131 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
132 local($br_id4, $str4) = ($1, $2);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
133 join('', &make_index_entry($br_id1, "$str1 $str2 $str3 $str4"),
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
134 &make_index_entry($br_id2, "$str2 $str3 $str4, $str1"),
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
135 &make_index_entry($br_id3, "$str3 $str4, $str1 $str2"),
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
136 &make_index_entry($br_id4, "$str4, $str1 $str2 $str3"),
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
137 $_);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
138 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
139
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
140 sub do_cmd_ttindex{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
141 &do_cmd_index(@_);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
142 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
143
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
144 sub my_typed_index_helper{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
145 local($word, $_) = @_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
146 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
147 local($br_id, $str) = ($1, $2);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
148 join('', &make_index_entry($br_id, "$str $word"),
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
149 &make_index_entry($br_id, "$word, $str"), $_);
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
150 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
151
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
152 sub do_cmd_stindex{ &my_typed_index_helper('statement', @_); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
153 sub do_cmd_kwindex{ &my_typed_index_helper('keyword', @_); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
154 sub do_cmd_opindex{ &my_typed_index_helper('operator', @_); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
155 sub do_cmd_exindex{ &my_typed_index_helper('exception', @_); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
156 sub do_cmd_obindex{ &my_typed_index_helper('object', @_); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
157
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
158 sub my_parword_index_helper{
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
159 local($word, $_) = @_;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
160 s/$next_pair_pr_rx//o;
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
161 local($br_id, $str) = ($1, $2);
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
162 &make_index_entry($br_id, "$str ($word)");
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
163 $_;
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
164 }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
165
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
166 sub do_cmd_bifuncindex{ &my_parword_index_helper('built-in function', @_); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
167 sub do_cmd_bimodindex{ &my_parword_index_helper('built-in module', @_); }
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
168 sub do_cmd_stmodindex{ &my_parword_index_helper('standard module', @_); }
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
169 sub do_cmd_bifuncindex{ &my_parword_index_helper('standard module', @_); }
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
170
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
171 sub do_cmd_nodename{ &do_cmd_label(@_); }
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
172
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
173 $any_next_pair_rx3 = "$O(\\d+)$C([\\s\\S]*)$O\\3$C";
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
174 $new_command{"indexsubitem"} = "";
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
175
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
176 sub get_indexsubitem{
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
177 local($result) = $new_command{"indexsubitem"};
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
178 #print "\nget_indexsubitem ==> $result\n";
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
179 $result;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
180 }
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
181
4511
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
182 sub do_env_cfuncdesc{
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
183 local($_) = @_;
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
184 local($return_type,$function_name,$arg_list) = ('', '', '');
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
185 local($cfuncdesc_rx) =
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
186 "$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5";
4511
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
187 $* = 1;
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
188 if (/$cfuncdesc_rx/o) {
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
189 $return_type = "$2";
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
190 $function_name = "$4";
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
191 $arg_list = "$6";
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
192 &make_index_entry($3,"<TT>$function_name</TT> " . &get_indexsubitem);
4511
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
193 }
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
194 $* = 0;
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
195 "<DL><DT>$return_type <STRONG><A NAME=\"$3\">$function_name</A></STRONG>" .
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
196 "(<VAR>$arg_list</VAR>)\n<DD>$'\n</DL>"
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
197 }
df2c212e4ea3 (myformat.perl): Added handler for cfuncdesc environment. This is needed
Fred Drake <fdrake@acm.org>
parents: 1776
diff changeset
198
4531
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
199 sub do_env_funcdesc{
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
200 local($_) = @_;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
201 local($function_name,$arg_list) = ('', '');
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
202 local($funcdesc_rx) = "$next_pair_rx$any_next_pair_rx3";
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
203 $* = 1;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
204 if (/$funcdesc_rx/o) {
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
205 $function_name = "$2";
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
206 $arg_list = "$4";
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
207 &make_index_entry($1,"<TT>$function_name</TT> " . &get_indexsubitem);
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
208 }
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
209 $* = 0;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
210 "<DL><DT><STRONG><A NAME=\"$3\">$function_name</A></STRONG>" .
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
211 "(<VAR>$arg_list</VAR>)\n<DD>$'\n</DL>"
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
212 }
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
213
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
214 sub do_env_datadesc{
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
215 local($_) = @_;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
216 local($data_name) = ('', '');
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
217 local($datadesc_rx) = "$next_pair_rx";
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
218 $* = 1;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
219 if (/$datadesc_rx/o) {
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
220 $data_name = "$2";
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
221 &make_index_entry($1,"<TT>$data_name</TT> " . &get_indexsubitem);
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
222 }
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
223 $* = 0;
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
224 "<DL><DT><STRONG><A NAME=\"$3\">$data_name</A></STRONG>" .
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
225 "\n<DD>$'\n</DL>"
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
226 }
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
227
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
228 sub do_env_excdesc{ &do_env_datadesc(@_); }
9603a60c869b (myformat.perl): Updated to allow library reference manual to be handled by
Fred Drake <fdrake@acm.org>
parents: 4511
diff changeset
229
1527
53ecced2f2b2 Support for latex2html (at version 0.5.1)
Guido van Rossum <guido@python.org>
parents:
diff changeset
230 1; # This must be the last line