Take the 2-minute tour ×
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
10  
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
1  
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
add comment

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.

3 Answers

up vote 42 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):

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

Output

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
share|improve this answer
8  
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
add comment

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
add comment

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
add comment

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