# Is there any way to specify a “TO DO” in LaTeX? [duplicate]

I'm writing my degree thesis in LaTeX and I have some chapters and sections which I didn't write yet.

Is there any way to put a tag to specify that there is a TO DO there so I remember to fill it ? (I mean something similar to @TODO in Java comments)

It would be great if LaTeX compiler raises a warning in the logs if it has found that tag.

-

## marked as duplicate by krlmlr, Peter Jansson, Jubobs, Thorsten, Claudio FiandrinoDec 9 '13 at 12:54

Have a look around the todonotes package. tex.ac.uk/tex-archive/macros/latex/contrib/todonotes/… You add todo entries with \todo{} and you can create a todolist with \listoftodos and you can customize some parameters accordingly to the documentation. –  Ludovic C. Jul 14 '13 at 22:38
This is perhaps obvious and has less to do with LaTeX and more to do with your editor of choice, but vim and gedit (to cite the two editors I use most often, but I'm sure many others as well) can both highlight TeX comments like %TODO: include plot of y vs x here, so that they'll show up quite clearly in your source document, but not in the compiled version. –  Tyler Jul 17 '13 at 0:35
Also related: tex.stackexchange.com/q/97477/8057 –  krlmlr Dec 9 '13 at 12:51

One way to go is to use the todonotes package.

Here is a short example of a really basic use of this package (see the documentation for more advanced options):

\documentclass{article}

\usepackage{todonotes}

\begin{document}

\listoftodos

\section{First section}

Here I need to make some more research before writting\todo{More research are needed}. So I will use a todo note to tag it.

\end{document}


And this is the output (after two compilations of the document):

EDIT As suggested by Gonzalo Medina, to create the warning in the log file, you can use the following code in your preamble:

\usepackage{etoolbox}
\makeatletter
\pretocmd{\@todo}{\GenericWarning{}{There's sometthing to do here}}{}{}
\makeatother

-
To generate the requested warning you can use \usepackage{etoolbox} \makeatletter \pretocmd{\@todo}{\GenericWarning{}{There's sometthing to do here}}{}{} \makeatother –  Gonzalo Medina Jul 14 '13 at 22:59

Apart from todonotes.sty, there are several packages to output todo notes in a document, you can find a list in this question: How to add todo notes?

About the more specific request here, that is emitting a warning, you can use for example:

\newcommand{\todo}[1]{\typeout{[WARNING]Todo: #1}


Of course, you can combine the solutions.