我有以下代码可以生成图像(遗憾的是,由于此处没有图像文件,因此代码无法工作)。由于某种原因,“完成”文本被放置在箭头下方。我该如何修复?
\begin{flushleft}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto, node distance=8.5cm ,semithick]
\node [draw=none, initial, initial text=\textbf{Initial Query},initial where=above](part1){\includegraphics[width=7.5cm,height=6cm,keepaspectratio=true]{byhalfpart1.jpg}};
\node [draw=none](part2)[right of=part1] {\includegraphics[width=7.5cm,height=6cm,keepaspectratio=true]{byhalfpart2.jpg}
};
\path (part1) edge[] node{} (part2);
\coordinate[below of=part2] (d1);
\path (part2) edge[shorten >=5cm] node{Done} (d1);
% \draw [shorten >=5cm] (part2) to[] node[auto] {\textbf{Done}} (d1);
\end{tikzpicture}\\
\end{flushleft}
答案1
如果没有充分米动物西工作埃例如,很难找出可以做什么。我认为你可以right=2cm of node.anchor
像这个小例子一样使用这个概念:
\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\begin{document}
\begin{tikzpicture}[textnode/.style={align=left}, -latex]
\node (iq) {initial query};
\node[textnode,below=1cm of iq.south] (part1) {part1 part1\\ part1 part1\\ part1 part1\\ part1 part1};
\node[textnode,right=1cm of part1.east] (part2) {part2 part2\\ part2 part2\\ part2 part2\\ part2 part2\\ part2 part2};
\node[below=1cm of part2.south] (d1) {Done};
\draw (iq) -- (part1);
\draw (part1) -- (part2);
\draw (part2) -- (d1);
\end{tikzpicture}
\end{document}