diff options
author | Fred Drake <fdrake@acm.org> | 1998-02-27 15:28:45 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-02-27 15:28:45 (GMT) |
commit | f9fd4e8828acf355afc836b21a693fde5114c89a (patch) | |
tree | 43a6a2fdf47ccf5ff633c95002d1fd11fc63505c /Doc | |
parent | 7186783f5668692da9053259a85ee59547e774a7 (diff) | |
download | cpython-f9fd4e8828acf355afc836b21a693fde5114c89a.zip cpython-f9fd4e8828acf355afc836b21a693fde5114c89a.tar.gz cpython-f9fd4e8828acf355afc836b21a693fde5114c89a.tar.bz2 |
Put all the indexsubitem stuff together.
Support modified verbatim for both LaTeX2HTML 96.1* and 98.1.
Make table column headers bold.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/myformat.perl | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/Doc/myformat.perl b/Doc/myformat.perl index 171c1dd..da9dbd1 100644 --- a/Doc/myformat.perl +++ b/Doc/myformat.perl @@ -156,6 +156,10 @@ sub do_cmd_strong{ $INDEX_SUBITEM = ""; +sub get_indexsubitem{ + $INDEX_SUBITEM ? " $INDEX_SUBITEM" : ''; +} + sub do_cmd_setindexsubitem{ local($_) = @_; s/$any_next_pair_pr_rx//; @@ -283,8 +287,8 @@ sub do_cmd_nodename{ &do_cmd_label(@_); } sub init_myformat{ # XXX need some way for this to be called after &initialise; ??? -# $anchor_mark = ''; -# $icons{'anchor_mark'} = ''; + $anchor_mark = ''; + $icons{'anchor_mark'} = ''; # <<2>>...<<2>> $any_next_pair_rx3 = "$O(\\d+)$C([\\s\\S]*)$O\\3$C"; $any_next_pair_rx5 = "$O(\\d+)$C([\\s\\S]*)$O\\5$C"; @@ -299,10 +303,6 @@ sub init_myformat{ &init_myformat; -sub get_indexsubitem{ - $INDEX_SUBITEM ? " $INDEX_SUBITEM" : ''; -} - # similar to make_index_entry(), but includes the string in the result # instead of the dummy filler. # @@ -320,12 +320,28 @@ sub make_str_index_entry{ "<a name=\"$br_id\">$str<\/a>"; } -# Changed from the stock version to indent {verbatim} sections: +# Changed from the stock version to indent {verbatim} sections, +# and make them smaller, to better match the LaTeX version: + +# (Used with LaTeX2HTML 96.1*) sub replace_verbatim { # Modifies $_ - s/$verbatim_mark(verbatim)(\d+)/<p><dl><dd><pre>$verbatim{$2}<\/pre><\/dl>/go; + s/$verbatim_mark(verbatim)(\d+)/<p><dl><dd><font size=\"-1\"><pre>$verbatim{$2}<\/pre><\/font><\/dl>/go; s/$verbatim_mark(rawhtml)(\d+)/$verbatim{$2}/ego; # Raw HTML } + +# (Used with LaTeX2HTML 98.1) +sub replace_verbatim_hook{ + # Modifies $_ + s/$math_verbatim_rx/&put_comment("MATH: ".$verbatim{$1})/eg; +# s/$verbatim_mark(verbatim\*?)(\d+)#/<PRE>\n$verbatim{$2}\n<\/PRE>/go; + s/$verbatim_mark(\w*[vV]erbatim\*?)(\d+)#/\n<p><dl><dd><font size=\"-1\">$verbatim{$2}<\/font><\/dl>\n/go; +# s/$verbatim_mark(rawhtml)(\d+)#/$verbatim{$2}/eg; # Raw HTML + # Raw HTML, but replacements may have protected characters + s/$verbatim_mark(rawhtml)(\d+)#/&unprotect_raw_html($verbatim{$2})/eg; + s/$verbatim_mark$keepcomments(\d+)#/$verbatim{$2}/ego; # Raw TeX + s/$unfinished_mark$keepcomments(\d+)#/$verbatim{$2}/ego; # Raw TeX +} sub do_env_cfuncdesc{ local($_) = @_; @@ -511,8 +527,10 @@ sub do_env_tableii{ } local($th1,$th2,$th3) = &setup_column_alignments($2); $globals{"lineifont"} = $font; - "<table border align=center>\n <tr>$th1$h1</th>\n $th2$h2</th>$'\n" - . "</table>"; + "<table border align=center>" + . "\n <tr>$th1<b>$h1</b></th>" + . "\n $th2<b>$h2</b></th>$'" + . "\n</table>"; } sub do_cmd_lineii{ @@ -542,9 +560,11 @@ sub do_env_tableiii{ } local($th1,$th2,$th3) = &setup_column_alignments($2); $globals{"lineifont"} = $font; - "<table border align=center>\n <tr>$th1$h1</th>\n $th2$h2</th>" - . "\n $th3$h3</th>$'\n" - . "</table>"; + "<table border align=center>" + . "\n <tr>$th1<b>$h1</b></th>" + . "\n $th2<b>$h2</b></th>" + . "\n $th3<b>$h3</b></th>$'" + . "\n</table>"; } sub do_cmd_lineiii{ |