在此流程图中,箭头位于矩形框内,并且箭头上方和下方的文本未对齐

在此流程图中,箭头位于矩形框内,并且箭头上方和下方的文本未对齐

在此处输入图片描述

\documentclass[12pt,a4,twoside]{article}
\usepackage{tikz}
\usetikzlibrary{shapes.misc,shapes.geometric,arrows.meta,positioning,shadows.blur,chains,scopes,quotes}
\begin{document}
\begin{figure}
\begin{tikzpicture}
 [
 ->,
    >=Stealth,
    shorten >=1pt,
    shorten <=1pt,
    thick,
    main node/.style={fill=white, draw, font=\sffamily\scriptsize\bfseries\normalsize, blur shadow, align=center},
    hex/.style={main node, rectangle},
    blur shadow={shadow opacity=25},
  ]
  %Nodes
   \node [hex] (maintopic) {Social \\ Value};
   \node [hex] (ecv) [below left=of maintopic] at (-5,-6) {Economic \\ Value};
   \node [hex] (env) [below right=of maintopic] at (5,-6) {Environmental \\ Value};
   %Lines
   \draw[<-, transform canvas={shift={(5pt,5pt)}}] (ecv.north) -- node [above,pos=0.25] {\rotatebox[origin=c]{50}{\parbox[t][][t]{4cm}{Labour, Technology}}} (maintopic.west); 
   \draw[->, transform canvas={shift={(5pt,-5pt)}}] (ecv.north) -- node [below,pos=0.8] {\rotatebox[origin=c]{50}{\parbox[t][][t]{6cm}{Machinery, Material, Electricity}}} (maintopic.west);
   \draw[->, transform canvas={shift={(5pt,5pt)}}] (env.north) -- node [above,pos=0.25] {\rotatebox[origin=c]{315}{\parbox[t][][t]{6.5cm}{Drainage, Management, Protection}}} (maintopic.east);
   \draw[<-, transform canvas={shift={(5pt,-5pt)}}] (env.north) --node [below,pos=0.75] {\rotatebox[origin=c]{315}{\parbox[t][][t]{6.5cm}{Water Supply, Resources, Ecology}}} (maintopic.east);
    \draw[->, transform canvas={shift={(5pt,5pt)}}] (env) -- node [above] {\rotatebox[origin=c]{0}{\parbox[t][][t]{6.5cm}{Drainage, Development}}}(ecv);
   \draw[<-, transform canvas={shift={(5pt,-5pt)}}] (env) -- node [below] {\rotatebox[origin=c]{0}{\parbox[t][][t]{6.5cm}{Water Supply, Resources, Ecology}}}(ecv);
  \end{tikzpicture}
\end{figure}
\end{document}

答案1

在此处输入图片描述

\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                positioning,
                quotes,
                shadows.blur}

\begin{document}
    \begin{tikzpicture}[
node distance = 33mm and 33mm,
     N/.style = {draw, thick, font=\sffamily\bfseries, align=center,
                 fill=white, outer sep=2mm, blur shadow={shadow opacity=30}},
every edge/.style = {draw, -Straight Barb, semithick},
every edge quotes/.append style = {auto, font=\footnotesize, inner sep=2pt, align=center, sloped}
                        ]
% Nodes
\node (n1) [N]  {Social\\ Value};
\node (n2) [N, below  left=of n1]   {Economic \\ Value};
\node (n3) [N, below right=of n1]   {Environmental \\ Value};
% Arrows
\draw   ([yshift= 1mm] n1.west)  edge["{Labour, Technology}"]                   ([xshift=-1mm] n2.north)
        ([xshift= 1mm] n3.north) edge["{Drainage, Management, Protection}"]     ([yshift= 1mm] n1.east)
        ([yshift=-1mm] n2.east)  edge["{Water Supply, Resources, Ecology}" ']   ([yshift=-1mm] n3.west);
\draw   ([xshift= 1mm] n2.north) edge["{Machinery, Material, Electricity}" ']   ([yshift=-1mm] n1.west)
        ([yshift= 1mm] n3.west)  edge["{Drainage, Development}"]     ([yshift= 1mm] n2.east)
        ([yshift=-1mm] n1.east)  edge["{Water Supply, Resources, Ecology}" ']                 ([xshift=-1mm] n3.north);
    \end{tikzpicture}
 \end{document}

或者小一点

\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                positioning,
                quotes,
                shadows.blur}

\begin{document}
    \begin{tikzpicture}[
node distance = 24mm and 24mm,
     N/.style = {draw, thick, font=\sffamily\bfseries, align=center,
                 fill=white, outer sep=2mm, blur shadow={shadow opacity=30}},
every edge/.style = {draw, -Straight Barb, semithick},
every edge quotes/.append style = {auto, font=\footnotesize, inner sep=2pt, align=center, sloped}
                        ]
% Nodes
\node (n1) [N]  {Social\\ Value};
\node (n2) [N, below  left=of n1]   {Economic \\ Value};
\node (n3) [N, below right=of n1]   {Environmental \\ Value};
% Arrows
\draw   ([yshift= 1mm] n1.west)  edge["{Labour, Technology}"]                   ([xshift=-1mm] n2.north)
        ([xshift= 1mm] n3.north) edge["{Drainage, Management,\\ Protection}"]     ([yshift= 1mm] n1.east)
        ([yshift=-1mm] n2.east)  edge["{Water Supply, Resources,\\ Ecology}" ']   ([yshift=-1mm] n3.west);
\draw   ([xshift= 1mm] n2.north) edge["{Machinery, Material,\\ Electricity}" ']   ([yshift=-1mm] n1.west)
        ([yshift= 1mm] n3.west)  edge["{Drainage, Development}"]     ([yshift= 1mm] n2.east)
        ([yshift=-1mm] n1.east)  edge["{Water Supply, Resources,\\ Ecology}" ']                 ([xshift=-1mm] n3.north);
    \end{tikzpicture}
 \end{document}

在此处输入图片描述

相关内容