Skip to content

Instantly share code, notes, and snippets.

@fdovila
Created October 11, 2019 21:33
Show Gist options
  • Save fdovila/7c84ed84375b9e7ca7f2eb007ce2fbae to your computer and use it in GitHub Desktop.
Save fdovila/7c84ed84375b9e7ca7f2eb007ce2fbae to your computer and use it in GitHub Desktop.
%By user https://tex.stackexchange.com/users/27866/mlc at https://tex.stackexchange.com/questions/9796/how-to-add-todo-notes
\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}
\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]
\newpage
\listoftodos[Notes]
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment