28

Is there a command that generates the error or warning of my choice? I'm planning to put it in an \ifthenelse, so it can't be a syntax error.

30

There are commands \GenericInfo, \GenericWarning and \GenericError. For class and package writers there are also \Class… and \Package… equivalents, described in the clsguide.

An example:

\documentclass{minimal}

\GenericWarning{}{A simple warning}

\GenericError{(cont.)\space\space}
  {This is a\MessageBreak
    multi-line error\MessageBreak
    message}
  {Describe here where to go for more information}
  {This is the error help (type H to see me)}

\begin{document}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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