Circuitikz - 移除 PNP 晶体管上的基极引脚

Circuitikz - 移除 PNP 晶体管上的基极引脚

我想使用 circuitikz 移除晶体管的基极引脚。我该怎么做?

在此处输入图片描述

以下是 MWE:

\documentclass[11pt]{article}

% ------- Enable UTF8 characters ------- %
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}


% --------------- Math ----------------- %
\usepackage{amsmath}
\usepackage{amsfonts}

% -------- TikZ --------- %
\usepackage{tikz}
\usepackage{circuitikz}

\begin{document}
 \begin{tikzpicture}[
square/.style={rectangle,draw,minimum width=3.5cm,minimum height=3.5cm,align=top}
]
  \draw (0,8) to[R=$R_1$, -o] (0,10)
  node[anchor=south] {$3.3V$};
  \draw (0,8) to[short, i=$i_1$] (1.25,8);
  \draw (1.25,8) -- (2,8);
  \draw (2,8) to[leDo] (2,6);
  \draw (2,6) -- (0,6);
  \draw (0,6) -- (0,4.5);
  \draw (0,4.5) node[ground]{};

  %\draw (6,10) to[short, o-] (6,8);
  %\draw (6,8) -- (4,8);
  \draw (4,8) to[short, -o] (7,8)
  node[anchor=south] {$24V$};
  \draw (6.5,8) to[short, i=$i_{\text{max}}$] (4,8);
  \draw (4,7) node[pnp] (pnp) {}
  (pnp.base) node[anchor=east] {}
  (pnp.collector) node[anchor=south] {}
  (pnp.emitter) node[anchor=north] {};
  \draw (4,8) -- (4,7.5);
  \draw (4,6.5) -- (4,6);
  \draw (4,6) -- (6,6);
  \draw (6,6) to[short, -o] (7,6)
  node[anchor=south] {$0V$};
  \draw (6,6) to[R=$R_2$] (6,4.5);
  \draw (6,4.5) node[ground]{};

  \node[square, black, dashed] (1) at (3,7) {};
  \node[anchor=west] at (3.5,9) {K827P};
\end{tikzpicture}
\end{document}

如果我对这些电路的编码方式不正确,请指出。

答案1

正如@John Kormylo 在我的回答的评论中写道:“在上面画一些白色的东西”。我意识到我在发布这个问题时完全失态了。以下是我所做的:

\begin{tikzpicture}[
square/.style={rectangle,draw,minimum width=3.5cm,minimum height=3.5cm,align=center},
whitesquare/.style={rectangle,draw,minimum width=0.5cm,minimum height=1cm, fill=white}
]
  \draw (0,8) to[R=$R_1$, -o] (0,10)
  node[anchor=south] {$3.3V$};
  \draw (0,8) to[short, i=$i_1$] (1.25,8);
  \draw (1.25,8) -- (2,8);
  \draw (2,8) to[leDo] (2,6);
  \draw (2,6) -- (0,6);
  \draw (0,6) -- (0,4.5);
  \draw (0,4.5) node[ground]{};

  \draw (4,8) to[short, -o] (7,8)
  node[anchor=south] {$24V$};
  \draw (6.5,8) to[short, i=$i_{\text{max}}$] (4,8);
  \draw (4,7) node[pnp] (pnp) {}
  (pnp.base) node[anchor=east] {}
  (pnp.collector) node[anchor=south] {}
  (pnp.emitter) node[anchor=north] {};
  \draw (4,8) -- (4,7.5);
  \draw (4,6.5) -- (4,6);
  \draw (4,6) -- (6,6);
  \draw (6,6) to[short, -o] (7,6)
  node[anchor=south] {$0V$};
  \draw (6,6) to[R=$R_2$] (6,4.5);
  \draw (6,4.5) node[ground]{};

  \node[whitesquare, white] (2) at (3.31,7) {};
  \node[square, black, dashed] (1) at (3,7) {};
  \node[anchor=west] at (3.5,9) {K827P};
\end{tikzpicture}

我只是添加了一个白色方块来去除黑线。

相关内容