我需要用 LaTeX 制作一个图形,几乎和下面的图形一模一样,但我没有找到任何类似图表的例子。
谁能帮我?
(我删除了该文本因为我不想侵犯任何人的版权。)
答案1
一个选项是使用TikZ
:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,fit}
\begin{document}
\begin{tikzpicture}[
node distance=1.5cm and 1cm,
shorten >= 4pt,
shorten <= 4pt,
nodei/.style={
text width=3cm,
align=center
},
nodeii/.style={
text width=3cm,
draw,
dashed,
minimum height=1.5cm,
align=center
},
>=latex
]
% the nodes
\node[nodei] (leftup) {Some text here\\Aditional text};
\node[nodei,below=of leftup] (leftdown) {Some text here\\Aditional text};
\node[nodei,right=5cm of leftup] (rightup) {Some text here\\Aditional text};
\node[nodei,below=of rightup] (rightdown) {Some text here\\Aditional text};
\node[nodei,below right=3cm and 1cm of leftdown] (midup) {Some text here\\Aditional text};
\node[nodeii,below=0.5cm of midup] (midmid) {Some text here\\Aditional text};
\node[nodeii,below=of midmid] (middown) {Some text here\\Aditional text};
\node[draw,inner sep=10pt,fit={(leftup) (leftdown)}] (left) {};
\node[draw,inner sep=10pt,fit={(midup) (middown)}] (middle) {};
\node[draw,inner sep=10pt,fit={(rightup) (rightdown)}] (right) {};
% the arrows
\draw[->] ([xshift=1cm]middown.north) -- ([xshift=1cm]middown.north|-midmid.south);
\draw[->] ([xshift=-1cm]middown.north) -- ([xshift=-1cm]middown.north|-midmid.south);
\draw[<-] (middown.north) -- node[fill=white] {some text} (middown.north|-midmid.south);
\draw[->] ([yshift=1cm]left.east) -- ([yshift=1cm]right.west|-left.east);
\draw[<-] ([yshift=-1cm]left.east) -- ([yshift=-1cm]right.west|-left.east);
\draw[->] (left.south east) -- ([xshift=25pt]middle.north west);
\draw[<-] ([xshift=-25pt]left.south east) -- (middle.north west);
\draw[->] (right.south west) -- ([xshift=-25pt]middle.north east);
\draw[<-] ([xshift=25pt]right.south west) -- (middle.north east);
% the node between the arrows
\node[nodei] at (middle.north|-left.west) {Some \\ text};
\end{tikzpicture}
\end{document}
答案2
正如 Thorsten 所说,http://texample.net有很多很好的例子:所有 tikz 示例的列表
我在这里找到了一个例子大型流程图。
你可以从中得到启发。它是由
- 定义节点的样式(无边框、矩形边框)
- 使用 TikZ 矩阵放置节点
- 通过线型路径连接节点