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'm trying to use TikZ to make flow charts in my LaTeX files, but I'm getting an error. Here's the LaTeX I'm using:


Some text
\tikzstyle{decision} = [diamond, draw, fill=blue!20, text width=4.5em, text badly centered, node distance=2.5cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=5em, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, very thick, color=black!50, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=2.5cm, minimum height=2em]

\begin{tikzpicture}[scale = 2, node distance = 2cm, auto]
\node [block] (init) {initialize model};
\node [cloud, left of=init] (expert) {expert};
\node [cloud, right of=init] (system) {system};
\node [block, below of=init] (identify) {identify candidate models};
\node [block, below of=identify] (evaluate) {evaluate candidate models};
\node [block, left of=evaluate, node distance=3cm] (update) {update model};
\node [decision, below of=evaluate] (decide) {is best candidate better?};
\node [block, below of=decide, node distance=3cm] (stop) {stop};


I literally copied-and-pasted this code from an example document, just to use as a test. And here's the error it produces:

Package pgfkeys Error: I do not know the key '/tikz/ellipse' and I am going to ignore it. Perhaps you misspelled it.

Well, I didn't misspell it. I get a similar error message for the diamond as well. How can I fix this?

Thanks a ton!

share|improve this question

closed as too localized by Stefan Kottwitz Jan 31 '13 at 19:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 16 down vote accepted

You should have worked more carefully. You have forgotten to include the tikZ libraries.


It would have been easier to download the source file instead of copy&paste.

share|improve this answer
Although, to be fair, the example does present it's self as being "complete" with \documentaclass, \includepackage, etc. Looks like it needs some updating to reflect the modularization of TikZ. – Sharpie Oct 13 '10 at 16:36
@Sharpie: The original example does have the right \usetikzlibrary command. So this was a cut-and-paste error. – Loop Space Oct 13 '10 at 16:44
Why yes it does. A failure on my part to actually follow the texample link and double check the asker's example. – Sharpie Oct 13 '10 at 18:22
I fell into this with a simple \node[draw,ellipse]. The manual mentions ellipse from p153 on without any note about having to load a library; in fact, it says on p1030, "The package [shapes] is loaded automatically by pgf". Well, apparently it is not. (This is on Tex Live 2014, TikZ/PGF 3.0.0.) – Raphael Apr 27 '15 at 12:19

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