实现代码如下:

\documentclass{article}
\usepackage{lipsum}                     % Dummytext
\usepackage{xargs}                      % Use more than one optional parameter in a new commands
\usepackage[pdftex,dvipsnames]{xcolor}  % Coloured text etc.
%
\usepackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes}
\newcommandx{\unsure}[2][1=]{\todo[linecolor=red,backgroundcolor=red!25,bordercolor=red,#1]{#2}}
\newcommandx{\change}[2][1=]{\todo[linecolor=blue,backgroundcolor=blue!25,bordercolor=blue,#1]{#2}}
\newcommandx{\info}[2][1=]{\todo[linecolor=OliveGreen,backgroundcolor=OliveGreen!25,bordercolor=OliveGreen,#1]{#2}}
\newcommandx{\improvement}[2][1=]{\todo[linecolor=Plum,backgroundcolor=Plum!25,bordercolor=Plum,#1]{#2}}
\newcommandx{\thiswillnotshow}[2][1=]{\todo[disable,#1]{#2}}
%
\begin{document}
\pagestyle{empty}
\listoftodos[Notes]
\todo[inline]{The original todo note withouth changed colours.\newline Here's another line.}
\lipsum[11]\unsure{Is this correct?}\unsure{I'm unsure about also!}
\lipsum[11]\change{Change this!}
\lipsum[11]\info{This can help me in chapter seven!}
\lipsum[11]\improvement{This really needs to be improved!\newline\newline What was I thinking?!}
\lipsum[11]
\thiswillnotshow{This is hidden since option `disable' is chosen!}
\improvement[inline]{The following section needs to be rewritten!}
\lipsum[11]

\end{document}

方案二,可以使用cooltooltips 来实现,代码如下:

\documentclass{article}

\usepackage{cooltooltips}
\usepackage{graphicx}
\usepackage{color}
\usepackage{hyperref}

\def\cool{\texttt{cool}}
\begin{document}

The \cool\ package enables a document to contain hyperlinks that
pop
up a brief tooltip when the mouse moves over them and also open
a
small window containing additional text. \cool\
works only with
pdf\LaTeX\@. Furthermore, the tooltips that
\cool\ produces are much
less cool when viewed under older versions of
Acrobat~($<7.0$) or the
current version of xpdf~(3.00) because they don't pop up the
extra,
small window.
\cooltooltip[0 0 1]{Example}{This is an example of a cool
tooltip.
Pretty cool, eh?}{http://www.ctan.org/}{Visit CTAN
on the Web}{This text\strut}
%
is an example of a cool tooltip (assuming
you're viewing this document with a sufficiently capable
\textsc{pdf}
reader). Move your mouse pointer over it and
watch what happens.
Then, click on the link. If your \textsc{pdf}
reader is properly
configured it should launch a Web browser and send it to the
\textsc{ctan} home page.

\end{document}

选自:http://tex.stackexchange.com/questions/9796/how-to-add-todo-notes其次,更为全面的功能,比如添加附件,注释样式多样等等可以使用pdfcomment宏包来实现:http://www.ctan.org/tex-archive/macros/latex/contrib/pdfcomment发布时间:2012-02-24 09:25:53 文章类别:宏包使用 原文地址:http://blog.sina.com.cn/s/blog_5e16f1770102ecwl.html

点赞(3)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部