我想在 CircuiTikZ 中绘制一个变压器,其中不包含延伸到侧面的导体小部分。
左图:目前的情况。右图:我想要的。
代码:
\documentclass{article}
\usepackage{tikz}
\usepackage[siunitx,cuteinductors]{circuitikz}
\begin{document}
\begin{figure}[bth]
\begin{center}
\begin{circuitikz}
\draw
(0,0) node[rground] {}
to [vsourcesin, l^=$F_A$] (0,2)
to [generic, l_=$Z_A$] (0,4)
to [short, i^>=$V_S$] (1,4)
to [short] (1,3)
(2,3) node[transformer]{}
(1,1) node {}
to [short] (1,0)
to [short] (0,0);
\end{circuitikz}
\end{center}
\caption{Position1.}\label{fig:position1}
\end{figure}
\end{document}
答案1
不要使用,node
语法transformer
,而应该使用cute inductor
。
\documentclass{article}
\usepackage{tikz}
\usepackage[siunitx,cuteinductors]{circuitikz}
\begin{document}
\begin{figure}[bth]
\begin{center}
\begin{circuitikz}
\draw
(0,0) node[rground] {}
to [vsourcesin, l^=$F_A$] (0,2)
to [generic, l_=$Z_A$] (0,4)
to [short, i^>=$V_S$] (1,4)
to [short] (1,3)
to[cute inductor] (1,1)
to [short] (1,0)
to [short] (0,0);
\draw (2.5,0)
to [short] (2.5,1)
to[cute inductor] (2.5,3)
to [short] (2.5,4);
\end{circuitikz}
\end{center}
\caption{Position1.}\label{fig:position1}
\end{figure}
\end{document}
结果: