# problems with ellipse TikZ

I'm working on a mac, I use the package TikZ and it works. But I have problems when I want use ellipse or diamond ex :

\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[ellipse] {Ellipse};
\end{tikzpicture}
\end{document}


If somebody could help me thank you !

• Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – Claudio Fiandrino Sep 12 '14 at 14:58

## 2 Answers

You have to use \usetikzlibrary{shapes.geometric} as the shape ellipse is defined by it.

\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
\node[ellipse,draw] {Ellipse};       %% draw just to show the shape

\node[diamond,draw] at (0,-3) {Diamond};
\end{tikzpicture}
\end{document}


Just for fun as usual.

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-node}

\begin{document}
\begin{pspicture}(8,8)
\rput(2,6){\ovalnode{A}{PSTricks}}
\rput(6,2){\dianode{B}{TikZ}}
\ncline{<-}{A}{B}\nbput[nrot=:U]{inheritance direction}
\end{pspicture}
\end{document}