texi2latex – convert Texinfo files to LaTeX

texi2latex is a program that converts Texinfo files to the LaTeX format. It is a full implementation of the Texinfo file format. See the manual (also as PDF) for further information.

The project page is http://savannah.nongnu.org/projects/texi2latex. In particular, you find there the download section and the bug report section.

As an example, I've repared the Texinfo manual processed with LaTeX.

What follows is the README file:

		 texi2latex -- convert Texinfo files to LaTeX


Copyright (c) 2005 Torsten Bronger <bronger@physik.rwth-aachen.de>

Licence: GPL, see COPYING in the distribution

Project web page: http://savannah.nongnu.org/projects/texi2latex/ (please
report bugs there)

This README is not out-of-date, but it's a mere ersatz manual.  For proper
documentation consult the Info pages of texi2latex included in this



* An XSLT processor.  I recommend Saxon 6.5.x (*not* 7.x or 8.x) because it's
  the fastest.  But texi2latex uses only standard XSLT 1.0, which is a very
  strictly defined standard.  So Xalan etc. work too.  At least in new big
  Linux distributions Saxon is already available.

* A current version of makeinfo, which is part of the Texinfo distribution.
  For some features it is necessary to have a CVS version of it, and even then
  you can't be sure.  See below.

* A non-ancient version of LaTeX.

Adjust the paths in the Makefile to your requirements and preferences.  Call

    make install     (as root)


Go to the directory where your Texinfo file resides.  Assuming that your
Texinfo file is called "mytexi.texi", call

    texi2latex mytexi.texi

(you may omit the extension).  This writes mytexi.ltx in the current directory.
ATTENTION: If this file already exists, it's overwritten.

Then you can get a PDF with

   pdflatex mytexi.ltx

Plain "latex" (without "pdf") works, too, but pdflatex is highly recommended.

Please note that plain latex and pdflatex can only deal with certain image
formats.  Plain latex usually only can include EPS files.  pdflatex can deal
with PDF, JPEG, and PNG.  So it may be necessary to convert images.

There are no non-standard dependencies in the ltx file.  In particular, there
are no "class" or "style" files special to texi2latex.  However, if your
version of LaTeX is too old, this may cause trouble.


The most straightforward way to customise the layout of the output is to create
a file called "mytexi-t2l.cfg" in the current directory.  This file is included
into the LaTeX file immediately before \begin{document}.  Change fonts with the
psnfss package, page margins with the geometry package, and headers and footers
with fancyhdr.

Additionally, a global style file called texi2latex.cfg is included.  You can
put it anywhere where LaTeX will find it, but it has lower precedence than the
local file.  For example, my texi2latex.cfg looks like this:


Moreover, you can pass command line options to texi2latex.  For example,

    texi2latex mytexi global-options=12pt

adds "12pt" to the \documentclass macro and thus switches the document font
size to 12pt.

If you know how to write XSLT, you can create a customisation layer to
texi2latex.xsl.  This is an XSLT file that you create that includes
texi2latex.xsl but overrides all templates that you want to change.  Such
measures are necessary e.g. for modifying title page layout.


If you have indices in your Texinfo document (concept index, function index,
etc) you have to create them separately with makeindex (part of the LaTeX
distribution).  texi2latex helps you with that.  When you process your LaTeX
file with (pdf)latex, a file called "makeindex.bat" is (over)written in the
current directory.  With

    bash makeindex.bat

all indices will be created.  Please note the you have to process your LaTeX
file at least twice to be sure that the page numbers won't change any more.
*Then* create the indices, and call LaTeX again.


The XML output format of makeinfo is almost, but not fully mature.  So if you
want to use advanced features such as index mapping (@synindex), it is
necessary to install a very fresh version of Texinfo, possibly a CVS version.
And even then success cannot be fully guaranteed.  Not yet.


I created v1.0 of texi2latex from 2004/12/24 to 2005/01/02.  Unfortunately, my
actual work and other Free Software projects make it difficult for me to
continue with it as fast as it should be.  If you want to help with texi2latex,
contact me.