制作 WBS 结构的代码

制作 WBS 结构的代码

我如何修改链接中的最后一个代码(工作分解结构 (WBS) TikZ)来制作 WBS 结构,就像一个图像WBS 图像

我不知道如何在 wbs 示例中引入新级别。

谢谢!!!

谨致问候,费利佩·丰塞卡

答案1

使用从 TeXexamples 窃取的代码...以下内容可以作为您制作所需树的起点:

\documentclass{article}
    \usepackage{tikz}
\usetikzlibrary{shadows,trees}

    \begin{document}
    \begin{tikzpicture}[
      every node/.style = {draw, rounded corners=3pt, semithick, drop shadow},
            ROOT/.style = {top color=green!60!blue, bottom color=blue!60!green,
                             inner sep=2mm, text=white, font=\bfseries},
              L1/.style = {fill=blue!20},
              L2/.style = {fill=orange!30},
              L3/.style = {fill=green!30, grow=down, xshift=1em, anchor=west, 
      edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}},
edge from parent/.style = {draw, thick},
              LD/.style = {level distance=#1ex},
             LD1/.style = {level distance=6ex},
             LD2/.style = {level distance=12ex},
             LD3/.style = {level distance=18ex},
         level 1/.style = {sibling distance=32mm}
                        ]
    % Parents
\node[ROOT] {root}
    [edge from parent fork down]
    child{node[L2] {AAA AAA AAA}
      child[L3,LD1]   {node[L3]   {A1}}
      child[L3,LD2]  {node[L3]   {A2}}
      child[L3,LD3]   {node[L3]   {A3}}
            }
    child{node[L2] {BB  BB BB BB}
      child[L3,LD1]  {node[L3]   {B1}}
      child[L3,LD2]  {node[L3]   {B2}}
            }
    child {node[L2] {C CC CCC}
      child[L3,LD1] {node[L3]   {C1}}
      child[L3,LD2] {node[L3]   {C2 C2 C2}
          child[L3,LD1] {node[L3,fill=red!30]   {C1}}
          child[L3,LD2] {node[L3,fill=red!30]   {C2}} 
                        }     
      child[L3,LD=30]  {node[L3]   {C2 C2 C2}}
            };
\end{tikzpicture}
    \end{document}

在此处输入图片描述

节点中的真实文本以及节点数量不应该太难改变和添加。

相关内容