📄 texi2html
字号:
} &$T2H_print_navigation($fh, $T2H_VERTICAL_HEAD_NAVIGATION); if ($T2H_VERTICAL_HEAD_NAVIGATION) { print $fh <<EOT;</TD><TD ALIGN="LEFT">EOT } elsif ($T2H_SPLIT eq 'section') { print $fh "<HR SIZE=1>\n"; }}# Specifies the minimum page length required before a navigation panel# is placed at the bottom of a page (the default is that of latex2html)# T2H_THIS_WORDS_IN_PAGE holds number of words of current page$T2H_WORDS_IN_PAGE = 300;sub T2H_DEFAULT_print_foot_navigation{ my $fh = shift; my $nwords = shift; if ($T2H_VERTICAL_HEAD_NAVIGATION) { print $fh <<EOT;</TD></TR></TABLE>EOT } print $fh "<HR SIZE=1>\n"; &$T2H_print_navigation($fh) if ($nwords >= $T2H_WORDS_IN_PAGE)}####################################################################### navigation panel## specify in this array which "buttons" should appear in which order# in the navigation panel for sections; use ' ' for empty buttons (space)@T2H_SECTION_BUTTONS = ( 'Back', 'Forward', ' ', 'FastBack', 'Up', 'FastForward', ' ', ' ', ' ', ' ', 'Top', 'Contents', 'Index', 'About', );# buttons for misc stuff@T2H_MISC_BUTTONS = ('Top', 'Contents', 'Index', 'About');# insert here name of icon images for buttons # Icons are used, if $T2H_ICONS and resp. value are set%T2H_ACTIVE_ICONS = ( 'Top', '', 'Contents', '', 'Overview', '', 'Index', '', 'Back', '', 'FastBack', '', 'Prev', '', 'Up', '', 'Next', '', 'Forward', '', 'FastForward', '', 'About' , '', 'First', '', 'Last', '', ' ', '' );# insert here name of icon images for these, if button is inactive%T2H_PASSIVE_ICONS = ( 'Top', '', 'Contents', '', 'Overview', '', 'Index', '', 'Back', '', 'FastBack', '', 'Prev', '', 'Up', '', 'Next', '', 'Forward', '', 'FastForward', '', 'About', '', 'First', '', 'Last', '', );# how to create IMG tagsub T2H_DEFAULT_button_icon_img{ my $button = shift; my $icon = shift; my $name = shift; return qq{<IMG SRC="$icon" BORDER="0" ALT="$button: $name" ALIGN="MIDDLE">};}# Names of text as alternative for icons%T2H_NAVIGATION_TEXT = ( 'Top', 'Top', 'Contents', 'Contents', 'Overview', 'Overview', 'Index', 'Index', ' ', ' ', 'Back', ' < ', 'FastBack', ' << ', 'Prev', 'Prev', 'Up', ' Up ', 'Next', 'Next', 'Forward', ' > ', 'FastForward', ' >> ', 'About', ' ? ', 'First', ' |< ', 'Last', ' >| ' );sub T2H_DEFAULT_print_navigation{ my $fh = shift; my $vertical = shift; my $spacing = 1; print $fh "<TABLE CELLPADDING=$spacing CELLSPACING=$spacing BORDER=0>\n"; print $fh "<TR>" unless $vertical; for $button (@$T2H_BUTTONS) { print $fh qq{<TR VALIGN="TOP" ALIGN="LEFT">\n} if $vertical; print $fh qq{<TD VALIGN="MIDDLE" ALIGN="LEFT">}; if (ref($button) eq 'CODE') { &$button($fh, $vertical); } elsif ($button eq ' ') { # handle space button print $fh $T2H_ICONS && $T2H_ACTIVE_ICONS{' '} ? &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{' '}) : $T2H_NAVIGATION_TEXT{' '}; next; } elsif ($T2H_HREF{$button}) { # button is active print $fh $T2H_ICONS && $T2H_ACTIVE_ICONS{$button} ? # use icon ? t2h_anchor('', $T2H_HREF{$button}, # yes &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{$button}, $T2H_NAME{$button})) : # use text "[" . t2h_anchor('', $T2H_HREF{$button}, $T2H_NAVIGATION_TEXT{$button}) . "]"; } else { # button is passive print $fh $T2H_ICONS && $T2H_PASSIVE_ICONS{$button} ? &$T2H_button_icon_img($button, $T2H_PASSIVE_ICONS{$button}, $T2H_NAME{$button}) : "[" . $T2H_NAVIGATION_TEXT{$button} . "]"; } print $fh "</TD>\n"; print $fh "</TR>\n" if $vertical; } print $fh "</TR>" unless $vertical; print $fh "</TABLE>\n";}####################################################################### Frames: this is from "Richard Y. Kim" <ryk@coho.net># Should be improved to be more conforming to other _print* functionssub T2H_DEFAULT_print_frame{ my $fh = shift; print $fh <<EOT;<HTML><HEAD><TITLE>$T2H_THISDOC{title}</TITLE></HEAD><FRAMESET cols="140,*"> <FRAME name=toc src="$docu_toc_frame_file"> <FRAME name=main src="$docu_doc"></FRAMESET> </HTML>EOT}sub T2H_DEFAULT_print_toc_frame{ my $fh = shift; &$T2H_print_page_head($fh); print $fh <<EOT;<H2>Content</H2>EOT print $fh map {s/HREF=/target=\"main\" HREF=/; $_;} @stoc_lines; print $fh "</BODY></HTML>\n";}####################################################################### About page## T2H_PRE_ABOUT might be a function$T2H_PRE_ABOUT = <<EOT;This document was generated $T2H_ADDRESSusing <A HREF="$T2H_HOMEPAGE"><I>texi2html</I></A><P></P> EOT$T2H_AFTER_ABOUT = '';sub T2H_DEFAULT_about_body{ my $about; if (ref($T2H_PRE_ABOUT) eq 'CODE') { $about = &$T2H_PRE_ABOUT(); } else { $about = $T2H_PRE_ABOUT; } $about .= <<EOT;The buttons in the navigation panels have the following meaning:<P></P><table border = "1"><TR><TH> Button </TH><TH> Name </TH><TH> Go to </TH><TH> From 1.2.3 go to</TH></TR>EOT for $button (@T2H_SECTION_BUTTONS) { next if $button eq ' ' || ref($button) eq 'CODE'; $about .= <<EOT;<TR><TD ALIGN="CENTER">EOT $about .= ($T2H_ICONS && $T2H_ACTIVE_ICONS{$button} ? &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{$button}) : " [" . $T2H_NAVIGATION_TEXT{$button} . "] "); $about .= <<EOT;</TD><TD ALIGN="CENTER">$button</TD><TD>$T2H_BUTTONS_GOTO{$button}</TD><TD>$T2H_BUTTONS_EXAMPLE{$button}</TD></TR>EOT } $about .= <<EOT;</TABLE><P></P>where the <STRONG> Example </STRONG> assumes that the current position is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of the following structure:<UL><LI> 1. Section One </LI><UL><LI>1.1 Subsection One-One</LI><UL><LI> ... </LI></UL><LI>1.2 Subsection One-Two</LI><UL><LI>1.2.1 Subsubsection One-Two-One</LI><LI>1.2.2 Subsubsection One-Two-Two</LI><LI>1.2.3 Subsubsection One-Two-Three <STRONG><== Current Position </STRONG></LI><LI>1.2.4 Subsubsection One-Two-Four</LI></UL><LI>1.3 Subsection One-Three</LI><UL><LI> ... </LI></UL><LI>1.4 Subsection One-Four</LI></UL></UL>$T2H_AFTER_ABOUTEOT return $about; } %T2H_BUTTONS_GOTO = ( 'Top', 'cover (top) of document', 'Contents', 'table of contents', 'Overview', 'short table of contents', 'Index', 'concept index', 'Back', 'previous section in reading order', 'FastBack', 'previous or up-and-previous section ', 'Prev', 'previous section same level', 'Up', 'up section', 'Next', 'next section same level', 'Forward', 'next section in reading order', 'FastForward', 'next or up-and-next section', 'About' , 'this page', 'First', 'first section in reading order', 'Last', 'last section in reading order', );%T2H_BUTTONS_EXAMPLE = ( 'Top', ' ', 'Contents', ' ', 'Overview', ' ', 'Index', ' ', 'Back', '1.2.2', 'FastBack', '1.1', 'Prev', '1.2.2', 'Up', '1.2', 'Next', '1.2.4', 'Forward', '1.2.4', 'FastForward', '1.3', 'About', ' ', 'First', '1.', 'Last', '1.2.4',);####################################################################### from here on, its l2h init stuff ### initialization for latex2html as for Singular manual generation## obachman 3/99## Options controlling Titles, File-Names, Tracing and Sectioning#$TITLE = '';$SHORTEXTN = 0;$LONG_TITLES = 0;$DESTDIR = ''; # should be overwritten by cmd-line argument$NO_SUBDIR = 0;# should be overwritten by cmd-line argument$PREFIX = ''; # should be overwritten by cmd-line argument$AUTO_PREFIX = 0; # this is needed, so that prefix settings are used$AUTO_LINK = 0; $SPLIT = 0;$MAX_LINK_DEPTH = 0;$TMP = ''; # should be overwritten by cmd-line argument$DEBUG = 0;$VERBOSE = 1;## Options controlling Extensions and Special Features #$HTML_VERSION = "3.2";$TEXDEFS = 1; # we absolutely need that$EXTERNAL_FILE = '';$SCALABLE_FONTS = 1;$NO_SIMPLE_MATH = 1;$LOCAL_ICONS = 1;$SHORT_INDEX = 0;$NO_FOOTNODE = 1;$ADDRESS = '';$INFO = '';## Switches controlling Image Generation #$ASCII_MODE = 0;$NOLATEX = 0;$EXTERNAL_IMAGES = 0;$PS_IMAGES = 0;$NO_IMAGES = 0;$IMAGES_ONLY = 0;$REUSE = 2;$ANTI_ALIAS = 1;$ANTI_ALIAS_TEXT = 1;##Switches controlling Navigation Panels#$NO_NAVIGATION = 1;$ADDRESS = '';$INFO = 0; # 0 = do not make a "About this document..." section ##Switches for Linking to other documents ## actuall -- we don't care$MAX_SPLIT_DEPTH = 0; # Stop making separate files at this depth$MAX_LINK_DEPTH = 0; # Stop showing child nodes at this depth $NOLATEX = 0; # 1 = do not pass unknown environments to Latex$EXTERNAL_IMAGES = 0; # 1 = leave the images outside the document $ASCII_MODE = 0; # 1 = do not use any icons or internal images# 1 = use links to external postscript images rather than inlined bitmap# images.$PS_IMAGES = 0;$SHOW_SECTION_NUMBERS = 0;### Other global variables ###############################################$CHILDLINE = "";# This is the line width measured in pixels and it is used to right justify# equations and equation arrays; $LINE_WIDTH = 500; # Used in conjunction with AUTO_NAVIGATION$WORDS_IN_PAGE = 300; # Affects ONLY the way accents are processed $default_language = 'english'; # The value of this variable determines how many words to use in each # title that is added to the navigation panel (see below)# $WORDS_IN_NAVIGATION_PANEL_TITLES = 0;# This number will determine the size of the equations, special characters,# and anything which will be converted into an inlined image# *except* "image generating environments" such as "figure", "table" # or "minipage".# Effective values are those greater than 0.# Sensible values are between 0.1 - 4.$MATH_SCALE_FACTOR = 1.5;# This number will determine the size of # image generating environments such as "figure", "table" or "minipage".# Effective values are those greater than 0.# Sensible values are between 0.1 - 4.$FIGURE_SCALE_FACTOR = 1.6;# If both of the following two variables are set then the "Up" button# of the navigation panel in the first node/page of a converted document# will point to $EXTERNAL_UP_LINK. $EXTERNAL_UP_TITLE should be set# to some text which describes this external link.$EXTERNAL_UP_LINK = "";$EXTERNAL_UP_TITLE = "";# If this is set then the resulting HTML will look marginally better if viewed # with Netscape.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -