Texi2HTML – Texinfo to HTML v1.82: 3. Installation of texi2html
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. Installation of texi2html

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 Requirements

To install texi2html, you must first obtain a copy of the source distribution. See section Obtaining texi2html.

texi2html requires perl version 5.00405 or above to be run. An older perl 5 version with File::Spec is also likely to work. The current version has been lightly tested on a wide range of perl, but has not been tested extensively on versions of perl below 5.6. To play nice with encodings you also need the Encode and Unicode::Normalize modules.

To rebuild the script perl isn’t required in most cases. For more information about advanced build features, see Advanced build features.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Configuring the source and rebuilding

texi2html is a standard Automake-based distribution. If you have a source version, you should run ./configure to configure the sources and make to build the script.

./configure accepts options to select the installation directory for the ‘texi2html’ file, the default directories texi2html will use to look for configuration files, and other details. Run ./configure --help for more information. Running ./configure creates ‘texi2html_configured.pl’ from ‘texi2html.pl’, and also builds the make configuration files (‘Makefile’s).

Running make combines five files into the final ‘texi2html’ program file:

  • texi2html_configured.pl’ contains the base program,
  • MySimple.pm’ handles the command line options,
  • texi2html.init’ is the default configuration file, and
  • T2h_i18n.pm’ is used for internationalization.
  • translations.pl’ contains the translations of the strings used in documents.

Running make also rebuilds the documentation if needed.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3 Installing

make install performs the installation to the locations specified to the ./configure script. This usually involves placing the actual ‘texi2html’ file someplace in your path, such as ‘/usr/local/bin’ or ‘/usr/bin’.

Installing texi2html in your path should be sufficient to run it. To use default initialization files, or a configuration file for LaTeX2HTML when using latex2html to convert @tex sections (see section Expanding @tex and @math regions using LaTeX2HTML), install them in the package data directory specified to configure. This is ‘/usr/local/share/texi2html/’ by default, but depends on the value of the --pkgdatadir=dir’ option passed to the ./configure script. Files used for strings customization and internationalization are also searched for in the ‘i18n’ directory of this directory. See section Use initialization files for fine tuning for more.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4 Advanced build features

This section documents features that are unlikely to be used but deserve a bit of documentation.

A ./configure switch, --with-unicode’ allows to choose whether the unicode code should be used or not. The default is to detect it with a test. This code requires Encode and Unicode::Normalize modules.

A similar ./configure switch, --with-unidecode’ allows to choose whether the perl module Text::Unidecode should be used or not. The default is to detect it with a test. This code requires the Text::Unidecode module.

perl isn’t needed to build the script. the script is build by ‘./configure’ and a shell script launched by make which is a simple wrapper around a sed one-liner. The perl command can be specified with the environment variable $PERL, otherwise it is detected. perl is required to rebuild the documentation as the HTML documentation is rebuild with texi2html itself.

The translations are managed by a script manage_i18n.pl, created by ./configure. manage_i18n.pl requires Data::Dumper to function normally. If this module isn’t there ./configure detects it and manage_i18n.pl doesn’t really rebuild the translations, but only copy files. It is possible to use the ./configure switch --enable-translations’ to override the ./configure detection. For more about translations, see Internationalization.

It is possible to build from outside of the source directory, for example the following should work:

tar xzvf texi2html-1.82.tar.gz
mkdir texi2html_build
cd texi2html_build
../texi2html-1.82/configure && make

All these features enables to build texi2html on a platform in order to run it on another platform, a kind of cross-building. The ./configure switches and $PERL allows to specify everything needed for the build of the texi2html script.

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Derek Price on January 5, 2009 using texi2html 1.82.

Derek Price, CVS developer and technical editor of Essential CVS (Essentials line from O'Reilly Press) , and others offer consulting services and training through Ximbiot.