1

Looking for how to insert an ellipsis (...) between $B_{1}$ and $B_{n}{1}$ and increase horizontal space between $B{n}{1}$ of U and $B{1}$ of R under K in the following picture.

\documentclass{standalone}    
\usepackage[edges]{forest}
\usetikzlibrary{arrows.meta}

\begin{document}

\begin{forest}
    for tree = {
      draw
    , rounded corners = 0mm
    , align = center
    , font = \normalsize
    %, minimum width  = 1cm
    %, minimum height = 1cm
    , edge = {blue, -Latex, very thick}
    , s sep = 1mm
    , l sep = 10mm
    , forked edge
    , fork sep = 4mm
    %, inner xsep = 5pt
    %, fit = band % rectangle
    %, inner ysep = 2pt
    }
    [C, font = \Huge, color = black, fill = green!100, draw = green!80!darkgray
        [C1, font = \huge, color = white, fill = blue!80, draw = blue!80!darkgray
            [K, font = \Large, color = black, fill = yellow!80, draw = yellow!80!darkgray
                [U, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{1}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ]
                [R, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                       [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{2}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ]
            ]
            [G, font = \Large, color = black, fill = yellow!80, draw = yellow!80!darkgray
                [U, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{3}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ]
                [R, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{4}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ]
            ]
            [A, font = \Large, color = black, fill = yellow!80, draw = yellow!80!darkgray
                [U, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{5}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ]
                [R, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{6}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ]
            ]
        ]
        [C2, font = \huge, color = white, fill = blue!80, draw = blue!80!darkgray
            [P, font = \Large, color = black, fill = yellow!80, draw = yellow!80!darkgray
                [U, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{7}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ]
                [R, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{8}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ]
            ]
        ]
        [C3, font = \huge, color = white, fill = blue!80, draw = blue!80!darkgray
            [S, font = \Large, color = black, fill = yellow!80, draw = yellow!80!darkgray
                [U, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{9}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ], font = \large, color = white, fill = black!80, draw = black!80!darkgray
                [R, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{10}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ]
            ]
            [B, font = \Large, color = black, fill = yellow!80, draw = yellow!80!darkgray
                [U, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{11}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ], font = \large, color = white, fill = black!80, draw = black!80!darkgray
                [R, font = \large, color = white, fill = black!80, draw = black!80!darkgray
                    [$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$B_{n_{12}}$, color = white, fill = red!80, draw = red!80!darkgray]
                ]
            ]
        ]
    ]  
\end{forest}

\end{document}

enter image description here

1 Answer 1

1

You can add [$\cdots$, draw=none, no edge] between your B nodes:

[$B_{1}$, color = white, fill = red!80, draw = red!80!darkgray][$\cdots$, draw=none, no edge][$B_{n_{1}}$, color = white, fill = red!80, draw = red!80!darkgray]

enter image description here

2
  • Wonderful tweak. Wondering how to increase increase the horizontal space between $B_{n}_{1}$ of U and $B_{1}$ of R under K.
    – MYaseen208
    Commented Aug 12, 2022 at 3:15
  • @MYaseen208: You could add [, draw=none, no edge, fit=band] between the U and R. To make the gap wider you could use [, draw=none, no edge, minimum width=5mm, fit=band]
    – Sandy G
    Commented Aug 12, 2022 at 4:17

You must log in to answer this question.

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