pdfcomment
TODOs und Review-Kommentare als PDF-Anmerkungen und hervorgehobener Text (\textcomment, \sidecomment, \change).
- Example
- Preamble
\textmarker{Markierter Text.}
\textcomment{Markierter Text.}{Kommentar dazu.}
\modified{Manuelle Markierung für Text, der seit der letzten Version geändert wurde.}
Das ist ein Text.
\change{FL1: Text angepasst}{Geänderter Text}.
Hier nur ein Kommentar\sidecomment{Kommentar}.
\todo{Hier muss noch kräftig Text produziert werden}
% TODO (and comment) configuration
%
% - \todo (from todo, easy-todo, todonotes) / \TODO (from fixmetodonotes) - for "normal" TODOs
% - \todofix - "important" TODOs
%
% - \textcomment - highlights text and has a hover comment
% - \sidecomment - just puts a comment to the side. Note: \comment MUST NOT be used as command name, it is already defined by much packages (mathdesign, mindflow, verbatim, and others)
%
% - \missingfigure
%
% - \textmarker
% - \modified
% - \change - adresses a review comment
% Enable nice comments
\usepackage{pdfcomment}
\newcommand{\textcomment}[2]{\colorbox{yellow!60}{#1}\pdfcomment[color={0.234 0.867 0.211},hoffset=-6pt,voffset=10pt,opacity=0.5]{#2}}
% Small PDF comment
% 1st parameter: comment
\newcommand{\sidecomment}[1]{\pdfcomment[color={0.045 0.278 0.643},voffset=4pt,icon=Note]{#1}}
% Disabled variant - for the final PDF
%\newcommand{\sidecomment}[1]{}
\newcommand{\todo}[1]{TODO!\sidecomment{#1}}
% Changes
%
% 1st parameter: review comment
% 2nd parameter: new text
\newcommand{\change}[2]{{\color{red}#2}\pdfcomment[color={0.234 0.867 0.211},voffset=8pt,opacity=0.5]{#1}}
% Disabled variant - for the final PDF
%\newcommand{\change}[2]{#2}
% Define default commands
\makeatletter
\@ifundefined{missingfigure}{\newcommand{\missingfigure}{... missing figure ...}}{}
\@ifundefined{textcomment}{\newcommand{\textcomment}[2]{#1 \todo{#2}}}{}
\@ifundefined{sidecomment}{\newcommand{\sidecomment}[1]{\marginpar{#1}}}{}
\@ifundefined{todo}{\newcommand{\todo}[1]{\sidecomment{#1}}}{}
\@ifundefined{TODO}{\newcommand{\TODO}[1]{\todo{#1}}}{}
\@ifundefined{todofix}{\newcommand{\todofix}[1]{\todo{#1}}}{}
\@ifundefined{change}{\newcommand{\change}[2]{#1 $\rightarrow$ #2}}{}
\makeatother
% Textmarker (Textfarbe rot)
\newcommand{\textmarker}[1]{{\color{red} #1}\xspace}
% Modified (Text blau)
\newcommand{\modified}[1]{{\color{blue!60!black} #1}\xspace}