[Tex/LaTex] Colourful notes – todo list annotations in tables

notestablestodonotes

I've decided that I'm going to make LaTeX notes for all of my lectures next year (I'm doing computer science at university). I want a way to brighten my notes up – make them more exiting to read when I'm deep into a month of non-stop revision. My plan was to have a colour scheme for extra reading, important, exam information, connections to other topics, revision strategies, etc…

I was thinking of hight-lighting part of the text, but also to have annotations with the todonotes package, so I can differentiate between course content and commentary.

The problem with this is that todonotes annotations doesn't work in tables, the lines from the annotations don't go to the text, and they mess up on some other non-block-text layouts. I suppose its not really designed for them to be left in published work.

Does anyone have a way to annotating that does work in these situations?
Is there a better way I could go about it?
Do you have any tips to produce exciting notes?

EDIT: Here is an example.

\documentclass[11pt]{article}
\usepackage[colorinlistoftodos, textwidth=3.5cm]{todonotes}

\newcommand{\summarynote}[1]{\todo[color=yellow!30,size=\small,bordercolor=yellow]{#1}}

\begin{document}
This text has an annotation that works \summarynote{Which is me}\\
\begin{center}
\begin{tabular}{c|c}
\textbf{Fruit} & \textbf{Calories (kcal)}\\
\hline
Banana & 95.0\\
\hline
Grapes & 61.5\\
\hline
Kiwi & 49.0 %\summarynote{This sidenote does not work}
\end{tabular}
\end{center}
\end{document}

When the second \summarynote is uncommented, it give the error message
LaTeX Error: Not in outer par mode.

Best Answer

A quick fix is to use inline notes:

\documentclass{article}
\usepackage{todonotes}

\begin{document}

\begin{tabular}{|c|c|c|}
\hline 
yadda & yadda & boo \\ 
\hline 
ene & mene & muh \\ 
\hline 
gibberish & \begin{minipage}{3cm}see my note\todo[inline]{Fill those cells!}\end{minipage} & more gibberish \\ 
\hline 
\end{tabular}

\end{document}

You can force the content of the cell you need to attach the note to into a minipage and then use the note with the inline option. This is the only way I can think of right now, which could make 'regular' notes work decently. Changing the column type to p doesn't help.

And here's the result:

enter image description here