0

This is my first time writing in this amazing community, and I hope anyone can help me. I've been trying to do this schema with the package schemata unsuccessfully. Could you help me with the code? I would thank you a lot.

enter image description here

  • 4
    See https://tex.stackexchange.com/a/257973/255043. It would help a lot if you could show what you tried because then others do not have to type all the texts. –  Nov 03 '21 at 01:39

1 Answers1

3

I just copied the forest style from this answer, and added some macros to recursively draw the scheme.

\documentclass[tikz,border=10pt]{standalone}
\usepackage{forest}
\usetikzlibrary{decorations.pathreplacing}
\forestset{% from https://tex.stackexchange.com/a/257973/255043
  forest scheme/.style={
    for tree={inner ysep=0pt,
      grow'=0,
      anchor=west,
      align=left,
      if n=1{%
        edge path={
          \noexpand\path [\forestoption{edge}] (!ul.south west) -- (!u1.north west)\forestoption{edge label};
        }
      }{no edge},
      edge={decorate, decoration={brace},thick},
    },
  }
}
\begin{document}
\bracketset{action character=@}
\def\MyTreeContent#1{\ifcase#1\relax
\or
\or
[Ciertas,tier=t2\MyTreeContent{3}]
[Contingententes,tier=t2\MyTreeContent{3}]
\or
[Vencidas,tier=t3\MyTreeContent{4}]
[Anticipadas,tier=t3\MyTreeContent{4}]
\or
[Inmediatas,tier=t4]
[Diferidas,tier=t4]
\fi}
\begin{forest}
  forest scheme
  @+
  [Annualidades
    [Simples
      \MyTreeContent{2}
    ]
    [Generales
      \MyTreeContent{2}
    ]
  ]
\end{forest}
\end{document}

enter image description here