3

I was trying the following code from the smartdiagram package, but I can't see the same result as in the manual.

My code is

\documentclass[12pt,a4paper]{article}
\usepackage{smartdiagram}
\usesmartdiagramlibrary{additions}

\begin{document}
\begin{minipage}[t][3.5cm]{\textwidth}
\begin{center}
\smartdiagramset{
uniform color list=gray!60!black for 3 items,
back arrow disabled=true,
additions={
additional item offset=0.85cm,
additional item border color=red,
additional connections disabled=false,
additional arrow color=red,
additional arrow tip=stealth,
additional arrow line width=1pt,
additional arrow style=]-latex’,
}
}
\smartdiagramadd[flow diagram:horizontal]{%
PGF,Ti\textit{k}Z,Smartdiagram%
}{%
below of module1/Low Level, below of module3/High level%
}
\end{center}
\end{minipage}
\end{document}
9
  • 1
    A little more detail on what you're seeing would be helpful. If the code compiled, how is the diagram different from what it should be. If the program didn't compile, what error is given in the log file? Does it say "smartdiagram.sty not found"?
    – DJP
    Commented Jun 21, 2014 at 18:34
  • It didn't compile. The error is: ! Missing \endcsname inserted. <to be read again> \pgf@arrows@invert] l.25 }
    – Y_gr
    Commented Jun 21, 2014 at 18:40
  • additional arrow style=]-latex’ should be additional arrow style=]-latex' -- the final character should be an apostrophe. Does it work if you change that? It does here at least. Commented Jun 21, 2014 at 19:33
  • That didn't work for me but when I added the arrows library explicitly, it does.
    – DJP
    Commented Jun 21, 2014 at 19:44
  • Yeah, sorry, was just about to add that. Commented Jun 21, 2014 at 19:45

1 Answer 1

4

From this post here it says (for a different question on a different package): "You need the arrows library (not explicitly mentioning all the libraries needed for the examples is very common in the manual)". So make the change Torbjorn T. mentions and add in the library and everything works for me. Try this code:

\documentclass[12pt,a4paper]{article}
\usepackage{smartdiagram}
\usesmartdiagramlibrary{additions}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{minipage}[t][3.5cm]{\textwidth}
\begin{center}
\smartdiagramset{
uniform color list=gray!60!black for 3 items,
back arrow disabled=true,
additions={
additional item offset=0.85cm,
additional item border color=red,
additional connections disabled=false,
additional arrow color=red,
additional arrow tip=stealth,
additional arrow line width=1pt,
additional arrow style=]-latex'
}
}
\smartdiagramadd[flow diagram:horizontal]{%
PGF,Ti\textit{k}Z,Smartdiagram%
}{%
below of module1/Low Level, below of module3/High level%
}
\end{center}
\end{minipage}
\end{document}
2
  • Thank you very much. Do you know how to make the grey boxes bigger?
    – Y_gr
    Commented Jun 22, 2014 at 10:23
  • 2
    Page 7 of the accompanying documentation lists more than 10 options in \smartdiagramset for diagram:horizontal: by default "module minimum width" is set at 2cm, you would have to increase that (add module minimum width = 3cm as a line under the line starting with "uniform color list"). It will mess up the spacing of the boxes so you'll need to change the other options (such as "module x sep") to get the bigger boxes without them crowding each other out.
    – DJP
    Commented Jun 22, 2014 at 15:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .