miktex-tex 1 &PACKAGE_NAME; &miktexrev; User Commands
miktex-tex text formatting and typesetting
&miktextex; option file \command

## Description

Run the &TeX; typesetter on file, usually creating `file.dvi`. If the file argument has no extension, `.tex` will be appended to it. Instead of a filename, a set of &TeX; commands can be given, the first of which must start with a backslash. With a `&format` argument &TeX; uses a different set of precompiled commands, contained in `format.fmt`; it is usually better to use the `-undump=format` option instead.

&TeX; formats the interspersed text and commands contained in the named files and outputs a typesetter independent file (called &DVI;, which is short for DeVice Independent). &TeX;'s capabilities and language are described in The &TeX;book. &TeX; is normally used with a large body of precompiled macros, and there are several specific formatting systems, such as &LaTeX;, which require the support of several macro files.

This version of &TeX; looks at its command-line to see what name it was called under. Both &initex; and &virtex; are links to the &miktextex; executable. When called as &initex; (or when the `-initialize` option is given) it can be used to precompile macros into a `.fmt` file. When called as &virtex; it will use the plain format. When called under any other name, &TeX; will use that name as the name of the format to use. For example, when called as &miktextex; the tex format is used, which is identical to the plain format. The commands defined by the plain format are documented in The &TeX;book. Other formats that are often available include latex and amstex.

The non-option command line argiments to the &TeX; program are passed to it as the first input line. (But it is often easier to type extended arguments as the first input line, since shells tend to gobble up or misinterpret &TeX;'s favorite symbols, like backslashes, unless you quote them.) As described in The &TeX;book, that first line should begin with a file name, a \controlsequence, or a &formatname.

The normal usage is to say `&miktextex; paper` to start processing `paper.tex`. The name paper will be the jobname, and is used in forming output file names. If &TeX; doesn't get a file name in the first line, the job name is `texput`. When looking for a file, &TeX; looks for the name with and without the default extension (`.tex`) appended, unless the name already contains that extension. If paper is the jobname, a log of error messages, with rather more detail than normally appears on the screen, will appear in `paper.log`, and the output file will be in `paper.dvi`.

This version of &TeX; will look in the first line of the file `paper.tex` to see if it begins with the magic sequence `%&`. If the first line begins with `%&format --translate-file tcxname`, then &TeX; will use the named format and transation table tcxname to process the source file. Either the format name or the `--translate-file` specification may be omitted, but not both. This overrides the format selection based on the name by which the program is invoked. The `-parse-first-line` option or the parse_first_line configuration value controls whether this behaviour is enabled.

The `e` response to &TeX;'s error-recovery prompt causes the default editor to start up at the current line of the current file. The configuration value [Core]Editor can be used to change the editor used. It may contain a string with `%f` indicating where the file name goes and `%l` indicating where the decimal line number (if any) goes. For example, an [Core]Editor string for `emacs` can be set with the command

    &prompt;initexmf --set-config-value="[Core]Editor=emacs +%l %f"

A convenient file is `null.tex`, containing nothing. When &TeX; can't find a file it thinks you want to input, it keeps asking you for another file name; responding `null` gets you out of the loop if you don't want to input anything. You can also type your EOF character (usually Control Z ).

## Options

## Environment

## Bugs

This version of &TeX; implements a number of optional extensions. In fact, many of these extensions conflict to a greater or lesser extent with the definition of &TeX;. This version of &TeX; fails to trap arithmetic overflow when dimensions are added or subtracted. Cases where this occurs are rare, but when it does the generated &DVI; file will be invalid.

## See Also

- texify 1