2.5.1 The First Line of a Texinfo File

Every Texinfo file that is to be the top-level input to TeX must begin with a line that looks like this:

\input texinfo

When the file is processed by TeX, the ‘\input texinfo’ command tells TeX to load the macros needed for processing a Texinfo file. These are in a file called texinfo.tex, which should have been installed on your system along with either the TeX or Texinfo software. TeX uses the backslash, ‘\’, to mark the beginning of a command, exactly as Texinfo uses ‘@’. The texinfo.tex file causes the switch from ‘\’ to ‘@’; before the switch occurs, TeX requires ‘\’, which is why it appears at the beginning of the file.

You may optionally follow this line with a comment to tell GNU Emacs to use Texinfo mode when the file is edited:

\input texinfo   @c -*-texinfo-*-

This may be useful when Emacs doesn’t detect the file type from the file extension automatically.