Section 8.5. More File Formats


8.5. More File Formats

There are a number of other file formats and tools used for creating documentation. These formats and tools occupy odd niches; once they are established, the effort of converting to another format is seen as unnecessary work.


TEX

.tex files are structured text files for use by Donald Knuth's open source TEX program and extensions of it, such as LATEX (http;//www.tug.org). Not surprisingly (given its academic background), TEX has excellent support for mathematical formulas, and so is commonly used in universities for papers and theses. TEX-related tools usually produce .dvi output files, suitable for conversion to PostScript or PDF.

TEX produces documents that are typographically excellent, though too many documents start to resemble each other in appearance if the default templates are used. Various macros to produce simple images with TEX files exist, but PostScript images can be also be referred to in TEX documents.


Texinfo

Texinfo (http://www.gnu.org/software/texinfo) is the source documentation format for the GNU Project. Online manuals and manpages are generated from the text-based .texi files. Texinfo supports the idea of a tree of pages with links to other pages. With suitable macros, TEX can read Texinfo files and PostScript images, and can generate PDF. The other format that can be generated from Texinfo files using the makeinfo tool is .info files, which can then be viewed with the command-line Info tool or from within Emacs. makeinfo can also generate DocBook and XML output.

The move to Texinfo from troff (see the next item in this list) has meant, in some cases, that the GNU manpage for a given command has become a minimal summary, along with a suggestion to read the Info version of the file for that command. To avoid this two-step process, you can always try the Info version first. Other irritations with the HTML generated from Texinfo files are that some pages contain very little text, and the use of multiple HTML files means having to follow a link to load a new web page for each successive text page, which is a very slow way to read a lot of text (though you can generate a single output file by using makeinfo's --no-split option). Luckily, most GNU manuals have other file formats, such as PDF, available as well.


troff

The original text markup language of the 1970s is troff (http://www.troff.org), and it's still found in the source files for manpages and some of the IETF RFC documents. There is a GNU version named groff, and this has even been used to produce book-sized documents. There are a number of specific macros defined for producing tables, figures, chemical diagrams, and so on.


POD

POD (Plain Old Documentation) is a simple markup language created by Larry Wall for Perl programs and other verbatim text, with default generators for HTML, manpages, TEX, and raw text. The special character for POD commands is =.

The various file formats described in this chapter can often be identified by which characters need to be escaped in the text and by how the tool commands are specified. = is POD, @ is Texinfo, . is troff, <> is XML (so the document was probably created in OpenOffice or DocBook), and \{ } is TEX.




Practical Development Environments
Practical Development Environments
ISBN: 0596007965
EAN: 2147483647
Year: 2004
Pages: 150

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net