Document ClassesHow to output warnings

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
Berticus
Posts: 8
Joined: Wed Dec 31, 2008 11:37 pm

How to output warnings

Post by Berticus »

The \ClassWarningNoLines and \ClassWarning commands only work when you use the \ProcessOptions command. How do I issue warnings after that?

Code: Select all

\ProcessOptions\relax

\ifthenelse{\boolean{someboolean}}{dosomething}{\ClassWarningNoLines{myclass}{Cannot use this command at this point}}
I get an undefined control sequence error. I also tried this:

Code: Select all

\ProcessOptions\relax

\ifthenelse{\boolean{someboolean}}{dosomething}{\@warning{Cannot use this command at this point}}
But when I do something that should create that warning, it isn't done.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: How to output warnings

Post by phi »

The command is called \ClassWarningNoLine, without 's' at the end. \ClassWarning and \ClassWarningNoLine should work everywhere, independent of \ProcessOptions.
Post Reply