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 just tried coping & pasting code from How to draw Venn diagrams (especially: complements) in LaTeX

and I get errors ... I suppose I need to install/configure Lyx to use PGF/Tikz?

share|improve this question
You need to add \usepackage{tikz} to your preamble (I think you can do this by selecting LaTeX preamble from the Layout menu). – Jake Aug 28 '11 at 12:42
I think you should change the Editor. I think in cases like this LyX reaches his capability – Marco Daniel Aug 28 '11 at 13:25
@Jake, I added \usepackage{tikz} under Document > Settings > LaTeX preamble I still got the same error. – Jiew Meng Aug 28 '11 at 13:46
@Marco, what editors do you recommend? – Jiew Meng Aug 28 '11 at 13:46
@Jake, thanks you got me on the right track! I needed \usepackage{pgfplots} too – Jiew Meng Aug 28 '11 at 13:49
up vote 5 down vote accepted

You need to add \usepackage{pgfplots} to your preamble. In LyX, you can edit the preamble under Document | Settings | LaTeX Preamble.

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.