blob: 9f8c04ee6ab0f4c42a3ed56aaab284f0ae87556c [file] [log] [blame]
Fred Drakebc7101d1998-03-06 21:18:55 +00001#LaTeX2HTML Version 96.1 : dot.latex2html-init -*- perl -*-
2#
Fred Drake13210ed1998-03-17 06:28:05 +00003# Significantly revised by Fred L. Drake, Jr. <fdrake@acm.org> for use
4# with the Python documentation.
5#
6# New name to avoid distributing "dot" files with the Python documentation.
7#
Fred Drakebc7101d1998-03-06 21:18:55 +00008
Fred Drake41814bc1998-05-11 18:23:35 +00009package Override;
10
11use Cwd qw(getcwd);
12
13
14package main;
15
Fred Drakebc7101d1998-03-06 21:18:55 +000016$INFO = 1; # 0 = do not make a "About this document..." section
17$MAX_LINK_DEPTH = 3;
Fred Draked7571651998-04-23 20:06:24 +000018$ADDRESS = '';
Fred Drakebc7101d1998-03-06 21:18:55 +000019
Fred Drakee194beb1998-05-19 19:38:49 +000020$NO_FOOTNODE = 1;
Fred Drakebc7101d1998-03-06 21:18:55 +000021$NUMBERED_FOOTNOTES = 1;
22
23# Python documentation uses section numbers to support references to match
24# in the printed and online versions.
25#
26$SHOW_SECTION_NUMBERS = 1;
27
28$ICONSERVER = '../icons';
29
Fred Drake0cb76201998-08-07 16:43:29 +000030$BODYTEXT = 'bgcolor="#ffffff"';
Fred Drakebc7101d1998-03-06 21:18:55 +000031$CHILDLINE = "\n<p><hr>\n";
32$VERBOSITY = 0;
Fred Drakebc7101d1998-03-06 21:18:55 +000033
Fred Drake4d10b431998-08-07 20:51:58 +000034# default # of columns for the indexes
Fred Drakeaa3f9fb1998-08-07 19:52:37 +000035$INDEX_COLUMNS = 2;
Fred Drake4d10b431998-08-07 20:51:58 +000036$MODULE_INDEX_COLUMNS = 5;
Fred Drakeaa3f9fb1998-08-07 19:52:37 +000037
Fred Drakec9f2c141998-03-11 12:08:21 +000038
Fred Drakedb34a1e1998-03-10 23:02:57 +000039# A little painful, but lets us clean up the top level directory a little,
40# and not be tied to the current directory (as far as I can tell).
41#
Fred Drakec9f2c141998-03-11 12:08:21 +000042use Cwd;
43use File::Basename;
44($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
45chop $mydir; # remove trailing '/'
46$mydir = getcwd() . "$dd$mydir"
47 unless $mydir =~ s|^/|/|;
Fred Drakedb34a1e1998-03-10 23:02:57 +000048$LATEX2HTMLSTYLES = "$mydir$envkey$LATEX2HTMLSTYLES";
Fred Drakeb3a3ed81998-07-24 22:17:34 +000049push (@INC, $mydir);
Fred Drakebc7101d1998-03-06 21:18:55 +000050
Fred Drake235e6b11998-03-27 05:19:43 +000051($myrootname, $myrootdir, $myext) = fileparse($mydir, '\..*');
52chop $myrootdir;
53
Fred Drakebc7101d1998-03-06 21:18:55 +000054
Fred Drakea4565b01998-05-15 17:14:17 +000055# Hackish way to get the appropriate paper-*/ directory into $TEXINPUTS;
56# pass in the paper size (a4 or letter) as the environment variable PAPER
57# to add the right directory. If not given, the current directory is
58# added instead for use with HOWTO processing.
59#
60if (defined $ENV{'PAPER'}) {
61 $mytexinputs = "$myrootdir${dd}paper-$ENV{'PAPER'}$envkey";
62}
63else {
64 $mytexinputs = getcwd() . $envkey;
65}
66$mytexinputs .= "$myrootdir${dd}texinputs";
67
68
69sub custom_driver_hook{
70 #
71 # This adds the directory of the main input file to $TEXINPUTS; it
72 # seems to be sufficiently general that it should be fine for HOWTO
73 # processing.
74 #
75 my $file = @_[0];
76 my($jobname,$dir,$ext) = fileparse($file, '\..*');
77 $dir = make_directory_absolute($dir);
78 $dir =~ s/$dd$//;
79 $TEXINPUTS = "$dir$envkey$mytexinputs";
80 print "\nadding $dir to \$TEXINPUTS\n";
81}
82
83
Fred Drake13210ed1998-03-17 06:28:05 +000084sub make_nav_panel{
Fred Drake64bdc241998-04-17 02:14:12 +000085 ($NEXT_TITLE ? $NEXT : '')
86 . ($UP_TITLE ? $UP : '')
87 . ($PREVIOUS_TITLE ? $PREVIOUS : '')
88 . $CONTENTS
89 . $INDEX
Fred Drake13210ed1998-03-17 06:28:05 +000090# . " $CUSTOM_BUTTONS"
Fred Drake64bdc241998-04-17 02:14:12 +000091 . "\n<br>\n"
92 . ($NEXT_TITLE ? "<b>Next:</b> $NEXT_TITLE\n" : '')
Fred Drake13210ed1998-03-17 06:28:05 +000093 . ($UP_TITLE ? "<b>Up:</b> $UP_TITLE\n" : '')
94 . ($PREVIOUS_TITLE ? "<b>Previous:</b> $PREVIOUS_TITLE\n" : '');
95}
96
Fred Drakebc7101d1998-03-06 21:18:55 +000097sub top_navigation_panel {
Fred Drake13210ed1998-03-17 06:28:05 +000098 "<div class=navigation>\n"
Fred Drake64bdc241998-04-17 02:14:12 +000099 . make_nav_panel()
100 . '<br><hr><p></div>';
Fred Drakebc7101d1998-03-06 21:18:55 +0000101}
102
103sub bot_navigation_panel {
Fred Drake9d4b6c51998-04-11 05:21:14 +0000104 "<p>\n<div class=navigation><hr>"
Fred Drake64bdc241998-04-17 02:14:12 +0000105 . make_nav_panel()
106 . '</div>';
107}
108
109sub add_link {
110 # Returns a pair (iconic link, textual link)
111 my($icon, $current_file, @link) = @_;
112 my($dummy, $file, $title) = split($delim,
113 $toc_section_info{join(' ',@link)});
114 if ($title && ($file ne $current_file)) {
115 $title = purify($title);
116 $title = get_first_words($title, $WORDS_IN_NAVIGATION_PANEL_TITLES);
117 return (make_href($file, $icon), make_href($file, "$title"))
118 }
119 elsif ($icon eq $up_visible_mark && $EXTERNAL_UP_LINK) {
120 return (make_href($EXTERNAL_UP_LINK, $icon),
121 make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE"))
122 }
123 elsif (($icon eq $previous_visible_mark
124 || $icon eq $previous_page_visible_mark)
125 && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) {
126 return (make_href($EXTERNAL_PREV_LINK, $icon),
127 make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE"))
128 }
129 elsif (($icon eq $next_visible_mark
130 || $icon eq $next_page_visible_mark)
131 && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) {
132 return (make_href($EXTERNAL_DOWN_LINK, $icon),
133 make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE"))
134 }
135 (&inactive_img($icon), "");
136}
137
138sub add_special_link {
139 my($icon, $file, $current_file) = @_;
140 (($file && ($file ne $current_file)) ? make_href($file, $icon) : undef)
141}
142
143sub img_tag {
144 local($icon) = @_;
145 my $alt;
146 my $align = " align=bottom ";
147
148 $alt = join('|', 'up', 'next_group', 'previous_group'
149 , 'next', 'previous', 'change_begin_right', 'change_begin'
150 , 'change_end_right', 'change_end', 'change_delete_right'
151 , 'change_delete', 'contents', 'index');
152
153 if ($icon =~ /(gif|png)$/) {
154 $used_icons{$icon} = 1;
155 if ($icon =~ /change_(begin|end|delete)_right/) { $align = ' ' };
156 my $nav_border = "$NAV_BORDER";
157 if ($icon =~ /($alt)/) {
158 $alt = $1;
159 }
160 else {
161 $nav_border = '1';
162 $alt = '[*]';
163 };
164 if ($LOCAL_ICONS) {
165 return join('', '<img ', $iconsizes{$1}, $align
166 ,'border=', $nav_border, ' alt="', $alt
167 ,'" src="', $icon, '">' );
168 }
169 return join('', '<img ', $iconsizes{$1}, $align
170 ,'border=', $nav_border, ' alt="', $alt, '"\n'
171 ,' src="', $ICONSERVER, "/$icon", '">' );
172 }
173 else {
174 return $icon;
175 }
Fred Drakebc7101d1998-03-06 21:18:55 +0000176}
177
178
Fred Drakebc7101d1998-03-06 21:18:55 +0000179sub gen_index_id {
180 # this is used to ensure common index key generation and a stable sort
Fred Drake235e6b11998-03-27 05:19:43 +0000181 my($str,$extra) = @_;
Fred Drake64bdc241998-04-17 02:14:12 +0000182 sprintf('%s###%s%010d', $str, $extra, ++$global{'max_id'});
Fred Drakebc7101d1998-03-06 21:18:55 +0000183}
184
Fred Drake13210ed1998-03-17 06:28:05 +0000185sub make_index_entry {
Fred Drake11916921998-04-02 22:30:57 +0000186 my($br_id,$str) = @_;
Fred Drake13210ed1998-03-17 06:28:05 +0000187 # If TITLE is not yet available (i.e the \index command is in the title of the
188 # current section), use $ref_before.
189 $TITLE = $ref_before unless $TITLE;
190 # Save the reference
191 $str = gen_index_id($str, '');
Fred Drake64bdc241998-04-17 02:14:12 +0000192 $index{$str} .= make_half_href("$CURRENT_FILE#$br_id");
Fred Drake13210ed1998-03-17 06:28:05 +0000193 "<a name=\"$br_id\">$anchor_invisible_mark<\/a>";
194}
Fred Drakebc7101d1998-03-06 21:18:55 +0000195
Fred Drake64bdc241998-04-17 02:14:12 +0000196
197sub insert_index{
Fred Drake4d10b431998-08-07 20:51:58 +0000198 my($mark,$datafile,$columns,$letters) = @_;
199 my $prog = "$myrootdir/tools/buildindex.py";
200 my $index;
201 if ($letters) {
202 $index = `$prog --columns $columns --letters $datafile`;
203 }
204 else {
205 $index = `$prog --columns $columns $datafile`;
206 }
Fred Drake64bdc241998-04-17 02:14:12 +0000207 s/$mark/$index/;
208}
209
Fred Drake235e6b11998-03-27 05:19:43 +0000210sub add_idx{
Fred Drake5a525191998-04-02 22:39:05 +0000211 print "\nDoing the index ...";
Fred Drake235e6b11998-03-27 05:19:43 +0000212 close(IDXFILE);
Fred Drake4d10b431998-08-07 20:51:58 +0000213 insert_index($idx_mark, 'index.dat', $INDEX_COLUMNS, 1);
Fred Drake13210ed1998-03-17 06:28:05 +0000214}
Fred Drakebc7101d1998-03-06 21:18:55 +0000215
216
217$idx_module_mark = '<tex2html_idx_module_mark>';
218$idx_module_title = 'Module Index';
219
Fred Drake13210ed1998-03-17 06:28:05 +0000220sub add_module_idx{
Fred Drakebc7101d1998-03-06 21:18:55 +0000221 print "\nDoing the module index ...";
Fred Drake235e6b11998-03-27 05:19:43 +0000222 my $key;
Fred Drake64bdc241998-04-17 02:14:12 +0000223 open(MODIDXFILE, '>modindex.dat') || die "\n$!\n";
Fred Drake235e6b11998-03-27 05:19:43 +0000224 foreach $key (keys %Modules) {
225 # dump the line in the data file; just use a dummy seqno field
Fred Drake9d4b6c51998-04-11 05:21:14 +0000226 print MODIDXFILE "$Modules{$key}" . $IDXFILE_FIELD_SEP . "$key###\n";
Fred Drakebc7101d1998-03-06 21:18:55 +0000227 }
Fred Drake235e6b11998-03-27 05:19:43 +0000228 close(MODIDXFILE);
Fred Drake4d10b431998-08-07 20:51:58 +0000229 insert_index($idx_module_mark, 'modindex.dat', $MODULE_INDEX_COLUMNS, 0);
Fred Drakebc7101d1998-03-06 21:18:55 +0000230}
231
Fred Drake235e6b11998-03-27 05:19:43 +0000232# replace both indexes as needed:
233sub add_idx_hook{
Fred Drakeb3a3ed81998-07-24 22:17:34 +0000234 add_idx() if (/$idx_mark/);
235 add_module_idx() if (/$idx_module_mark/);
236 process_all_localmoduletables();
Fred Drake235e6b11998-03-27 05:19:43 +0000237}
Fred Drakebc7101d1998-03-06 21:18:55 +0000238
Fred Drakebc7101d1998-03-06 21:18:55 +0000239
240# In addition to the standard stuff, add label to allow named node files.
241sub do_cmd_tableofcontents {
242 local($_) = @_;
243 $TITLE = $toc_title;
244 $tocfile = $CURRENT_FILE;
Fred Drake64bdc241998-04-17 02:14:12 +0000245 my($closures,$reopens) = preserve_open_tags();
246 anchor_label('contents', $CURRENT_FILE, $_); # this is added
Fred Drakebc7101d1998-03-06 21:18:55 +0000247 join('', "<BR>\n", $closures
Fred Drake64bdc241998-04-17 02:14:12 +0000248 , make_section_heading($toc_title, 'H2'), $toc_mark
Fred Drakebc7101d1998-03-06 21:18:55 +0000249 , $reopens, $_);
250}
251# In addition to the standard stuff, add label to allow named node files.
252sub do_cmd_listoffigures {
253 local($_) = @_;
254 $TITLE = $lof_title;
255 $loffile = $CURRENT_FILE;
Fred Drake64bdc241998-04-17 02:14:12 +0000256 my($closures,$reopens) = preserve_open_tags();
257 anchor_label('lof', $CURRENT_FILE, $_); # this is added
Fred Drakebc7101d1998-03-06 21:18:55 +0000258 join('', "<BR>\n", $closures
Fred Drake64bdc241998-04-17 02:14:12 +0000259 , make_section_heading($lof_title, 'H2'), $lof_mark
Fred Drakebc7101d1998-03-06 21:18:55 +0000260 , $reopens, $_);
261}
262# In addition to the standard stuff, add label to allow named node files.
263sub do_cmd_listoftables {
264 local($_) = @_;
265 $TITLE = $lot_title;
266 $lotfile = $CURRENT_FILE;
Fred Drake64bdc241998-04-17 02:14:12 +0000267 my($closures,$reopens) = preserve_open_tags();
268 anchor_label('lot', $CURRENT_FILE, $_); # this is added
Fred Drakebc7101d1998-03-06 21:18:55 +0000269 join('', "<BR>\n", $closures
Fred Drake64bdc241998-04-17 02:14:12 +0000270 , make_section_heading($lot_title, 'H2'), $lot_mark
Fred Drakebc7101d1998-03-06 21:18:55 +0000271 , $reopens, $_);
272}
273# In addition to the standard stuff, add label to allow named node files.
274sub do_cmd_textohtmlinfopage {
275 local($_) = @_;
276 if ($INFO) { #
Fred Drake64bdc241998-04-17 02:14:12 +0000277 anchor_label("about",$CURRENT_FILE,$_); # this is added
Fred Drakebc7101d1998-03-06 21:18:55 +0000278 } #
279 ( ($INFO == 1)
280 ? join('', $close_all
281 , "<STRONG>$t_title</STRONG><P>\nThis document was generated using the\n"
282 , "<A HREF=\"$TEX2HTMLADDRESS\"><STRONG>LaTeX</STRONG>2<tt>HTML</tt></A>"
283 , " translator Version $TEX2HTMLVERSION\n"
284 , "<P>Copyright &#169; 1993, 1994, 1995, 1996, 1997,\n"
285 , "<A HREF=\"$AUTHORADDRESS\">Nikos Drakos</A>, \n"
286 , "Computer Based Learning Unit, University of Leeds.\n"
287 , "<P>The command line arguments were: <BR>\n "
288 , "<STRONG>latex2html</STRONG> <tt>$argv</tt>.\n"
289 , "<P>The translation was initiated by $address_data[0] on $address_data[1]"
290 , $open_all, $_)
291 : join('', $close_all, $INFO,"\n", $open_all, $_))
292}
293
294# $idx_mark will be replaced with the real index at the end
295sub do_cmd_textohtmlindex {
296 local($_) = @_;
297 $TITLE = $idx_title;
298 $idxfile = $CURRENT_FILE;
Fred Drake235e6b11998-03-27 05:19:43 +0000299 if (%index_labels) { make_index_labels(); }
300 if (($SHORT_INDEX) && (%index_segment)) { make_preindex(); }
Fred Drakebc7101d1998-03-06 21:18:55 +0000301 else { $preindex = ''; }
Fred Drake235e6b11998-03-27 05:19:43 +0000302 my $heading = make_section_heading($idx_title, 'h2') . $idx_mark;
Fred Drake11916921998-04-02 22:30:57 +0000303 my($pre,$post) = minimize_open_tags($heading);
Fred Drake235e6b11998-03-27 05:19:43 +0000304 anchor_label('genindex',$CURRENT_FILE,$_); # this is added
305 '<br>\n' . $pre . $_;
Fred Drakebc7101d1998-03-06 21:18:55 +0000306}
307
308# $idx_module_mark will be replaced with the real index at the end
309sub do_cmd_textohtmlmoduleindex {
310 local($_) = @_;
Fred Drakebc7101d1998-03-06 21:18:55 +0000311 $TITLE = $idx_module_title;
Fred Drake64bdc241998-04-17 02:14:12 +0000312 anchor_label("modindex",$CURRENT_FILE,$_);
Fred Drake235e6b11998-03-27 05:19:43 +0000313 '<p>' . make_section_heading($idx_module_title, "h2")
314 . $idx_module_mark . $_;
Fred Drakebc7101d1998-03-06 21:18:55 +0000315}
316
317# The bibliography and the index should be treated as separate sections
318# in their own HTML files. The \bibliography{} command acts as a sectioning command
319# that has the desired effect. But when the bibliography is constructed
320# manually using the thebibliography environment, or when using the
321# theindex environment it is not possible to use the normal sectioning
322# mechanism. This subroutine inserts a \bibliography{} or a dummy
323# \textohtmlindex command just before the appropriate environments
324# to force sectioning.
325
326# XXX This *assumes* that if there are two {theindex} environments, the
327# first is the module index and the second is the standard index. This
328# is sufficient for the current Python documentation, but that's about
329# it.
330
331sub add_bbl_and_idx_dummy_commands {
Fred Drake11916921998-04-02 22:30:57 +0000332 my $id = $global{'max_id'};
Fred Drakebc7101d1998-03-06 21:18:55 +0000333
334 s/([\\]begin\s*$O\d+$C\s*thebibliography)/$bbl_cnt++; $1/eg;
335 s/([\\]begin\s*$O\d+$C\s*thebibliography)/$id++; "\\bibliography$O$id$C$O$id$C $1"/geo
336 #if ($bbl_cnt == 1)
337 ;
338 #}
Fred Drake11916921998-04-02 22:30:57 +0000339 #----------------------------------------------------------------------
340 # (FLD) This was added
341 my(@parts) = split(/\\begin\s*$O\d+$C\s*theindex/);
342 if (scalar(@parts) == 3) {
343 # Be careful to re-write the string in place, since $_ is *not*
344 # returned explicity; *** nasty side-effect dependency! ***
345 print "\nadd_bbl_and_idx_dummy_commands ==> adding module index";
346 my $rx = "([\\\\]begin\\s*$O\\d+$C\\s*theindex[\\s\\S]*)"
347 . "([\\\\]begin\\s*$O\\d+$C\\s*theindex)";
348 s/$rx/\\textohtmlmoduleindex \1 \\textohtmlindex \2/o;
349 }
350 else {
351 $global{'max_id'} = $id; # not sure why....
352 s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o;
353 s/[\\]printindex/\\textohtmlindex /o;
354 }
355 #----------------------------------------------------------------------
Fred Drake64bdc241998-04-17 02:14:12 +0000356 lib_add_bbl_and_idx_dummy_commands()
Fred Drake11916921998-04-02 22:30:57 +0000357 if defined(&lib_add_bbl_and_idx_dummy_commands);
Fred Drakebc7101d1998-03-06 21:18:55 +0000358}
359
360# The bibliographic references, the appendices, the lists of figures and tables
361# etc. must appear in the contents table at the same level as the outermost
362# sectioning command. This subroutine finds what is the outermost level and
363# sets the above to the same level;
364
Fred Drake13210ed1998-03-17 06:28:05 +0000365sub set_depth_levels {
366 # Sets $outermost_level
Fred Drake11916921998-04-02 22:30:57 +0000367 my $level;
Fred Drake13210ed1998-03-17 06:28:05 +0000368 #RRM: do not alter user-set value for $MAX_SPLIT_DEPTH
369 foreach $level ("part", "chapter", "section", "subsection",
370 "subsubsection", "paragraph") {
371 last if (($outermost_level) = /\\($level)$delimiter_rx/);
372 }
373 $level = ($outermost_level ? $section_commands{$outermost_level} :
374 do {$outermost_level = 'section'; 3;});
Fred Drakebc7101d1998-03-06 21:18:55 +0000375
Fred Drake13210ed1998-03-17 06:28:05 +0000376 #RRM: but calculate value for $MAX_SPLIT_DEPTH when a $REL_DEPTH was given
377 if ($REL_DEPTH && $MAX_SPLIT_DEPTH) {
378 $MAX_SPLIT_DEPTH = $level + $MAX_SPLIT_DEPTH;
379 } elsif (!($MAX_SPLIT_DEPTH)) { $MAX_SPLIT_DEPTH = 1 };
Fred Drakebc7101d1998-03-06 21:18:55 +0000380
Fred Drake64bdc241998-04-17 02:14:12 +0000381 %unnumbered_section_commands = ('tableofcontents' => $level,
382 'listoffigures' => $level,
383 'listoftables' => $level,
384 'bibliography' => $level,
385 'textohtmlindex' => $level,
386 'textohtmlmoduleindex' => $level);
387 $section_headings{'textohtmlmoduleindex'} = 'h1';
Fred Drakebc7101d1998-03-06 21:18:55 +0000388
Fred Drake64bdc241998-04-17 02:14:12 +0000389 %section_commands = (%unnumbered_section_commands,
390 %section_commands);
Fred Drake11916921998-04-02 22:30:57 +0000391
392 make_sections_rx();
Fred Drake13210ed1998-03-17 06:28:05 +0000393}
Fred Drakebc7101d1998-03-06 21:18:55 +0000394
395
396# Fix from Ross Moore for ']' in \item[...]; this can be removed once the next
Fred Drake235e6b11998-03-27 05:19:43 +0000397# patch to LaTeX2HTML is released and tested ... if the patch gets included.
398# Be very careful to keep this around, just in case things break again!
Fred Drakebc7101d1998-03-06 21:18:55 +0000399#
400sub protect_useritems {
401 local(*_) = @_;
Fred Drake11916921998-04-02 22:30:57 +0000402 local($preitems,$thisitem);
Fred Drakebc7101d1998-03-06 21:18:55 +0000403 while (/\\item\s*\[/) {
Fred Drake11916921998-04-02 22:30:57 +0000404 $preitems .= $`;
405 $_ = $';
Fred Drakebc7101d1998-03-06 21:18:55 +0000406 $thisitem = $&.'<<'.++$global{'max_id'}.'>>';
407 s/^(((($O|$OP)\d+($C|$CP)).*\3|<[^<>]*>|[^\]<]+)*)\]/$thisitem.=$1;''/e;
Fred Drake11916921998-04-02 22:30:57 +0000408 $preitems .= $thisitem . '<<' . $global{'max_id'} . '>>]';
409 s/^]//;
Fred Drakebc7101d1998-03-06 21:18:55 +0000410 }
411 $_ = $preitems . $_;
412}
413
Fred Drake1072e461998-04-12 02:16:34 +0000414# This changes the markup used for {verbatim} environments, and is the
415# best way I've found that ensures the <dl> goes one the outside of the
416# <pre>...</pre>.
417#
418# Note that this *must* be done in the init file, not the python.perl
419# style support file. The %declarations must be set before initialize()
420# is called in the main script.
421#
Fred Drake64bdc241998-04-17 02:14:12 +0000422%declarations = ('preform' => '<dl><dd><pre></pre></dl>',
Fred Drake1072e461998-04-12 02:16:34 +0000423 %declarations);
424
Fred Drakebc7101d1998-03-06 21:18:55 +00004251; # This must be the last line