Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Undefined color model when using showkeys

152 views
Skip to first unread message

xpj...@gmail.com

unread,
Sep 12, 2008, 11:28:17 PM9/12/08
to
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.
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.

Ulrich M. Schwarz

unread,
Sep 13, 2008, 2:59:40 AM9/13/08
to
On Fri, 12 Sep 2008 20:28:17 -0700, xpjrd3 wrote:

> 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

Robin Fairbairns

unread,
Sep 13, 2008, 7:43:42 AM9/13/08
to
In article <920aabe4-2fb9-4c5d...@a8g2000prf.googlegroups.com>,

xpj...@gmail.com writes:
>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'.
>
>Interestingly enough, if I replace blue with gray in the \definecolor
>command (as shown in the showkeys documentation) it works flawlessly.

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

xpj...@gmail.com

unread,
Sep 13, 2008, 12:09:45 PM9/13/08
to
On Sep 13, 5:43 am, r...@cl.cam.ac.uk (Robin Fairbairns) wrote:
> In article <920aabe4-2fb9-4c5d-808a-f2da58a72...@a8g2000prf.googlegroups.com>,

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.

0 new messages