5

I want to reproduce the following figure using tcolorbox along with tikz. Need some nodes adjustment with tcolorbox joined with arrows.

enter image description here

My code is

\documentclass[border=10pt]{standalone}
%\documentclass[border=10pt]{article}

\usepackage{enumitem}
\setlist[itemize]{leftmargin=*, itemsep = 0em}
\usepackage[none]{hyphenat}

\usepackage{tikz}
\usetikzlibrary{matrix, shapes, arrows, positioning}

\usepackage[most]{tcolorbox}

\begin{document}


\newtcolorbox{GreenBox}[2][]{%
   enhanced,
   colback   = green!5!white,
   colframe  = green!75!black, 
   arc       = 4mm, 
   outer arc = 1mm, 
   fonttitle = \huge\slshape\textbf,
   center title, 
   title     = #2,
   #1}


\newtcolorbox{RedBox}[2][]{%
   enhanced,
   colback   = red!5!white,
   colframe  = red!95!black, 
   arc       = 4mm, 
   outer arc = 1mm, 
   fonttitle = \huge\slshape\textbf,
   center title, 
   title     = #2,
   #1}

\newtcolorbox{BrownBox}[2][]{%
   enhanced,
   colback   = brown!5!white,
   colframe  = brown!75!black, 
   arc       = 4mm, 
   outer arc = 1mm, 
   fonttitle = \huge\slshape\textbf,
   center title, 
   title     = #2,
   #1}

\newtcolorbox{BlueBox}[2][]{%
   enhanced,
   colback   = blue!5!white,
   colframe  = blue!75!black, 
   arc       = 4mm, 
   outer arc = 1mm, 
   fonttitle = \huge\slshape\textbf,
   center title, 
   title     = #2,
   #1}
   
\begin{GreenBox}{ASD}

  \begin{RedBox}[width=3cm, remember as=box1, nobeforeafter]{A}
  \begin{itemize}
  \item A
  \item B
  \end{itemize}
  \end{RedBox}
  \hfill
  \begin{RedBox}[width=3cm, remember as=box2, nobeforeafter]{B}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{RedBox}
  \hfill
  \begin{RedBox}[width=3cm, remember as=box3, nobeforeafter]{C}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{RedBox}
  \vspace{2cm}
  \begin{RedBox}[width=3cm, remember as=box4, nobeforeafter]{D}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{RedBox}
  \hfill
  \begin{BlueBox}[width=3cm, remember as=box5, nobeforeafter]{E}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{BlueBox}
  \hfill
  \begin{RedBox}[width=3cm, remember as=box6, nobeforeafter]{F}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{RedBox}
  \vfill
  \begin{BrownBox}[width=3cm, remember as=box7, nobeforeafter]{G}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{BrownBox}
  \hfill
  \begin{BrownBox}[width=3cm, remember as=box8, nobeforeafter]{H}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{BrownBox}
  \hfill
  \begin{BrownBox}[width=3cm, remember as=box9, nobeforeafter]{I}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{BrownBox}
\end{GreenBox}

\begin{tikzpicture}[overlay, remember picture, line width=1mm, draw=red]
\draw[->] (box1)--(box5);
\draw[->] (box2)--(box5);
\draw[->] (box3)--(box5);
\draw[->] (box4)--(box5);
\draw[->] (box6)--(box5);
\draw[->] (box7)--(box5);
\draw[->] (box8)--(box5);
\draw[->] (box9)--(box5);
\end{tikzpicture}

\end{document}

which produces the following figure enter image description here

  • my not-an-answer: \includegraphics{yXOQ1.jpg} – Donald Arseneau Jul 3 '20 at 2:29
12
+50

Useful libraries

The arrows.meta tikzlibrary, along with shadows.blur (for the rectangles and arrows) and shapes, can do things you were missing.

Here's what I got

Does this look somewhat close to what was desired ?

Result

Differences from the original

Intentionally I kept these simple, rather than accurately mimicking the target :

  • The box widths were made uniform (5cm)
  • Used Utopia font (rather than Cambria)
  • Avoided overlap of boxes with bottom strip
  • Maintained symmetry as far as possible

Could be improved

Certain aspects could be improved :

  • A yellow-gray border around the whole poster is still missing. Including it in tcolorbox brings together several unwanted lines, which I could not control.
  • The original arrowheads were perfect triangles, while my arrows are slightly concave. It is possible to adhere to a right-triangle, but let it remain as a subtle Walter clue.
  • The fuzzy shadow of the central elliptical node has a strange dark margin. There should be some way out, which I couldn't find.

And of course a handful others for a passionate typo-maniac to spot out !

And finally the code

\documentclass[border=10pt]{standalone}

\usepackage{fourier}
\usepackage{amsmath}
\usepackage{paralist}
\usepackage{tcolorbox}
\tcbuselibrary{skins}

\usepackage{tikz}
\usetikzlibrary{shapes, shadows.blur, arrows.meta}
%
\tikzset{
    arw/.style={line width=18pt,     % line style
                -{Latex[length=20pt, % arrow style
                        width=36pt]}
               },
    shd/.style={preaction={%    % line & arrow shadow
                 transform canvas={
                     shift={(1.5pt,-1pt)}
                                  }, 
                 draw=gray,
                 opacity=0.25,
                 line width=12pt}
               },
         }
%
%   Main frame background color
\definecolor{cBkg}{HTML}{eeece0}
%   Color of top/bottom/center
\definecolor{cCen}{HTML}{1f487c}
%   Colors for the eight boxes
\definecolor{cAdm}{HTML}{bf674f}
\definecolor{cExe}{HTML}{bf7c51}
\definecolor{cAud}{HTML}{c48f49}
\definecolor{cPar}{HTML}{bea553}
\definecolor{cReg}{HTML}{bcb855}
\definecolor{cJud}{HTML}{adbc57}
\definecolor{cCiv}{HTML}{9bbb58}
\definecolor{cLeg}{HTML}{c0504e}

\newcommand{\cobox}[3]{%
    \begin{tcolorbox}[colback=#1,
                      colframe=white,
                      skin=beamer,
                      drop fuzzy shadow,
                      width=5cm,
                      left=1ex,right=0.5ex]
    \textbf{\large\mbox{}\hfill#2\hfill\mbox{}}
        \begin{compactitem}[o]\color{white}\raggedright
         #3
        \end{compactitem}
    \end{tcolorbox}
                      }

\begin{document}

\begin{tcolorbox}[width=20cm,
                  left=0.2cm,
                  boxrule=0pt,
                  colbacktitle=cCen,
                  sharp corners,
                  fonttitle=\center\bfseries\Huge,
                  toptitle=1.5ex,
                  bottomtitle=1.5ex,
                  title=SOEs Accountability,
                  colback=cBkg]
   \mbox{}\\
%   White strip below title and   |   Comment next 10 lines
%   dotted line  (aesthetic ?!)   |   if strip is not reqd.
\tcbsubtitle[boxrule=0pt, 
            colback=white,
            before skip=-2\baselineskip,
            after skip=-2\baselineskip]%
     {\centering\LARGE\strut%
      \tikz[overlay]
        \draw[cBkg!80!black, very thick, dashed, 
              xshift=0.5ex, yshift=-1ex]
          (-10cm, 0) -- (10cm, 0);
     }
   \mbox{}\\[-1ex]  
%
\begin{tikzpicture}
%   Central elliptical node
  \node[ellipse,
        thick, white,
        draw=white,
        fill=cCen,
        blur shadow={shadow blur steps=15}]
    (Cen) at (0,0)
      {\begin{minipage}{4cm}%
        \centering\bfseries\LARGE%
           \mbox{}\\                % space above
            SOEs\\ 
        Accountability\\[-1ex]
           \mbox{}                  % space below
       \end{minipage}%
      };
%   Define coordinates of boxes
  \coordinate (Adm) at (-6,  3);
  \coordinate (Exe) at ( 0,  4.5);
  \coordinate (Aud) at ( 6,  3);
  \coordinate (Par) at ( 7,  0);
  \coordinate (Reg) at ( 6, -3.2);
  \coordinate (Jud) at ( 0, -4.3);
  \coordinate (Civ) at (-6, -3);
  \coordinate (Leg) at (-7,  0);
%   Arrows placed below boxes
  \draw[arw,shd,cAdm] (Adm.center) -- (Cen);  
  \draw[arw,shd,cExe] (Exe.center) -- (Cen);
  \draw[arw,shd,cAud] (Aud.center) -- (Cen);
  \draw[arw,shd,cPar] (Par.center) -- (Cen);
  \draw[arw,shd,cReg] (Reg.center) -- (Cen);
  \draw[arw,shd,cJud] (Jud.center) -- (Cen);
  \draw[arw,shd,cCiv] (Civ.center) -- (Cen);
  \draw[arw,shd,cLeg] (Leg.center) -- (Cen);
%
%   Next the eight boxes, one by one...
%
  \node at (Adm)
  {\cobox{cAdm}
         {Administrative Control}
         {\item Minister
          \item Civil servants from Section 
                Officer to Secretary}
  };
%
  \node at (Exe)
   {\cobox{cExe}
          {Executive}
          {\item Prime Minister
           \item Cabinet
           \item Privatization Commission
           \item Finance Division
           \item Cabinet Committes
           \item ECC}
   }; 
%
  \node at (Aud)
   {\cobox{cAud}
          {Auditing}
          {\item Chartered Accountants
           \item Auditor General of Pakistan}
   }; 
%
  \node at (Par)
   {\cobox{cPar}
          {Parliamentary Oversight}
          {\item National Assembly Standing Committee
           \item Senate Standing Committee
           \item Public Accounts Committee}
   }; 
%
  \node at (Reg)
   {\cobox{cReg}
          {Regulatary Oversight}
          {\item SECP
           \item PPRA
           \item Sectoral Regulators}
   }; 
%
  \node at (Jud)
   {\cobox{cJud}
          {Judicial/ Accountability}
          {\item Supreme Court
           \item High Court
           \item Federal Ombudsman
           \item FIA
           \item NAB}
   }; 
%
  \node at (Civ)
   {\cobox{cCiv}
          {Civil Society}
          {\item Media
           \item Public at large
           \item Transparency International}
   }; 
%
  \node at (Leg)
   {\cobox{cLeg}
          {Legal \Large\strut  % medium space above line
                 \medskip      % medium space after line
          }
          {\item Board of Directors
                 \smallskip}   % small space at the end
   }; 
%
\end{tikzpicture}
%
%  Blue strip at bottom
\tcbsubtitle[boxrule=0pt, 
            colback=cCen,
            after skip=-2em]%
     {\mbox{}}
   \mbox{}\\[-1ex]  
%
\end{tcolorbox}

\end{document}
  • This is for my humble opinion very beautiful. – Sebastiano Jul 2 '20 at 21:45
  • @Sebastiano Thanks ! I'd always advocate LaTeX for its immense possibilities in reproducing any article or graphic to the minutest detail. What one might need is perhaps a keen eye and uncompromising patience (or, alternatively, a bit of insomnia and prolonged unemployment-- as in my case-- which might necessitate the former two). – Partha D. Jul 3 '20 at 2:36
  • My comment is due because your work has been done very well. It is true. With LaTeX is important the perseverance and the patience. 😁😁😁😁😁 for a bit of insomnia and...I'm sorry for 😐😐😐😐 prolonged unemployment. All the best and regards. – Sebastiano Jul 3 '20 at 12:02
  • Thanks MYaseen208 for my first bounty ! To be frank, I enjoyed it more than a promotion in office ! πŸ˜› No worries @Sebastiano ...it is more of a voluntary unemployment (my employer didn't accept my resignation, but gave me a three-years-leave). I sometimes prefer to relax and do what my cool heart thirst for, rather than run around places where my crazy pocket drives to. – Partha D. Jul 6 '20 at 7:24
  • 1
    I always wish you the best that life has to offer. πŸ˜‰ – Sebastiano Jul 6 '20 at 11:35
6

A tcbraster to start with:

\documentclass[10pt]{standalone}

\usepackage{enumitem}
\setlist[itemize]{leftmargin=*, itemsep = 0em}
\usepackage[none]{hyphenat}

\usepackage{tikz}
\usetikzlibrary{matrix, shapes, arrows, positioning}

\usepackage[most]{tcolorbox}

\begin{document}

\tcbset{
    innerbox/.style={enhanced, 
        fonttitle=\bfseries, 
        coltitle=black,
        colupper=white,
        detach title,
        fontupper=\scriptsize,
        halign=flush left,
        before upper={\centerline\tcbtitle\par},
        colframe=white,
        drop shadow},
}
 
\begin{tcboxeditemize}[%
    raster columns=3, 
    raster column skip=5mm, raster row skip=5mm,
    raster left skip=1mm, raster right skip=1mm, 
    size=small, innerbox, remember as=box\thetcbrasternum,
    colback=violet!90,
    raster row 1/.style={raster valign=bottom},
    raster row 2/.style={raster valign=center},
    raster row 3/.style={raster valign=top}]
    {colframe=blue!75!black, colback=white!80!brown, sharp corners, title=ASD, boxsep=0pt, left=1mm, right=1mm}

\tcbitem[colback=brown!80!red, title=Administrative Control]
  \begin{itemize}
  \item Minister
  \item Civil servants from section Officer to Secretary
  \end{itemize}

\tcbitem[colback=brown, title=Executive]
  \begin{itemize}
  \item Prime Minister
  \item Cabinet
  \item Privatization Commision
  \item Finance Division
  \item Cabinet Commitees
  \item ECC
  \end{itemize}

\tcbitem[colback=brown!80!green, title=Auditing]
  \begin{itemize}
  \item Chartered accoutants
  \item Auditor General of Pakistan
  \end{itemize}

\tcbitem[title=D]
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}

\tcbitem[height=2cm, bean arc, colback=blue!30!black, valign=center, fontupper=\bfseries\large, halign=center]
  SOEs Accountability

\tcbitem[title=F]
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}

\tcbitem[title=G]
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}

\tcbitem[title=H]
  \begin{itemize}
  \item AS
  \item BC
  \item CD
  \item DE
  \end{itemize}

\tcbitem[title=I]
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}

\end{tcboxeditemize}

\begin{tikzpicture}[overlay, remember picture, line width=1mm, draw=red]
\draw[->] (box1)--(box5);
\draw[->] (box2)--(box5);
\draw[->] (box3)--(box5);
\draw[->] (box4)--(box5);
\draw[->] (box6)--(box5);
\draw[->] (box7)--(box5);
\draw[->] (box8)--(box5);
\draw[->] (box9)--(box5);
\end{tikzpicture}

\end{document}

enter image description here

4

Look at this. I hope it helps you. I put some comments to guide with instructions. Sorry for not using the tcolorbox as you requested. I found it easier the way below. IMHO, it may simplify your work.

Edit: I rewrote the code to become cleaner. Hope this looks better now!

\documentclass[10pt, border=20pt]{standalone}

\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{matrix, shapes, arrows, positioning, shadows.blur}

\newif\iffirstbullet

\def\bitem{%
    \\\color{white}\textbullet~%
    }

\newcommand{\clbox}[7]{%
    %-> #1=Title; #2=Size; #3=position; #4=color; #5=(start)--(end); #6=xshift; #7bullets
    \firstbullettrue %... prevents breaking the first line
    \node (#1) [#3, #6]{};
    
    %--> THEN, USE IT AS REFERENCE TO DRAW THE ARROW UP TO THE CENTRAL SHAPE
    \draw[-triangle 90, line width=1mm, postaction={draw, line width=4mm, shorten >=3mm, -}, #4] #5;
    
    %--> THEN DRAW THE SHAPE AT THE VERY SAME POSITION COVERING PART OF THE ARROW
    \node [rectangle, rounded corners, line width=1pt, text centered, draw=white, blur shadow={shadow blur steps=5}, fill=#4, #3, #6]{%
        \begin{tabular}{c}
            \bfseries #1\\
            \begin{tabular}{p{#2}}
                #7
            \end{tabular}
        \end{tabular}
        };
    }

\begin{document}
 
\begin{tikzpicture}[node distance = 2.5cm]
    \tiny %... adjusts text font size
    
    %--> BEGIN WITH CENTRAL SHAPE
    \node (soes) [ellipse, line width=1pt, text centered, draw = white, fill = white!20!blue, blur shadow={shadow blur steps=5}]
        {\begin{tabular}{c}
            \\
            \color{white}\bfseries SOEs\\
            \color{white}\bfseries Accountability\\
            \\
        \end{tabular}
        };
    
    %-> #1=Title; #2=Size; #3=position; #4=color; #5=(start)--(end); #6=xshift; #7=bullets
    \clbox{Executive}{2.5cm}{above of=soes}{brown!80!black}{(Executive)--(soes)}{}{%
        \bitem Prime Minister
        \bitem Cabinet
        \bitem ...
        }
    
    %-> #1=Title; #2=Size; #3=position; #4=color; #5=(start)--(end); #6=xshift; #7=bullets
    \clbox{Administrative Control}{2.5cm}{left of=Executive}{BrickRed}{(Administrative Control)--(soes)}{xshift=-1.5cm}{%
        \bitem Minister
        \bitem Civil servants from Section Officer to Secretary
        }
    
    %-> #1=Title; #2=Size; #3=position; #4=color; #5=(start)--(end); #6=xshift; #7=bullets
    \clbox{Auditing}{2.5cm}{right of=Executive}{brown}{(Auditing)--(soes)}{xshift=1.5cm}{%
        \bitem Chartered accountants
        \bitem Auditor General of Pakistan
        }
    
    %-> #1=Title; #2=Size; #3=position; #4=color; #5=(start)--(end); #6=xshift; #7=bullets
    \clbox{Legal}{2.5cm}{left of=soes}{black!30!red}{(Legal)--(soes)}{xshift=-1.5cm}{%
        \bitem Board of Directors
        }
    
    %-> #1=Title; #2=Size; #3=position; #4=color; #5=(start)--(end); #6=xshift; #7=bullets
    \clbox{Parliamentary Oversight}{2.5cm}{right of=soes}{YellowOrange!80!black}{(Parliamentary Oversight)--(soes)}{xshift=1.5cm}{%
        \bitem National Assembly Standing Commite
        \bitem Senate Standing Commitee
        \bitem Public Accounts Commitee
        }
    
    %-> #1=Title; #2=Size; #3=position; #4=color; #5=(start)--(end); #6=xshift; #7=bullets
    \clbox{Judicial Accountability}{2.5cm}{below of=soes}{PineGreen!50!black}{(Judicial Accountability)--(soes)}{}{%
        \bitem Supreme Court
        \bitem High Court Federal Ombudsman
        \bitem FIA
        \bitem NAB
        }
    
    %-> #1=Title; #2=Size; #3=position; #4=color; #5=(start)--(end); #6=xshift; #7=bullets
    \clbox{Civil Society}{2.5cm}{left of=Judicial Accountability}{green!50!black}{(Civil Society)--(soes)}{xshift=-1.5cm}{%
        \bitem Media
        \bitem Public at large
        \bitem Transparency International
        }
    
    %-> #1=Title; #2=Size; #3=position; #4=color; #5=(start)--(end); #6=xshift; #7=bullets
    \clbox{Regulatory Oversight}{2.5cm}{right of=Judicial Accountability}{GreenYellow!60!black}{(Regulatory Oversight)--(soes)}{xshift=1.5cm}{%
        \bitem SECP
        \bitem PPRA
        \bitem Sectoral Regulators
        }
\end{tikzpicture}

\end{document}

enter image description here

2

Based on your MWE:

enter image description here

\documentclass[border=3mm]{standalone}
\usepackage{enumitem}
\setlist[itemize]{nosep,
                  leftmargin=*}
\usepackage[most]{tcolorbox}
\usetikzlibrary{arrows.meta, 
                matrix, 
                positioning}
\usepackage[none]{hyphenat}

\begin{document}
\newtcolorbox{GreenBox}[2][]{%
   enhanced,
   colback   = green!5!white,
   colframe  = green!75!black,
   arc       = 2mm,
   %outer arc = 1mm,
   fonttitle = \Large\slshape\bfseries,
   center title,
   title     = #2,
   #1}

\newtcolorbox{CB}[3][]{% ColorBox
   width=3cm,
   enhanced,
   left=1mm, right=1mm,
   colback   = #3!5!white,
   colframe  = #3!95!black,
   arc       = 2mm,
  % outer arc = 1mm,
   shadow={1.5pt}{-1.5pt}{0pt}{gray!50},
   fonttitle = \Large\slshape\bfseries,
   center title,
   title     = #2,
   #1}


\begin{GreenBox}{ASD}

  \begin{CB}[remember as=box1, nobeforeafter]{A}{red}
  \begin{itemize}
  \item A
  \item B
  \end{itemize}
  \end{CB}
  \hfill
  \begin{CB}[remember as=box2, nobeforeafter]{B}{red}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{CB}
  \hfill
  \begin{CB}[remember as=box3, nobeforeafter]{C}{red}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{CB}

  \vspace*{1cm}
  \begin{CB}[remember as=box4, nobeforeafter]{D}{red}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{CB}
  \hfill
  \begin{CB}[width=3cm, remember as=box5, nobeforeafter]{E}{blue}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{CB}
  \hfill
  \begin{CB}[width=3cm, remember as=box6, nobeforeafter]{F}{red}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{CB}
  
  \vspace*{1cm}
  \begin{CB}[width=3cm, remember as=box7, nobeforeafter]{G}{brown}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{CB}
  \hfill
  \begin{CB}[width=3cm, remember as=box8, nobeforeafter]{H}{brown}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{CB}
  \hfill
  \begin{CB}[width=3cm, remember as=box9, nobeforeafter]{I}{brown}
  \begin{itemize}
  \item AS
  \item BC
  \end{itemize}
  \end{CB}
\end{GreenBox}

\begin{tikzpicture}[overlay, remember picture,
every edge/.style = {draw=red, line width=3mm,
                     -{Triangle[length=4mm, width=6mm]},
                        shorten >=1pt, shorten <=2pt}
                    ]
\draw   (box1.south east) edge (box5.north west)
        (box2) edge (box5)
        (box3.south west) edge (box5.north east)
        (box4) edge (box5)
        (box6) edge (box5)
        (box7.north east) edge (box5.south west)
        (box8) edge (box5)
        (box9.north west) edge (box5.south east);
\end{tikzpicture}

\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.