\documentclass{article}
\usepackage[american]{circuitikz}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\begin{minipage}{.5\textwidth}
\centering
\begin{circuitikz}
\draw(0,0)
to[short,*-*](4,0)
;
\draw(0,1.5)
to[short,*-](0.2,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,L,l_=$ L_f $] (2,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,L,l_=$ L_f $] (3.8,1.5)
to[short,-*](4,1.5)
;
\draw(2,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,C=$ C_f $] (2,0)
;
\end{circuitikz}
\end{minipage}%
\begin{minipage}{0.5\textwidth}
\centering
\begin{circuitikz}
\draw(7.1,0)
to[short,*-*](5,0)
to[short,-*](4.5,0)
to[short,-*](2.5,0)
to[short,-*](2,0)
to[short,*-*](0,0)
;
\draw(0,1.5)
to[short,*-](0.2,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,L,l_=$ L_f $] (2,1.5)
to[short,*-*](2.5,1.5)
to[short](4.5,1.5)
to[short,*-*](5,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,L,l_=$ L_f $] (7,1.5)
to[short,-*](7.1,1.5)
;
\draw(3.55,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,C=$ C_f $] (3.55,0)
;
\draw[dashed](0.4,1.8)--(1.8,1.8);
\draw[dashed](0.4,1.8)--(0.4,-0.2);
\draw[dashed](0.4,-0.2)--(1.8,-0.2);
\draw[dashed](1.8,-0.2)--(1.8,1.8);
\draw[dashed](2.65,1.8)--(4.35,1.8);
\draw[dashed](2.65,1.8)--(2.65,-0.2);
\draw[dashed](2.65,-0.2)--(4.35,-0.2);
\draw[dashed](4.35,-0.2)--(4.35,1.8);
\draw[dashed](5.3,1.8)--(6.7,1.8);
\draw[dashed](5.3,1.8)--(5.3,-0.2);
\draw[dashed](5.3,-0.2)--(6.7,-0.2);
\draw[dashed](6.7,-0.2)--(6.7,1.8);
\end{circuitikz}
\end{minipage}
\caption{Example of ladder LC network as cascaded connection of two basic two-port networks.}
\end{figure}
\end{document}
产生以下输出
可以看出,需要<
>
中间的那个符号。我试过了,raisebox
但没有用,如果两个小页面中的数字可以稍微靠近一点,我会很感激,因为这是我使用小页面时遇到的另一件麻烦事。
谢谢。
答案1
你真的不需要迷你页面。Circuitikz 就是 tikzpicture。难道不是$\leftrightarrow$
更好的符号吗?
\documentclass{article}
\usepackage[american]{circuitikz}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\begin{circuitikz}[baseline=(current bounding box.center)]
\draw(0,0)
to[short,*-*](4,0)
;
\draw(0,1.5)
to[short,*-](0.2,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,L,l_=$ L_f $] (2,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,L,l_=$ L_f $] (3.8,1.5)
to[short,-*](4,1.5)
;
\draw(2,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,C=$ C_f $] (2,0)
;
\end{circuitikz}
\hfill $<>$ \hfill
\begin{circuitikz}[baseline=(current bounding box.center)]
\draw(7.1,0)
to[short,*-*](5,0)
to[short,-*](4.5,0)
to[short,-*](2.5,0)
to[short,-*](2,0)
to[short,*-*](0,0)
;
\draw(0,1.5)
to[short,*-](0.2,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,L,l_=$ L_f $] (2,1.5)
to[short,*-*](2.5,1.5)
to[short](4.5,1.5)
to[short,*-*](5,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,L,l_=$ L_f $] (7,1.5)
to[short,-*](7.1,1.5)
;
\draw(3.55,1.5)
to[/tikz/circuitikz/bipoles/length=0.8cm,C=$ C_f $] (3.55,0)
;
\draw[dashed](0.4,1.8)--(1.8,1.8);
\draw[dashed](0.4,1.8)--(0.4,-0.2);
\draw[dashed](0.4,-0.2)--(1.8,-0.2);
\draw[dashed](1.8,-0.2)--(1.8,1.8);
\draw[dashed](2.65,1.8)--(4.35,1.8);
\draw[dashed](2.65,1.8)--(2.65,-0.2);
\draw[dashed](2.65,-0.2)--(4.35,-0.2);
\draw[dashed](4.35,-0.2)--(4.35,1.8);
\draw[dashed](5.3,1.8)--(6.7,1.8);
\draw[dashed](5.3,1.8)--(5.3,-0.2);
\draw[dashed](5.3,-0.2)--(6.7,-0.2);
\draw[dashed](6.7,-0.2)--(6.7,1.8);
\end{circuitikz}
\caption{Example of ladder LC network as cascaded connection of two basic two-port networks.}
\end{figure}
\end{document}
答案2
作为补充约翰·科米洛答案(解决 op 问题)侧重于非主题问题,如何更简短、简洁地编写电路代码:
\documentclass[margin=3mm]{standalone}
\usepackage[american]{circuitikz}
\ctikzset{bipoles/length=0.8cm}
\begin{document}
\begin{circuitikz}[baseline=(current bounding box.center)]
]
\draw (0,1.5) to [L,l_=$L_f$,*-] ++ (2.2,0)
to [L,l_=$L_f$,-*] ++ (2.2,0)
(2.2,1.5) to [C=$C_f$,*-*] ++ (0,-1.5)
(0,0) to [short,*-*] (4.4,0)
;
\end{circuitikz}
\hfill $\longleftrightarrow$ \hfill
\begin{circuitikz}[baseline=(current bounding box.center),
box/.style = {draw, dashed, minimum height=20mm, minimum width=18mm},
]
\draw (0,1.5) to [short,*-o] ++ (0.2,0)
to [L,l_=$L_f$] ++ (1.8,0)
to [short,o-o] ++ (0.4,0)
-- ++ (1.8,0)
to [short,o-o] ++ (0.4,0)
to [L,l_=$L_f$] ++ (1.8,0)
to [short,o-*] ++ (0.2,0)
(3.3,1.5) to [C=$C_f$,*-*] ++ (0,-1.5)
(0,0) to [short,*-o] ++ (0.2,0) -- ++ (1.8,0)
to [short,o-o] ++ (0.4,0) -- ++ (1.8,0)
to [short,o-o] ++ (0.4,0) -- ++ (1.8,0)
to [short,o-*] ++ (0.2,0)
;
\node[box] at (1.1,0.8) {};
\node[box] at (3.3,0.8) {};
\node[box] at (5.5,0.8) {};
\end{circuitikz}
\end{document}