EIDT

EIDT

Meu software produz alguma documentação automaticamente. Um dos elementos que estou adicionando à documentação é uma árvore no estilo descrito aqui:

Fazendo uma árvore de diretórios (simples)

Como a árvore pode ser grande, ela abrangeria várias páginas. Vejo aqui que existe uma maneira de informar manualmente à árvore onde quebrar as páginas:

Como faço para dividir uma árvore florestal em duas árvores com alinhamento vertical adequado?

Mas o que eu realmente quero é que a árvore quebre automaticamente a página. Existe uma maneira de fazer isso com o Tikz Forest?

Um exemplo do código florestal está abaixo:

\documentclass[english,10pt,oneside,table,xcdraw]{book}

\usepackage{lmodern}
\usepackage[lgr,T1]{fontenc}
\usepackage{geometry}
\usepackage[utf8]{inputenc}
\usepackage{forest}
\usepackage{longtable}
\usepackage{tikz}
\usetikzlibrary{calc,shapes,shapes.arrows,arrows,trees,shadows,backgrounds,positioning}

\forestset{
  nodeStyle/.style={
    before typesetting nodes={
      edge=#1,
      for ancestors={
        edge=#1,
        #1,
      },
      #1,
    }
  },
  my edge label/.style={
    edge label={
      node [midway, fill=white, font=\scriptsize] {#1}
    }
  }
}

\begin{document}
\newcolumntype{C}[1]{>{\centering}p{#1}}
\newcolumntype{M}{>{\begin{varwidth}{4cm}}l<{\end{varwidth}}} %M is for Maximal column

\definecolor{tempColor}{rgb}{0.2,1,0.2}
\begin{figure}
\begin{center}
\par\medskip
{
  \footnotesize
  \begin{forest}
  for tree=
  {
    if level=0{align=center}
    {
      % allow multi-line text and set alignment
      align={@{}C{50mm}@{}},
    },
    grow'=0,
    font=\sffamily\bfseries,
    edge path=
    {
      \noexpand\path [draw, \forestoption{edge}] (!u.south west) +(7.5pt,0) |- (.child anchor) \forestoption{edge label};
    },
    before typesetting nodes=
    {
      if n=1
      {
        insert before={[,phantom]}
      }
      {}
    },
    parent anchor=south,
    child anchor=west,
    anchor=west,
    calign=first,
    inner xsep=7pt,
    edge={ultra thick, rounded corners=2pt},
    fill=white,
    rounded corners=2pt,
    fit=band,
    before computing xy={l=15pt},
  }
[{TypeData}
   [{ModelType}
   ]
   [{StationType},drop shadow
      [{StationConfig},fill=lightgray
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig},drop shadow,fill=lightgray[child, font=\sffamily, align=left][child, font=\sffamily, align=left][child, font=\sffamily, align=left]
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]
      [{StationConfig}
      ]  
   ]
   [{SecondType}
   ]
]
  \end{forest}
}
\caption{ }
\end{center}
\end{figure}
\end{document}

Responder1

Sempre poste o código completo e funcional, a menos que o problema seja um erro de compilação. Apenas persuadir seu código a compilar foi um exercício de adivinhação. Por esse motivo, posso ter alterado seu código de maneiras que nem percebo.

Aqui está meu palpite sobre o seu preâmbulo:

\documentclass[a4paper]{article}
\usepackage{geometry,array}
\usepackage{forest}
\usetikzlibrary{shadows}
\newcolumntype{C}[1]{@{}>{\centering\arraybackslash}m{#1}@{}}

Obviamente, isso provavelmente não é idêntico ao seu, o que é de se esperar ao adivinhar. A resposta abaixo é baseada na suposição de que este é o seu preâmbulo.

Se o problema fosse apenas de automação, esperaria que seu exemplo demonstrasse o método manual. Tendo uma mente desconfiada, suponho que você saiba que não é esse o caso, mesmo que não saiba por quê.

Nada disso é muito útil, é claro. Isso significa que o tempo que poderia ser gasto na sua pergunta é gasto em um monte de outras coisas, como tentar descobrir quais pacotes carregar e inventar uma definição para C.


OK. Portanto, o código fornecido nas respostas à pergunta que você vinculou só pode ser usado para dividir árvores que crescem para baixo. O seu cresce para o leste.

Além disso, pelo menos alguns dos exemplos (por exemplo, mind) não podem ser compilados com o Forest atual sem responder aos prompts do TeX no console ou modificar o forest.sty.

Portanto, você provavelmente precisará compilá-los na linha de comando para poder descartar os prompts. Não há erro. O TeX está apenas \showlhe dizendo algo, pois lhe dirá se você pedir mais ajuda. Portanto, não há preocupação aqui em ignorar erros. Você só precisa deixar que ele mostre o que ele quer mostrar.

O código a seguir faz o seguinte:

  • ele atualiza seu código para usar foldero estilo do Forest 2, o que facilita o desenho desse estilo de árvore;
  • fornece um dir treeestilo para o sabor específico desse estilo;
  • fornece um split dir here=<text>estilo para dividir a árvore no nó atual, análogo ao split here=<text>estilo vinculado.

As definições de estilo são baseadas na minha adaptação do código de Sašo, conforme incluído nas respostas à pergunta vinculada e anotado nos comentários abaixo.

Limitações:

  • nada é dividido automaticamente;
  • a divisão não funcionará corretamente se você fizer coisas estranhas, onde 'estranho' significa aproximadamente 'coisas que farão com que a divisão não funcione corretamente';
  • mesmo se você fizer coisas menos estranhas, a divisão perderá todas as arestas desenhadas para irmãos do nó atual composto após a divisão;
  • apenas uma divisão por árvore é suportada (mas veja abaixo a versão multi-split);
  • a(s) divisão(ões) depende(m) da 'ordem linear' padrão dos nós, de modo que na next nodeordem linear é o primeiro nó que deve ser desenhado após a divisão e tudo e somente esse e os nós posteriores nessa ordem devem ser empatado após essa divisão.

Código:

\documentclass[a4paper]{article}
\usepackage{geometry,array}
\usepackage[edges]{forest}
\usetikzlibrary{shadows}
\newcolumntype{C}[1]{@{}>{\centering\arraybackslash}m{#1}@{}}
\forestset{%
  dir tree/.style={%
    for tree={%
      folder,
      grow'=0,
      if level=0{align=center}
      {
        align={C{50mm}},
      },
      font=\sffamily\bfseries\footnotesize,
      inner xsep=7pt,
      edge={ultra thick, rounded corners=2pt},
      fill=white,
      rounded corners=2pt,
      drop shadow,
    },
  },
}
% addaswyd o gôd Sašo Živanović: https://tex.stackexchange.com/a/296771/
\def\hiddenparcommand{\par}
\forestset{%
  declare toks register={split here interject},
  declare toks register={split here node},
  declare toks register={split resume here node},
  split here interject={},
  split here node={},
  split resume here node={},
  to widest/.style={
    tikz+={\path (\forestregister{tempdima}, \forestoption{y}) -- (\forestregister{tempdimb}, \forestoption{y});},
  },
  split dir here/.style={%
    split here node/.option=name,
    split here interject={#1},
    split dir tree,
    delay={
      for next node={split dir resume here},
    },
  },
  split dir resume here/.style={%
    split resume here node/.option=name,
  },
  split dir tree/.code={%
    \forestset{%
      draw tree stage/.style={
        for root'={
          tempdima/.min={x()+min_x()}{tree},
          tempdimb/.max={x()+max_x()}{tree},
          for tree={%
            to widest,
            if name/.wrap pgfmath arg={{####1}{label={[text=gray, anchor=north, font=\scriptsize]below:{[cont.]}}}{}}{split_here_node},
            if name/.wrap pgfmath arg={{####1}{edge={densely dotted, gray}, label={[font=\scriptsize, anchor=south, text=gray]above:{[cont.]}}}{}}{split_resume_here_node},
          },
        },
        for nodewalk/.wrap pgfmath arg={{draw tree processing order/.style={name=####1,preceding nodes}}{}}{split_here_node},
        for root'={draw tree},
        TeX/.wrap pgfmath arg={\hiddenparcommand ####1\hiddenparcommand}{split_here_interject},
        for nodewalk/.wrap pgfmath arg={{draw tree processing order/.style={name=####1,following nodes}}{}}{split_resume_here_node},
        for root'={draw tree},
      },
    }
  }
}
\begin{document}
\begin{forest}
  dir tree,
  before drawing tree={
    for tree={
      tikz+/.wrap 2 pgfmath args={\node [anchor=west, font=\footnotesize, text=red] at (.east) {L:#1; n:#2};}{level()}{n()}
    }
  }
  [TypeData
    [ModelData
    ]
    [StationData
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig, split dir here=continued
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
   ]
   [StationData
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
    ]
  ]
\end{forest}
\end{document}

Resultado:

dividir árvore de diretórios

Não deverá ser muito difícil, penso eu, aplicar estas modificaçõesao meu código experimental permitindo múltiplas divisões, da mesma forma que o acima modifica o código que escrevi para estilizar a estratégia de divisão única de Sašo.

Por exemplo (mais tardeeditar) aqui está uma versão modificada desse código experimental de prova de conceito para múltiplas divisões (observe que as divisões não fazem nenhum sentido específico, portanto não envolvem necessariamente uma quebra de página):

% ateb: https://tex.stackexchange.com/a/339790/ addaswyd o gwestiwn DiB: https://tex.stackexchange.com/q/339669/
\documentclass[a4paper]{article}
\usepackage{geometry,array}
\usepackage[edges]{forest}
\usetikzlibrary{shadows}
\newcolumntype{C}[1]{@{}>{\centering\arraybackslash}m{#1}@{}}
\forestset{%
  dir tree/.style={%
    for tree={%
      folder,
      grow'=0,
      if level=0{align=center}
      {
        align={C{50mm}},
      },
      font=\sffamily\bfseries\footnotesize,
      inner xsep=7pt,
      edge={ultra thick, rounded corners=2pt},
      fill=white,
      rounded corners=2pt,
      drop shadow,
    },
  },
}
% addaswyd o gôd Sašo Živanović: https://tex.stackexchange.com/a/296771/
\def\hiddenparcommand{\par}
\newcommand\otherhiddenparcommand{\par\noindent}
\newcommand\hiddencommacommand{, }
\forestset{%
  declare keylist register={split here ids},
  declare keylist register={split here interjects},
  declare toks register=split here toks,
  split here ids={},
  split here interjects={},
  to widest/.style={
    tikz+={\path (\forestregister{tempdima}, \forestoption{y}) -- (\forestregister{tempdimb}, \forestoption{y});},
  },
  hide commas/.style={%
    split here toks+={\hiddencommacommand},
    split here toks+={#1},
  },
  split dir here/.style={%
    split dir tree pre,
    delay={%
      !next.split dir tree post,
    },
    before drawing tree={%
      split here ids+/.option=id,
      !next.split resume here ids+/.option=id,
    },
    split={#1}{,}{split here toks,hide commas},
    split here interjects/.register=split here toks,
    split dir tree
  },
  split dir tree pre/.style={%
    label={[text=gray, anchor=north, font=\scriptsize]below:{[cont.]}{}},
  },
  split dir tree post/.style={%
    label={[font=\scriptsize, anchor=south, text=gray]above:{[cont.]}{}},
  },
  split dir tree/.code={%
    \forestset{%
      draw tree stage/.style={
        for root'={
          tempdima/.min={x()+min_x()}{tree},
          tempdimb/.max={x()+max_x()}{tree},
          for tree={%
            to widest,
          },
        },
        tempcountb'=-1,
        do until={%
          strequal((split_here_ids),"")
        }{%
          tempkeylistb'={},
          tempkeylista'={},
          split register={split here ids}{,}{tempcounta,tempkeylistb+},
          split register={split here interjects}{,}{temptoksa,tempkeylista+},
          split here ids'/.register=tempkeylistb,
          split here interjects'/.register=tempkeylista,
        % Sašo Živanović: http://chat.stackexchange.com/transcript/message/28484520#28484520
          for nodewalk/.wrap 2 pgfmath args={%
            {%
              draw tree processing order/.style={%
                filter={tree}{(id()<=########1)&&(id()>########2)}%
              }%
            }{}%
          }{tempcounta}{tempcountb},
          for root'={draw tree},
          TeX/.wrap pgfmath arg={\otherhiddenparcommand ########1\hiddenparcommand}{temptoksa},
          tempcountb'/.register=tempcounta,
        },
        for nodewalk/.wrap pgfmath arg={%
          {%
            draw tree processing order/.style={%
              filter={tree}{id()>=####1}%
            }%
          }{}%
        }{(tempcountb)+1},
        for root'={draw tree},
      },
    }
  },
}
\begin{document}
\begin{forest}
  dir tree,
  [TypeData
    [ModelData
    ]
    [StationData
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig, split dir here=continued
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
   ]
   [StationData
      [StationConfig
      ]
      [StationConfig, split dir here=more to come
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig, split dir here=last part coming up
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
    ]
  ]
\end{forest}
\end{document}

prova de conceito multi-split

eu acho que vocêpoderser capaz de automatizá-lo. Seria mais fácil se as árvores sempre pudessem começar em novas páginas, para que você pudesse comparar ycada nó com a altura do bloco de texto. Então, se essa for uma opção, acho que sugiro investigar isso. Caso contrário, talvez você possa procurar maneiras de descobrir quanto resta do bloco de texto. Mas isso não seria uma questão florestal, parece-me.

Não creio, entretanto, que exista uma maneira elegante de restaurar as arestas perdidas, embora você possa simulá-las. Para restaurá-los como arestas, você precisaria interferir na estrutura da árvore, eu acho. Para simulá-los, você poderia simplesmente salvar o xvalor do pai e então criar uma coordenada com TikZ e empate a partir daí após a divisão.

Eu sugeriria abordar isso passo a passo se você ainda quiser fazer isso. Se você precisar restaurar as bordas (sobre o que não tenho certeza), talvez faça isso primeiro e depois tente modificar o caso de múltiplas divisões, se precisar de múltiplas divisões. Só então eu pensaria em tentar automatizá-lo e me concentraria no cenário de nova página por árvore em primeira instância, mesmo que você espere evitar isso eventualmente (o que também não tenho certeza). Tudo isso (menos a parte de não nova página, se aplicável) deveria, eu acho, ser factível em Forest, embora obviamente isso não seja mais do que uma suposição um tanto fundamentada. (Sašo poderia dizer com certeza e provavelmente teria uma ideia melhor de qualquer maneira.)

EIDT

Isso divide a árvore automaticamente e tenta restaurar as arestas ausentes. Observe que isso impede o uso de edgeopções diferentes para nós diferentes com bordas restauradas e ignora qualquer arquivo edge label.

Correção de bug 04/12/2023Agora você pode desenhar duas dessas árvores, se desejar, e não deverá cometer erros em tantos casos extremos.

% ateb: https://tex.stackexchange.com/a/326884/ i gwestiwn Amir: https://tex.stackexchange.com/q/326875/
% agenir y fersiwn hwn Forest 2017/02/02 v2.1.4
\documentclass[a4paper]{article}
\usepackage{geometry,array}
\usepackage[edges]{forest}
\usetikzlibrary{shadows}
\newcolumntype{C}[1]{@{}>{\centering\arraybackslash}m{#1}@{}}
\forestset{%
  dir tree/.style={%
    for tree={%
      folder,
      grow'=0,
      if level=0{align=center}
      {
        align={C{50mm}},
      },
      font=\sffamily\bfseries\footnotesize,
      inner xsep=7pt,
      edge={ultra thick, rounded corners=2pt},
      fill=white,
      rounded corners=2pt,
      drop shadow,
    },
  },
}
% addaswyd o gôd Sašo Živanović: https://tex.stackexchange.com/a/296771/
\def\hiddenparcommand{\par}
\newcommand\otherhiddenparcommand{\par\noindent}
\newcommand\hiddencommacommand{, }
\forestset{%
  declare keylist register={split here ids},
  split here ids={},
  declare keylist register={split here interjects}, the tree parts
  split here interjects={},
  declare keylist={split here auto siblings}{},
  declare toks register=split here toks,
  declare dimen register=tmpdima,
  tmpdima'=0pt,
  declare dimen register=tmpdimb,
  tmpdimb'=0pt,
  declare dimen register=tmpdimc,
  tmpdimc'=0pt,
  to widest/.style={
    tikz+={\path (\forestregister{tempdima}, \forestoption{y}) -- (\forestregister{tempdimb}, \forestoption{y});},
  },
  hide commas/.style={%
    split here toks+={\hiddencommacommand},
    split here toks+={#1},
  },
  split dir tree pre/.style={%
    label={[text=gray, anchor=north, font=\scriptsize]below:{[cont.]}{}},
  },
  split dir tree post/.style={%
    label={[font=\scriptsize, anchor=south, text=gray]above:{[cont.]}{}},
  },
  split dir tree auto post/.style={
    split dir tree post,
    tempkeylistc'={},
    tmpdimb/.option=y,
    for nodewalk={
      while={
        > ORw2+d _+d < On=! & {y}{tmpdimb}{##2-##1} {\textheight-#1} {n'}{1}%
      }{
        next,
        tempkeylistc/.option=name
      }%
    }{},
    split here auto siblings/.register=tempkeylistc,
    tikz+/.process={
      OOw2{edge}{id}
      {
        \path [##1] (!u.parent anchor |- .north) ++(\forestregister{folder indent},1ex) coordinate (before ##2) |- (.child anchor);
        \edef\tempa{\foresteoption{split here auto siblings}}
        \foreach \i in \tempa \path [##1] (before ##2) |- ({forest cs:\i.child anchor});
      }
    },
  },
  split dir tree/.code={
    \forestset{
      draw tree stage/.style={
        for root'={
          tempdima/.min={
            >OOw2+d{x}{min x}{####1+####2}%
          }{tree},
          tempdimb/.max={
            >OOw2+d{x}{max x}{####1+####2}%
          }{tree},
          for tree={
            to widest,
          },
        },
        tempcountb'=-1,
        until={
          strequal((split_here_ids),"")
        }{
          tempkeylistb'={},
          tempkeylista'={},
          split register={split here ids}{,}{tempcounta,tempkeylistb+},
          split register={split here interjects}{,}{temptoksa,tempkeylista+},
          split here ids'/.register=tempkeylistb,
          split here interjects'/.register=tempkeylista,
          for nodewalk={
            draw tree processing order/.style={
              filter={tree}{> ORw+n< OR> & {id}{tempcounta}{########1+1}{id}{tempcountb}}%
            }
          }{},
          for root'={draw tree},
          TeX/.process={Rw{temptoksa}{\otherhiddenparcommand ####1\hiddenparcommand}},
          tempcountb'/.register=tempcounta,
        },
        for nodewalk={
          draw tree processing order/.style={
            filter={tree}{>OR>{id}{tempcountb}}
          }
        }{},
        for root'={draw tree},
      },
    }%
  },
  split dir here auto/.style n args=2{
    split dir tree pre,
    !next node.split dir tree auto post=#2,
    split here ids+/.option=id,
    split={#1}{,}{split here toks,hide commas},
    split here interjects/.register=split here toks,
  },
  split dir tree auto/.style={
    split dir tree,
    before drawing tree={
      tempdima/.max={y}{tree},
      tempdimc/.register=tempdima,
      tempdimd/.min={y}{tree},
      tempdima-/.register=tempdimd,
      tempdimb'=\textheight,
      tmpdima'=10ex,
      tmpdimc'=\pagetotal,
      while={
        >RR>{tempdima}{tempdimb}
      }{
        for nodewalk={
          root',
          until={
            > ROw2+d RRw2+d > {tempdimc}{y}{##1-##2} {tmpdima}{tmpdimc}{\textheight-##2-##1}
          }{next node},
          if nodewalk valid={previous node}{%
            previous node,
            split dir here auto/.process={R_w2{tmpdima}{continued}{{##2}{##1}}},
            next node,
          }{},
          tempdima/.option=y,
          tempdimc/.register=tempdima,
          tempdima-/.register=tempdimd,
          tmpdima'=15ex,
          tmpdimc'=0pt
        }{},
      },
    },
  },
}
\begin{document}
\begin{forest}
  dir tree,
  split dir tree auto,
  [TypeData
    [ModelData
    ]
    [StationData
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
   ]
   [StationData
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
    ]
   [StationData
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
      [StationConfig
      ]
    ]
  ]
\end{forest}
\end{document}

árvore de diretórios de divisão automática

informação relacionada