
我創建了沒有箭頭的電流表。我想在電流表外面添加+和-。
\documentclass{beamer}
\usepackage[american,siunitx]{circuitikz}
\begin{document}
\begin{frame}
\begin{circuitikz}[x=3cm,y=3cm]
\draw (0,0) to[ammeter] ++(1,0);
\draw (0,-1) to node[draw,circle,fill=white,thick]{A} ++(1,0);
\end{circuitikz}
\end{frame}
\end{document}
答案1
像這樣?
\documentclass{beamer}
\usepackage[american,siunitx]{circuitikz}
\begin{document}
\begin{frame}
\begin{circuitikz}[x=3cm,y=3cm]
\draw (0,0) to[ammeter] ++(1,0);
\draw (0,-1) to node[draw,circle,fill=white,thick](A){A} ++(1,0);
\node[xshift=-3mm] at (A.south west){$+$};
\node[xshift=3mm] at (A.south east){$-$};
\end{circuitikz}
\end{frame}
\end{document}
答案2
您可以透過在其旁邊放置一些節點來手動完成此操作:
\documentclass{beamer}
\usepackage[american,siunitx]{circuitikz}
\begin{document}
\begin{frame}
\begin{circuitikz}[x=3cm,y=3cm]
\draw (0,0) to[ammeter] ++(1,0);
\draw (0,-1) to node[draw,circle,fill=white,thick](a){A} ++(1,0);
\path (a.west) node[above left,inner sep=1pt] {$-$} (a.east) node[above
right,inner sep=1pt] {$+$};
\end{circuitikz}
\end{frame}
\end{document}