%%
%%  The LaTeX Graphics Companion, 2ed (first printing May 2007)
%%
%%  Example 8-6-7 on page 581.
%%
%%  Copyright (C) 2007 Michel Goossens, Frank Mittelbach, Denis Roegel, Sebastian Rahtz, Herbert Vo\ss
%%
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%%
%%  See http://www.latex-project.org/lppl.txt for details.
%%

\documentclass{ttctexa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{135.83385pt}
\StartShownPreambleCommands
\usepackage[basic]{circ}
\StopShownPreambleCommands
\begin{document}
\begin{circuit}{0}
\npn1 {?} B l    % draw npn transistor
\frompin npn1C   % draw from collector
\- 1 u           % a little wire up
\nl\A1 {$I_C$} u % A-meter for collector current
\atpin npn1B     % next draw from base
\- 1 l           % a little wire left
\R1 {510 k$\Omega$} l  % place resistor on base
\- 1 l           % add little wire left
\centerto A1     % align centered on first A-meter
\nl\A2 {$I_B$} u % draw second A-meter
\frompin A2b     % connect second A-meter to
\vtopin R1l      % resistor
\frompin A1t
\- 1 u \.1       % connection point
\frompin A2t
\vtopin .1
\htopin .1       % connect second A-meter to 1.
\- 1 u \cc\connection1
   {$U_b$} c u  % connect to voltage
\frompin npn1E   % connect emitter to
\- 1 d  \GND1    % ground
\end{circuit}
\end{document}