[Tex/LaTex] Package todo – cut off at page end

todonotes

I am using the todonotes package. However, when the \todos get too long the text goes over the page and cannot be seen. Here is an example of what I tried:

\documentclass{article}

\usepackage{todonotes}

\usepackage{lipsum} %for dummy text

\begin{document}

\todo[inline,caption={}]{
Some notes:
\begin{itemize}
\item \lipsum[1]
\item \lipsum[2]
\item \lipsum[1]
\item \lipsum[2]
\item \lipsum[1]
\item \lipsum[2]
\item \lipsum[1]
\item \lipsum[2]
\end{itemize}
}
\end{document}

Therefore, how can you do a page break in the todonotes package, so that the notes go on on the next page?

I appreciate your answers!

Best Answer

todonotes uses tikz nodes for its contents, and node contents can not be broken across pages.

Hence to put large amount of text with a frame and coloured background, todonotes is not a good choice. Better use tcolorbox. Here is an example as requested.

\documentclass{article}

\usepackage[most]{tcolorbox}

\usepackage{lipsum} %for dummy text

\begin{document}

\begin{tcolorbox}[colback=orange,colframe=black,enhanced jigsaw,
                   arc=3mm,boxsep=4pt,boxrule=0.5pt,breakable]
Some notes:
\begin{itemize}
\item \lipsum[1]
\item \lipsum[2]
\item \lipsum[1]
\item \lipsum[2]
\item \lipsum[1]
\item \lipsum[2]
\item \lipsum[1]
\item \lipsum[2]
\end{itemize}
\end{tcolorbox}
\end{document}

enter image description here