Today I tried to learn more about the several interaction modes for tex/latex/pdflatex etc. The manpages turned out to be not very helpful:

$ man tex

    -interaction mode
        Sets  the interaction mode.  The mode can be either batchmode,
        nonstopmode, scrollmode, and errorstopmode. The meaning of these
        modes is the same as that of the corresponding \commands.

While Google quickly helped me to learn what I wanted to know, I was suprised that I wasn't able to find useful and official documentation about this topic. After turning the whole documentation of my TeXLive distribution upside down I am asking now, if someone can please point me to the official and detailed documenation (if it exists) concerning the interaction modes and maybe the default values to some of the other commandline options.

  • 1
    Could you say what's wrong with the example you give? To me, that or the (for me) more obvious latex --help seems to cover everything pretty well.
    – Joseph Wright
    Jan 13, 2013 at 13:58
  • 1
    For example, interaction mode is something that TeX has, which is what the ... same as that of the corresponding ... part is about. So for this I'd expect to read The TeXbook or similar for more info.
    – Joseph Wright
    Jan 13, 2013 at 14:01
  • 1
    If you wouldn't know, could you tell how exactly each mode differs from the other from the above given description? Because I could not, at least not without experimenting.
    – Niklas
    Jan 13, 2013 at 14:07
  • 2
    @Niklas so you are not really asking for information about the commandline but about the primitive tex commands such as \scrollmode for which the official doc is the TeXBook, or texdoc texbytopic for a free alternative. Jan 13, 2013 at 14:50
  • @DavidCarlisle Thanks, that was exactly what I was looking for.
    – Niklas
    Jan 13, 2013 at 15:01

2 Answers 2


The man page points these command line options as being equivalent to using the command forms such as \scrollmode, for which the official doc is the TeXBook, or

texdoc texbytopic 

for a free alternative (see chapter 32).


Interaction modes

TeX and the derived programs pdftex, xetex and luatex have four interaction modes:

  • batch mode
  • nonstop mode
  • scroll mode
  • errorstop mode

This is in order of increasing user interaction.

  1. In batch mode nothing is printed on the terminal, errors are scrolled as if <return> is hit at every error; missing files that TeX tries to input or request from keyboard input (\read on a not open input stream) cause the job to abort.

  2. In nonstop mode the diagnostic message will appear on the terminal, but there is no possibility of user interaction just like in batch mode.

  3. In scroll mode, TeX will stop only for missing files to input or if keyboard input is necessary.

  4. In errorstop mode, TeX will stop at each error, asking for user intervention.

The four modes can be set in the document using the control sequences

\batchmode \nonstopmode \scrollmode \errorstopmode

wherever one deems this useful. They will change the default interaction mode from the moment TeX will process them; note that interaction mode changes are always global. The default interaction mode is "errorstop", unless declared differently on the command line with the option

tex -interaction=[batchmode|nonstopmode|scrollmode|errorstopmode]

where tex stands for any typesetting engine known to the system (it could be pdflatex, for instance, or xetex or whatever).

Engines with e-TeX extensions (pdftex, xetex and luatex) can access to the current interaction mode by looking at the internal integer register


that holds the values 0, 1, 2, 3 corresponding respectively to batch, nonstop, scroll or errorstop. One can even change the current interaction mode by saying


thus making it possible to change temporarily the mode and reverting back to the previous one:

<some code where we want not to stop for errors>

(for an application see this answer)

Other useful command line options

  • -jobname=string sets the name of the job independently of the file on which the engine is run on

  • -halt-on-error stops the run at the first error (independently on the interaction mode)

  • -file-line-error changes the format of error messages to show not only the line number, but also the file TeX is currently reading the input from

  • -shell-escape enables the possibility of running system commands from within TeX

  • -no-shell-escape disables the above

  • -draftmode (only pdftex and luatex) produces no PDF output, so it can be useful for syntax checking

There are other options, but are somewhat esoteric or aimed mainly to format building.

  • Hello egreg, do you think adding -time-statistics to your "Other useful command line options" list would be helpful? Here's a post of mine in case of interest: [tex.stackexchange.com/a/450436/54180] Sep 11, 2018 at 16:06
  • @C-Star-Puppy Never heard about it; I think it's just MiKTeX.
    – egreg
    Sep 11, 2018 at 16:08
  • Can you check that on your machine for me? (tex --help) Sep 11, 2018 at 16:14
  • Done and it's not there; I also checked the strings in the binary, no occurrence of stat. On the other hand, on Unix systems there is time: time pdflatex test will show the information.
    – egreg
    Sep 11, 2018 at 17:12
  • Hmm, so it may be indeed a MikTeX specific command. Alright fair enough. ;) Sep 13, 2018 at 0:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .