#! /usr/bin/perl
|
#! /usr/bin/perl
|
'di ';
|
'di ';
|
'ig 00 ';
|
'ig 00 ';
|
#+##############################################################################
|
#+##############################################################################
|
#
|
#
|
# texi2html: Program to transform Texinfo documents to HTML
|
# texi2html: Program to transform Texinfo documents to HTML
|
#
|
#
|
# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
#
|
#
|
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation; either version 2 of the License, or
|
# (at your option) any later version.
|
# (at your option) any later version.
|
#
|
#
|
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
#
|
#
|
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
#
|
#
|
#-##############################################################################
|
#-##############################################################################
|
|
|
# This requires perl version 5 or higher
|
# This requires perl version 5 or higher
|
require 5.0;
|
require 5.0;
|
|
|
#++##############################################################################
|
#++##############################################################################
|
#
|
#
|
# NOTE FOR DEBUGGING THIS SCRIPT:
|
# NOTE FOR DEBUGGING THIS SCRIPT:
|
# You can run 'perl texi2html.pl' directly, provided you have
|
# You can run 'perl texi2html.pl' directly, provided you have
|
# the environment variable T2H_HOME set to the directory containing
|
# the environment variable T2H_HOME set to the directory containing
|
# the texi2html.init file
|
# the texi2html.init file
|
#
|
#
|
#--##############################################################################
|
#--##############################################################################
|
|
|
# CVS version:
|
# CVS version:
|
# $Id: texi2html.pl,v 1.55 2000/07/27 14:39:41 obachman Exp $
|
# $Id: texi2html.pl,v 1.55 2000/07/27 14:39:41 obachman Exp $
|
|
|
# Homepage:
|
# Homepage:
|
$T2H_HOMEPAGE = <
|
$T2H_HOMEPAGE = <
|
http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
EOT
|
EOT
|
|
|
# Authors:
|
# Authors:
|
$T2H_AUTHORS = <
|
$T2H_AUTHORS = <
|
Written by: Lionel Cons (original author)
|
Written by: Lionel Cons (original author)
|
Karl Berry
|
Karl Berry
|
Olaf Bachmann
|
Olaf Bachmann
|
and many others.
|
and many others.
|
Maintained by: Olaf Bachmann
|
Maintained by: Olaf Bachmann
|
Send bugs and suggestions to
|
Send bugs and suggestions to
|
EOT
|
EOT
|
|
|
# Version: set in configure.in
|
# Version: set in configure.in
|
$THISVERSION = '1.64';
|
$THISVERSION = '1.64';
|
$THISPROG = "texi2html $THISVERSION"; # program name and version
|
$THISPROG = "texi2html $THISVERSION"; # program name and version
|
|
|
# The man page for this program is included at the end of this file and can be
|
# The man page for this program is included at the end of this file and can be
|
# viewed using the command 'nroff -man texi2html'.
|
# viewed using the command 'nroff -man texi2html'.
|
|
|
# Identity:
|
# Identity:
|
|
|
$T2H_TODAY = &pretty_date; # like "20 September 1993"
|
$T2H_TODAY = &pretty_date; # like "20 September 1993"
|
# the eval prevents this from breaking on system which do not have
|
# the eval prevents this from breaking on system which do not have
|
# a proper getpwuid implemented
|
# a proper getpwuid implemented
|
eval { ($T2H_USER = (getpwuid ($<))[6]) =~ s/,.*//;}; # Who am i
|
eval { ($T2H_USER = (getpwuid ($<))[6]) =~ s/,.*//;}; # Who am i
|
|
|
#+++############################################################################
|
#+++############################################################################
|
# #
|
# #
|
# Initialization #
|
# Initialization #
|
# Pasted content of File $(srcdir)/texi2html.init: Default initializations #
|
# Pasted content of File $(srcdir)/texi2html.init: Default initializations #
|
# #
|
# #
|
#---############################################################################
|
#---############################################################################
|
|
|
# leave this within comments, and keep the require statement
|
# leave this within comments, and keep the require statement
|
# This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init
|
# This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init
|
# exists.
|
# exists.
|
|
|
#
|
#
|
# -*-perl-*-
|
# -*-perl-*-
|
######################################################################
|
######################################################################
|
# File: texi2html.init
|
# File: texi2html.init
|
#
|
#
|
# Sets default values for command-line arguments and for various customizable
|
# Sets default values for command-line arguments and for various customizable
|
# procedures
|
# procedures
|
#
|
#
|
# A copy of this file is pasted into the beginning of texi2html by
|
# A copy of this file is pasted into the beginning of texi2html by
|
# 'make texi2html'
|
# 'make texi2html'
|
#
|
#
|
# Copy this file and make changes to it, if you like.
|
# Copy this file and make changes to it, if you like.
|
# Afterwards, either, load it with command-line option -init_file
|
# Afterwards, either, load it with command-line option -init_file
|
#
|
#
|
# $Id: texi2html.init,v 1.34 2000/07/27 14:09:02 obachman Exp $
|
# $Id: texi2html.init,v 1.34 2000/07/27 14:09:02 obachman Exp $
|
|
|
######################################################################
|
######################################################################
|
# stuff which can also be set by command-line options
|
# stuff which can also be set by command-line options
|
#
|
#
|
#
|
#
|
# Note: values set here, overwrite values set by the command-line
|
# Note: values set here, overwrite values set by the command-line
|
# options before -init_file and might still be overwritten by
|
# options before -init_file and might still be overwritten by
|
# command-line arguments following the -init_file option
|
# command-line arguments following the -init_file option
|
#
|
#
|
|
|
# T2H_OPTIONS is a hash whose keys are the (long) names of valid
|
# T2H_OPTIONS is a hash whose keys are the (long) names of valid
|
# command-line options and whose values are a hash with the following keys:
|
# command-line options and whose values are a hash with the following keys:
|
# type ==> one of !|=i|:i|=s|:s (see GetOpt::Long for more info)
|
# type ==> one of !|=i|:i|=s|:s (see GetOpt::Long for more info)
|
# linkage ==> ref to scalar, array, or subroutine (see GetOpt::Long for more info)
|
# linkage ==> ref to scalar, array, or subroutine (see GetOpt::Long for more info)
|
# verbose ==> short description of option (displayed by -h)
|
# verbose ==> short description of option (displayed by -h)
|
# noHelp ==> if 1 -> for "not so important options": only print description on -h 1
|
# noHelp ==> if 1 -> for "not so important options": only print description on -h 1
|
# 2 -> for obsolete options: only print description on -h 2
|
# 2 -> for obsolete options: only print description on -h 2
|
|
|
$T2H_DEBUG = 0;
|
$T2H_DEBUG = 0;
|
$T2H_OPTIONS -> {debug} =
|
$T2H_OPTIONS -> {debug} =
|
{
|
{
|
type => '=i',
|
type => '=i',
|
linkage => \$main::T2H_DEBUG,
|
linkage => \$main::T2H_DEBUG,
|
verbose => 'output HTML with debuging information',
|
verbose => 'output HTML with debuging information',
|
};
|
};
|
|
|
$T2H_DOCTYPE = '';
|
$T2H_DOCTYPE = '';
|
$T2H_OPTIONS -> {doctype} =
|
$T2H_OPTIONS -> {doctype} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \$main::T2H_DOCTYPE,
|
linkage => \$main::T2H_DOCTYPE,
|
verbose => 'document type which is output in header of HTML files',
|
verbose => 'document type which is output in header of HTML files',
|
noHelp => 1
|
noHelp => 1
|
};
|
};
|
|
|
$T2H_CHECK = 0;
|
$T2H_CHECK = 0;
|
$T2H_OPTIONS -> {check} =
|
$T2H_OPTIONS -> {check} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$main::T2H_CHECK,
|
linkage => \$main::T2H_CHECK,
|
verbose => 'if set, only check files and output all things that may be Texinfo commands',
|
verbose => 'if set, only check files and output all things that may be Texinfo commands',
|
noHelp => 1
|
noHelp => 1
|
};
|
};
|
|
|
# -expand
|
# -expand
|
# if set to "tex" (or, "info") expand @iftex and @tex (or, @ifinfo) sections
|
# if set to "tex" (or, "info") expand @iftex and @tex (or, @ifinfo) sections
|
# else, neither expand @iftex, @tex, nor @ifinfo sections
|
# else, neither expand @iftex, @tex, nor @ifinfo sections
|
$T2H_EXPAND = "info";
|
$T2H_EXPAND = "info";
|
$T2H_OPTIONS -> {expand} =
|
$T2H_OPTIONS -> {expand} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \$T2H_EXPAND,
|
linkage => \$T2H_EXPAND,
|
verbose => 'Expand info|tex|none section of texinfo source',
|
verbose => 'Expand info|tex|none section of texinfo source',
|
};
|
};
|
|
|
# - glossary
|
# - glossary
|
#if set, uses section named `Footnotes' for glossary
|
#if set, uses section named `Footnotes' for glossary
|
$T2H_USE_GLOSSARY = 0;
|
$T2H_USE_GLOSSARY = 0;
|
T2H_OPTIONS -> {glossary} =
|
T2H_OPTIONS -> {glossary} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_USE_GLOSSARY,
|
linkage => \$T2H_USE_GLOSSARY,
|
verbose => "if set, uses section named `Footnotes' for glossary",
|
verbose => "if set, uses section named `Footnotes' for glossary",
|
noHelp => 1,
|
noHelp => 1,
|
};
|
};
|
|
|
|
|
# -invisible
|
# -invisible
|
# $T2H_INVISIBLE_MARK is the text used to create invisible destination
|
# $T2H_INVISIBLE_MARK is the text used to create invisible destination
|
# anchors for index links (you can for instance use the invisible.xbm
|
# anchors for index links (you can for instance use the invisible.xbm
|
# file shipped with this program). This is a workaround for a known
|
# file shipped with this program). This is a workaround for a known
|
# bug of many WWW browsers, including netscape.
|
# bug of many WWW browsers, including netscape.
|
# For me, it works fine without it -- on the contrary: if there, it
|
# For me, it works fine without it -- on the contrary: if there, it
|
# inserts space between headers and start of text (obachman 3/99)
|
# inserts space between headers and start of text (obachman 3/99)
|
$T2H_INVISIBLE_MARK = '';
|
$T2H_INVISIBLE_MARK = '';
|
# $T2H_INVISIBLE_MARK = ' ';
|
# $T2H_INVISIBLE_MARK = ' ';
|
$T2H_OPTIONS -> {invisible} =
|
$T2H_OPTIONS -> {invisible} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \$T2H_INVISIBLE_MARK,
|
linkage => \$T2H_INVISIBLE_MARK,
|
verbose => 'use text in invisble anchot',
|
verbose => 'use text in invisble anchot',
|
noHelp => 1,
|
noHelp => 1,
|
};
|
};
|
|
|
# -iso
|
# -iso
|
# if set, ISO8879 characters are used for special symbols (like copyright, etc)
|
# if set, ISO8879 characters are used for special symbols (like copyright, etc)
|
$T2H_USE_ISO = 0;
|
$T2H_USE_ISO = 0;
|
$T2H_OPTIONS -> {iso} =
|
$T2H_OPTIONS -> {iso} =
|
{
|
{
|
type => 'iso',
|
type => 'iso',
|
linkage => \$T2H_USE_ISO,
|
linkage => \$T2H_USE_ISO,
|
verbose => 'if set, ISO8879 characters are used for special symbols (like copyright, etc)',
|
verbose => 'if set, ISO8879 characters are used for special symbols (like copyright, etc)',
|
noHelp => 1,
|
noHelp => 1,
|
};
|
};
|
|
|
# -I
|
# -I
|
# list directories where @include files are searched for (besides the
|
# list directories where @include files are searched for (besides the
|
# directory of the doc file) additional '-I' args add to this list
|
# directory of the doc file) additional '-I' args add to this list
|
@T2H_INCLUDE_DIRS = (".");
|
@T2H_INCLUDE_DIRS = (".");
|
$T2H_OPTIONS -> {I} =
|
$T2H_OPTIONS -> {I} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \@T2H_INCLUDE_DIRS,
|
linkage => \@T2H_INCLUDE_DIRS,
|
verbose => 'append $s to the @include search path',
|
verbose => 'append $s to the @include search path',
|
};
|
};
|
|
|
# -top_file
|
# -top_file
|
# uses file of this name for top-level file
|
# uses file of this name for top-level file
|
# extension is manipulated appropriately, if necessary.
|
# extension is manipulated appropriately, if necessary.
|
# If empty, .html is used
|
# If empty, .html is used
|
# Typically, you would set this to "index.html".
|
# Typically, you would set this to "index.html".
|
$T2H_TOP_FILE = '';
|
$T2H_TOP_FILE = '';
|
$T2H_OPTIONS -> {top_file} =
|
$T2H_OPTIONS -> {top_file} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \$T2H_TOP_FILE,
|
linkage => \$T2H_TOP_FILE,
|
verbose => 'use $s as top file, instead of .html',
|
verbose => 'use $s as top file, instead of .html',
|
};
|
};
|
|
|
|
|
# -toc_file
|
# -toc_file
|
# uses file of this name for table of contents file
|
# uses file of this name for table of contents file
|
# extension is manipulated appropriately, if necessary.
|
# extension is manipulated appropriately, if necessary.
|
# If empty, _toc.html is used
|
# If empty, _toc.html is used
|
$T2H_TOC_FILE = '';
|
$T2H_TOC_FILE = '';
|
$T2H_OPTIONS -> {toc_file} =
|
$T2H_OPTIONS -> {toc_file} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \$T2H_TOC_FILE,
|
linkage => \$T2H_TOC_FILE,
|
verbose => 'use $s as ToC file, instead of _toc.html',
|
verbose => 'use $s as ToC file, instead of _toc.html',
|
};
|
};
|
|
|
# -frames
|
# -frames
|
# if set, output two additional files which use HTML 4.0 "frames".
|
# if set, output two additional files which use HTML 4.0 "frames".
|
$T2H_FRAMES = 0;
|
$T2H_FRAMES = 0;
|
$T2H_OPTIONS -> {frames} =
|
$T2H_OPTIONS -> {frames} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_FRAMES,
|
linkage => \$T2H_FRAMES,
|
verbose => 'output files which use HTML 4.0 frames (experimental)',
|
verbose => 'output files which use HTML 4.0 frames (experimental)',
|
noHelp => 1,
|
noHelp => 1,
|
};
|
};
|
|
|
|
|
# -menu | -nomenu
|
# -menu | -nomenu
|
# if set, show the Texinfo menus
|
# if set, show the Texinfo menus
|
$T2H_SHOW_MENU = 1;
|
$T2H_SHOW_MENU = 1;
|
$T2H_OPTIONS -> {menu} =
|
$T2H_OPTIONS -> {menu} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_SHOW_MENU,
|
linkage => \$T2H_SHOW_MENU,
|
verbose => 'ouput Texinfo menus',
|
verbose => 'ouput Texinfo menus',
|
};
|
};
|
|
|
# -number | -nonumber
|
# -number | -nonumber
|
# if set, number sections and show section names and numbers in references
|
# if set, number sections and show section names and numbers in references
|
# and menus
|
# and menus
|
$T2H_NUMBER_SECTIONS = 1;
|
$T2H_NUMBER_SECTIONS = 1;
|
$T2H_OPTIONS -> {number} =
|
$T2H_OPTIONS -> {number} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_NUMBER_SECTIONS,
|
linkage => \$T2H_NUMBER_SECTIONS,
|
verbose => 'use numbered sections'
|
verbose => 'use numbered sections'
|
};
|
};
|
|
|
# if set, and T2H_NUMBER_SECTIONS is set, then use node names in menu
|
# if set, and T2H_NUMBER_SECTIONS is set, then use node names in menu
|
# entries, instead of section names
|
# entries, instead of section names
|
$T2H_NODE_NAME_IN_MENU = 0;
|
$T2H_NODE_NAME_IN_MENU = 0;
|
|
|
# if set and menu entry equals menu descr, then do not print menu descr.
|
# if set and menu entry equals menu descr, then do not print menu descr.
|
# Likewise, if node name equals entry name, do not print entry name.
|
# Likewise, if node name equals entry name, do not print entry name.
|
$T2H_AVOID_MENU_REDUNDANCY = 1;
|
$T2H_AVOID_MENU_REDUNDANCY = 1;
|
|
|
# -split section|chapter|none
|
# -split section|chapter|none
|
# if set to 'section' (resp. 'chapter') create one html file per (sub)section
|
# if set to 'section' (resp. 'chapter') create one html file per (sub)section
|
# (resp. chapter) and separate pages for Top, ToC, Overview, Index,
|
# (resp. chapter) and separate pages for Top, ToC, Overview, Index,
|
# Glossary, About.
|
# Glossary, About.
|
# otherwise, create monolithic html file which contains whole document
|
# otherwise, create monolithic html file which contains whole document
|
#$T2H_SPLIT = 'section';
|
#$T2H_SPLIT = 'section';
|
$T2H_SPLIT = '';
|
$T2H_SPLIT = '';
|
$T2H_OPTIONS -> {split} =
|
$T2H_OPTIONS -> {split} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \$T2H_SPLIT,
|
linkage => \$T2H_SPLIT,
|
verbose => 'split document on section|chapter else no splitting',
|
verbose => 'split document on section|chapter else no splitting',
|
};
|
};
|
|
|
# -section_navigation|-no-section_navigation
|
# -section_navigation|-no-section_navigation
|
# if set, then navigation panels are printed at the beginning of each section
|
# if set, then navigation panels are printed at the beginning of each section
|
# and, possibly at the end (depending on whether or not there were more than
|
# and, possibly at the end (depending on whether or not there were more than
|
# $T2H_WORDS_IN_PAGE words on page
|
# $T2H_WORDS_IN_PAGE words on page
|
# This is most useful if you do not want to have section navigation
|
# This is most useful if you do not want to have section navigation
|
# on -split chapter
|
# on -split chapter
|
$T2H_SECTION_NAVIGATION = 1;
|
$T2H_SECTION_NAVIGATION = 1;
|
$T2H_OPTIONS -> {sec_nav} =
|
$T2H_OPTIONS -> {sec_nav} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_SECTION_NAVIGATION,
|
linkage => \$T2H_SECTION_NAVIGATION,
|
verbose => 'output navigation panels for each section',
|
verbose => 'output navigation panels for each section',
|
};
|
};
|
|
|
# -subdir
|
# -subdir
|
# if set put result files in this directory
|
# if set put result files in this directory
|
# if not set result files are put into current directory
|
# if not set result files are put into current directory
|
#$T2H_SUBDIR = 'html';
|
#$T2H_SUBDIR = 'html';
|
$T2H_SUBDIR = '';
|
$T2H_SUBDIR = '';
|
$T2H_OPTIONS -> {subdir} =
|
$T2H_OPTIONS -> {subdir} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \$T2H_SUBDIR,
|
linkage => \$T2H_SUBDIR,
|
verbose => 'put HTML files in directory $s, instead of $cwd',
|
verbose => 'put HTML files in directory $s, instead of $cwd',
|
};
|
};
|
|
|
# -short_extn
|
# -short_extn
|
# If this is set all HTML file will have extension ".htm" instead of
|
# If this is set all HTML file will have extension ".htm" instead of
|
# ".html". This is helpful when shipping the document to PC systems.
|
# ".html". This is helpful when shipping the document to PC systems.
|
$T2H_SHORTEXTN = 0;
|
$T2H_SHORTEXTN = 0;
|
$T2H_OPTIONS -> {short_ext} =
|
$T2H_OPTIONS -> {short_ext} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_SHORTEXTN,
|
linkage => \$T2H_SHORTEXTN,
|
verbose => 'use "htm" extension for output HTML files',
|
verbose => 'use "htm" extension for output HTML files',
|
};
|
};
|
|
|
|
|
# -prefix
|
# -prefix
|
# Set the output file prefix, prepended to all .html, .gif and .pl files.
|
# Set the output file prefix, prepended to all .html, .gif and .pl files.
|
# By default, this is the basename of the document
|
# By default, this is the basename of the document
|
$T2H_PREFIX = '';
|
$T2H_PREFIX = '';
|
$T2H_OPTIONS -> {prefix} =
|
$T2H_OPTIONS -> {prefix} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \$T2H_PREFIX,
|
linkage => \$T2H_PREFIX,
|
verbose => 'use as prefix for output files, instead of ',
|
verbose => 'use as prefix for output files, instead of ',
|
};
|
};
|
|
|
# -o filename
|
# -o filename
|
# If set, generate monolithic document output html into $filename
|
# If set, generate monolithic document output html into $filename
|
$T2H_OUT = '';
|
$T2H_OUT = '';
|
$T2H_OPTIONS -> {out_file} =
|
$T2H_OPTIONS -> {out_file} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';},
|
linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';},
|
verbose => 'if set, all HTML output goes into file $s',
|
verbose => 'if set, all HTML output goes into file $s',
|
};
|
};
|
|
|
# -short_ref
|
# -short_ref
|
#if set cross-references are given without section numbers
|
#if set cross-references are given without section numbers
|
$T2H_SHORT_REF = '';
|
$T2H_SHORT_REF = '';
|
$T2H_OPTIONS -> {short_ref} =
|
$T2H_OPTIONS -> {short_ref} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_SHORT_REF,
|
linkage => \$T2H_SHORT_REF,
|
verbose => 'if set, references are without section numbers',
|
verbose => 'if set, references are without section numbers',
|
};
|
};
|
|
|
# -idx_sum
|
# -idx_sum
|
# if value is set, then for each @prinindex $what
|
# if value is set, then for each @prinindex $what
|
# $docu_name_$what.idx is created which contains lines of the form
|
# $docu_name_$what.idx is created which contains lines of the form
|
# $key\t$ref sorted alphabetically (case matters)
|
# $key\t$ref sorted alphabetically (case matters)
|
$T2H_IDX_SUMMARY = 0;
|
$T2H_IDX_SUMMARY = 0;
|
$T2H_OPTIONS -> {idx_sum} =
|
$T2H_OPTIONS -> {idx_sum} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_IDX_SUMMARY,
|
linkage => \$T2H_IDX_SUMMARY,
|
verbose => 'if set, also output index summary',
|
verbose => 'if set, also output index summary',
|
noHelp => 1,
|
noHelp => 1,
|
};
|
};
|
|
|
# -verbose
|
# -verbose
|
# if set, chatter about what we are doing
|
# if set, chatter about what we are doing
|
$T2H_VERBOSE = '';
|
$T2H_VERBOSE = '';
|
$T2H_OPTIONS -> {Verbose} =
|
$T2H_OPTIONS -> {Verbose} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_VERBOSE,
|
linkage => \$T2H_VERBOSE,
|
verbose => 'print progress info to stdout',
|
verbose => 'print progress info to stdout',
|
};
|
};
|
|
|
# -lang
|
# -lang
|
# For page titles use $T2H_WORDS->{$T2H_LANG}->{...} as title.
|
# For page titles use $T2H_WORDS->{$T2H_LANG}->{...} as title.
|
# To add a new language, supply list of titles (see $T2H_WORDS below).
|
# To add a new language, supply list of titles (see $T2H_WORDS below).
|
# and use ISO 639 language codes (see e.g. perl module Locale-Codes-1.02
|
# and use ISO 639 language codes (see e.g. perl module Locale-Codes-1.02
|
# for definitions)
|
# for definitions)
|
# Default's to 'en' if not set or no @documentlanguage is specified
|
# Default's to 'en' if not set or no @documentlanguage is specified
|
$T2H_LANG = '';
|
$T2H_LANG = '';
|
$T2H_OPTIONS -> {lang} =
|
$T2H_OPTIONS -> {lang} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => sub {SetDocumentLanguage($_[1])},
|
linkage => sub {SetDocumentLanguage($_[1])},
|
verbose => 'use $s as document language (ISO 639 encoding)',
|
verbose => 'use $s as document language (ISO 639 encoding)',
|
};
|
};
|
|
|
# -l2h
|
# -l2h
|
# if set, uses latex2html for generation of math content
|
# if set, uses latex2html for generation of math content
|
$T2H_L2H = '';
|
$T2H_L2H = '';
|
$T2H_OPTIONS -> {l2h} =
|
$T2H_OPTIONS -> {l2h} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_L2H,
|
linkage => \$T2H_L2H,
|
verbose => 'if set, uses latex2html for @math and @tex',
|
verbose => 'if set, uses latex2html for @math and @tex',
|
};
|
};
|
|
|
######################
|
######################
|
# The following options are only relevant if $T2H_L2H is set
|
# The following options are only relevant if $T2H_L2H is set
|
#
|
#
|
# -l2h_l2h
|
# -l2h_l2h
|
# name/location of latex2html progam
|
# name/location of latex2html progam
|
$T2H_L2H_L2H = "latex2html";
|
$T2H_L2H_L2H = "latex2html";
|
$T2H_OPTIONS -> {l2h_l2h} =
|
$T2H_OPTIONS -> {l2h_l2h} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \$T2H_L2H_L2H,
|
linkage => \$T2H_L2H_L2H,
|
verbose => 'program to use for latex2html translation',
|
verbose => 'program to use for latex2html translation',
|
noHelp => 1,
|
noHelp => 1,
|
};
|
};
|
|
|
# -l2h_skip
|
# -l2h_skip
|
# if set, skips actual call to latex2html tries to reuse previously generated
|
# if set, skips actual call to latex2html tries to reuse previously generated
|
# content, instead
|
# content, instead
|
$T2H_L2H_SKIP = '';
|
$T2H_L2H_SKIP = '';
|
$T2H_OPTIONS -> {l2h_skip} =
|
$T2H_OPTIONS -> {l2h_skip} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_L2H_SKIP,
|
linkage => \$T2H_L2H_SKIP,
|
verbose => 'if set, tries to reuse previously latex2html output',
|
verbose => 'if set, tries to reuse previously latex2html output',
|
noHelp => 1,
|
noHelp => 1,
|
};
|
};
|
|
|
# -l2h_tmp
|
# -l2h_tmp
|
# if set, l2h uses this directory for temporarary files. The path
|
# if set, l2h uses this directory for temporarary files. The path
|
# leading to this directory may not contain a dot (i.e., a "."),
|
# leading to this directory may not contain a dot (i.e., a "."),
|
# otherwise, l2h will fail
|
# otherwise, l2h will fail
|
$T2H_L2H_TMP = '';
|
$T2H_L2H_TMP = '';
|
$T2H_OPTIONS -> {l2h_tmp} =
|
$T2H_OPTIONS -> {l2h_tmp} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \$T2H_L2H_TMP,
|
linkage => \$T2H_L2H_TMP,
|
verbose => 'if set, uses $s as temporary latex2html directory',
|
verbose => 'if set, uses $s as temporary latex2html directory',
|
noHelp => 1,
|
noHelp => 1,
|
};
|
};
|
|
|
# if set, cleans intermediate files (they all have the prefix $doc_l2h_)
|
# if set, cleans intermediate files (they all have the prefix $doc_l2h_)
|
# of l2h
|
# of l2h
|
$T2H_L2H_CLEAN = 1;
|
$T2H_L2H_CLEAN = 1;
|
$T2H_OPTIONS -> {l2h_clean} =
|
$T2H_OPTIONS -> {l2h_clean} =
|
{
|
{
|
type => '!',
|
type => '!',
|
linkage => \$T2H_L2H_CLEAN,
|
linkage => \$T2H_L2H_CLEAN,
|
verbose => 'if set, do not keep intermediate latex2html files for later reuse',
|
verbose => 'if set, do not keep intermediate latex2html files for later reuse',
|
noHelp => 1,
|
noHelp => 1,
|
};
|
};
|
|
|
$T2H_OPTIONS -> {D} =
|
$T2H_OPTIONS -> {D} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => sub {$main::value{@_[1]} = 1;},
|
linkage => sub {$main::value{@_[1]} = 1;},
|
verbose => 'equivalent to Texinfo "@set $s 1"',
|
verbose => 'equivalent to Texinfo "@set $s 1"',
|
noHelp => 1,
|
noHelp => 1,
|
};
|
};
|
|
|
$T2H_OPTIONS -> {init_file} =
|
$T2H_OPTIONS -> {init_file} =
|
{
|
{
|
type => '=s',
|
type => '=s',
|
linkage => \&LoadInitFile,
|
linkage => \&LoadInitFile,
|
verbose => 'load init file $s'
|
verbose => 'load init file $s'
|
};
|
};
|
|
|
|
|
##############################################################################
|
##############################################################################
|
#
|
#
|
# The following can only be set in the init file
|
# The following can only be set in the init file
|
#
|
#
|
##############################################################################
|
##############################################################################
|
|
|
# if set, center @image by default
|
# if set, center @image by default
|
# otherwise, do not center by default
|
# otherwise, do not center by default
|
$T2H_CENTER_IMAGE = 1;
|
$T2H_CENTER_IMAGE = 1;
|
|
|
# used as identation for block enclosing command @example, etc
|
# used as identation for block enclosing command @example, etc
|
# If not empty, must be enclosed in |
|
# If not empty, must be enclosed in |
|
$T2H_EXAMPLE_INDENT_CELL = ' | ';
|
$T2H_EXAMPLE_INDENT_CELL = ' | ';
|
# same as above, only for @small
|
# same as above, only for @small
|
$T2H_SMALL_EXAMPLE_INDENT_CELL = ' | ';
|
$T2H_SMALL_EXAMPLE_INDENT_CELL = ' | ';
|
# font size for @small
|
# font size for @small
|
$T2H_SMALL_FONT_SIZE = '-1';
|
$T2H_SMALL_FONT_SIZE = '-1';
|
|
|
# if non-empty, and no @..heading appeared in Top node, then
|
# if non-empty, and no @..heading appeared in Top node, then
|
# use this as header for top node/section, otherwise use value of
|
# use this as header for top node/section, otherwise use value of
|
# @settitle or @shorttitle (in that order)
|
# @settitle or @shorttitle (in that order)
|
$T2H_TOP_HEADING = '';
|
$T2H_TOP_HEADING = '';
|
|
|
# if set, use this chapter for 'Index' button, else
|
# if set, use this chapter for 'Index' button, else
|
# use first chapter whose name matches 'index' (case insensitive)
|
# use first chapter whose name matches 'index' (case insensitive)
|
$T2H_INDEX_CHAPTER = '';
|
$T2H_INDEX_CHAPTER = '';
|
|
|
# if set and $T2H_SPLIT is set, then split index pages at the next letter
|
# if set and $T2H_SPLIT is set, then split index pages at the next letter
|
# after they have more than that many entries
|
# after they have more than that many entries
|
$T2H_SPLIT_INDEX = 100;
|
$T2H_SPLIT_INDEX = 100;
|
|
|
# if set (e.g., to index.html) replace hrefs to this file
|
# if set (e.g., to index.html) replace hrefs to this file
|
# (i.e., to index.html) by ./
|
# (i.e., to index.html) by ./
|
$T2H_HREF_DIR_INSTEAD_FILE = '';
|
$T2H_HREF_DIR_INSTEAD_FILE = '';
|
|
|
########################################################################
|
########################################################################
|
# Language dependencies:
|
# Language dependencies:
|
# To add a new language extend T2H_WORDS hash and create $T2H_<...>_WORDS hash
|
# To add a new language extend T2H_WORDS hash and create $T2H_<...>_WORDS hash
|
# To redefine one word, simply do:
|
# To redefine one word, simply do:
|
# $T2H_WORDS->{}->{} = 'whatever' in your personal init file.
|
# $T2H_WORDS->{}->{} = 'whatever' in your personal init file.
|
#
|
#
|
$T2H_WORDS_EN =
|
$T2H_WORDS_EN =
|
{
|
{
|
# titles of pages
|
# titles of pages
|
'ToC_Title' => 'Table of Contents',
|
'ToC_Title' => 'Table of Contents',
|
'Overview_Title' => 'Short Table of Contents',
|
'Overview_Title' => 'Short Table of Contents',
|
'Index_Title' => 'Index',
|
'Index_Title' => 'Index',
|
'About_Title' => 'About this document',
|
'About_Title' => 'About this document',
|
'Footnotes_Title' => 'Footnotes',
|
'Footnotes_Title' => 'Footnotes',
|
'See' => 'See',
|
'See' => 'See',
|
'see' => 'see',
|
'see' => 'see',
|
'section' => 'section',
|
'section' => 'section',
|
# If necessary, we could extend this as follows:
|
# If necessary, we could extend this as follows:
|
# # text for buttons
|
# # text for buttons
|
# 'Top_Button' => 'Top',
|
# 'Top_Button' => 'Top',
|
# 'ToC_Button' => 'Contents',
|
# 'ToC_Button' => 'Contents',
|
# 'Overview_Button' => 'Overview',
|
# 'Overview_Button' => 'Overview',
|
# 'Index_button' => 'Index',
|
# 'Index_button' => 'Index',
|
# 'Back_Button' => 'Back',
|
# 'Back_Button' => 'Back',
|
# 'FastBack_Button' => 'FastBack',
|
# 'FastBack_Button' => 'FastBack',
|
# 'Prev_Button' => 'Prev',
|
# 'Prev_Button' => 'Prev',
|
# 'Up_Button' => 'Up',
|
# 'Up_Button' => 'Up',
|
# 'Next_Button' => 'Next',
|
# 'Next_Button' => 'Next',
|
# 'Forward_Button' =>'Forward',
|
# 'Forward_Button' =>'Forward',
|
# 'FastWorward_Button' => 'FastForward',
|
# 'FastWorward_Button' => 'FastForward',
|
# 'First_Button' => 'First',
|
# 'First_Button' => 'First',
|
# 'Last_Button' => 'Last',
|
# 'Last_Button' => 'Last',
|
# 'About_Button' => 'About'
|
# 'About_Button' => 'About'
|
};
|
};
|
|
|
$T2H_WORD_DE =
|
$T2H_WORD_DE =
|
{
|
{
|
'ToC_Title' => 'Inhaltsverzeichniss',
|
'ToC_Title' => 'Inhaltsverzeichniss',
|
'Overview_Title' => 'Kurzes Inhaltsverzeichniss',
|
'Overview_Title' => 'Kurzes Inhaltsverzeichniss',
|
'Index_Title' => 'Index',
|
'Index_Title' => 'Index',
|
'About_Title' => 'Über dieses Dokument',
|
'About_Title' => 'Über dieses Dokument',
|
'Footnotes_Title' => 'Fußnoten',
|
'Footnotes_Title' => 'Fußnoten',
|
'See' => 'Siehe',
|
'See' => 'Siehe',
|
'see' => 'siehe',
|
'see' => 'siehe',
|
'section' => 'Abschnitt',
|
'section' => 'Abschnitt',
|
};
|
};
|
|
|
$T2H_WORD_NL =
|
$T2H_WORD_NL =
|
{
|
{
|
'ToC_Title' => 'Inhoudsopgave',
|
'ToC_Title' => 'Inhoudsopgave',
|
'Overview_Title' => 'Korte inhoudsopgave',
|
'Overview_Title' => 'Korte inhoudsopgave',
|
'Index_Title' => 'Index', #Not sure ;-)
|
'Index_Title' => 'Index', #Not sure ;-)
|
'About_Title' => 'No translation available!', #No translation available!
|
'About_Title' => 'No translation available!', #No translation available!
|
'Footnotes_Title' => 'No translation available!', #No translation available!
|
'Footnotes_Title' => 'No translation available!', #No translation available!
|
'See' => 'Zie',
|
'See' => 'Zie',
|
'see' => 'zie',
|
'see' => 'zie',
|
'section' => 'sectie',
|
'section' => 'sectie',
|
};
|
};
|
|
|
$T2H_WORD_ES =
|
$T2H_WORD_ES =
|
{
|
{
|
'ToC_Title' => 'índice General',
|
'ToC_Title' => 'índice General',
|
'Overview_Title' => 'Resumen del Contenido',
|
'Overview_Title' => 'Resumen del Contenido',
|
'Index_Title' => 'Index', #Not sure ;-)
|
'Index_Title' => 'Index', #Not sure ;-)
|
'About_Title' => 'No translation available!', #No translation available!
|
'About_Title' => 'No translation available!', #No translation available!
|
'Footnotes_Title' => 'Fußnoten',
|
'Footnotes_Title' => 'Fußnoten',
|
'See' => 'Véase',
|
'See' => 'Véase',
|
'see' => 'véase',
|
'see' => 'véase',
|
'section' => 'sección',
|
'section' => 'sección',
|
};
|
};
|
|
|
$T2H_WORD_NO =
|
$T2H_WORD_NO =
|
{
|
{
|
'ToC_Title' => 'Innholdsfortegnelse',
|
'ToC_Title' => 'Innholdsfortegnelse',
|
'Overview_Title' => 'Kort innholdsfortegnelse',
|
'Overview_Title' => 'Kort innholdsfortegnelse',
|
'Index_Title' => 'Indeks', #Not sure ;-)
|
'Index_Title' => 'Indeks', #Not sure ;-)
|
'About_Title' => 'No translation available!', #No translation available!
|
'About_Title' => 'No translation available!', #No translation available!
|
'Footnotes_Title' => 'No translation available!',
|
'Footnotes_Title' => 'No translation available!',
|
'See' => 'Se',
|
'See' => 'Se',
|
'see' => 'se',
|
'see' => 'se',
|
'section' => 'avsnitt',
|
'section' => 'avsnitt',
|
};
|
};
|
|
|
$T2H_WORD_PT =
|
$T2H_WORD_PT =
|
{
|
{
|
'ToC_Title' => 'Sumário',
|
'ToC_Title' => 'Sumário',
|
'Overview_Title' => 'Breve Sumário',
|
'Overview_Title' => 'Breve Sumário',
|
'Index_Title' => 'Índice', #Not sure ;-)
|
'Index_Title' => 'Índice', #Not sure ;-)
|
'About_Title' => 'No translation available!', #No translation available!
|
'About_Title' => 'No translation available!', #No translation available!
|
'Footnotes_Title' => 'No translation available!',
|
'Footnotes_Title' => 'No translation available!',
|
'See' => 'Veja',
|
'See' => 'Veja',
|
'see' => 'veja',
|
'see' => 'veja',
|
'section' => 'Seção',
|
'section' => 'Seção',
|
};
|
};
|
|
|
$T2H_WORDS =
|
$T2H_WORDS =
|
{
|
{
|
'en' => $T2H_WORDS_EN,
|
'en' => $T2H_WORDS_EN,
|
'de' => $T2H_WORDS_DE,
|
'de' => $T2H_WORDS_DE,
|
'nl' => $T2H_WORDS_NL,
|
'nl' => $T2H_WORDS_NL,
|
'es' => $T2H_WORDS_ES,
|
'es' => $T2H_WORDS_ES,
|
'no' => $T2H_WORDS_NO,
|
'no' => $T2H_WORDS_NO,
|
'pt' => $T2H_WORDS_PT
|
'pt' => $T2H_WORDS_PT
|
};
|
};
|
|
|
@MONTH_NAMES_EN =
|
@MONTH_NAMES_EN =
|
(
|
(
|
'January', 'February', 'March', 'April', 'May',
|
'January', 'February', 'March', 'April', 'May',
|
'June', 'July', 'August', 'September', 'October',
|
'June', 'July', 'August', 'September', 'October',
|
'November', 'December'
|
'November', 'December'
|
);
|
);
|
|
|
@MONTH_NAMES_DE =
|
@MONTH_NAMES_DE =
|
(
|
(
|
'Januar', 'Februar', 'März', 'April', 'Mai',
|
'Januar', 'Februar', 'März', 'April', 'Mai',
|
'Juni', 'Juli', 'August', 'September', 'Oktober',
|
'Juni', 'Juli', 'August', 'September', 'Oktober',
|
'November', 'Dezember'
|
'November', 'Dezember'
|
);
|
);
|
|
|
@MONTH_NAMES_NL =
|
@MONTH_NAMES_NL =
|
(
|
(
|
'Januari', 'Februari', 'Maart', 'April', 'Mei',
|
'Januari', 'Februari', 'Maart', 'April', 'Mei',
|
'Juni', 'Juli', 'Augustus', 'September', 'Oktober',
|
'Juni', 'Juli', 'Augustus', 'September', 'Oktober',
|
'November', 'December'
|
'November', 'December'
|
);
|
);
|
|
|
@MONTH_NAMES_ES =
|
@MONTH_NAMES_ES =
|
(
|
(
|
'enero', 'febrero', 'marzo', 'abril', 'mayo',
|
'enero', 'febrero', 'marzo', 'abril', 'mayo',
|
'junio', 'julio', 'agosto', 'septiembre', 'octubre',
|
'junio', 'julio', 'agosto', 'septiembre', 'octubre',
|
'noviembre', 'diciembre'
|
'noviembre', 'diciembre'
|
);
|
);
|
|
|
@MONTH_NAMES_NO =
|
@MONTH_NAMES_NO =
|
(
|
(
|
|
|
'januar', 'februar', 'mars', 'april', 'mai',
|
'januar', 'februar', 'mars', 'april', 'mai',
|
'juni', 'juli', 'august', 'september', 'oktober',
|
'juni', 'juli', 'august', 'september', 'oktober',
|
'november', 'desember'
|
'november', 'desember'
|
);
|
);
|
|
|
@MONTH_NAMES_PT =
|
@MONTH_NAMES_PT =
|
(
|
(
|
'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio',
|
'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio',
|
'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro',
|
'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro',
|
'Novembro', 'Dezembro'
|
'Novembro', 'Dezembro'
|
);
|
);
|
|
|
|
|
$MONTH_NAMES =
|
$MONTH_NAMES =
|
{
|
{
|
'en' => \@MONTH_NAMES_EN,
|
'en' => \@MONTH_NAMES_EN,
|
'de' => \@MONTH_NAMES_DE,
|
'de' => \@MONTH_NAMES_DE,
|
'es' => \@MONTH_NAMES_ES,
|
'es' => \@MONTH_NAMES_ES,
|
'nl' => \@MONTH_NAMES_NL,
|
'nl' => \@MONTH_NAMES_NL,
|
'no' => \@MONTH_NAMES_NO,
|
'no' => \@MONTH_NAMES_NO,
|
'pt' => \@MONTH_NAMES_PT
|
'pt' => \@MONTH_NAMES_PT
|
};
|
};
|
########################################################################
|
########################################################################
|
# Control of Page layout:
|
# Control of Page layout:
|
# You can make changes of the Page layout at two levels:
|
# You can make changes of the Page layout at two levels:
|
# 1.) For small changes, it is often enough to change the value of
|
# 1.) For small changes, it is often enough to change the value of
|
# some global string/hash/array variables
|
# some global string/hash/array variables
|
# 2.) For larger changes, reimplement one of the T2H_DEFAULT_* routines,
|
# 2.) For larger changes, reimplement one of the T2H_DEFAULT_* routines,
|
# give them another name, and assign them to the respective
|
# give them another name, and assign them to the respective
|
# $T2H_ variable.
|
# $T2H_ variable.
|
|
|
# As a general interface, the hashes T2H_HREF, T2H_NAME, T2H_NODE hold
|
# As a general interface, the hashes T2H_HREF, T2H_NAME, T2H_NODE hold
|
# href, html-name, node-name of
|
# href, html-name, node-name of
|
# This -- current section (resp. html page)
|
# This -- current section (resp. html page)
|
# Top -- top page ($T2H_TOP_FILE)
|
# Top -- top page ($T2H_TOP_FILE)
|
# Contents -- Table of contents
|
# Contents -- Table of contents
|
# Overview -- Short table of contents
|
# Overview -- Short table of contents
|
# Index -- Index page
|
# Index -- Index page
|
# About -- page which explain "navigation buttons"
|
# About -- page which explain "navigation buttons"
|
# First -- first node
|
# First -- first node
|
# Last -- last node
|
# Last -- last node
|
#
|
#
|
# Whether or not the following hash values are set, depends on the context
|
# Whether or not the following hash values are set, depends on the context
|
# (all values are w.r.t. 'This' section)
|
# (all values are w.r.t. 'This' section)
|
# Next -- next node of texinfo
|
# Next -- next node of texinfo
|
# Prev -- previous node of texinfo
|
# Prev -- previous node of texinfo
|
# Up -- up node of texinfo
|
# Up -- up node of texinfo
|
# Forward -- next node in reading order
|
# Forward -- next node in reading order
|
# Back -- previous node in reading order
|
# Back -- previous node in reading order
|
# FastForward -- if leave node, up and next, else next node
|
# FastForward -- if leave node, up and next, else next node
|
# FastBackward-- if leave node, up and prev, else prev node
|
# FastBackward-- if leave node, up and prev, else prev node
|
#
|
#
|
# Furthermore, the following global variabels are set:
|
# Furthermore, the following global variabels are set:
|
# $T2H_THISDOC{title} -- title as set by @setttile
|
# $T2H_THISDOC{title} -- title as set by @setttile
|
# $T2H_THISDOC{fulltitle} -- full title as set by @title...
|
# $T2H_THISDOC{fulltitle} -- full title as set by @title...
|
# $T2H_THISDOC{subtitle} -- subtitle as set by @subtitle
|
# $T2H_THISDOC{subtitle} -- subtitle as set by @subtitle
|
# $T2H_THISDOC{author} -- author as set by @author
|
# $T2H_THISDOC{author} -- author as set by @author
|
#
|
#
|
# and pointer to arrays of lines which need to be printed by t2h_print_lines
|
# and pointer to arrays of lines which need to be printed by t2h_print_lines
|
# $T2H_OVERVIEW -- lines of short table of contents
|
# $T2H_OVERVIEW -- lines of short table of contents
|
# $T2H_TOC -- lines of table of contents
|
# $T2H_TOC -- lines of table of contents
|
# $T2H_TOP -- lines of Top texinfo node
|
# $T2H_TOP -- lines of Top texinfo node
|
# $T2H_THIS_SECTION -- lines of 'This' section
|
# $T2H_THIS_SECTION -- lines of 'This' section
|
|
|
#
|
#
|
# There are the following subs which control the layout:
|
# There are the following subs which control the layout:
|
#
|
#
|
$T2H_print_section = \&T2H_DEFAULT_print_section;
|
$T2H_print_section = \&T2H_DEFAULT_print_section;
|
$T2H_print_Top_header = \&T2H_DEFAULT_print_Top_header;
|
$T2H_print_Top_header = \&T2H_DEFAULT_print_Top_header;
|
$T2H_print_Top_footer = \&T2H_DEFAULT_print_Top_footer;
|
$T2H_print_Top_footer = \&T2H_DEFAULT_print_Top_footer;
|
$T2H_print_Top = \&T2H_DEFAULT_print_Top;
|
$T2H_print_Top = \&T2H_DEFAULT_print_Top;
|
$T2H_print_Toc = \&T2H_DEFAULT_print_Toc;
|
$T2H_print_Toc = \&T2H_DEFAULT_print_Toc;
|
$T2H_print_Overview = \&T2H_DEFAULT_print_Overview;
|
$T2H_print_Overview = \&T2H_DEFAULT_print_Overview;
|
$T2H_print_Footnotes = \&T2H_DEFAULT_print_Footnotes;
|
$T2H_print_Footnotes = \&T2H_DEFAULT_print_Footnotes;
|
$T2H_print_About = \&T2H_DEFAULT_print_About;
|
$T2H_print_About = \&T2H_DEFAULT_print_About;
|
$T2H_print_misc_header = \&T2H_DEFAULT_print_misc_header;
|
$T2H_print_misc_header = \&T2H_DEFAULT_print_misc_header;
|
$T2H_print_misc_footer = \&T2H_DEFAULT_print_misc_footer;
|
$T2H_print_misc_footer = \&T2H_DEFAULT_print_misc_footer;
|
$T2H_print_misc = \&T2H_DEFAULT_print_misc;
|
$T2H_print_misc = \&T2H_DEFAULT_print_misc;
|
$T2H_print_chapter_header = \&T2H_DEFAULT_print_chapter_header;
|
$T2H_print_chapter_header = \&T2H_DEFAULT_print_chapter_header;
|
$T2H_print_chapter_footer = \&T2H_DEFAULT_print_chapter_footer;
|
$T2H_print_chapter_footer = \&T2H_DEFAULT_print_chapter_footer;
|
$T2H_print_page_head = \&T2H_DEFAULT_print_page_head;
|
$T2H_print_page_head = \&T2H_DEFAULT_print_page_head;
|
$T2H_print_page_foot = \&T2H_DEFAULT_print_page_foot;
|
$T2H_print_page_foot = \&T2H_DEFAULT_print_page_foot;
|
$T2H_print_head_navigation = \&T2H_DEFAULT_print_head_navigation;
|
$T2H_print_head_navigation = \&T2H_DEFAULT_print_head_navigation;
|
$T2H_print_foot_navigation = \&T2H_DEFAULT_print_foot_navigation;
|
$T2H_print_foot_navigation = \&T2H_DEFAULT_print_foot_navigation;
|
$T2H_button_icon_img = \&T2H_DEFAULT_button_icon_img;
|
$T2H_button_icon_img = \&T2H_DEFAULT_button_icon_img;
|
$T2H_print_navigation = \&T2H_DEFAULT_print_navigation;
|
$T2H_print_navigation = \&T2H_DEFAULT_print_navigation;
|
$T2H_about_body = \&T2H_DEFAULT_about_body;
|
$T2H_about_body = \&T2H_DEFAULT_about_body;
|
$T2H_print_frame = \&T2H_DEFAULT_print_frame;
|
$T2H_print_frame = \&T2H_DEFAULT_print_frame;
|
$T2H_print_toc_frame = \&T2H_DEFAULT_print_toc_frame;
|
$T2H_print_toc_frame = \&T2H_DEFAULT_print_toc_frame;
|
|
|
########################################################################
|
########################################################################
|
# Layout for html for every sections
|
# Layout for html for every sections
|
#
|
#
|
sub T2H_DEFAULT_print_section
|
sub T2H_DEFAULT_print_section
|
{
|
{
|
my $fh = shift;
|
my $fh = shift;
|
local $T2H_BUTTONS = \@T2H_SECTION_BUTTONS;
|
local $T2H_BUTTONS = \@T2H_SECTION_BUTTONS;
|
&$T2H_print_head_navigation($fh) if $T2H_SECTION_NAVIGATION;
|
&$T2H_print_head_navigation($fh) if $T2H_SECTION_NAVIGATION;
|
my $nw = t2h_print_lines($fh);
|
my $nw = t2h_print_lines($fh);
|
if ($T2H_SPLIT eq 'section' && $T2H_SECTION_NAVIGATION)
|
if ($T2H_SPLIT eq 'section' && $T2H_SECTION_NAVIGATION)
|
{
|
{
|
&$T2H_print_foot_navigation($fh, $nw);
|
&$T2H_print_foot_navigation($fh, $nw);
|
}
|
}
|
else
|
else
|
{
|
{
|
print $fh ' ' . "\n";
|
print $fh ' ' . "\n";
|
}
|
}
|
}
|
}
|
|
|
###################################################################
|
###################################################################
|
# Layout of top-page I recommend that you use @ifnothtml, @ifhtml,
|
# Layout of top-page I recommend that you use @ifnothtml, @ifhtml,
|
# @html within the Top texinfo node to specify content of top-level
|
# @html within the Top texinfo node to specify content of top-level
|
# page.
|
# page.
|
#
|
#
|
# If you enclose everything in @ifnothtml, then title, subtitle,
|
# If you enclose everything in @ifnothtml, then title, subtitle,
|
# author and overview is printed
|
# author and overview is printed
|
# T2H_HREF of Next, Prev, Up, Forward, Back are not defined
|
# T2H_HREF of Next, Prev, Up, Forward, Back are not defined
|
# if $T2H_SPLIT then Top page is in its own html file
|
# if $T2H_SPLIT then Top page is in its own html file
|
sub T2H_DEFAULT_print_Top_header
|
sub T2H_DEFAULT_print_Top_header
|
{
|
{
|
&$T2H_print_page_head(@_) if $T2H_SPLIT;
|
&$T2H_print_page_head(@_) if $T2H_SPLIT;
|
t2h_print_label(@_); # this needs to be called, otherwise no label set
|
t2h_print_label(@_); # this needs to be called, otherwise no label set
|
&$T2H_print_head_navigation(@_);
|
&$T2H_print_head_navigation(@_);
|
}
|
}
|
sub T2H_DEFAULT_print_Top_footer
|
sub T2H_DEFAULT_print_Top_footer
|
{
|
{
|
&$T2H_print_foot_navigation(@_);
|
&$T2H_print_foot_navigation(@_);
|
&$T2H_print_page_foot(@_) if $T2H_SPLIT;
|
&$T2H_print_page_foot(@_) if $T2H_SPLIT;
|
}
|
}
|
sub T2H_DEFAULT_print_Top
|
sub T2H_DEFAULT_print_Top
|
{
|
{
|
my $fh = shift;
|
my $fh = shift;
|
|
|
# for redefining navigation buttons use:
|
# for redefining navigation buttons use:
|
# local $T2H_BUTTONS = [...];
|
# local $T2H_BUTTONS = [...];
|
# as it is, 'Top', 'Contents', 'Index', 'About' are printed
|
# as it is, 'Top', 'Contents', 'Index', 'About' are printed
|
local $T2H_BUTTONS = \@T2H_MISC_BUTTONS;
|
local $T2H_BUTTONS = \@T2H_MISC_BUTTONS;
|
&$T2H_print_Top_header($fh);
|
&$T2H_print_Top_header($fh);
|
if ($T2H_THIS_SECTION)
|
if ($T2H_THIS_SECTION)
|
{
|
{
|
# if top-level node has content, then print it with extra header
|
# if top-level node has content, then print it with extra header
|
print $fh "$T2H_NAME{Top}"
|
print $fh "$T2H_NAME{Top}"
|
unless ($T2H_HAS_TOP_HEADING);
|
unless ($T2H_HAS_TOP_HEADING);
|
t2h_print_lines($fh, $T2H_THIS_SECTION)
|
t2h_print_lines($fh, $T2H_THIS_SECTION)
|
}
|
}
|
else
|
else
|
{
|
{
|
# top-level node is fully enclosed in @ifnothtml
|
# top-level node is fully enclosed in @ifnothtml
|
# print fulltitle, subtitle, author, Overview
|
# print fulltitle, subtitle, author, Overview
|
print $fh
|
print $fh
|
"\n" .
|
"\n" .
|
join("\n", split(/\n/, $T2H_THISDOC{fulltitle})) .
|
join("\n", split(/\n/, $T2H_THISDOC{fulltitle})) .
|
"\n";
|
"\n";
|
print $fh "$T2H_THISDOC{subtitle}\n" if $T2H_THISDOC{subtitle};
|
print $fh "$T2H_THISDOC{subtitle}\n" if $T2H_THISDOC{subtitle};
|
print $fh "$T2H_THISDOC{author}\n" if $T2H_THISDOC{author};
|
print $fh "$T2H_THISDOC{author}\n" if $T2H_THISDOC{author};
|
print $fh <
|
print $fh <
|
|
|
|
|
|
|
Overview:
|
Overview:
|
|
|
EOT
|
EOT
|
t2h_print_lines($fh, $T2H_OVERVIEW);
|
t2h_print_lines($fh, $T2H_OVERVIEW);
|
print $fh "\n";
|
print $fh "\n";
|
}
|
}
|
&$T2H_print_Top_footer($fh);
|
&$T2H_print_Top_footer($fh);
|
}
|
}
|
|
|
###################################################################
|
###################################################################
|
# Layout of Toc, Overview, and Footnotes pages
|
# Layout of Toc, Overview, and Footnotes pages
|
# By default, we use "normal" layout
|
# By default, we use "normal" layout
|
# T2H_HREF of Next, Prev, Up, Forward, Back, etc are not defined
|
# T2H_HREF of Next, Prev, Up, Forward, Back, etc are not defined
|
# use: local $T2H_BUTTONS = [...] to redefine navigation buttons
|
# use: local $T2H_BUTTONS = [...] to redefine navigation buttons
|
sub T2H_DEFAULT_print_Toc
|
sub T2H_DEFAULT_print_Toc
|
{
|
{
|
return &$T2H_print_misc(@_);
|
return &$T2H_print_misc(@_);
|
}
|
}
|
sub T2H_DEFAULT_print_Overview
|
sub T2H_DEFAULT_print_Overview
|
{
|
{
|
return &$T2H_print_misc(@_);
|
return &$T2H_print_misc(@_);
|
}
|
}
|
sub T2H_DEFAULT_print_Footnotes
|
sub T2H_DEFAULT_print_Footnotes
|
{
|
{
|
return &$T2H_print_misc(@_);
|
return &$T2H_print_misc(@_);
|
}
|
}
|
sub T2H_DEFAULT_print_About
|
sub T2H_DEFAULT_print_About
|
{
|
{
|
return &$T2H_print_misc(@_);
|
return &$T2H_print_misc(@_);
|
}
|
}
|
|
|
sub T2H_DEFAULT_print_misc_header
|
sub T2H_DEFAULT_print_misc_header
|
{
|
{
|
&$T2H_print_page_head(@_) if $T2H_SPLIT;
|
&$T2H_print_page_head(@_) if $T2H_SPLIT;
|
# this needs to be called, otherwise, no labels are set
|
# this needs to be called, otherwise, no labels are set
|
t2h_print_label(@_);
|
t2h_print_label(@_);
|
&$T2H_print_head_navigation(@_);
|
&$T2H_print_head_navigation(@_);
|
}
|
}
|
sub T2H_DEFAULT_print_misc_footer
|
sub T2H_DEFAULT_print_misc_footer
|
{
|
{
|
&$T2H_print_foot_navigation(@_);
|
&$T2H_print_foot_navigation(@_);
|
&$T2H_print_page_foot(@_) if $T2H_SPLIT;
|
&$T2H_print_page_foot(@_) if $T2H_SPLIT;
|
}
|
}
|
sub T2H_DEFAULT_print_misc
|
sub T2H_DEFAULT_print_misc
|
{
|
{
|
my $fh = shift;
|
my $fh = shift;
|
local $T2H_BUTTONS = \@T2H_MISC_BUTTONS;
|
local $T2H_BUTTONS = \@T2H_MISC_BUTTONS;
|
&$T2H_print_misc_header($fh);
|
&$T2H_print_misc_header($fh);
|
print $fh "$T2H_NAME{This}\n";
|
print $fh "$T2H_NAME{This}\n";
|
t2h_print_lines($fh);
|
t2h_print_lines($fh);
|
&$T2H_print_misc_footer($fh);
|
&$T2H_print_misc_footer($fh);
|
}
|
}
|
|
|
###################################################################
|
###################################################################
|
# chapter_header and chapter_footer are only called if
|
# chapter_header and chapter_footer are only called if
|
# T2H_SPLIT eq 'chapter'
|
# T2H_SPLIT eq 'chapter'
|
# chapter_header: after print_page_header, before print_section
|
# chapter_header: after print_page_header, before print_section
|
# chapter_footer: after print_section of last section, before print_page_footer
|
# chapter_footer: after print_section of last section, before print_page_footer
|
#
|
#
|
# If you want to get rid of navigation stuff after each section,
|
# If you want to get rid of navigation stuff after each section,
|
# redefine print_section such that it does not call print_navigation,
|
# redefine print_section such that it does not call print_navigation,
|
# and put print_navigation into print_chapter_header
|
# and put print_navigation into print_chapter_header
|
@T2H_CHAPTER_BUTTONS =
|
@T2H_CHAPTER_BUTTONS =
|
(
|
(
|
'FastBack', 'FastForward', ' ',
|
'FastBack', 'FastForward', ' ',
|
' ', ' ', ' ', ' ',
|
' ', ' ', ' ', ' ',
|
'Top', 'Contents', 'Index', 'About',
|
'Top', 'Contents', 'Index', 'About',
|
);
|
);
|
|
|
sub T2H_DEFAULT_print_chapter_header
|
sub T2H_DEFAULT_print_chapter_header
|
{
|
{
|
# nothing to do there, by default
|
# nothing to do there, by default
|
if (! $T2H_SECTION_NAVIGATION)
|
if (! $T2H_SECTION_NAVIGATION)
|
{
|
{
|
my $fh = shift;
|
my $fh = shift;
|
local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS;
|
local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS;
|
&$T2H_print_navigation($fh);
|
&$T2H_print_navigation($fh);
|
print $fh "\n \n";
|
print $fh "\n \n";
|
}
|
}
|
}
|
}
|
|
|
sub T2H_DEFAULT_print_chapter_footer
|
sub T2H_DEFAULT_print_chapter_footer
|
{
|
{
|
local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS;
|
local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS;
|
&$T2H_print_navigation(@_);
|
&$T2H_print_navigation(@_);
|
}
|
}
|
###################################################################
|
###################################################################
|
$T2H_TODAY = &pretty_date; # like "20 September 1993"
|
$T2H_TODAY = &pretty_date; # like "20 September 1993"
|
|
|
sub pretty_date {
|
sub pretty_date {
|
local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
|
local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
|
|
|
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
|
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
|
$year += ($year < 70) ? 2000 : 1900;
|
$year += ($year < 70) ? 2000 : 1900;
|
# obachman: Let's do it as the Americans do
|
# obachman: Let's do it as the Americans do
|
return($MONTH_NAMES->{$T2H_LANG}[$mon] . ", " . $mday . " " . $year);
|
return($MONTH_NAMES->{$T2H_LANG}[$mon] . ", " . $mday . " " . $year);
|
}
|
}
|
|
|
|
|
###################################################################
|
###################################################################
|
# Layout of standard header and footer
|
# Layout of standard header and footer
|
#
|
#
|
|
|
# Set the default body text, inserted between
|
# Set the default body text, inserted between
|
###$T2H_BODYTEXT = 'LANG="EN" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"';
|
###$T2H_BODYTEXT = 'LANG="EN" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"';
|
$T2H_BODYTEXT = 'LANG="' . $T2H_LANG . '" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"';
|
$T2H_BODYTEXT = 'LANG="' . $T2H_LANG . '" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"';
|
# text inserted after
|
# text inserted after
|
$T2H_AFTER_BODY_OPEN = '';
|
$T2H_AFTER_BODY_OPEN = '';
|
#text inserted before
|
#text inserted before
|
$T2H_PRE_BODY_CLOSE = '';
|
$T2H_PRE_BODY_CLOSE = '';
|
# this is used in footer
|
# this is used in footer
|
$T2H_ADDRESS = "by $T2H_USER " if $T2H_USER;
|
$T2H_ADDRESS = "by $T2H_USER " if $T2H_USER;
|
$T2H_ADDRESS .= "on $T2H_TODAY";
|
$T2H_ADDRESS .= "on $T2H_TODAY";
|
# this is added inside after and some META NAME stuff
|
# this is added inside after and some META NAME stuff
|
# can be used for
|