有可能吗待办事项作为脚注出现,而不是像通常的边距框一样出现?
如果能够为待办事项设置自己的脚注计数器(例如罗马数字或拉丁字母),那就太好了。
答案1
这是一个解决方案,但它并不完美,因为内联模式现在已损坏。它应该用 own 关键字进行扩展todofoot
,但这符合我的喜好。
\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}
上述代码产生以下输出: