我正在尝试在用
schemabloc
包绘制的这两个 tikzpictures 之间放置等效符号。这是我尝试让它工作的代码,但它给了我那个。有什么想法可以让它工作吗?
\documentclass{book}
\usepackage{schemabloc}
\begin{document}
\begin{center}
\begin{tikzpicture}
\sbEntree{e}
\sbBloc{a}{$a$}{e}
\sbRelier[$e$]{e}{a}
\sbBloc{b}{$b$}{a}
\sbRelier{a}{b}
\sbSortie{s}{b}
\sbRelier[$s$]{b}{s}
\end{tikzpicture}
$\iff$
\begin{tikzpicture}
\sbEntree{e}
\sbBloc{a}{$ab$}{e}
\sbRelier{e}{a}
\sbSortie{s}{a}
\sbRelier[$s$]{a}{s}
\end{tikzpicture}
\end{center}
\end{document}
答案1
最简单的方法就是把$\iff$
图片放进去:
完整代码如下:
\documentclass{article}
\usepackage{schemabloc}
\begin{document}
\begin{center}
\begin{tikzpicture}
\sbEntree{e}
\sbBloc{a}{$a$}{e}
\sbRelier[$e$]{e}{a}
\sbBloc{b}{$b$}{a}
\sbRelier{a}{b}
\sbSortie{s}{b}
\sbRelier[$s$]{b}{s}
\node at (5.5,0) {$\iff$};
\end{tikzpicture}
\begin{tikzpicture}
\sbEntree{e}
\sbBloc{a}{$ab$}{e}
\sbRelier{e}{a}
\sbSortie{s}{a}
\sbRelier[$s$]{a}{s}
\end{tikzpicture}
\end{center}
\end{document}
baseline
或者,您可以在环境中设置tikzpicture
:
\documentclass{article}
\usepackage{schemabloc}
\begin{document}
\begin{center}
\begin{tikzpicture}[baseline=(current bounding box.center)]
\sbEntree{e}
\sbBloc{a}{$a$}{e}
\sbRelier[$e$]{e}{a}
\sbBloc{b}{$b$}{a}
\sbRelier{a}{b}
\sbSortie{s}{b}
\sbRelier[$s$]{b}{s}
\end{tikzpicture}
$\iff$
\begin{tikzpicture}[baseline=(current bounding box.center)]
\sbEntree{e}
\sbBloc{a}{$ab$}{e}
\sbRelier{e}{a}
\sbSortie{s}{a}
\sbRelier[$s$]{a}{s}
\end{tikzpicture}
\end{center}
\end{document}
这需要进行一些调整: