I have a set of commands in my document's preamble that look like this:
\newcommand{\nathaniel}[1]{\textcolor{blue}{[#1]}}
\newcommand{\anotherAuthor}[1]{\textcolor{darkgreen}{[#1]}}
They are to allow my coauthors and I to make comments in the document that will appear in the pdf, to facilitate working on it. However, we find we quite often want to put several paragraphs inside such a comment (e.g. if we've written some new material that we're not sure about, and we want the other authors to notice it). If I try to do this:
\nathaniel{
one
two
}
then I get this error:
paragraph ended before \@textcolor was complete
I know I can use \\ to get a linebreak instead, but I'd prefer it if my custom command would just accept normal paragraph breaks. Is there some command that will cause LaTeX to accept multiple paragraphs as if they were a single one, or some other way to colour multiple paragraphs of text?



\leavevmodehere? (And why is it within the braces?) https://tex.stackexchange.com/a/22853/ says that\leavevmodeis to avoid paragraph-break problems, but when I omit\leavevmodeI don't see paragraph-break problems. – root Jan 06 '19 at 20:08\colorbetween paragraphs, so this implementation adds\leavevmodein order to start the paragraph before setting the color. Inside or outside the braces is immaterial. – egreg Jan 06 '19 at 20:19\nathanielcomes after a blank line. If issued between paragraphs,\colorinserts an object that can affect pagination. – egreg Jan 06 '19 at 20:27