0

When I use the following code to draw an RDF graph:

\begin{tikzpicture}[node distance=2.75cm,>=stealth']
\node[vertex style=Turquoise] (Rk) {Righteous Kill};

\node[vertex style=BurntOrange, above of=Rk,xshift=2em] (BD) {Bryan Dennehy}
 edge [<-,cyan!60!blue] node[text style,above]{starring} (Rk);
\end{tikzpicture}

I get the following error:

Package pgf Error: Unknown arrow tip kind 'stealth''.

See the pgf package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.150 ...picture}[node distance=2.75cm,>=stealth']

How can I solve it please

3
2

I believe to have googled the relevant styles. As Torbjørn T. suggests, you should either load the arrows library or better the arrows.meta library, in which case you also need to update the arrow head.

\documentclass[dvipsnames,png,border=3.14mm,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows.meta} %<added arrows.meta
% for the original stealth' you'd have to load arrows instead
% https://tex.stackexchange.com/a/107028/121799
\tikzset{vertex style/.style={
    draw=#1,
    thick,
    fill=#1!70,
    text=white,
    ellipse,
    minimum width=2cm,
    minimum height=0.75cm,
    font=\small,
    outer sep=3pt,
  },
  text style/.style={
    sloped,
    text=black,
    font=\footnotesize,
    above
  }
}
\begin{document}
\begin{tikzpicture}[node distance=2.75cm,>={Stealth[]}]
\node[vertex style=Turquoise] (Rk) {Righteous Kill};
\node[vertex style=BurntOrange, above of=Rk,xshift=2em] (BD) {Bryan Dennehy}
 edge [<-,cyan!60!blue] node[text style,above]{starring} (Rk);
\end{tikzpicture}
\end{document}

enter image description here

I will be happy to remove this answer, I just posted it as an alternative to sab hoque's answer, which, at time of writing this, does not provide a compilable code.

1

You have to use a upper case S so like this (not fully sure if that will solve the problem):

\begin{tikzpicture}[node distance=2.75cm,>=Stealth]
\node[vertex style=Turquoise] (Rk) {Righteous Kill};

\node[vertex style=BurntOrange, above of=Rk,xshift=2em] (BD) {Bryan Dennehy}
 edge [<-,cyan!60!blue] node[text style,above]{starring} (Rk);
\end{tikzpicture}
3
  • without knowing, what op have in document preamble, this is only guessing/speculations. we need to wait on her/his response. – Zarko Jul 18 '18 at 0:59
  • @sab hoque, you should delete even the ' – user2869180 Jul 18 '18 at 2:35
  • 1
    The stealth' arrow tip (note ' at the end) is from the old arrows library. This is what bib used. The Stealth arrow tip is from the newer arrows.meta library. To use the first you need \usetikzlibrary{arrows} in the preamble, as cfr mentioned above. To use the second you need \usetikzlibrary{arrows.meta}, you should probably update your answer to include that, your code will not work without it. – Torbjørn T. Jul 18 '18 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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