编辑

编辑

大家好,我想建立一个如下图所示的组织结构图,但我不知道如何开始。我读了有关 tikz 软件包的信息…… 组织结构图

 \documentclass[border=10pt]{standalone}
 \usepackage{tikz}
 \usetikzlibrary{calc}

 \begin{document}

  \begin{tikzpicture}
    \tikzset{every node/.style=
        {thick, draw=black, align=center, minimum height=30pt, text       
   width=150pt}
     }
   \node(a1) {deterministische \\Prozesse};% start with left second level
   \node[right=10pt] (a2) at (a1.east) {stochastische Prozesse};
    \node[above=10pt] (top) at ($(a1.north)!.5!(a2.north)$)      
    {Maschinenbelegungs-\\planung};
   \node[below=10pt] (b1) at (a1.south) {ein- Maschinen\\Probleme};
  \node[below=10pt] (b2) at (a2.south) {mehrstufige\\Probleme};
   %\node[below=10pt] (c1) at (b1.south) {identische Maschinenfolge für\\alle 
  Auftr\"age \\\texbf{Flow Shop}};
  \node[below=10pt] (c2) at (b2.south) {unterschiedliche\\Maschinenfolge der  
  Auftr\"age \\\textbf{Job Shop}};
    %\node[below=10pt] (c3) at (b2.south) {ungeordnete Maschinenfolge\\ der  
 Auftr\"age \\\textbf{Open Shop}};
 \coordinate (atop) at ($(top.south) + (0,-5pt)$);% midpoint below top
  \coordinate (btop) at ($(a2.south) + (0,-5pt)$);% midoint below a3
  \coordinate (ctop) at ($(b2.south) + (0,-5pt)$);
  \draw[thick] (top.south) -- (atop)
   (a1.north) |- (atop) -| (a2.north)
   (a1.south) -- (b1.north)
   (b1.north) |- (btop) -| (b2.north)
   (b2.south) -- (c2.north);
   % (c2.north) |- (ctop) -| (c3.north);
   \end{tikzpicture}
  \end{document}

这是我的代码,但在更多问题下,我不知道如何在其下构建最后的东西……并且所有块周围的框架应该相同吗?你们能帮帮我吗?

答案1

您可以使用类似以下方法修复节点的位置

\node[below right=10pt] (c3) at (b2.south east) {ungeordnete Maschinenfolge\\ der Auftr\"age \\\textbf{Open Shop}};

然而,请注意,这种语法已被弃用,并且positioning建议使用库。

更根本的是,这不是一种绘制树的简单方法。我建议使用为此设计的库或包。森林就是一个例子。

\documentclass[border=10pt,tikz]{standalone}
\usepackage[edges]{forest}
\usetikzlibrary{fit}

\begin{document}
\begin{forest}
  for tree={
    draw,
    align=center
  },
  forked edges,
  [Maschinenbelegungs-\\planung
    [deterministische\\Prozesse
      [ein- Maschinen\\Probleme
      ]
      [mehrstufige\\Probleme
        [identische Maschinenfolge für\\alle Auftr\"age \\\textbf{Flow Shop}
        ]
        [unterschiedliche\\Maschinenfolge der Auftr\"age \\\textbf{Job Shop}
        ]
        [ungeordnete Maschinenfolge\\ der Auftr\"age \\\textbf{Open Shop}
        ]
      ]
    ]
    [stochastische\\Prozesse
    ]
  ]
  \node [draw, fit=(current bounding box.south east) (current bounding box.north west)] {};
\end{forest}
\end{document}

森林解决方案

编辑

为了使其适合标准文章而不旋转它,我建议将最终节点设为 4 行而不是 3 行。这会使图表略高一些,但会明显变窄。我认为它看起来也更整洁。

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[edges]{forest}
\usetikzlibrary{fit}

\begin{document}
\begin{figure}
  \centering
  \begin{forest}
    for tree={
      draw,
      align=center
    },
    forked edges,
    [Maschinenbelegungs-\\planung
      [deterministische\\Prozesse
        [ein- Maschinen\\Probleme
        ]
        [mehrstufige\\Probleme
          [identische\\Maschinenfolge\\für alle Auftr\"age\\\textbf{Flow Shop}
          ]
          [unterschiedliche\\Maschinenfolge\\der Auftr\"age\\\textbf{Job Shop}
          ]
          [ungeordnete\\Maschinenfolge\\der Auftr\"age\\\textbf{Open Shop}
          ]
        ]
      ]
      [stochastische\\Prozesse
      ]
    ]
    \node [draw, fit=(current bounding box.south east) (current bounding box.north west)] {};
  \end{forest}
  \caption{Organisation}\label{fig:org}
\end{figure}
\end{document}

4 线终端节点

答案2

这只是制作组织结构图的一个例子。我在 tikz 中制作了一个,所以我想它可能会帮助其他人了解如何开始。

\documentclass[border=10pt,tikz]{standalone}

\definecolor{highlight}{HTML}{A3C87B}
\tikzstyle{role} = [rectangle, rounded corners, minimum width=1cm, minimum height=1cm,text centered, draw=black]

\begin{document}
    \begin{tikzpicture}
        \node (A) [role, align=center] at (0,0) {Presidente - Conseil \\ d'administration};
        \node (B) [role] at (0,-2) {Directrice Generale};
        \node (C) [role] at (-3.0,-4) {Assistante de direction};
        \node (D) [role] at (3.5,-4) {Assistante administratif comptable};
        \node (E) [role] at (-2.5,-6) {R\'ef\'erente handicap};
        \node (F) [role, align=center] at (-19,-10) {Responsable d'activit\'es \\ R\'ef\'erente qualit\'e};
        \node (G) [role, align=center] at (-13,-10) {Responsable d'activit\'es};
        \node (H) [role, align=center] at (-7,-10) {Charg\'e de d\'eveloppement \\ R\'ef\'erent actions num\'eriques};
        \node (I) [role, align=center] at (0,-10) {Responsable d'activit\'es};
        \node (J) [role, align=center] at (7,-10) {Responsable d'activit\'es};
        \node (K) [role, align=center] at (12,-10) {Directeur CER \\ Chef de service};
        \node (L) [role, align=center] at (19,-10) {Responsable d'activit\'es};
    
        %%%%%%   F
        \node (F10) [role, align=center] at (-20.5,-12) {Intervenantes \\ exterieurs};
        \node (F11) [align=center] at (-22,-13.5) {PPP};
        \node (F12) [role, align=center] at (-21,-14.5) {CIP};
        \node (F13) [align=center] at (-22,-16) {CBP};
        \node (F14) [role, align=center] at (-20.5,-17) {Formateur \\ FLE};
    
        \node (F20) [align=center] at (-18,-12) {CBP};
        \node (F21) [role, align=center] at (-16.5,-13) {Formateur};
        
        \node (F30) [align=center] at (-18,-14) {PPP};
        \node (F31) [role, align=center] at (-17,-15) {CIP};
        
        \node (F40) [align=center] at (-18,-16) {CLEA};
        \node (F41) [role, align=center] at (-16,-17) {Formateur};
        \node (F42) [role, align=center] at (-16,-18.3) {Formateur};
        \node (F43) [role, align=center] at (-16,-19.6) {Formateur};
        \node (F44) [role, align=center] at (-16,-20.9) {Formateur};
        \node (F45) [role, align=center] at (-16,-22.2) {Formateur};
        \node (F46) [role, align=center] at (-16,-23.5) {Formateur};
    
        \node (F50) [align=center] at (-18,-24.8) {Parcours s\'ecuris\'e};
        \node (F51) [role, align=center] at (-16,-26.1) {Formateur technique \\ informatique};
        
        %%%%%%   G
        \node (G10) [align=center] at (-13.88,-11) {EDI 94};
        \node (G11) [role, align=center] at (-12.88,-12) {CIP};
        \node (G12) [role, align=center] at (-12.44,-13.3) {Formateur};
        
        %%%%%%   H
        \node (H10) [align=center] at (-9.5,-11.5) {TIC TRUCK};
        \node (H11) [role, align=center] at (-8,-12.5) {Coordinateur};
    
        \node (H20) [align=center] at (-6.5,-11.5) {Actions Informatiques};
        \node (H21) [role,align=center] at (-5,-12.5) {Coordinateur \\ num\'erique};
        \node (H22) [role,align=center] at (-5,-13.8) {Technicien \\ informatique};
        
        %%%%%%   I
        \node (I10) [align=center, fill=highlight] at (-2,-11.5) {ISAE};
        \node (I11) [role, align=center, fill=highlight] at (-1,-12.5) {CIP};
        \node (I12) [role, align=center, fill=highlight] at (-1,-13.8) {CIP};
        \node (I13) [role, align=center, fill=highlight] at (-0.8,-15.1) {Assistant \\ sociale};
        \node (I14) [role, align=center, fill=highlight] at (-0.8,-16.4) {Assistant \\ sociale};
    
        \node (I20) [align=center] at (-2,-18) {Chantier de \\ remobilisation};
        \node (I21) [role, align=center] at (-0.8,-19.3) {Encadrant \\ technique};
        
        \node (I30) [align=center, fill=highlight] at (1.5,-11.5) {PPAIP};
        \node (I31) [role, align=center, fill=highlight] at (3,-12.5) {Psychologue \\ du travail};
        \node (I32) [role, align=center, fill=highlight] at (3,-14) {Psychologue \\ du travail};
        \node (I33) [role, align=center, fill=highlight] at (3,-15.5) {Psychologue \\ du travail};
        \node (I34) [role, align=center, fill=highlight] at (2.5,-16.8) {CIP};
        \node (I35) [role, align=center, fill=highlight] at (2.5,-18.1) {CIP};
        \node (I36) [role, align=center, fill=highlight] at (2.5,-19.4) {CIP};
        \node (I37) [role, align=center, fill=highlight] at (2.5,-20.7) {CIP};
        \node (I38) [role, align=center, fill=highlight] at (2.5,-22) {CIP};
    
        %%%%%%   J
        \node (J10) [align=center] at (5.5,-11.5) {EDI 92};
        \node (J11) [role, align=center] at (6.7,-12.5) {Assistant \\ sociale};
        \node (J12) [role, align=center] at (6.7,-13.8) {Assistant \\ sociale};
        \node (J13) [role, align=center] at (6.7,-15.1) {Secr\'etaire};
    
        \node (J20) [align=center] at (8.5,-11.5) {EDIP};
        \node (J21) [role, align=center] at (9.7,-12.5) {Assistant \\ sociale};
        \node (J22) [role, align=center] at (9.7,-13.8) {RSA 93};
    
        %%%%%%   K
        \node (K10) [role, align=center] at (13.2,-11.3) {Educateur};
        \node (K11) [role, align=center] at (13.2,-12.6) {Educateur};
        \node (K12) [role, align=center] at (13.2,-13.9) {Educateur};
        \node (K13) [role, align=center] at (13.2,-15.2) {Educateur};
        \node (K14) [role, align=center] at (13.2,-16.5) {Educateur};
        \node (K15) [role, align=center] at (13.2,-17.8) {Educateur};
        \node (K16) [role, align=center] at (13.2,-19.1) {CIP};
        \node (K17) [role, align=center] at (13.2,-20.4) {Agent \\ d'entretien};
        \node (K18) [role, align=center] at (13.2,-21.7) {Agent \\ d'entretien};
    
        %%%%%%   L   
        \node (L10) [align=center] at (16,-11.5) {OFI};
        \node (L11) [role, align=center] at (17.5,-12.8) {Coordinateur};
        \node (L12) [role, align=center] at (17.5,-14.1) {Coordinateur};
        \node (L13) [role, align=center] at (17.5,-15.3) {Formateur};
        \node (L14) [role, align=center] at (17.5,-16.6) {Formateur};
        \node (L15) [role, align=center] at (17.5,-17.9) {Formateur};
        \node (L16) [role, align=center] at (17.5,-19.2) {Formateur};
        \node (L17) [role, align=center] at (17.5,-20.5) {Formateur};
        \node (L18) [role, align=center] at (17.5,-21.8) {Secr\'etaire};
    
        \node (L20) [align=center] at (20,-11.5) {Pr\'epa apprentissage};
        \node (L21) [role, align=center] at (22,-12.8) {Coordinateur/CIP};
        \node (L22) [role, align=center] at (21.5,-14.1) {Formateur};
        \node (L23) [role, align=center] at (21.5,-15.4) {Formateur};
    
        \node (L30) [align=center] at (20,-16.7) {ALPHA PRO};
        \node (L31) [role, align=center] at (21.5,-18) {Formateur};
        
        %%%%%%   Phantoms
        \node (phantom1) at (0,-8.12) {};
        \node (phantom2) at (0.12,-6) {};
    
    
        
        %%%%%%   Edges
        \draw (A) edge (B);
        \draw (C) edge (D);
        \draw (B) edge (phantom1);
        \draw (E) edge (phantom2);
        \draw (-19,-8) edge (19,-8);
        \draw (-19,-8) edge (F);
        \draw (-13,-8) edge (G);
        \draw (-7,-8) edge (H);
        \draw (0,-8) edge (I);
        \draw (7,-8) edge (J);
        \draw (12,-8) edge (K);
        \draw (19,-8) edge (L);
        
        %%%%%%   F
        \draw (F) |- (-22,-11) edge (F11);
        \draw (F) |- (-18,-11) edge (F20);
        \draw (-22,-12) edge (F10);
        \draw (F11) |- (F12); 
        \draw (F11) edge (F13); 
        \draw (F13) |- (F14); 
    
        \draw (F20) |- (F21);
        \draw (F20) edge (F30);
        
        \draw (F30) |- (F31);
        \draw (F30) edge (F40);
        
        \draw (F40) |- (F41);
        \draw (F40) |- (F42);
        \draw (F40) |- (F43);
        \draw (F40) |- (F44);
        \draw (F40) |- (F45);
        \draw (F40) |- (F46);
        
        \draw (F40) edge (F50);
        \draw (F50) |- (F51);
    
        %%%%%%   G
        \draw (G.210) edge (G10);
        \draw (G10) |- (G11);
        \draw (G10) |- (G12);
    
        %%%%%%   H
        \draw (H) |- (-9.5,-11) edge (H10);
        \draw (H10) |- (H11);
    
        \draw (H) |- (-6.5,-11) edge (H20);
        \draw (H20) |- (H21);
        \draw (H20) |- (H22);
        
        %%%%%%   I
        \draw (I) |- (-2,-11) edge (I10);
        \draw (I10) |- (I11);
        \draw (I10) |- (I12);
        \draw (I10) |- (I13);
        \draw (I10) |- (I14);
    
        \draw (I10) edge (I20);
        \draw (I20) |- (I21);
    
        \draw (I) |- (1.5,-11) edge (I30);
        \draw (I30) |- (I31);
        \draw (I30) |- (I32);
        \draw (I30) |- (I33);
        \draw (I30) |- (I34);
        \draw (I30) |- (I35);
        \draw (I30) |- (I36);
        \draw (I30) |- (I37);
        \draw (I30) |- (I38);
        
        %%%%%%   J
        \draw (J) |- (5.5,-11) edge (J10);
        \draw (J10) |- (J11);
        \draw (J10) |- (J12);
        \draw (J10) |- (J13);
        
        \draw (J) |- (8.5,-11) edge (J20);
        \draw (J20) |- (J21);
        \draw (J20) |- (J22);
    
        %%%%%%   K
        \draw (K) |- (K10);
        \draw (K) |- (K11);
        \draw (K) |- (K12);
        \draw (K) |- (K13);
        \draw (K) |- (K14);
        \draw (K) |- (K15);
        \draw (K) |- (K16);
        \draw (K) |- (K17);
        \draw (K) |- (K18);
        
        %%%%%%   L
        \draw (L) |- (16,-11) edge (L10);
        \draw (L10) |- (L11);
        \draw (L10) |- (L12);
        \draw (L10) |- (L13);
        \draw (L10) |- (L14);
        \draw (L10) |- (L15);
        \draw (L10) |- (L16);
        \draw (L10) |- (L17);
        \draw (L10) |- (L18);
    
        \draw (L) |- (20,-11) edge (L20);
        \draw (L20) |- (L21);
        \draw (L20) |- (L22);
        \draw (L20) |- (L23);
    
        \draw (L20) edge (L30);
        \draw (L30) |- (L31);
        
    \end{tikzpicture}
\end{document}

从而产生... 组织结构图

相关内容