TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently discovered that I could use tikz in my plain tex documents using \input tikz. I'm happy with it and began to experiment the drawing of some pictures. But, when trying to compile some documents, I discovered that all the \colorbox were now fill with black. The following example gives a black rectangle instead of a gray one with "some text" written in it :

\input eplain


\input tikz

\colorbox{gray}{some text}


Is this a known problem ? Is there a way to get back \colorbox working properly with tikz ?

share|improve this question
Welcome to TeX.SE. – Peter Grill Oct 26 '12 at 4:41
I guess the answer here might help you:tex.stackexchange.com/questions/42958/… – Mafra Oct 26 '12 at 13:13
Thanks for your help. I saw this answer befor posting my own question. I don't use the url package and all colors I use are rgb or gray. In fact, tikz does work correctly, but it breaks the \colorbox that become all black. – Raphaël Oct 26 '12 at 18:25
I'm not answering your question again, but if you just want to have the colored text you can use just tikz and forget about loading color.tex. With tikz only you use: \color{gray}{some text} – Mafra Oct 27 '12 at 13:56
Of course I understand that I can replace \colorbox with tikz pictures, but I don't know how to do for now. As I'm a complete novice in tikz I which I could stick with my old macros for a while and then introduce tikz as soon as I can do it. – Raphaël Oct 28 '12 at 7:32

I found a way to avoid the conflict, so that you can keep using the color package (since you didn't like my suggestion of using only tikz and using \color{}{} instead of \colorbox{}{})

Simply load it with the "xdvi" option like this: \usepackage[xdvi]{color}

I'm not sure why using the xdvi option "fixes" the problem. I stopped investigating the theoretical reasons after discovering this workaround :-)

\input eplain


\input tikz

\colorbox{gray}{some text}

% if not loading color package and using only tikz use this
%\color{gray}{some text}

share|improve this answer

Your Answer


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.