manpagez: man pages & more
info texinfo
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.11 What a Texinfo File Must Have

By convention, the name of a Texinfo file ends with (in order of preference) one of the extensions ‘.texinfo’, ‘.texi’, ‘.txi’, or ‘.tex’. The longer extensions are preferred since they describe more clearly to a human reader the nature of the file. The shorter extensions are for operating systems that cannot handle long file names.

In order to be made into a good printed manual and other output formats, a Texinfo file must begin with lines like this:

\input texinfo
@setfilename info-file-name
@settitle name-of-manual

The contents of the file follow this beginning, and then you must end the Texinfo source with a line like this:


Here’s an explanation:

If you use Emacs, it is also useful to include mode setting and start-of-header and end-of-header lines at the beginning of a Texinfo file, like this:

\input texinfo   @c -*-texinfo-*-
@c %**start of header
@setfilename info-file-name
@settitle name-of-manual
@c %**end of header

In the first line, ‘-*-texinfo-*-’ causes Emacs to switch into Texinfo mode when you edit the file.

The @c ...header lines above which surround the @setfilename and @settitle lines allow you to process, within Emacs, just part of the Texinfo source. (See section Start of Header.)

Furthermore, you will usually provide a Texinfo file with a title page, indices, and the like, all of which are explained in this manual. But the minimum, which can be useful for short documents, is just the three lines at the beginning and the one line at the end.

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

This document was generated on October 2, 2013 using texi2html 5.0.

© 2000-2021
Individual documents may contain additional copyright information.