Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use Plain TeX and Eplain. In my document I'm using both the color and url packages inside the \beginpackages..\endpackages block. Just now I tried adding \input tikz.tex (as the TikZ manual states) to the document and got the error:

Package pgfbase: Error! Unsupported color model `'. Sorry.

over and over. The document's colors were all wrong (indeed, they were gone) and the document looked terrible.

I figured that the color package somehow conflicted so I removed that and disabled the hyperlinks I was using which automatically introduce color.

Is there any way to get the color package with Eplain and TikZ to play nicely together? I'd rather not disable hyperlinks.

Edited to add:

Here's a sample input file, as requested.

\input eplain
\beginpackages
  \usepackage{url}
  \usepackage{color}
\endpackages
\enablehyperlinks
\hlopts{}

\input tikz


\definexref{anchor}{display}{type} Hi there. This refers to the \ref{anchor}.

\bye

This file will produce the warning above and also produce odd-looking PDF output. Without the \input tikz it should look normal.

share|improve this question
1  
It's hard to tell without at least a small example of code. –  egreg Jan 31 '12 at 17:27
    
@egreg, added one. –  EfForEffort Jan 31 '12 at 20:49

1 Answer 1

up vote 3 down vote accepted

Set the colors after loading tikz; moreover use the following pattern:

\input eplain
\beginpackages
  \usepackage{url}
  \usepackage{color}
\endpackages

\input tikz

\enablehyperlinks
\definecolor{urlcolor}{rgb}{.2,.4,.6}
\hlopts{colormodel=,color=urlcolor}

\definexref{anchor}{display}{type} Hi there. This refers to the \ref{anchor}.

\bye

Using

\hlopts{colormodel=rgb,color={.2,.4,.6}}

(that according to the docs should work) breaks tikz. Remember that tikz supports only the rgb and gray color models.

share|improve this answer
    
Thanks, @egreg, this works great! How could I have figured out the solution to this problem? I don't know much about colors; maybe I should start there. –  EfForEffort Feb 1 '12 at 1:38
    
@D.Bueno I just tried to figure out what was happening and the usual strategy of moving things around. –  egreg Feb 1 '12 at 9:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.