Example: Todo notes

Published 2007-09-14 | Author: Henrik Skov Midtiby

A clever and elegant way of placing todo notes in your document. The notes are shown in the margin and overlays are used to show where the notes were inserted. You can also create a list of todo notes with hyperlinks.

Update 2008-10-22

The todonotes packge is now available on CTAN. Check out the documentation for an overview of all the features.

Author:Henrik Skov Midtiby
Source:Midtiby notes

Download as: [PDF] [TEX]  •  [Open in writeLaTeX]

Todo notes

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de.

% Todo notes
% Author: Henrik Skov Midtiby
% Source: http://midtiby.blogspot.com/2007/09/todo-notes-in-latex.html
%         http://midtiby.blogspot.com/2008/05/updated-todonotes-package.html
%         http://midtiby.blogspot.com/2008/07/todonotes-version-2008-07-28.html  
% PDFTeX required. Remember to compile the document twice.
% Uses the remember picture feature

\documentclass[a4paper]{article}

\usepackage[colorlinks]{hyperref}
\usepackage[colorinlistoftodos]{todonotes}
\begin{document}

\listoftodos

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla
\todo{Plain todonotes.}%
urna. Maecenas interdum nunc in augue. Mauris quis massa in ante
tincidunt mollis. Proin imperdiet. Donec porttitor pede id est. Sed
in ante. Integer id arcu. Nam lectus nisl, posuere sit amet,
imperdiet ut, tristique ac, lorem. In erat. In commodo enim.
\todo[color=blue!40]{Todonote with a different color.}%
Phasellus libero ipsum, tempor a, pharetra consequat, pellentesque
sit amet, sem. Praesent ut augue luctus elit adipiscing ultricies.
Vestibulum suscipit cursus leo. Nullam molestie justo.

Morbi dui. Morbi convallis mi sed sem. Nulla convallis lacus vitae
risus. Phasellus adipiscing. Nullam tortor. Sed laoreet aliquam
ante. Vestibulum diam. Pellentesque nec leo. Pellentesque velit.
\todo[nolist]{Todonote that is only shown in the margin and not in
the list of todos.}%
Praesent congue mi eu ipsum cursus fringilla. Etiam leo erat,
tristique et, pharetra eget, mollis vitae, velit. In hac habitasse
\todo[size=\small, color=green!40]{A note with a small fontsize.}%
platea dictumst. In quam nibh, facilisis et, laoreet non, facilisis
tempus, justo. Class aptent taciti sociosqu ad litora torquent per
conubia nostra, per inceptos himenaeos.

\todo[inline]{testing testing}

Donec nulla lectus, faucibus sit amet, auctor non, consectetuer
quis, pede. Nullam dictum. Nullam suscipit, ligula in scelerisque
\todo[noline]{A note with no line back to the text.}%
posuere, sapien purus rutrum magna, vitae pharetra leo quam vel
tortor. Donec eleifend condimentum sapien. Etiam sed orci. Aliquam
\todo[inline, color=red!50]{Inline todonotes.}%
tempor. Pellentesque egestas tortor id eros. Donec mauris justo,
commodo id, pellentesque id, eleifend non, mi. Duis venenatis
sagittis metus. Donec tempus metus id lacus. Praesent vel diam.
Morbi nec ante. Vestibulum varius felis ac lacus. Nulla vitae neque
\todo[inline, color=green!40]{A note with no line back to the text.}%
in nibh bibendum volutpat. Quisque accumsan diam. Aenean ultricies
nisl ac lacus. Aliquam posuere. Aenean venenatis tortor in felis.

\end{document}

Comments

  • #1 Jeroen, February 23, 2012 at 3:09 p.m.

    how is this example related to tikz? the todonotes packages doesn't realy on tikz does it?

    Jeroen

  • #2 Stefan Kottwitz, February 26, 2012 at 10:36 a.m.

    Hi Jeroen,

    the todonotes package is implemented using TikZ. Here we can see that it hides TikZ somehow from the user, acting as a front end, but TikZ is required and TikZ features can be used in addition.

    Stefan

  • #3 Tabea, September 10, 2013 at 11:22 a.m.

    When I used the ToDo Notes package, a list of figures and TikZ in the same document, I got the error message

    " ! pdfTeX error (ext1): \pdfendlink cannot be used in vertical mode. \close@pdflink ->\Hy@endcolorlink \pdfendlink

    l.13 ...r caption}\relax }}{24}{figure.caption.26}

    ! ==> Fatal error occurred, no output PDF file produced! "

    An easy way to solve this, is to delete the list of figures (.lof) files.

    This way, pdflatex compiles again :)

Adding comments is currently not enabled.