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 am trying to draw some pictures using TikZ within LaTeX. I have started by using simple examples, but I am having trouble getting colors to show. For example, I use the following commands, but only get black and white output for the items created with TikZ. As suggested, I am supplying a full, compilable document that generates the behavior:

\documentclass{article}

\usepackage{color}
\usepackage{xcolor}

\usepackage{tikz}
\usetikzlibrary{calc,through}

\begin{document}

\begin{tikzpicture}[scale=1.2] 
\draw [gray] (0,1) -- (2,1);
\draw [red] (0, 0.5) -- (2,0.5);
\draw [blue] (0,0) -- (2,0);
\end{tikzpicture}

\textcolor{red}{this shows in red correctly}

\end{document}

I am using scientific workplace to create my document. I have used the tikz package, as well as the color and xcolor packages. Any thoughts as to why there is no color. I know the system is generally capable of creating color, as the second \textcolor statement comes out in red.

share|improve this question
3  
It would be great if you could turn your code into a full, compilable, minimal document that reproduces the described behaviour. You might be loading some packages that interfere with the colour. –  Jake Sep 25 '11 at 3:34
1  
This compiles fine (with color) for me. What compiler do you use (pdflatex?), and what viewer (Acrobat)? –  Jake Sep 25 '11 at 4:55
1  
By the way, tikz loads xcolor, so you don't need to load this explicitly yourself. –  Jake Sep 25 '11 at 4:56
3  
@stanford202: Interesting! You should post that as an answer and mark it as accepted, so other people stumbling across the same problem can find the answer more easily. It's also worth pointing out that this reliance on old TikZ/PGF versions is quite a serious drawback: The new version (2.1) includes many quite important features (such as left or right aligning text in nodes), and the recommendation to update to a current version is a very frequent one on this site. –  Jake Sep 26 '11 at 23:30
3  
I presume that you mean (in the update) "Scientific Workplace does not work with newer versions of pgf". As Jake said, it would be good to post that as an answer rather than an update to the question. –  Loop Space Sep 27 '11 at 6:50
show 5 more comments

1 Answer

up vote 1 down vote accepted

In case anyone else has this problem, Scientific Workplace does not work with newer versions of pgf. So, you need to have an older version of pgf installed, e.g. v1.18, in order to use tikz.

See more here: http://forum.mackichan.com/node/565#comment-1200


(The above was added to the original answer by the original questioner. I've taken the liberty of posting this as an answer (CW) as part of "house keeping".)

share|improve this answer
    
Just wanted to also mention that Scientific Workplace can be made to work with newer versions of pgf, but you must change the latex formatter from True Tex to something like MikTex. –  profj Jul 9 '12 at 18:57
add comment

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.