Skip to content

Instantly share code, notes, and snippets.

@SHDShim
Last active April 4, 2018 20:42
Show Gist options
  • Save SHDShim/89c350ab92cf1734556698b52ce33752 to your computer and use it in GitHub Desktop.
Save SHDShim/89c350ab92cf1734556698b52ce33752 to your computer and use it in GitHub Desktop.
latex, todo, package

How to setup latex todo package for comments

The todo package provides powerful commenting options for latex writers. I made some setups to fit to my flavor.

I used this setup since early 2018. This makes three different kinds comments: inline comment, urgent comment (inline but with an orange color), and side comment.

(Note) Make sure you include the setspace package.

\usepackage{hyperref}
\usepackage{setspace}
\usepackage[textsize=small, shadow, textwidth=1.5cm, backgroundcolor=yellow]{todonotes}

\makeatletter
\renewcommand{\todo}[2][]{%
    \@todo[caption={#2}, #1]{\begin{spacing}{0.5}#2\end{spacing}}%
} 
\newcommand{\inlinecomment}[1]{\todo[inline]{ #1}\noindent}
\newcommand{\urgentcomment}[1]{\todo[color=red!70, inline]{[URGENT] #1}\noindent}
\newcommand{\sidecomment}[1]{\todo[fancyline]{\scriptsize #1}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment