Next: , Up: Generic Translator texi2any   [Contents][Index]


20.1 texi2any: A Texinfo Reference Implementation

Above, we called texi2any “the” translator for Texinfo instead of just “a” translator, even though (of course) it’s technically and legally possible for other implementations to be written. The reason is that alternative implementations are very likely to have subtle, or not-so-subtle, differences in behavior, and thus Texinfo documents would become dependent on the processor. Therefore, it is important to have a reference implementation that defines parts of the language not fully specified by the manual (often intentionally so). It is equally important to have consistent command-line options and other behavior for all processors.

For this reason, the once-independent texi2html Perl Texinfo processor was made compatible with the C implementation of makeinfo, to avoid continuing with two different implementations (see History). The current implementation, texi2any, serves as the reference implementation. It inherited the design of customization and other features from texi2html (for more on texi2html compatibility, see texi2html). However, texi2any is a full reimplementation: it constructs a tree-based representation of the input document for all back-ends to work from.

Extensive tests of the language were developed at the same time as texi2any; we plead with anyone thinking of writing a program to parse Texinfo input to at least make use of these tests.

The texi2html wrapper script (see texi2html) provides a very simple example of calling texi2any from a shell script; it’s in util/texi2html in the Texinfo sources. More consequentially, texi-elements-by-size is an example Perl script using the Texinfo::Parser module interface; it’s also in the util source directory. (Its functionality may also be useful to authors; see texi-elements-by-size.)

With the release of texi2any as the reference implementation, development of both the C implementation of makeinfo and texi2html has been halted. Going forward, we ask authors of Texinfo documents to use only texi2any.


Next: , Up: Generic Translator texi2any   [Contents][Index]