1

I am using a smartdiagram from here: http://www.texample.net/tikz/examples/smart-description/

The problem is that after I insert the bullet points that I need to, the rectangles look messy. For example:

enter image description here

\documentclass[border=10pt]{standalone} 
%%%<
\usepackage{verbatim}
%%%>

\usepackage{smartdiagram}
\begin{document}
\smartdiagram[descriptive diagram]{
  {Cat. 1,{  \begin{itemize}
  \item Define shapes, colors, shading,
  \item and line styles for nodes and arrows
  \item new item
  \item another item
  \item one more
  \item OK, I lied
  \end{itemize}}},
  {Position, {Place nodes using a matrix,
              relative or absolute positioning}},
  {Relation, Insert edges or arrows
             between selected nodes},
  {Label, Add labels on edges or arrows}}
\end{document}

How can I fix it so the rectangles adapt to the size of the bullet point list instead of going over each other?

2 Answers 2

2

From the documentation i found the command \smartdiagramset{descriptive items y sep=SOMEVALUE} that seems to do what you need:

\documentclass[border=10pt]{standalone} 
%%%<
\usepackage{verbatim}
%%%>


\usepackage{smartdiagram}
\begin{document}
\smartdiagramset{descriptive items y sep=90pt}
\smartdiagram[descriptive diagram]{
  {Cat. 1,{\begin{itemize}
  \item Define shapes, colors, shading,
  \item and line styles for nodes and arrows
  \item new item
  \item another item
  \item one more
  \item OK, I lied
  \end{itemize}}},
  {Position, {Place nodes using a matrix,
              relative or absolute positioning}},
  {Relation, Insert edges or arrows
             between selected nodes},
  {Label, Add labels on edges or arrows}}
\end{document}

Output:

enter image description here

As you can see all the distances are same after that and this command will not help you redefine the "sep" after first use. (At least I didn't make it). If you want to modify the sep after firs usage let me know to take a further look. But I think it should remain constant.

3
  • Thank you, that helps! However, I do not think journals would like all that valuable space wasted in between the rectangles (it makes my diagram bigger!). Is there a way, such that y distance between {rectangles} can be fixed instead of the circles?
    – learnerX
    Feb 25, 2018 at 1:10
  • For me it is easier to define my way using just tikz and not smartdiagram. May be I will give it a try tomorrow...
    – koleygr
    Feb 25, 2018 at 1:17
  • That would be helpful!
    – learnerX
    Feb 25, 2018 at 1:20
0

edit (second version of answer, at the first i misunderstood the problem :-( ): with pure tikz is easy to obtain desired result, but code is not so short any more:

enter image description here

\documentclass[tikz, border=10pt]{standalone}
\usetikzlibrary{backgrounds, chains, positioning, shadows}
\usepackage{enumitem}

\begin{document}
    \begin{tikzpicture}[
 node distance = 2mm and 0mm,
   start chain = going below,
    box/.style = {rectangle, rounded corners, draw=gray, very thick,
                  minimum height=16mm, text width=60mm, align=flush center,
                  top color=#1!90, bottom color=#1!10,
                  drop shadow, on chain},
    cir/.style = {circle, draw=gray, very thick,
                  minimum size=16mm, inner sep=2pt, outer sep=0pt,
                  top color=#1, bottom color=#1!10,
                  drop shadow},
                        ]

\node (n1) [box=red]    {\begin{itemize}[nosep, leftmargin=*]
                        \item Define shapes, colors, shading,
                        \item and line styles for nodes and arrows
                        \item new item
                        \item another item
                        \item one more
                        \item OK, I lied
                         \end{itemize}};
\node (n2) [box=cyan]   {Place nodes using a matrix,
                        relative or absolute positioning};
\node (n3) [box=blue]   {Insert edges or arrows
                        between selected nodes};
\node (n4) [box=green]  {Add labels on edges or arrows};
    \begin{scope}[on background layer]
\node [cir=red,  left=of n1]    {Cat. 1};
\node [cir=cyan, left=of n2]    {Position};
\node [cir=blue, left=of n3]    {Relation};
\node [cir=green,left=of n4]    {Label};
    \end{scope}
    \end{tikzpicture}
\end{document}
1
  • \smartdiagramset{descriptive items y sep=...} Feb 23, 2018 at 2:31

You must log in to answer this question.

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