Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

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.

share|improve this question

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Have a look around the todonotes package.… 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: – krlmlr Dec 9 '13 at 12:51

3 Answers 3

up vote 43 down vote accepted

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):





\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.


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:

\pretocmd{\@todo}{\GenericWarning{}{There's sometthing to do here}}{}{}
share|improve this answer
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.

For more info about generating warnings: Is there any way to generate custom errors/warnings in LaTeX?

share|improve this answer

The fixme package does automatically generate entries in the log file. I personally like and use that very much. You can specify which author (if more than one) does the note, you can specify what kind of note you want to put (note/warning/error/fatal, fatal does interrupt compiling, if not in draft mode), and in the end, you get a nice summary in the log file/output like

FiXme Summary: Number of notes: 14, (FiXme) Number of warnings: 29, (FiXme) Number of errors: 0, (FiXme) Number of fatal errors: 0, (FiXme) Total: 43.

You can also generate a summary of the notes (in draft mode) which links nicely with hyperref back to the text.

share|improve this answer

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