2

When I am compiling this code using xelatex 2018:

\begin{tikzpicture}[sibling distance=80pt] 
   \node[box] {TeX}
   child {node[box] {Plain\TeX}} child {node[box] {\LaTeX}
   child {node[box] {amsmath}} child {node[box] {graphicx}} child {node[box] {hyperref}}
}; \end{tikzpicture}

Throw this error:

Package pgfkeys Error: I do not know the key '/tikz/box' and I am going to ignore it. Perhaps you misspelled it. ...icture}[sibling distance=80pt] \node[box]

this is my reference:

\usepackage{pgf}
\usepackage{tikz} % Required for drawing custom shapes
\usetikzlibrary{shapes,arrows,automata}

What package missing?

2
  • 1
    Welcome to TeX-SE! Replace box by rectangle.
    – user121799
    May 26 '19 at 4:21
  • It works.@marmot
    – Dolphin
    May 26 '19 at 4:23
5

box is not a predefined style so you may want to define it in your code. One possible definition could be

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{automata}
\begin{document}
\begin{tikzpicture}[sibling distance=80pt,box/.style={rectangle,draw}] 
   \node[box] {TeX}
   child {node[box] {Plain\TeX}} child {node[box] {\LaTeX}
   child {node[box] {amsmath}} child {node[box] {graphicx}} child {node[box] {hyperref}}
}; \end{tikzpicture}
\end{document}

enter image description here

1
  • I will be happy to remove this answer.
    – user121799
    May 26 '19 at 4:25
1

I am also facing error

Extra }, or forgotten \endgroup. }

Kindly guide, what is missing in it. I have copied the code from below URL, and only modify the box items How to draw a figure of taxonomy in tikz or similars

\documentclass[border=10pt]{standalone}
\usepackage[edges]{forest}
\usetikzlibrary{shadows.blur}
\begin{document}
% addaswyd o ateb marmot: https://tex.stackexchange.com/a/436172/
% starting point: https://tex.stackexchange.com/a/341454/121799
\begin{forest}
  forked edges,
  for tree={font=\sffamily, rounded corners, top color=gray!5, bottom color=gray!10, edge+={darkgray, line width=1pt}, draw=darkgray, align=center, anchor=children},
  before packing={where n children=3{calign child=2, calign=child edge}{}},
  before typesetting nodes={where content={}{coordinate}{}},
  where level<=1{line width=2pt}{line width=1pt},
  [SDA, blur shadow
    [Symetric
      [310131432]
    ]
    [Asymetric
     [Homomorphic
        [Fog-Based
            [PHE
                [61 79 80]
            ]
        ]
        [Non-Fog-Based
            [PHE
                [Paillier
                    [6,11,23,30,31,34,37,39,40,44,53,54,56,69,70,72,73,74,75,76]
                ]
                [Elgamal
                    [4,5,38,71]
                ]
            ]
            [SWHE
                [7,84]
            ]
            [FHE Schemes
                [57,58,71]
            ]       
        ]
     
     ]
     [Non Homomorphic
        [No-Fog-Based
            [SMPC
                    [678283]
            ]   
            [Others
                [89212645]
            ]
        ]   
        [Fog-Based
            [62]
        ]
     ]
    ]
  ]
\end{forest}
\end{document}

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.