# How to add To do notes in Table

Im using todonotes package and run in to a problem with it, when in a Table. I get a Float(s) lost error. How can i use todonotes package in a tablecell?

MWE:

    \documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{ifthen}
\usepackage{xkeyval}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{calc}
\usepackage[
german,
textsize=tiny
]{todonotes}
\usepackage{showframe}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
some more text
and \todo[fancyline]{PSP Nr.} some more
\lipsum[2]
\begin{table}[htp]
\caption{default}
\begin{center}
\begin{tabular}{p{4cm}p{7cm}}
narrow text in table & some more narrow text in table\\
narrow text in table1 & some more %\todo[fancyline]{PSP Nr.} % <-- include this
narrow text in table1\\
\end{tabular}
\end{center}
\label{default}
\end{table}%
\end{document}


The basic problem is that you try to place a float inside of a float. You could use the workaround for footnotes (which are also floats) presented in the todonotes-documentation, loading the marginnotes-package and replace \marginpar with \marginnote:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{ifthen}
\usepackage{xkeyval}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{calc}
\usepackage[
german,
textsize=tiny
]{todonotes}
\usepackage{showframe}
\usepackage{lipsum}

%important part starts here
\usepackage{marginnote}
\renewcommand{\marginpar}{\marginnote}

\begin{document}
\lipsum[1]
some more text
and \todo[fancyline]{PSP Nr.} some more
\lipsum[2]
\begin{table}[htp]
\caption{default}
\begin{center}
\begin{tabular}{p{4cm}p{7cm}}
narrow text in table & some more narrow text in table\\
narrow text in table1 & some more\todo[fancyline]{PSP Nr.} % <-- include this
narrow text in table1\\
\end{tabular}
\end{center}
\label{default}
\end{table}%
\end{document}


• You did my day at a level I can't imagine....This issue have been frustrating me for 3 years. Thanks Apr 8 at 15:10