How does one make just one word in the title a different color?
The \title
under amsart
is set in CAPITAL LETTERS. As such, merely using
\title{\textcolor{red}{The} title}
doesn't work out-of-the-box because there is no colour RED
. However, it's simple enough to define RED
to be the same as red
:
\documentclass{amsart}
\usepackage{xcolor}
\colorlet{RED}{red}
\title{\textcolor{red}{The} title}
\author{An Author}
\begin{document}
\maketitle
\end{document}
With amsart
there is the problem of capitalization, but it is easily solved.
\documentclass{amsart}
\usepackage{xcolor}
\usepackage{textcase}
\DeclareRobustCommand{\foo}[1]{\textcolor{red}{#1}}
\begin{document}
\title[The title]{\foo{The} title}
\author{An Author}
\maketitle
\end{document}
Use a more meaningful name than \foo
, of course. Omit the optional argument if you also want the coloring in the page headings.
See https://tex.stackexchange.com/a/468247/4427 for details about why loading textcase
is better for the application.
The rationale for defining a command is that hardwiring a color means having to chase for every occurrence in the document for it, whereas with a command you can just modify the definition in case you change your mind about what color to use (or no color at all).