【发布时间】:2018-01-27 23:53:41
【问题描述】:
我创建了以下 LaTeX/TikZ 脚本来绘制图形:
\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{arrows, chains}
\usetikzlibrary{positioning,shapes.multipart}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[draw, fill=yellow!96!black, rectangle,
align=center, inner sep=3ex, font=\sffamily, label=below: Label1] (Box1) {
\begin{tikzpicture}
\node[draw, shape=rectangle split, rectangle split parts=2,
inner sep=1ex, rounded corners=0pt,
fill=white, font=\vphantom{Q}\sffamily] (Innerbox) {One \nodepart{two} Two};
\end{tikzpicture}};
\node[draw, inner sep=1ex, right=of Box1, label=below: Label2] (Box2) {
\begin{tikzpicture}
\end{tikzpicture}
{\begin{tikzpicture}
\node[draw, fill=yellow!96!black, rectangle,
align=center, inner sep=3ex, font=\sffamily, label=below: Label3] (Box3) {Four};
\end{tikzpicture}}};
\draw (Box1) -- (Box2) -- (Box3);
\draw[dashed] (Innerbox.one east) -- (Box2);
\draw[dashed] (Innerbox.two east) -- (Box2);
\end{tikzpicture}
\end{document}
我想解决以下问题:
如何让盒子对齐,而不是下面的标签总是在同一水平面上?
-
如何在 Box2 的右侧添加框“四”(不是在里面,而是作为像 Box1 一样的框),最好是从 Box2 到 Box3 的虚线?
所需结构:
[盒子1] -- [盒子2] -- [盒子3]
【问题讨论】:
-
嗨!如果它解决了问题,请记住将下面的答案标记为已接受! :)