Texinfo mode provides several predefined key commands for TeX formatting and printing. These include commands for sorting indices, looking at the printer queue, killing the formatting job, and recentering the display of the buffer in which the operations occur.
Often, when you are writing a document, you want to typeset and print
only part of a file to see what it will look like. You can use the
texinfo-tex-region and related commands for this purpose. Use
texinfo-tex-buffer command to format all of a
texinfo-tex-buffer to work, the
file must start with a ‘\input texinfo’ line and must
@settitle line. The file must end with
on a line by itself. (When you use
texinfo-tex-region, you must
@settitle line with start-of-header and
texi2dvi on the buffer. In addition to running TeX on the
buffer, this command automatically creates or updates indices as
Run TeX on the current region.
If @-commands related to printed output are between the
start-of-header and end-of-header lines, then
texinfo-tex-region will format the
region accordingly. For example, if you write the
between the start-of-header and end-of-header lines,
will format the region in “small” book size.
texindex to sort the indices of a Texinfo file formatted with
texinfo-tex-region command does
texindex automatically; it only runs the
typesetting command. You must run the
a second time after sorting the raw index files with the
command. (Usually, you do not format an index when you format a region,
only when you format a buffer. Now that the
exists, there is little or no need for this command.)
Print a DVI file that was made with
Show the print queue.
Delete a job from the print queue; you will be prompted for the job
number shown by a preceding C-c C-t C-q command
Kill the currently running TeX job started by either
texinfo-tex-buffer, or any other
process running in the Texinfo shell buffer.
Quit a TeX formatting job that has stopped because of an error by sending an x to it. When you do this, TeX preserves a record of what it did in a .log file.
Redisplay the shell buffer in which the TeX printing and formatting commands are run to show its most recent output.
Thus, the usual sequence of commands for formatting a buffer is as follows (with comments to the right):
C-c C-t C-b Run
texi2dvi on the buffer.
C-c C-t C-p Print the DVI file.
C-c C-t C-q Display the printer queue.
The Texinfo mode TeX formatting commands start a subshell in Emacs
called the *tex-shell*. The
commands are all run in this shell.
You can watch the commands operate in the ‘*tex-shell*’ buffer, and you can switch to and from and use the ‘*tex-shell*’ buffer as you would any other shell buffer.
The formatting and print commands depend on the values of several variables. The default values are:
Variable Default value texinfo-texi2dvi-command "texi2dvi" texinfo-tex-command "tex" texinfo-texindex-command "texindex" texinfo-delete-from-print-queue-command "lprm" texinfo-tex-trailer "@bye" tex-start-of-header "%**start" tex-end-of-header "%**end" tex-dvi-print-command "lpr -d" tex-show-queue-command "lpq"
You can change the values of these variables with the M-x set-variable command (see Examining and Setting Variables in The GNU Emacs Manual), or with your .emacs initialization file (see Init File in The GNU Emacs Manual).
Beginning with version 20, GNU Emacs offers a user-friendly interface, called Customize, for changing values of user-definable variables. See Easy Customization Interface in The GNU Emacs Manual, for more details about this. The Texinfo variables can be found in the ‘Development/Docs/Texinfo’ group, once you invoke the M-x customize command.