Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit beb27bf

Browse files
committed
Make navigation panels more CSS-friendly.
Make sure the contents page always has the "table of child links" turned off; this wasn't being handled properly by latex2html for "howto" ("article") documents, so just do it ourselves for all document types.
1 parent d14e973 commit beb27bf

1 file changed

Lines changed: 26 additions & 15 deletions

File tree

Doc/perl/l2hinit.perl

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,31 @@ sub set_icon_size{
111111
$BLANK_ICON = "\n<td>" . img_tag('blank.' . $IMAGE_TYPE) . "</td>";
112112
$NAV_BGCOLOR = " bgcolor=\"#99CCFF\"";
113113

114+
sub make_nav_sectref{
115+
my($label,$title) = @_;
116+
if ($title) {
117+
return ("<b class=navlabel>$label:</b> "
118+
. "<span class=sectref>$title</span>\n");
119+
}
120+
return '';
121+
}
122+
114123
sub make_nav_panel{
115-
("<table width=\"100%\" cellpadding=0 cellspacing=2>\n<tr>"
116-
. "\n<td>$NEXT</td>"
117-
. "\n<td>$UP</td>"
118-
. "\n<td>$PREVIOUS</td>"
119-
. "\n<td align=center$NAV_BGCOLOR width=\"100%\">"
120-
. "\n <b>$t_title</b></td>"
121-
. ($CONTENTS ? "\n<td>$CONTENTS</td>" : $BLANK_ICON)
122-
. "\n<td>$CUSTOM_BUTTONS</td>" # module index
123-
. ($INDEX ? "\n<td>$INDEX</td>" : $BLANK_ICON)
124-
. "\n</tr></table><hr>\n"
125-
. ($NEXT_TITLE ? "<b>Next:</b> $NEXT_TITLE\n" : '')
126-
. ($UP_TITLE ? "<b>Up:</b> $UP_TITLE\n" : '')
127-
. ($PREVIOUS_TITLE ? "<b>Previous:</b> $PREVIOUS_TITLE\n" : ''));
124+
return ("<table width=\"100%\" cellpadding=0 cellspacing=2>\n<tr>"
125+
. "\n<td>$NEXT</td>"
126+
. "\n<td>$UP</td>"
127+
. "\n<td>$PREVIOUS</td>"
128+
. "\n<td align=center$NAV_BGCOLOR width=\"100%\">"
129+
. "\n <b class=title>$t_title</b></td>"
130+
. ($CONTENTS ? "\n<td>$CONTENTS</td>" : $BLANK_ICON)
131+
. "\n<td>$CUSTOM_BUTTONS</td>" # module index
132+
. ($INDEX ? "\n<td>$INDEX</td>" : $BLANK_ICON)
133+
. "\n</tr></table>"
134+
#. "<hr>"
135+
. make_nav_sectref("Next", $NEXT_TITLE)
136+
. make_nav_sectref("Up", $UP_TITLE)
137+
. make_nav_sectref("Previous", $PREVIOUS_TITLE)
138+
);
128139
}
129140

130141
sub top_navigation_panel {
@@ -278,7 +289,7 @@ sub do_cmd_tableofcontents {
278289
$tocfile = $CURRENT_FILE;
279290
my($closures,$reopens) = preserve_open_tags();
280291
anchor_label('contents', $CURRENT_FILE, $_); # this is added
281-
join('', "<BR>\n", $closures
292+
join('', "<BR>\n\\tableofchildlinks[off]", $closures
282293
, make_section_heading($toc_title, 'H2'), $toc_mark
283294
, $reopens, $_);
284295
}
@@ -458,7 +469,7 @@ sub protect_useritems {
458469
# style support file. The %declarations must be set before initialize()
459470
# is called in the main script.
460471
#
461-
%declarations = ('preform' => '<dl><dd><pre></pre></dl>',
472+
%declarations = ('preform' => '<dl><dd><pre class=verbatim></pre></dl>',
462473
%declarations);
463474

464475
1; # This must be the last line

0 commit comments

Comments
 (0)