【LaTeX应用】tikzpicture绘图,两个tikzpicture并列间距调整

【LaTeX应用】tikzpicture绘图,两个tikzpicture并列间距调整

\begin{tikzpicture}
		\node[draw,minimum width=40mm, minimum height=6mm] (m1) {message};
		\node[draw,minimum width=10mm, minimum height=6mm, left =(0mm of m1.east)] (m2) {0}; 
		\node[draw, minimum width=30mm, minimum height=6mm, below of = m1, node distance = 13mm] (e1) {$ E(k,\cdot) $};
		\node[draw, minimum width=40mm, minimum height=6mm, below of = e1, node distance = 13mm] (c1) {ciphertext}; 
		
		\draw[->] (m1) -- (e1);
		\draw[->] (e1) -- (c1);
		\end{tikzpicture}
		\hspace{2.5em}
		\begin{tikzpicture}
		\node[draw,minimum width=40mm, minimum height=6mm] (m1) {ciphertext};
		
		\node[draw, minimum width=30mm, minimum height=6mm, below of = m1, node distance = 13mm] (e1) {$ E(k,\cdot) $};
		\node[draw, minimum width=40mm, minimum height=6mm, below of = e1, node distance = 13mm] (c1) {message}; 
		\node[draw,minimum width=10mm, minimum height=6mm, left =(0mm of c1.east)] (m2) {...};
		
		\draw[->] (m1) -- (e1);
		\draw[->] (e1) -- (c1);
		\end{tikzpicture}

两个tikzpicture之间不能有换行,之间用\hspace{2.5em}添加间隔,这里添加的是2.5个字符间隔

导言区添加包

\usepackage{tikz}
\usetikzlibrary{chains}

 

上一篇:Java单体应用 - 架构模式 - 03.设计模式-01.工厂模式


下一篇:Scala实验二——2.模拟图形绘制