
我正在嘗試繪製一個原理圖,其中的增益為 \times 2 。描述將文字置於元素之上。我嘗試將節點準確地放置在放大器所在的位置,但它似乎放置在其他位置,這是由於相對定位造成的嗎?我正在嘗試“測試”以顯示擴大機內部。
\documentclass[border=10pt]{standalone}
\usepackage[pdftex]{graphicx} %% Grafikeinbindung
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz} [scale=2]
% switches
%S1
\path(0,0) -- (2,0) node[midway, nigfete, bodydiode, rotate=90, xscale=-1](s1){} ;
\draw (s1.G) node[anchor=east] {$S_1$};
\draw (0,0) to (s1.D) (s1.S) to (2,0);
%S3
\path(2,-2) -- (4,-2) node[midway, nigfete, bodydiode,rotate=90, xscale=-1](s3){};
\draw (s3.G) node[anchor=east] {$S_3$};
\draw[color=red] (s3.G |- 0,-0.5) to (s3.G |- 0, 0) -- ++ (s1.G -| 0,0) to [amp, l_=$\times 2$] ++(-1,0) node[midway]{test} to [nos](s1.G) ;
\end{circuitikz}
\end{document}
答案1
答案2
在您的頌歌中,標籤「x2」距離很遠,因為您可能使用的是引入縮放環境中標籤修復先前的版本circuitikz
(即 0.9.0 之前的版本)。
要將「測試」標籤放入擴大機中,您可以使用 鍵t=
,但必須取消翻轉文字(擴大機是從左到右繪製的,因此它旋轉了 180 度):
\documentclass[border=10pt]{standalone}
\usepackage[RPvoltages]{circuitikz}
\begin{document}
\begin{circuitikz} [scale=2]
% switches
%S1
\path(0,0) -- (2,0) node[midway, nigfete, bodydiode, rotate=90, xscale=-1](s1){} ;
\draw (s1.G) node[anchor=east] {$S_1$};
\draw (0,0) to (s1.D) (s1.S) to (2,0);
%S3
\path(2,-2) -- (4,-2) node[midway, nigfete, bodydiode,rotate=90, xscale=-1](s3){};
\draw (s3.G) node[anchor=east] {$S_3$};
\draw[color=red] (s3.G |- 0,-0.5) to (s3.G |- 0, 0) -- ++ (s1.G -| 0,0)
to [amp, l_=$\times 2$, t={\scalebox{-1}{test}}, ] ++(-1,0)
to [nos](s1.G);
\end{circuitikz}
\end{document}
目前版本(0.9.3)給出: