3

I am a beginner with LaTex and not comfortable enough to switch over just yet. At the moment I mainly use the smartdiagram package to easily produce high-quality flow diagrams for various documents and presentations.

For this use case I created a number of templates. Here are two examples based on them.

This one works:

\documentclass{article}
\usepackage{tikz} % smartdiagram base package
\usepackage{smartdiagram} % used for generating diagrams                           
\usetikzlibrary{arrows} % additional arrows
\begin{document}
\smartdiagramset{                                                                                           
% ARROWS
  arrow tip={stealth},
}
\smartdiagram[flow diagram:horizontal]{ % set orientation (horizontal/vertical)
A,B,C,D
}
\end{document}

This one doesn't:

\documentclass{article}
\usepackage{tikz} % smartdiagram base package
\usepackage{smartdiagram} % used for generating diagrams                           
\usetikzlibrary{arrows} % additional arrows
\begin{document}
\smartdiagramset{                                                                                           
% ARROWS
  arrow tip={|-|},
}
\smartdiagram[flow diagram:horizontal]{ % set orientation (horizontal/vertical)
A,B,C,D
}
\end{document}

As you can see I am struggling with the arrow library. If I set smartdiagram's arrow tip parameter to a bracket-like TikZ arrow, LaTex returns the following error message:

flow_diagram.tex.swp:119: Package pgf Error: Arrow
 end type ``[-]'' unknown.

See the pgf package documentation for explanation.

I took this arrow definition from TikZ' manual (p. 257), where a number of bracket-like arrow tips and their respective names are listed.

Any other arrow tip type I can render with this template without any problems, it's only these bracket-type arrows I struggle with.

Can you please tell me, if I am doing something wrong?

9
  • I cannot compile your example as their seem to be some problems with smartdiagrams pgf-keys. Could you please reduce your MWE!
    – Toscho
    Mar 23, 2013 at 19:26
  • @Toscho Sorry about the long example. I edited my question accordingly. Mar 23, 2013 at 19:36
  • 1
    Well, it could be a bug of the package under some point of views or not. Actually the package does not consider at the moment (but I think it's a nice add) the possibility of having arrows on both sides of a path (i.e. <->) thus the key arrow tip only addresses the -tip. This means that arrow tip=[-] is wrong, but arrow tip=[ or arrow tip=] are perfectly right (even without braces). Mar 24, 2013 at 8:42
  • @Toscho: if you have problems with the keys you have very likely the version 0.1 of the package, but for two weeks there's on CTAN version 0.2. Mar 24, 2013 at 8:51
  • BTW: What's the reason, to rename the existing pgf keys?
    – Toscho
    Mar 24, 2013 at 11:52

1 Answer 1

3

pgf doesn't know the arrow tip [-]. This is two arrow tips together. You can use \draw[{[-]}](0,0)--(1,0); or \draw[<->,arrows={[-]}] (a)--(b); if you loaded \usetikzlibrary{arrows} before.

If this happens only with the [-] arrow tips, it might be in bug in smartdiagram due to not dealing properly with the brackets (they need always be enclosed in {}.

2
  • I just checked again and this happens for any type of bracket-like arrow tip in a smartdiagram environment even if there is a proper enclosure in {}. In a tikzpicture environment, OTOH, everything works fine. So as you said it's likely a bug in smartdiagram. I will try to contact the maintainer about it. Thank you for your answer! Mar 23, 2013 at 19:49
  • 1
    I have been looking for this tip for at least 45mn. Thanks !
    – perror
    Jun 28, 2013 at 13:21

You must log in to answer this question.

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