diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-17 21:16:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-17 21:16:42 +0000 |
commit | a3d3111bfe26b8e5f5bc6049dfb2a4ca2edc7881 (patch) | |
tree | f4a8a34f904c1bb86adcc3ae0e14434badc6dbe4 /Build/source/utils/texi2html/examples/makeinfo.init | |
parent | 6c0eafbb1395d426a72a74538e0b2a95e8344ca6 (diff) |
utils 1
git-svn-id: svn://tug.org/texlive/trunk@1484 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/texi2html/examples/makeinfo.init')
-rw-r--r-- | Build/source/utils/texi2html/examples/makeinfo.init | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/Build/source/utils/texi2html/examples/makeinfo.init b/Build/source/utils/texi2html/examples/makeinfo.init new file mode 100644 index 00000000000..ec3cb92264f --- /dev/null +++ b/Build/source/utils/texi2html/examples/makeinfo.init @@ -0,0 +1,147 @@ +# -*-perl-*- +$TOP_FILE = 'index.html'; + +$SHOW_MENU = 1; + +$USE_NODES = 1; + +$SPLIT = 'node'; + +$SECTION_NAVIGATION = 1; + +$SHORT_REF = 1; + +$NODE_NAME_IN_MENU = 1; + +$AVOID_MENU_REDUNDANCY = 0; + +$SPLIT_INDEX = 0; + +$MENU_SYMBOL = '*'; + +$WORDS_IN_PAGE = 200; + +$SEPARATED_FOOTNOTES = 0; + +@SECTION_BUTTONS = + ( + \"node: ", \$Texi2HTML::NODE{This}, [ 'NodeNext', \$Texi2HTML::NODE{Next} ] , \",", [ 'NodePrev', \$Texi2HTML::NODE{Prev} ], \",", [ 'NodeUp', \$Texi2HTML::NODE{NodeUp} ], 'Following' + ); + +my $default_init_out = $init_out; +$init_out = \&makeinfo_like_init_out; + +sub makeinfo_like_init_out() +{ + my $encoding = &$default_init_out(); + $NAVIGATION_TEXT{'Following'} = ' > '; + return $encoding; +} + + +@MISC_BUTTONS = @SECTION_BUTTONS; + +$foot_line_and_ref = \&makeinfo_like_foot_line_and_ref; +$foot_lines = \&makeinfo_like_foot_lines; +$index_summary = \&makeinfo_like_index_summary; +$summary_letter = \&makeinfo_like_summary_letter; +$index_entry = \&makeinfo_like_index_entry; +$index_letter = \&makeinfo_like_index_letter; +$print_index = \&makeinfo_like_print_index; +$listoffloats = \&makeinfo_like_listoffloats; +$listoffloats_entry = \&makeinfo_like_listoffloats_entry; + +sub makeinfo_like_foot_line_and_ref($$$$$$$$) +{ + my $foot_num = shift; + my $relative_num = shift; + my $footid = shift; + my $docid = shift; + my $from_file = shift; + my $footnote_file = shift; + my $lines = shift; + my $state = shift; + + my $foot_anchor = "<sup>" . &$anchor($docid, "$footnote_file#$footid", $relative_num) . "</sup>"; + $foot_anchor = &$anchor($docid, "$footnote_file#$footid", "($relative_num)") if ($state->{'preformatted'}); + unshift @$lines, "<li>"; + push @$lines, "</li>\n"; + return ($lines, $foot_anchor); +} + +sub makeinfo_like_foot_lines($) +{ + my $lines = shift; + unshift @$lines, "<hr>\n<h4>$Texi2HTML::I18n::WORDS->{'Footnotes_Title'}</h4>\n<ol type=\"1\">\n"; + push @$lines, "</ol>"; + return $lines; +} + + +sub makeinfo_like_index_summary +{ + return ''; +} + +sub makeinfo_like_summary_letter +{ + return ''; +} + +sub makeinfo_like_index_entry($$$$) +{ + my $text_href = shift; + my $entry = shift; + my $element_href = shift; + my $element_text = shift; + + return '<li>' . $entry . ': ' . &$anchor('', $element_href, $element_text) + . "</li>\n"; +} + +sub makeinfo_like_index_letter($$$) +{ + my $letter = shift; + my $id = shift; + my $text = shift; + return $text; +} + +sub makeinfo_like_print_index($$) +{ + my $text = shift; + my $name = shift; + return "<ul class=\"index-$name\" compact>\n" . $text . "</ul>\n"; +} + +sub makeinfo_like_listoffloats_entry($$$$) +{ + my $style_texi = shift; + my $float = shift; + my $float_style = shift; + my $caption = shift; + my $href = shift; + + if ($caption ne '') + { + return '<li>' . &$I('%{href}: %{caption}', { 'href' => &$anchor('', $href, $float_style), 'caption' => $caption }) . "</li>\n"; + } + else + { + return '<li>' . &$anchor('', $href, $float_style) . "</li>\n"; + } +} + +sub makeinfo_like_listoffloats($$$) +{ + my $style_texi = shift; + my $style = shift; + my $float_entries = shift; + + my $result = "<ul class=\"listoffloats\">\n" ; + foreach my $float_entry (@$float_entries) + { + $result .= $float_entry; + } + return $result . "</ul>\n"; +} |