我想用这个cryptocode
包把一些盒子连接起来。但我找不到如何有效地做到这一点。我试图改变风格,看看代码……但我找不到这个间距的来源。目前我有一个基于负间距的肮脏解决方案,但问题是间距有时会无缘无故地改变,而且往往会破坏我的绘图。有没有更好的解决方案?
谢谢!
梅威瑟:
\documentclass{article}
\input{include}
\begin{document}
What I have:
\begin{figure}[h]
\centering%
\begin{bbrenv}{ctpi2}%
\begin{bbrbox}[name=$\pi_A$,minheight=15mm]%
\pseudocode{%
a \gets 3%
}%
\end{bbrbox}%
\bbrmsgspace{4mm}%
\bbrmsgfrom{top={$a$}}%
\bbrqryspace{4mm}%
\bbrqryto{top={$2a$}}%
\end{bbrenv}%
% \hspace*{-2.9mm}%
\begin{bbrenv}{ctpi2}%
\begin{bbrbox}[name=$\pi_B$,minheight=15mm]%
\end{bbrbox}%
\bbrqryspace{1mm}%
\bbrqryto{top=,edgestyle={<->}}%
\bbrqryspace{4mm}%
\bbrqryto{top={\raisebox{2.5mm}{\vdots}},edgestyle={<->}}%
\end{bbrenv}%
% \hspace*{-2.8mm}%
\begin{bbrenv}{ctpi2}%
\begin{bbrbox}[name=$\pi_C$,minheight=15mm]%
\end{bbrbox}%
\bbrqryspace{5mm}%
\bbrqryto{top={$3a$}}%
\end{bbrenv}%
\caption{My figure}
\end{figure}
What I would like (without dirty space)
\begin{figure}[h]
\centering%
\begin{bbrenv}{ctpi2}%
\begin{bbrbox}[name=$\pi_A$,minheight=15mm]%
\pseudocode{%
a \gets 3%
}%
\end{bbrbox}%
\bbrmsgspace{4mm}%
\bbrmsgfrom{top={$a$}}%
\bbrqryspace{4mm}%
\bbrqryto{top={$2a$}}%
\end{bbrenv}%
\hspace*{-2.9mm}%
\begin{bbrenv}{ctpi2}%
\begin{bbrbox}[name=$\pi_B$,minheight=15mm]%
\end{bbrbox}%
\bbrqryspace{1mm}%
\bbrqryto{top=,edgestyle={<->}}%
\bbrqryspace{4mm}%
\bbrqryto{top={\raisebox{2.5mm}{\vdots}},edgestyle={<->}}%
\end{bbrenv}%
\hspace*{-2.8mm}%
\begin{bbrenv}{ctpi2}%
\begin{bbrbox}[name=$\pi_C$,minheight=15mm]%
\end{bbrbox}%
\bbrqryspace{5mm}%
\bbrqryto{top={$3a$}}%
\end{bbrenv}%
\caption{My figure}
\end{figure}
\end{document}