绘制瓦特表

绘制瓦特表

如何使用 LaTeX 和 circuitikz 绘制功率表?我想要使用一个大圆圈,里面有一个 W,还有 4 个圆圈(上、下、左、右),分别包含 2 个 + 和 2 个 -,就像这张照片里的那样 谢谢大家

答案1

这个瓦特表符号对我来说看起来很奇怪,以前从未见过。不过,您可以使用空源和一些 tikz 节点来实现它,例如:

\documentclass{standalone}
\usepackage{circuitikz}

\begin{document}
\newcommand{\esourcetowattmeter}[1]{
    \draw (#1)node{W};
    \draw (#1.north) node[circle,draw,anchor=south,inner sep=0,fill=white,minimum width=2.5mm]{\tiny +};
    \draw (#1.south) node[circle,draw,anchor=north,inner sep=0,fill=white,minimum width=2.5mm]{\tiny +};
    \draw (#1.east) node[circle,draw,anchor=west,inner sep=0,fill=white,minimum width=2.5mm]{\tiny -};
    \draw (#1.west) node[circle,draw,anchor=east,inner sep=0,fill=white,minimum width=2.5mm]{\tiny -};
}

\begin{circuitikz}
\draw (0,0) to[R]++(2,0) coordinate(left) to [esource,n=wattmeter]++(2,0) to [L]++(2,0);

\draw (left)to [short,*-]++(0,1)-|(wattmeter.north);
\draw (wattmeter.south) to [R]++(0,-2);

\esourcetowattmeter{wattmeter}
\end{circuitikz}

\end{document}

结果:在此处输入图片描述

谨致问候,Stefan

相关内容