3

I wanted to input those nested brackets in this pattern on a portrait-oriented page, which means they are supposed to be upright:

enter image description here

Any idea how to implement this?

UPDATE: I actually lost hope in doing it horizontally so I switched to the normal ones, here is the code I used:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\[
    \begin{aligned}
        & \text{3D-Space browsed} \\
        & \begin{cases}
            & \text{Plane 1 browsed} \\
            & \begin{cases}
                & \begin{aligned}
                    & \begin{cases}
                        & \text{Level 7 top} \\
                        & \text{Level 7 bottom}
                    \end{cases} \\
                    & \begin{cases}
                        & \text{Level 7 top} \\
                        & \text{Level 7 bottom}
                    \end{cases}
                \end{aligned}
            \end{cases}
            \quad
            \text{Plane 2  browsed} \\
            & \begin{cases}
                & \begin{aligned}
                    & \begin{cases}
                        & \text{Level 7 top} \\
                        & \text{Level 7 bottom}
                    \end{cases} \\
                    & \begin{cases}
                        & \text{Level 7 top} \\
                        & \text{Level 7 bottom}
                    \end{cases}
                \end{aligned} \\
                & \begin{cases}
                    & \text{Level 7 top} \\
                    & \text{Level 7 bottom}
                \end{cases}
            \end{cases}
        \end{cases}
    \end{aligned}
\]

\end{document}

But it gives an unusual output:

I highlighted the places that are not as they should be

also, two things are still left for me:

  1. The linking curves between increments
  2. The dots signaling the continuation of the pattern.

Any input would be appreciated. Also, I checked the links provided by Zarko but my dumb brain did not know how to incorporate the code.

Ingmar
  • 6,690
  • 5
  • 26
  • 47
  • 2
    What you try so far? Please show this. Where you stuck? Are only curly braced the problem? – Zarko Jul 23 '23 at 09:14
  • 1
    I could not do it horizontally at all. All I did was getting a simple vertical bracket. I am new to this so I may sound a bit too much of a noob, I am sorry. – Stefan Bock Jul 23 '23 at 09:17
  • 1
    Anyway, show what you try so far. After then we can easily help you. Now we haven't any information about your document and how showed picture is/should be inserted or written within. – Zarko Jul 23 '23 at 09:58
  • 1
    See if answers on https://tex.stackexchange.com/q/491915/ or https://tex.stackexchange.com/q/610382/ can help you. – Zarko Jul 23 '23 at 10:10
  • I somehow beginning to get it, but I do not know how deep I can nest the braces. I will keep trying and see what comes up. – Stefan Bock Jul 23 '23 at 13:49
  • Related: https://tex.stackexchange.com/a/119876/11604 – Fran Jul 24 '23 at 11:52

3 Answers3

8

You can do horizontal braces with \overbrace or \underbrace, as long as the braced sections are properly nested. For arrows connecting different parts of the drawing, see How to add arrow in equations and matrix?.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
  \overbrace{
    \overbrace{
      \overbrace{
        \begin{array}[t]{l}
          \text{Level 7 top} \\
          \text{Level 7 bottom}
        \end{array}
      }
      \overbrace{
        \begin{array}[t]{l}
          \text{Level 7 top} \\
          \text{Level 7 bottom}
        \end{array}
      }
    }^{\text{Plane 1 browsed}}
    \overbrace{
      \overbrace{
        \begin{array}[t]{l}
          \text{Level 7 top} \\
          \text{Level 7 bottom}
        \end{array}
      }
      \overbrace{
        \begin{array}[t]{l}
          \text{Level 7 top} \\
          \text{Level 7 bottom}
        \end{array}
      }
      \overbrace{
        \begin{array}[t]{l}
          \text{Level 7 top} \\
          \text{Level 7 bottom}
        \end{array}
      }
    }^{\text{Plane 2 browsed}}
  }^{\text{3D-Space browsed}}
\]
\end{document}
gernot
  • 49,614
5

This answer shows how to arrange the braces vertically. Note that the cases environment does the alignments, so you don't need aligned. For arrows connecting different parts of the drawing, see How to add arrow in equations and matrix?.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
  \text{3D-Space browsed}
  \begin{cases}
    \text{Plane 1 browsed}
    \begin{cases}
       \begin{cases}
          \text{Level 7 top} \\
          \text{Level 7 bottom}
       \end{cases} \\
       \begin{cases}
          \text{Level 7 top} \\
          \text{Level 7 bottom}
       \end{cases}
    \end{cases}\\
    \text{Plane 2  browsed}
    \begin{cases}
       \begin{cases}
          \text{Level 7 top} \\
          \text{Level 7 bottom}
       \end{cases} \\
       \begin{cases}
          \text{Level 7 top} \\
          \text{Level 7 bottom}
       \end{cases}\\
       \begin{cases}
          \text{Level 7 top} \\
          \text{Level 7 bottom}
       \end{cases}
    \end{cases}
  \end{cases}
\]
\end{document}
gernot
  • 49,614
1

Thank to the help of @gernot, I created the following MWE:

\documentclass{article}
\usepackage{amsmath,tikz}
\usepackage{graphicx}
\usetikzlibrary{tikzmark}

\usepackage[margin=0.5cm]{geometry} % Set the margin to 1cm on all sides

\newcommand{\bigvdots}{\scalebox{1.5}{$\vdots$}} \begin{document}

[ \text{(u,v,w) space browsed} \begin{cases} \text{$(k=1)$ $1_{st}$ plane browsed} \begin{cases} \text{$(j=1)$} \begin{cases} \text{$(i=1): n=1\tikzmark{0}$}\ \text{$(i=2): n=2\tikzmark{1}$}\ \vdots\ \text{$(i=I): n=I\tikzmark{2}$}\ \end{cases} \\ \text{$(j=2)$} \begin{cases} \text{$(i=1): n=1 + I\tikzmark{3}$}\ \text{$(i=2): n=2 +I$}\ \vdots\ \text{$(i=I): n=2I$}\ \end{cases} \ \vdots\ \text{$(j=J)$} \begin{cases} \text{$(i=1): n=1 -I+IJ$}\ \vdots\ \text{$(i=I): n=IJ\tikzmark{4}$}\ \end{cases} \end{cases} \\ \text{$(k=2)$ $2_{nd}$ plane browsed} \begin{cases} \text{$(j=1)$} \begin{cases} \text{$(i=1): n=1 + IJ\tikzmark{5}$}\ \vdots\ \text{$(i=I): n=I + IJ$}\ \end{cases} \ \vdots\ \text{$(j=J)$} \begin{cases} \text{$(i=1): n=1-I+2IJ$}\ \vdots\ \text{$(i=I): n=2IJ$}\ \end{cases} \end{cases} \\ \bigvdots\\ \text{$(k=K)$ $K_{th}$ plane browsed} \begin{cases} \text{$(j=1)$} \begin{cases} \text{$(i=1): n=1-IJ+IJK$}\ \vdots\ \text{$(i=I): n=I-IJ+IJK$}\ \end{cases} \ \vdots\ \text{$(j=J)$} \begin{cases} \text{$(i=1): n=1 -I+KIJ$}\ \vdots\ \text{$(i=I): n=IKJ$}\ \end{cases} \end{cases} \end{cases} ]

\begin{tikzpicture}[remember picture, overlay, bend left=45, -latex, blue] \draw[rounded corners=5pt] ([xshift=1ex, yshift=1ex]pic cs:0) -- node[right, xshift=6ex, yshift=-1.7ex] {Increment i} ++(1,0) |- ([xshift=1ex, yshift=1ex]pic cs:1); \end{tikzpicture} \begin{tikzpicture}[remember picture, overlay, -latex, red] \draw[rounded corners=5pt]([xshift=1ex,yshift=1ex]pic cs:2) -- node[right, xshift=6ex, yshift=-3.8ex] {Increment j} ++(1,0) |-([xshift=1ex, yshift=1ex]pic cs:3); \end{tikzpicture} \begin{tikzpicture}[remember picture, overlay, -latex, green] \draw[rounded corners=5pt] ([xshift=1ex, yshift=1ex]pic cs:4) -- node[right, xshift=6ex, yshift=-3.8ex] {Increment k} ++(1.2,0) |- ([xshift=1ex, yshift=0.5ex]pic cs:5); \end{tikzpicture} \end{document}

Which produces the following result:

Execution of the MWE

Which answers my question. However, there is an issue I still need to address: For the text behind each bracket, I want to make it break a line while standing centered vertically around the middle of the curly brace. Is there a way to do so?