1

Is it possible to have todos appear as footnotes instead of as the usual boxes in the margin?

It would also be nice to have a possibility of an own footnote counter for the todos, e.g., roman numbers or Latin letters.

  • 2
    Welcome to TeX.SX! You may have a look on our starter guide. This is just a comment, but are you sure that's what you want? Todo notes are supposed to be as discreet as possible, but extraneous footnotes would alter the flow of your "normal" text... – jub0bs May 14 '13 at 10:28
  • Thanks for the comment and it is a very valid point about the flow of the rest of the text. However, I also use \listoftodos and surely that alters the flow at least as much (if not used at the end or with appropriate \newpage's). To answer your question, yes, I would like to have the todos appear as footnotes. – Pål GD May 14 '13 at 10:48
1

Here is a solution, however it is not perfect as inline mode is now broken. It should have been expanded with an own keyword todofoot, but this works to my likings.

\documentclass{article}
\usepackage{todonotes}

\makeatletter
\newcounter{todofootnote}
\renewcommand{\@todo}[2][]{%
  \if@todonotes@prependcaptionglobal%
  \@todonotes@prependcaptiontrue%
  \else%
  \@todonotes@prependcaptionfalse%
  \fi%
  \renewcommand{\@todonotes@text}{#2}%
  \renewcommand{\@todonotes@caption}{#2}%
  \setkeys{todonotes}{#1}%
  \if@todonotes@localdisable%
  \else%
  \addtocounter{@todonotes@numberoftodonotes}{1}%
  \if@todonotes@appendtolistoftodos%
  \phantomsection%
  \if@todonotes@captiongiven%
  \else%
  \renewcommand{\@todonotes@caption}{#2}%
  \fi%
  \@todonotes@addElementToListOfTodos%
  \fi%
  % Prepend the short caption given if it is requested
  \if@todonotes@captiongiven%
  \if@todonotes@prependcaption%
  \renewcommand{\@todonotes@text}{\@todonotes@caption: #2}%
  \fi%
  \fi%
  % Place the todonote as indicated by the options (inline or in a
  % marginpar), below is the code for the inline placement.
  % was: \@todonotes@drawMarginNoteWithLine%
  \let\oldthefootnote\thefootnote%
  \renewcommand{\thefootnote}{\roman{footnote}}%
  \footnote[\value{@todonotes@numberoftodonotes}]{TODO: #2}%
  \let\thefootnote\oldthefootnote%
  \fi%    }%
\makeatother

\begin{document}
\listoftodos

\section{Footnotes \& the \texttt{todonotes} package}
Lorem\todo{zeroeth todo} ipsum\footnote{zeroeth footnote} dolor sit
amet\footnote{latin?}, consectetur adipiscing elit.  Nam orci mauris,
auctor quis faucibus eget, fermentum et enim.  Vivamus vitae arcu id
metus auctor ullamcorper id ut nunc.  Donec semper, turpis
convallis\todo{rewrite one} adipiscing lobortis, magna arcu dapibus
metus, quis pharetra arcu risus non arcu.  In eu diam id orci
scelerisque egestas.  Cras ultricies feugiat risus, at hendrerit nulla
gravida sed.  Pellentesque dolor metus, pharetra non porta ut, egestas
eu nulla.  In congue\todo{todo note two} mattis lacinia.  Nullam sed
lectus non tortor rutrum vulputate a in tortor.  Nam ut odio odio, ut
laoreet ligula\footnote{second footnote}.  Aliquam felis odio, ornare
eget sollicitudin et, suscipit vel lacus.  Curabitur quis orci libero,
vel pulvinar odio.  Integer\footnote{3rd note in the foot} aliquam
eleifend ligula, id placerat ante interdum\todo{todo note three} vel.
Sed in nisi tellus.  Suspendisse a diam nec dolor ultrices sagittis
vitae vitae massa.
\end{document}

The code above produces the following output: enter image description here

  • Thank you! I think a line break is needed before the last "}", before \makeatother. – toliveira Sep 20 '18 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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