Showing posts with label warning. Show all posts
Showing posts with label warning. Show all posts

Saturday, February 26, 2011

latex warning output

To make latex print an warning at output one can use:
  • \@latex@warning{My message}prints "file.tex:10: My message on input line 10"
  • \@latex@warning@no@line{My message}prints "file.tex:0: My message"

One can define a \todo command to get warnings about uncompleted sections. The following todo command will print a
TODO...
in the PDF and the warning message passed as a parameter \todo{Finish Thanks section!}

Code for pasting in LaTeX package(.sty file)

\makeatletter
\newcommand{\todo}[1][]{\@latex@warning{TODO #1}\fbox{TODO\dots}}
\makeatother