放大器的内部标签 (t=) 打印颠倒,而普通标签 (l=) 则正面朝上。如何让内部标签正面朝上?
\documentclass{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) node[adder](sum) {};
\draw (sum.east) to [twoport,>,t={D=1}] ++ (4,0) node[above]{$y(n-1)$};
\draw (-2,0) to (sum.west) node[inputarrow]{};
\draw (sum) ++ (.5,0) node[above right] {$y(n)$};
\node[inputarrow] at (4.5,0) {};
\draw (3.5,0) --(3.5,2);
\draw (0,2) to (sum.north) node[inputarrow,rotate=-90] {};
\draw (3.5,2) to [amp,t= $a$,>] (0,2);
\node[above] at (-2,0) {$x(n)$};
\end{circuitikz}
\end{document}
答案1
它似乎\ctikzset{label/align = straight}
不影响内部标签。(有人甚至可能认为这是一个错误。)您可以随时使用\rotatebox
(包括,请参阅 graphicx 手册)。
(注意:内层标签存储为/bipoles/twoport/text
。)
\documentclass{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) node[adder](sum) {};
\draw (sum.east) to [twoport,>,t={D=1}] ++ (4,0) node[above]{$y(n-1)$};
\draw (-2,0) to (sum.west) node[inputarrow]{};
\draw (sum) ++ (.5,0) node[above right] {$y(n)$};
\node[inputarrow] at (4.5,0) {};
\draw (3.5,0) --(3.5,2);
\draw (0,2) to (sum.north) node[inputarrow,rotate=-90] {};
\draw (3.5,2) to [amp,t=\rotatebox{180}{$a$},>] (0,2);
\node[above] at (-2,0) {$x(n)$};
\end{circuitikz}
\end{document}