我该如何绘制这个组织结构图?

我该如何绘制这个组织结构图?

我正在尝试用 LaTeX 实现这个组织结构图:

在此处输入图片描述

但是我在正确对齐节点方面遇到了一些困难,而且我不知道如何进行绘制。

以下是 MWE:

\documentclass[headings=big,twoside,chapterprefix=true,fleqn]{scrreprt}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{pdflscape}
\usepackage{tikz}
\begin{document}
\begin{landscape}
\begin{figure}
\centering
\begin{tikzpicture}
\begin{scope}[xscale=3.5,yscale=2]
\node (PDG) at (0,6) [rectangle,draw] {PDG};
\node (CE) at (-1,5) [rectangle,draw,dashed] {Comité exécutif};
\node (CET) at (1,5) [rectangle,draw,dashed] {Comité d'éthique};
\node (SG) at (-1,4.5) [rectangle,draw,fill=gray!30] {Secrétariat Général};
\node (C) at (1,4.5) [rectangle,draw,fill=gray!30] {Cabinet};
\node (AC) at (-1,4) [rectangle,draw,fill=orange!90] {\color{white}Affaires Corporatives};
\node (AeC) at (1,4) [rectangle,draw,fill=gray!30] {Audit et Conformité};
\node (TO) at (-1,3.5) [rectangle,draw,fill=orange!90] {\color{white}Transformation Office};
\node (SIE) at (1,3.5) [rectangle,draw,fill=gray!30] {\begin{tabular}{c}Sûreté interne\\d'établissement\end{tabular}}; 
\node (DC) at (-1,3) [rectangle,draw,fill=orange!90] {\color{white}Direction Communication};
\node (Con) at (1,3) [rectangle,draw,fill=gray!30] {Conseillers};
\node (SPE) at (-3.8,2.2) [rectangle,fill=gray!30] {\begin{tabular}{c}Stratégie,\\Panification\\$\&$ Économie\end{tabular} };
\node (DSE) at (-3,1) [rectangle,fill=gray!30] {\begin{tabular}{c}Digitalisation et\\Systèmes\\d'Information\end{tabular} };
\node (F) at (-2.8,2) [rectangle,fill=gray!30] {Finance};
\node (BDM) at (-2,1) [rectangle,fill=gray!30] {\begin{tabular}{c}Business\\Développment\\Marketing\end{tabular} };
\node (RH) at (-1.8,2) [rectangle,fill=gray!30] {\begin{tabular}{c}Ressources\\Humaines\end{tabular}};
\node (SSE) at (-1,1) [rectangle,fill=gray!30] {\begin{tabular}{c}Santé, Sécurité \\$\&$ Environnement\end{tabular} };
\node (PL) at (-0.8,2) [rectangle,fill=orange!90] {\begin{tabular}{c}\color{white}Procurement \\$\&$ \color{white} Logistique\end{tabular}};
\node (EPM) at (0,1) [rectangle,fill=orange!90] {\begin{tabular}{c} \color{white}Engineering $\&$\\ \color{white} Project \\ \color{white} Management\end{tabular} };
\node (RN) at (0.8,2) [rectangle,fill=orange!90] {\begin{tabular}{c}\color{white} Ressources \\$\&$ \color{white} Nouvelles\end{tabular}};
\node (RD) at (1.6,1) [rectangle,fill=gray!30] {\begin{tabular}{c} Recherche $\&$\\ Développement\end{tabular} };
\node (J) at (1.8,2) [rectangle,fill=gray!30] {Juridique };
\node (EP) at (-3.8,0) [rectangle,fill=gray!30] {Exploration-Production};
\node (TC) at (-2.4,0) [rectangle,fill=gray!30] {Transport par Canalisation};
\node (LS) at (-0.8,0) [rectangle,fill=gray!30] {Liquéfaction et Séparation};
\node (RP) at (0.6,0) [rectangle,fill=orange!90] {\color{white}Raffinage et Pétrochimie};
\node (Com) at (2,0) [rectangle,fill=gray!30] {Commercialisation};
%draw :
\draw (CE) -- (CET);
\draw (SG) -- (C);
\draw (AC) -- (AeC);
\draw (TO) -- (SIE);
\draw (DC) -- (Con);
\end{scope}
\end{tikzpicture}
\end{figure}
\end{landscape}
\end{document}

结果 :

在此处输入图片描述

答案1

在此处输入图片描述

tikz通过使用库来努力使代码更简短、更简洁calcchains并且positioning

\documentclass[headings=big,twoside,chapterprefix=true,fleqn]{scrreprt}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{pdflscape}
\usepackage{tikz}
\usetikzlibrary{babel, calc, chains, positioning}

\begin{document}
\begin{landscape}
\begin{figure}
\centering

\tikzset{}
    \begin{tikzpicture}[
  node distance = 2mm and 4mm,
    start chain = A going below,
    start chain = B going right,
    base/.style = {inner sep=1mm,
                   align=flush center, font=\sffamily\linespread{.84}\selectfont},
   bnode/.style = {base, fill=black!80, text = white},
   gnode/.style = {base, fill=gray!30},
   onode/.style = {base, fill=orange!90, text=white},
                        ]
    \begin{scope}[every node/.append style={minimum height=11mm, text width=32mm,on chain=A}]
\node (PDG) [bnode] {PDG};
\node (CE)  [base, draw, dashed, below left=of PDG]   {Comité exécutif};
\node (SG)  [gnode] {Secrétariat Général};
\node (AC)  [onode] {Affaires Corporatives};
\node (TO)  [gnode] {Transformation Office};
\node (DC)  [onode] {Direction Communication};

\node (CET) [base, draw, dashed, below right=of PDG] {Comité d'éthique};
\node (C)   [gnode] {Cabinet};
\node (AeC) [gnode] {Audit et Conformité};
\node (SIE) [gnode] {Sûreté interne d'établissement};
\node (Con) [gnode] {Conseillers};
\foreach \L/\R in {CE/CET, SG/C, AC/AeC, TO/SIE, DC/Con}{\draw (\L) -- (\R);}
    \end{scope}
%%%%
    \begin{scope}[node distance=4mm and 4mm,
                  every node/.append style={minimum height=13mm,text width=24mm,on chain=B}]
\coordinate[below=of PDG |- DC.south] (aux1);
\node (SPE) [gnode,below left=4mm and 62mm of aux1] % 58mm=2x(24+2)mm+2x4mm+2mm
            {Stratégie, Panification \& Économie};
\node (F)   [gnode] {Finance};
\node (RH)  [gnode] {Ressources Humaines};
\node (PL)  [onode] {Procurement $\&$  Logistique};
\node (RN)  [onode] {Ressources  $\&$  Nouvelles};
\node (J)   [gnode] {Juridique };
\draw[thick] (PDG) -- (aux1) -- (aux1 -| SPE)
                      (aux1) -- (aux1 -| J)  ;
%
\node  (SSE) [gnode, below=of $(SPE.south)!0.5!(F.south)$]
             {Digitalisation et Systèmes d'Information};
\node (BDM) [gnode] {Business Développment Marketing};
\node (DSE) [gnode, below=of $(PL.south)!0.5!(RN.south)$]
            {Santé, Sécurité $\&$ Environnement};
\node (EPM) [onode] {Engineering $\&$  Project \\  Management};
\node (RD)  [gnode] {Recherche $\&$ Développement};
%
\foreach \x in {SPE, F,RH, PL, RN, J,
                SSE, BDM,DSE, EPM}{\draw (\x |- aux1) -- (\x);}
\draw (aux1-| J) -| (RD);
    \end{scope}
%%%%
    \begin{scope}[node distance=4mm and 4mm,
                  every node/.append style={minimum height=11mm,text width=32mm,on chain=B}]
\coordinate[below=of PDG |- SSE.south] (aux2);
\node (EP) [gnode,below left=4mm and 59mm of aux2] % 58mm=1x(32+2)mm+2x4mm+34/2mm (LS) at (dummy4)
           {Exploration-Production};
\node (TC) [gnode] {Transport par Canalisation};
\node (LS) [gnode] {Liquéfaction et Séparation};
\node (RP) [onode] {Raffinage et Pétrochimie};
\node (COM)[gnode] {Commercialisation};
\draw[thick] (aux1) -- (aux2) -- (aux2 -| EP)
                       (aux2) -- (aux2 -| COM);
\foreach \x in {EP, TC, LS, RP, COM}{\draw (\x |- aux2) -| (\x);}
    \end{scope}
\end{tikzpicture}
\end{figure}
\end{landscape}
\end{document}

答案2

这是一种最小损害提案,我尽可能保留您的代码。但是,我所做的更改是使用定位库将节点相对于彼此放置。我猜切换到森林可能会允许人们提出更优雅的解决方案,但正如我所说,我在这里造成的损害最小。更新:我忘了说,即使我用 编译,所有重音字符也不会显示xelatex。但我假设你现在知道如何处理这个问题。我还做了一些进一步的简化,比如用它们的 Ti替换tabular环境和\color{white}Z 当量。

\documentclass[headings=big,twoside,chapterprefix=true,fleqn]{scrreprt}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{pdflscape}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{landscape}
\begin{figure}
\centering
\tikzset{onode/.style={fill=orange!90,text=white},gnode/.style={fill=gray!30}}
\begin{tikzpicture}[every node/.append style={draw,align=center},node
distance=1cm,font=\sffamily]
\begin{scope}[xscale=3.5,yscale=2]
\node (PDG) at (0,6) [rectangle,draw] {PDG};
\node[below left=1cm of PDG,anchor=east] (CE) {Comité exécutif};
\node[below right=1cm of PDG,dashed,anchor=west] (CET) {Comité d'éthique};
\node[below=of CE.east,gnode,anchor=east] (SG) {Secrétariat Général};
\node[below=of CET.west,anchor=west,gnode]  (C) {Cabinet};
\node[below=of SG.east,onode,anchor=east] (AC){Affaires Corporatives};
\node[below=of C.west,anchor=west,gnode] (AeC) {Audit et Conformité};
\node[below=of AC.east,onode,anchor=east] (TO) {Transformation Office};
\node[below=of AeC.west,anchor=west,gnode] (SIE) {Sûreté interne\\d'établissement}; 
\node[below=of TO.east,onode,anchor=east] (DC)  {Direction Communication};
\node[below=of SIE.west,anchor=west,gnode] (Con) {Conseillers};
%
\path (DC) -- (Con) coordinate[midway,yshift=-2cm] (dummy) -- ++(-0.5cm,0)
coordinate (dummy2);
\node[left=1cm of dummy,gnode] (RH){Ressources\\Humaines};
\node[left=of RH,gnode] (F) {Finance};
\node[left=of F,gnode] (SPE) {Stratégie,\\Panification\\ \& Économie};
\node[right=1cm of dummy,onode] (PL) {Procurement \\$\&$  Logistique};
\node[right=of PL,onode] (RN)  { Ressources \\$\&$  Nouvelles};
\node[right=of RN,gnode] (J) {Juridique };
%
\node[below=2cm of dummy,anchor=west,gnode] (SSE) {Santé, Sécurité \\$\&$ Environnement};
\node[right=1.5cm of SSE,onode] (EPM) { Engineering $\&$\\  Project \\  Management};
\node[right=1.5cm of EPM,gnode] (RD) { Recherche $\&$\\ Développement};
\node[left=1.5cm of SSE,gnode] (BDM) {Business\\Développment\\Marketing};
\node[left=1.5cm of BDM,gnode] (DSE) {Digitalisation et\\Systèmes\\d'Information};
%
\coordinate[below=1cm of DSE] (dummy3);
\coordinate (dummy4) at (dummy3 -| dummy);
\node[gnode] (LS) at (dummy4)  {Liquéfaction et Séparation};
\node[right=of LS,onode] (RP)  {Raffinage et Pétrochimie};
\node[right=of RP,gnode] (COM) {Commercialisation};
\node[left=of LS,gnode] (TC)  {Transport par Canalisation};
\node[left=of TC,gnode] (EP)  {Exploration-Production};
%draw :
\draw (CE) -- (CET);
\draw (SG) -- (C);
\draw (AC) -- (AeC);
\draw (TO) -- (SIE);
\draw (DC) -- (Con);
% new draw
\draw (PDG) -- ([yshift=0.5cm]dummy) coordinate (dummy5);
\foreach \X in {RH,F,SPE,PL,RN,J,SSE.155,EPM.40,RD,BDM.130,DSE.48}
{\draw (dummy5) -| (\X);}
\draw (dummy5) -| ([xshift=-0.15cm,yshift=0.3cm]dummy4) coordinate (dummy6);
\foreach \X in {LS,RP,COM,TC,EP}
{\draw (dummy6) -| (\X);}
\end{scope}
\end{tikzpicture}
\end{figure}
\end{landscape}
\end{document}

在此处输入图片描述

相关内容