如何生成这种风格的表格?

如何生成这种风格的表格?

有人能建议我如何在乳胶中创建这种类型的表格吗?在此处输入图片描述

答案1

一种可能性是使用colortblforest@cfr 的这个很好的例子

\documentclass{article}
\usepackage{colortbl}
\usepackage{forest}
\forestset{
  dir node/.style={
    parent anchor=south west,
    child anchor=west,
    anchor=west,
    inner ysep=0pt,
    align=left,
  },
  dir tree/.style={
    for tree={
      grow'=0,
      dir node,
      edge path={
        \noexpand\path [draw, \forestoption{edge}] (!u.parent anchor) ++(1em,0) |- node[fill,inner sep=1.25pt] {} (.child anchor)\forestoption{edge label};
      },
      if n children=0{}{
        delay={
          prepend={[text 1, dir node, phantom, calign with current]}
        }
      },
      fit=band,
      before computing xy={
        l=1em,
      }
    },
  }
}
\begin{document}
\begin{tabular}{p{0.3\textwidth}p{0.3\textwidth}p{0.3\textwidth}}
\rowcolor{gray}
Trends I & Trends II & Trends III\\
\rowcolor{gray!50}
\begin{forest} % from https://tex.stackexchange.com/a/286188/121799
  dir tree,
  for tree = {
    font=\ttfamily
  }
  [text 1
    [text 2
      [text 3
        [text 4
          [text 5.1
            [text 6]
          ]
          [text 5.2
          ]
        ]
      ]
    ]
  ]
\end{forest}
 &
 \begin{forest}
  dir tree,
  for tree = {
    font=\ttfamily
  }
  [text 1
    [text 2
      [text 3
        [text 4
          [text 5.1
            [text 6]
          ]
          [text 5.2
          ]
        ]
      ]
    ]
  ]
\end{forest}
  & 
\begin{forest}
  dir tree,
  for tree = {
    font=\ttfamily
  }
  [text 1
    [text 2
      [text 3
        [text 4
          [text 5.1
            [text 6]
          ]
          [text 5.2
          ]
        ]
      ]
    ]
  ]
\end{forest}
\end{tabular}
\end{document}

\documentclass[tikz,border=10pt]{standalone}
\usepackage{forest}
\begin{document}
\begin{forest}
  for tree={
    font=\sffamily,
    line width=1pt,
    grow'=0,folder},
  [Rings
   [Commutative\\ Rings
     [Commutative Rings\\ with identity,name=cr
      [Integer domains,l*=2,name=id] 
     ]
   ]
   [Rings\\ with unity,name=ru
    [Division rings
     [Fields,l*=2,name=fld]
    ]
   ]
  ]
 \begin{scope}[line width=1pt]
   \draw[-latex] (ru) -- (cr);
   \draw[-latex] (id) -- (fld);
  \end{scope}
\end{forest}
\end{document}

在此处输入图片描述

相关内容