h1

Pretty colours

18 May, 2010

I use LaTeX a lot for my PhD, and I wanted a way to add notes to my documents for my supervisor to read.

Requirements:

  • include ‘plan’ sections in blue, and ensure it’s easy to produce a document without the plans
  • include ‘citethis’ and ‘question’ reminders in red, and ensure I can find them all before submitting
  • all these things should nest as expected and not make a mess of the subsequent font colour
Don't badger me about badgers.

Output

Definitions:

\usepackage{color}
\usepackage{verbatim}
...
\newcommand{\citethis}{{\color{red}(cite)}}
\newenvironment{plan}{\color{blue}}{}
\newcommand{\question}[1]{{\color{red}{#1}}}

Usage:

\begin{plan} here I will differentiate stoats \citethis
and weasels\end{plan}

Weasels are weasily recognised \question{(has this been
experimentally proven?)}, whereas stoats are stoatally
different.

To produce a document without the plans:

\let\plan=\comment
\let\endplan=\endcomment

To find all the red to-dos, comment out the newcommand definitions and recompile. You’ll get an error for each one you missed. Alternatively, hide them with:

\renewcommand{\question}[1]{}
\renewcommand{\citethis}{}

I hope someone else finds this useful. If you can see any improvements, please let me know πŸ™‚

Advertisements

2 comments

  1. Bad puns for the lose! πŸ˜›


  2. […] I have even started my literature review. It currently consists of several pages of, er, pretty colours. I think this may be an unprecedented level of […]



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: