3 Answers
Most likely you tried \input{texstudio_hy2940}
and that file does not exist and you are running in \batchmode
so TeX can not stop and ask for a different file name.
Look in the log file for the full error message.
The TeXBook says:
Sometimes an error is so bad that TeX is forced to quit prematurely. For example, if you are running in
\batchmode
or\nonstopmode
, TeX makes an "emergency stop" if it needs input from the terminal; this happens when a necessary file cannot be opened, or when no\end
command was found in the input document.
As mentioned by @geordie in the comment, a common cause is no \end{document}
. So, scroll down and check that on your document.
_
Note:
I came here because of that, but did not read the comment. Just realize the answer that I'm looking is in the comment after I find the culprit from git diff
. That is way I post this answer to help others like me.
Well, like others pointed, it can be caused due to myriad of reasons. Going to Log > Log file (it was in Log > Issues in above screenshot) is the way to get more hints about it.
One possible reason can also be that if some used package (say minted) which uses shell commands, and you have set the ComSpec
environment variable to something other than cmd
(like bash
). Then that package won't work and emergencies in batch mode abound.
\input
a file that doesn't exist then normally tex prompts for a different file namebut in batch mode it never interactively prompts so does an "emergency stop" The log file will show the error (you only see a summary in that screenshot). unrelated but the following bad box warning is almost certainly\\
misused at the end of a paragarph,