# \newcommand, par and textcolor


\definecolor{cincinnati-red}{RGB}{190,0,0}

\newcommand{\authorA}[1]{\textcolor{cincinnati-red}{[A: #1]}}


in this form:

\authorA{
Hi Guys:

(more stuff)
}


I get the error

Runaway argument?
{[A:  Hi Guys:
! Paragraph ended before \@textcolor was complete.
\par
l.166 }


How do I set up this macro so that the textcolor extends over the entire scope of the argument? (Simply changing \textcolor to \color, as suggested when reading Writing paragraphs in \textcolor, does not work for me. (The color does not show up.)

• Don't use \textcolor. It doesn't accept a paragraph in its argument. Use \color. If if doesn't work for you: Make a complete example that demonstrates the problem. – Ulrike Fischer Aug 15 '16 at 13:53
• Welcome to TeX - LaTeX! \color is the correct command to use. – Andrew Swann Aug 15 '16 at 13:54

The correct command here is \color as \textcolor is not long. The syntax for your command would then be

\newcommand{\authorA}[1]{{\color{cincinnati-red}[A: #1]}}


not that that \color and the text it applies to is enclosed in an extra group of braces, so the color does not affect the text following the command.

\documentclass{article}

\usepackage{xcolor}

\definecolor{cincinnati-red}{RGB}{190,0,0}

\newcommand{\authorA}[1]{{\color{cincinnati-red}[A: #1]}}

\begin{document}

Text before

\authorA{
Hi Guys:

(more stuff)
}

Text after
\end{document}