TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the following, why is the exclamation mark (!) repeated in the error message?

  \errmessage{^^J! package Error: #1^^J}%
\error{Stop now.}{Hi, don't go on.}

! package Error: Stop now.
share|improve this question
Formatting error messages is tricky. See the steps in latex.ltx or similar (but with word-wrapping and other goodies) in l3msg. – Joseph Wright Oct 3 '12 at 7:13
up vote 4 down vote accepted

The first exclamation mark is provided by \errmessage itself:

    \errhelp{[ERRHELP: #2]}%
    \errmessage{[ERRMESSAGE: #1]}
\error{Stop now.}{Hi, don't go on.}

The .log file:

This is TeX, Version 3.1415926 (TeX Live 2011)
! [ERRMESSAGE: Stop now.].
\error ...HELP: #2]}\errmessage {[ERRMESSAGE: #1]}
l.7 \error{Stop now.}{Hi, don't go on.}

? h
[ERRHELP: Hi, don't go on.]
? x
No pages of output.
Transcript written on test.log.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.