考虑以下 TikZ 图像的代码:
\documentclass[crop, tikz]{standalone}
\usetikzlibrary{arrows,%
positioning,%
shapes}
\tikzset{%
Block/.style ={rectangle, rounded corners, draw, text width = 2.5cm, align = center, minimum height = 1.5cm}}
\begin{document}
\begin{tikzpicture}[auto, node distance = 1cm, thick]
\node[Block] (KP) {process};
\node[Block, below=of KP] (VA) {sales};
\node[Block, below left=of VA] (EL) {delivery};
\node[Block, below right=of VA] (UeL) {examination};
\draw[-latex'] (KP) -- (VA);
\coordinate[below=0.25cm of VA] (Verbindung);
\draw (VA) -- (Verbindung);
\draw[-latex'] (Verbindung) -| (EL);
\draw[-latex'] (Verbindung) -| (UeL);
\draw[-latex'] (EL) -- (UeL) node [midway, above] {manual};
\coordinate[below=3cm of VA] (Verbindung2);
\draw[dashed, -latex'] (EL) |- (Verbindung2) -| (UeL);
\node[above=0.1cm of Verbindung2] (digital) {digital};
\end{tikzpicture}
\end{document}
我怎样才能将单词“digital”设置在虚线箭头上方与单词“manual”在其各自箭头上方相同的距离,因为即使将值设置为 0cm 也不会产生相同的结果?
答案1
如果您不关心字母中的降部问题g
,您可以使用digital
:
\node[below=3cm of VA, above] (digital) {digital};
如果下降器有问题,你可以使用
\draw[-latex'] (EL) -- (UeL) node [midway, above] {manual\vphantom{g}};
代码:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,%
positioning,%
shapes}
\tikzset{%
Block/.style ={rectangle, rounded corners, draw, text width = 2.5cm, align = center, minimum height = 1.5cm}}
\pagecolor{white}
\begin{document}
\begin{tikzpicture}[auto, node distance = 1cm, thick]
\node[Block] (KP) {process};
\node[Block, below=of KP] (VA) {sales};
\node[Block, below left=of VA] (EL) {delivery};
\node[Block, below right=of VA] (UeL) {examination};
\draw[-latex'] (KP) -- (VA);
\coordinate[below=0.25cm of VA] (Verbindung);
\draw (VA) -- (Verbindung);
\draw[-latex'] (Verbindung) -| (EL);
\draw[-latex'] (Verbindung) -| (UeL);
\draw[-latex'] (EL) -- (UeL) node [midway, above] {manual};
\coordinate[below=3cm of VA] (Verbindung2);
\draw[dashed, -latex'] (EL) |- (Verbindung2) -| (UeL);
\node[below=3cm of VA, above] (digital) {digital};
\end{tikzpicture}
\end{document}