# OPTIONS

The following command-line options are supported, and they affect all remaining filenames. Option values are always provided as separate arguments following the option name. Letter case in option names is not significant.

Any argument that begins with a hyphen is expected to be an option, and will raise an error if it is not recognized. If a filename begins with a hyphen, you therefore need to disguise it by supplying a leading directory path. For example, ./-foo represents the file named -foo in the current directory in UNIX.

-@
Set TeXinfo mode, so that at-sign is the escape character instead of backslash. Although backslash-prefixed control sequences continue to be recognized, dollar signs are ordinary characters, so special treatment of TeX mathematics mode is disabled. In addition, any settings from -d (display math formatting), -e (Emacs mode), -i (indentation), and -m (mathematics conversion) options are ignored, and the indentation level spacing is set to zero, because leading spaces can be significant in the info-mode text produced from TeXinfo files.

Because TeXinfo is a continually evolving language, all TeXinfo commands that do not require special handling are enumerated in tex-pretty; any others that it finds will raise a warning message. Such new commands can probably be handled without modifying tex-pretty; see the STYLE FILES section below.

-a
Show author information on stderr.
-c
-d
Use display-mathematics style formatting for inline mathematics. This helps to set off mathematics text, and makes it easier to inspect it for correctness, However, in documents that make heavy use of inline mathematics, it may detract from readability of the non-mathematics material.
-e modename
Supply an Emacs mode name for the leading comment banner (default: TeX).
-f filename
Supply an alternate input filename for use in the output comment banner. This overrides the actual filename(s), and provides a way to name the output, even when no named input file is available, because standard input is redirected, or comes from a pipe.
-h or -?
Display brief usage information on stderr.
-i nnn
Set the number of spaces for each indentation level (default: 4). The value is forced into the nearest endpoint of the range 0 ... 16 if it is outside that interval. Although a zero value is accepted, it is not recommended, because suppressing indentation obscures the logical structure.
-l filename
Redirect warning and error messages from stderr to the indicated filename. This option is provided for user convenience on operating systems (e.g. IBM PC DOS) that fail to provide for redirection of stderr to a specified file.

If the file cannot be opened for output, tex-pretty will terminate silently (because the internal attempted redirection required the closure of stderr) with a non-zero exit code.

-m nnn
Select the mathematics mode style conversion (default: 0 --- no conversion). The value nnn is the sum of the desired numbers from this list (for each of the two cases of inline and display mathematics, the largest number chosen is the one that is used):
1
Inline mathematics is coded as $...$.
2
Inline mathematics is coded as $$...$$ (LaTeX).
4
Inline mathematics is coded as \begin{math} ... \end{math} (LaTeX).
8
Display mathematics is coded as $$...$$.
16
Display mathematics is coded as $...$ (LaTeX).
32
Display mathematics is coded as \begin{displaymath} ... \end{displaymath} (LaTeX).

tex-pretty recognizes all of these forms in the input stream.

This option may be helpful in assisting in the conversion between LaTeX and plain TeX markup, in standardizing the markup of mathematics in LaTeX, and in improving the possibilities for detection of begin-end imbalances (when the dollar forms are eliminated, and an editor or other software capable of delimiter balance checking is employed).

Although the double-dollar markup style for display mathematics is frequently found in LaTeX documents, strictly speaking, it should be replaced by either of the alternatives above.

-n
Suppress generation of the default leading comment banner.
-q
Suppress reading of the two default style files (see the STYLE FILES section below). Style files explicitly specified with the -s options will still be processed.
-s filename
Name a style file (see the STYLE FILES section below) to augment tex-pretty's built-in knowledge of standard environments and control sequences.
-t
Copy tabular environments verbatim. This is sometimes desirable if they have already been carefully formatted.

Otherwise, tex-pretty carries out its normal prettyprinting activities inside tabular environments, except that there, it lines up ampersand column separators on line positions which are multiples of 8, to improve vertical alignment for better readability. This is about the best it can do with only a single pass over the environment.

-v
Show version information on stderr.
-w nnn
Set the maximum output line width (default: 72). This limit may be exceeded if an excessively long string without embedded spaces is encountered, and it is ignored completely inside comments and verbatim text. The line width value is forced into the nearest endpoint of the range 16 ... 256 if it is outside that interval.