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.

In my document I am leaving %TODO comments in order to get back at them at some time. How can I generate a list of them with their relevant information in Kile 2.0?

share|improve this question

4 Answers 4

up vote 8 down vote accepted

To precise Andrey's answer:

The todonotes package allows to use \todo commands to leave TODO notes in your documents. They are then displayed in the margin in draft mode, and removed in final mode. You can also generate a dynamic list of TODO notes with \listoftodos.

share|improve this answer
    
an alternative would be the fixme package –  matth Jun 15 '12 at 9:13

Perhaps you should start leaving \todos instead!

share|improve this answer

Actually, Kile directly supports both a %TODO comment and a %FIXME comment. There may be others, but none of them seem to be documented anymore.

Enter one of these and you will notice the syntax highlighting. To see all such comments in your TeX file or project look under the Structure tab in the side panel. You should see a tree of Sections, Figures, etc. with your todos and fixes at the top.

share|improve this answer
    
Excellent. This still works and should be more documented. –  dorien Nov 23 at 21:26

A more low-level solution would be to use some grep magic. If your %TODO notes are all only one line long, then this would be as simple as running the following in your terminal:

grep -n '%TODO' file.tex

This would print out a list of the lines in file.tex including the pattern %TODO. The -n switch prints line numbers, making it easy to find the relevant lines.

If you have some multi-line %TODOs, then you can use the -A 5 switch to print 5 lines after each instance of %TODO:

grep -n -A 5 '%TODO' file.tex

Indeed, with a multi-file project, you can search for all %TODOs across multiple files by replacing file.tex with *.tex or some other suitable wildcard.

Oh, here's something cool you could do, you could write the %TODO list to a file, and then verbatiminput the file into your tex document.

grep -n '%TODO' file.tex > todo.tex

And then add:

\verbatiminput{todo.tex}

To the end of your main file. This requires the verbatim package. Presumably listings has its own way of doing this.

You could even strip out the %TODO part of each line of todo.tex and write it as an item into an itemize environment. This is left as an exercise for the reader.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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