When TeX, in interactive mode, shows the
? prompt after an error, you have a few choices, but you should keep in mind that the first character you type determines the subsequent behavior:
- return means “ignore the error and proceed”
s means “run showing future error messages without stopping except for requesting user input”
r means “run showing future error messages, stopping if user input is required”
q means “run quietly” (without showing anything)
i means “insert something in the input stream”
x means “stop here”
e means “stop here and open the editor on the file at the current line number”
- a digit
In case you type
i, TeX will insert the tokens you type after it until hitting return (which will count as a space); if you immediately hit return, you'll be prompted for the tokens to insert.
In case you type a digit, TeX will determine a
<number> based on its rules from the subsequent characters you type. Hitting return will ignore
<number> tokens from the input stream and TeX will stop again showing the ignored tokens, waiting for further input. Except in cases of
i and of a digit, extra characters will be ignored.
exit is exactly the same as typing
e, which has the behavior you are experiencing.
The correct way for exiting is typing
Note that lowercase or uppercase is irrelevant, so
E have the same effect as
On some implementations, hitting control-
D will trigger the “emergency stop”, basically similar to typing
x. On some implementations, hitting
e is the same as typing
x, but not in TeX Live, which will use the current value of the environment variable
TEXEDIT for opening the file (if set in the environment). The value can be also set in the top level
texmf.cnf file. For instance, my top level
texmf.cnf file is
% (Public domain.)
% This texmf.cnf file should contain only your personal changes from the
% original texmf.cnf (for example, as chosen in the installer).
% That is, if you need to make changes to texmf.cnf, put your custom
% settings in this file, which is .../texlive/YYYY/texmf.cnf, rather than
% the distributed file (which is .../texlive/YYYY/texmf-dist/web2c/texmf.cnf).
% And include *only* your changed values, not a copy of the whole thing!
TEXMFHOME = ~/Library/texmf
TEXMFVAR = ~/Library/texlive/2014/texmf-var
TEXMFCONFIG = ~/Library/texlive/2014/texmf-config
TEXEDIT = nano +%d '%s'
e will open the file in