1

This question already has an answer here:

I have trouble making the Graph Drawing example on page 363 in the TikZ & PGF Manual work.

To this end, I've read the question asked ealier, errors - Layered Graph From TikZ Manual #291718 but have not had any luck using the code suggested by user @JP-Ellis.

I'm getting the same error on my local install (MikTex 2.9 Fully updated, TexStudio 5.6.2) and on Overleaf.com

Here is my code example:

% !TeX program = lualatex
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{graphs}
\usetikzlibrary{graphdrawing}
\usegdlibrary{layered}
\title{Tikz Graph Test}
\begin{document}
\tikz [nodes={text height=.7em,text depth=.2em,draw=black!20,thick,fill=white,font=\footnotesize},>=stealth',rounded corners,semithick] \graph [layered layout,level distance=1cm,sibling sep=0.5em,sibling distance=1cm] {"Femte" -> {"Sjette","Prise"};};
\end{document}
  • Here is the log from TexStudio (pastebin)
  • Here is the log from Overleaf (pastebin)

The main errors seem to be these:

./main.tex:10: Undefined control sequence.
\sa@placebox ->\newpage \global \pdfpagewidth 
                                              =\wd \sa@box \global \pdfpageh...
l.10 ...tance=1cm] {"Femte" -> {"Sjette","Prise"};};

and this

! You can't use a prefix with `the character ='.
<to be read again>
=
l.10 ...tance=1cm] {"Femte" -> {"Sjette","Prise"};};

marked as duplicate by esdd, Stefan Pinnow, TeXnician, user36296, Zarko tikz-pgf Jul 12 '17 at 14:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.