When writing documents, I like to 'mark up' draft/partial text (e.g., short summaries of what will go in a section) so that I can clearly see what needs to be adjusted. I know that things like the todonotes package exist (see this question, for example), but I want something that can span arbitrary parts of the document (e.g., multiple paragraphs or even sections with whatever text is in there).
I have been using the color package's \color 'switch' to do this (with an alternate \textcolor based command for short inline bits of text), with commands like this:
\usepackage[usenames,dvips]{color}
\newcommand{\todo}[1]{\textcolor{Purple}{#1}}
\newcommand{\startToDo}{\color{Purple}}
\newcommand{\stopToDo}{\color{Black}}
However, this has problems in various situations (such as footnotes, URLs, tables), some dependent on the particular other packages used. (See this question and this one.)
Does anyone have any ideas on a robust alternative I could use? I would prefer not to use marginal lines (as used to indicate changes) so that it is clear exactly which bits of text, figures, etc. are included. Differently-coloured text was the obvious choice for me.
EDIT: Since my current \color method does work very nicely as a 'start/end' switch across arbitrary LaTeX constructs (except for the special cases mentioned above), I would only change to something that continues to give me that, but is more robust (especially since this is used to 'highlight' text that I need to adjust/rewrite, and is thus only used when working towards a 'proper' first draft; i.e., convenience of use outweighs absolute correctness since this won't normally be in any public-facing versions of the document).
There's a chance that my outstanding question will get an answer that 'fixes' my explicit \color usage (though I imagine with lots of very arcane low-level TeX) but obviously a pre-existing package or simple LaTeX that achieves the same or similar effect would be better.
Best Answer
Here I use the
stackengine
package to develop the macros\markabove
and\markbelow
that uses text lapping to achieve an edit, without affecting the layout of the original document, if you are careful with your%
signs. It works in footnotes, too, as shown.EDITED to allow a TODO like functionality, when your comments are too long to stick directly into the text.