\documentclass[a4paper, 12pt]{report}
\usepackage{graphicx, multirow, rotating, threeparttable, setspace}
%\usepackage[usenames,dvipsnames,pdftex]{color}
\usepackage[color,notref]{showkeys}
\begin{document}
\definecolor{refkey}{blue}{.75}
It would be nice if this worked.
\end{document}
When I run this I get the following error message:
!LaTeX Error: Undefined color model 'blue'.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help
...
I.6 \definecolor{refkey}{blue}{.75}
?
Interestingly enough, if I replace blue with gray in the \definecolor
command (as shown in the showkeys documentation) it works flawlessly.
But if I use any other color I get this error message. I've tried
every permutation of the (now commented out) \usepackage{color}
command but to no avail. I'm using TeXShop 2.14 on a Mac, but have
also tried this on a PC running MikTeX and got the same error message,
so I don't think I have a corrupted system. Any help would be
immensely appreciated.
> I'm trying to use the color option of the showkeys package but am
> running into a problem I cannot get around or find a previously posted
> solution to. Here's the code I've used to isolate the error:
>
> \documentclass[a4paper, 12pt]{report} \usepackage{graphicx, multirow,
> rotating, threeparttable, setspace}
> %\usepackage[usenames,dvipsnames,pdftex]{color}
> \usepackage[color,notref]{showkeys}
> \begin{document}
> \definecolor{refkey}{blue}{.75}
> It would be nice if this worked.
> \end{document}
>
> When I run this I get the following error message:
>
> !LaTeX Error: Undefined color model 'blue'.
>
> See the LaTeX manual or LaTeX Companion for explanation. Type H <return>
> for immediate help
> ...
>
> I.6 \definecolor{refkey}{blue}{.75}
>
> ?
>
> Interestingly enough, if I replace blue with gray in the \definecolor
> command (as shown in the showkeys documentation) it works flawlessly.
Yes, because it's not gray-the-color, but gray-the-color-model, i.e.
"monochrome". (In other words, \definecolor doesn't work the way you think
it does.) Take a look at the xcolor package, which offers ways of mixing
colors together (in this case, blue and either white of black, I'd guess).
HTH
Ulrich
as one would expect, given that "gray" is a colour model (greyscale).
strange to relate, there's no colour model "blue".
look at the documentation of the color package -- \definecolor comes
from that package.
--
Robin Fairbairns, Cambridge
Ulrich and Robin: Thanks immensely for your help. As you might have
already guessed I'm rather new at LaTeX, so when I read color model it
didn't quite register with me what it was talking about. I changed to
the rgb model and got exactly what I was after. I really appreciate
your patience with what in hindsight was such a simple thing.