summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-09 22:01:48 +0000
committerKarl Berry <karl@freefriends.org>2019-11-09 22:01:48 +0000
commit16df7ec0a0f02470b7343f4b149ab22a42ba0576 (patch)
tree73684fe1e6241c2cfac9985b1df8ae4b0366fe84 /Master/texmf-dist/tex
parent10df8aabc98589863e781801ad499a29df4b018e (diff)
circuitikz (9nov19)
git-svn-id: svn://tug.org/texlive/trunk@52709 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex4
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex36
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex3
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex2
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex31
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex94
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex500
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex8
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty4
9 files changed, 622 insertions, 60 deletions
diff --git a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
index c1b973efb2f..301118a9cbc 100644
--- a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
+++ b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
@@ -1,5 +1,5 @@
-\def\pgfcircversion{0.9.5}
-\def\pgfcircversiondate{2019/10/12}
+\def\pgfcircversion{0.9.6}
+\def\pgfcircversiondate{2019/11/09}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
index 28e41a24d06..8f4777543d2 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
@@ -743,6 +743,13 @@
\pgfkeys{/tikz/photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
\ctikzset{photo/.add code={}{\pgf@circuit@bpt@drawphototrue}}
+% Option draw fet without bulk connection -- Added by Burak Kelleci
+\newif\ifpgf@circuit@bpt@drawbulk
+\pgfkeys{/tikz/bulk/.add code={}{\pgf@circuit@bpt@drawbulktrue}}
+\ctikzset{bulk/.add code={}{\pgf@circuit@bpt@drawbulktrue}}
+\pgfkeys{/tikz/nobulk/.add code={}{\pgf@circuit@bpt@drawbulkfalse}}
+\ctikzset{nobulk/.add code={}{\pgf@circuit@bpt@drawbulkfalse}}
+
% Option draw pmos with empty circle
\newif\ifpgf@circuit@pmos@emptycircle
\pgf@circuit@pmos@emptycirclefalse
@@ -1017,6 +1024,31 @@
\ctikzset{tripoles/isfet/bodydiode distance/.initial=.3}
\ctikzset{tripoles/isfet/bodydiode conn/.initial=.6}
\ctikzset{tripoles/isfet/curr direction/.initial=1}
+%
+% multi-emitter and multi-collector BJTs by Romano Giannetti
+%
+\ctikzset{tripoles/bjt/emitters/.initial=1}
+\ctikzset{tripoles/bjt/collectors/.initial=1}
+\pgfkeys{/tikz/emitters/.add code={}{\ctikzset{tripoles/bjt/emitters=#1}}}
+\pgfkeys{/tikz/collectors/.add code={}{\ctikzset{tripoles/bjt/collectors=#1}}}
+\ctikzset{tripoles/bjt/pins width/.initial=0.3}
+\pgfkeys{/tikz/bjt pins width/.add code={}{\ctikzset{tripoles/bjt/pins width=#1}}}
+\ctikzset{tripoles/bjt/multi height/.initial=.5}
+\pgfkeys{/tikz/bjt multi height/.add code={}{\ctikzset{tripoles/bjt/multi height/.initial=#1}}}
+%
+\ctikzset{tripoles/bjt/width/.initial=.3}
+\ctikzset{tripoles/bjt/base height 2/.initial=.4}
+\ctikzset{tripoles/bjt/base height/.initial=1.1}
+\ctikzset{tripoles/bjt/height/.initial=.4}
+\ctikzset{tripoles/bjt/base width/.initial=1}
+\ctikzset{tripoles/bjt/arrow pos/.initial=.5}
+% do NOT touch these two!
+\ctikzset{tripoles/bjt/npn/curr direction/.initial=1}
+\ctikzset{tripoles/bjt/pnp/curr direction/.initial=-1}
+
+%% transistors stop here
+
+%% Logic ports
\newif\ifpgf@circuit@europeanlogicport
\ctikzset{logic ports/.is choice}
@@ -1221,8 +1253,8 @@
\newif\ifpgf@circuit@oa@iplusup\pgf@circuit@oa@iplusupfalse
\pgfkeys{/tikz/noinv input up/.add code={}{\pgf@circuit@oa@iplusuptrue}}
\ctikzset{noinv input up/.add code={}{\pgf@circuit@oa@iplusuptrue}}
-\pgfkeys{/tikz/input noinv down/.add code={}{\pgf@circuit@oa@iplusupfalse}}
-\ctikzset{input noinv down/.add code={}{\pgf@circuit@oa@iplusupfalse}}
+\pgfkeys{/tikz/noinv input down/.add code={}{\pgf@circuit@oa@iplusupfalse}}
+\ctikzset{noinv input down/.add code={}{\pgf@circuit@oa@iplusupfalse}}
%
% changing output polarity (for fully diff objects)
%
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
index cc2bf8de14d..b0d2a989bd0 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
@@ -200,7 +200,8 @@
\edef\pgf@circ@ffffff{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
}
\fi
- coordinate[currarrow,pos=\ctikzvalof{current/distance},rotate=\pgf@circ@ffffff](Iarrow)
+ coordinate[currarrow,pos=\ctikzvalof{current/distance},rotate=\pgf@circ@ffffff,
+ anchor=center](Iarrow)
(Iarrow.\pgf@circ@bipole@current@label@where)
node[anchor=\pgf@circ@dir, \circuitikzbasekey/bipole current style]
(\ctikzvalof{bipole/name}current){\pgf@circ@finallabels{current/label}}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex
index 6af0af0ee04..c90b986eba7 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex
@@ -195,7 +195,7 @@
\fi
\fi
}
- coordinate[flowarrow,pos=\ctikzvalof{flow/distance},rotate=\pgf@circ@ffffff,yshift=\flow@offset](Farrowpos)
+ coordinate[flowarrow,pos=\ctikzvalof{flow/distance},rotate=\pgf@circ@ffffff,yshift=\flow@offset, anchor=center](Farrowpos)
(Farrowpos.\pgf@circ@bipole@flow@label@where) node[anchor=\pgf@circ@dir, \circuitikzbasekey/bipole flow style]
(\ctikzvalof{bipole/name}flow){\pgf@circ@finallabels{flow/label}}
}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
index facb041effc..31890ea44db 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
@@ -180,6 +180,12 @@
}
}
+%% Null styles that can be used to change individually the L1 and L2
+%% inductors of the transformer.
+
+\ctikzset{transformer L1/.style={}}
+\ctikzset{transformer L2/.style={}}
+
\def\pgf@circ@drawtransformerbasicbody{
\pgfscope
\pgfslopedattimetrue
@@ -194,6 +200,7 @@
{\pgf@circ@res@down}%
}
+ \pgfkeys{\circuitikzbasekey/.cd, transformer L1}
\edef\pgf@circ@temp{\ctikzvalof{inductor}}%
\def\pgf@temp{european}%
\ifx\pgf@temp\pgf@circ@temp%
@@ -222,6 +229,7 @@
{\pgf@circ@res@up}%
}
+ \pgfkeys{\circuitikzbasekey/.cd, transformer L2}
\edef\pgf@circ@temp{\ctikzvalof{inductor}}%
\def\pgf@temp{european}%
\ifx\pgf@temp\pgf@circ@temp%
@@ -266,23 +274,34 @@
\pgf@circ@drawtransformerbasicbody
+ % use the chocke line thickness
+ \pgfsetlinewidth{\ctikzvalof{bipoles/cutechoke/cthick}\pgflinewidth}
+
+ % Find the distance from center for the lines representing the core
+ % the 2.5 is for backward compatibility --- the distance was calculated as a fraction
+ % of the whole component, now as a fraction of the distance between coils, to be
+ % compatible with the quadpoles "inner" style.
+ \pgfmathsetlength{\pgf@circ@res@other}{2.5*\stretto*\ctikzvalof{quadpoles/transformer core/core width}*\pgf@circ@res@right}
+
\pgfmoveto{\pgfpoint%
- {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
+ {\pgf@circ@res@other}%
{\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
}
\pgflineto{
- \pgfpoint
- {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
+ \pgfpoint%
+ {\pgf@circ@res@other}%
{\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
}
+ %% this should be just -\pgf@circ@res@other, but in case someone define an asymmetric trafo someday...
+ \pgfmathsetlength{\pgf@circ@res@other}{2.5*\stretto*\ctikzvalof{quadpoles/transformer core/core width}*\pgf@circ@res@left}
\pgfmoveto{\pgfpoint%
- {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
+ {\pgf@circ@res@other}%
{\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}%
}
\pgflineto{
- \pgfpoint
- {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}%
+ \pgfpoint%
+ {\pgf@circ@res@other}%
{\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}%
}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
index fdaad445ce1..724f5ee3500 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
@@ -443,6 +443,96 @@
}
}
+%% transistor arrow
+
+\def\pgf@circ@find@linescale{
+ % find the scale inverse of the scale factor: line width do not scale
+ % with scale=..., transform shape so we have to counteract it.
+ \iftikz@fullytransformed % this is true if `transform shape` is active
+ % from @Circumscribe https://tex.stackexchange.com/a/474035/38080
+ % Note that this trick is not working inside a `spy` environment...
+ \pgfgettransformentries{\scaleA}{\scaleB}{\scaleC}{\scaleD}{\whatevs}{\whatevs}%
+ \pgfmathsetmacro{\@@factor}{1.0/sqrt(abs(\scaleA*\scaleD-\scaleB*\scaleC))}%
+ \else
+ \pgfmathsetmacro{\@@factor}{1.0}
+ \fi
+}
+
+\pgfdeclareshape{trarrow}{%
+ % this arrow is only filled but grows with the linewidth, more or less
+ % like currarrow do
+ \savedanchor{\northeast}{%
+ \pgf@circ@res@step = \pgf@circ@Rlen
+ \pgf@circ@find@linescale
+ \divide \pgf@circ@res@step by \ctikzvalof{current arrow scale}
+ \pgfpoint{0.7*\pgf@circ@res@step +0.5*\@@factor*\pgflinewidth}
+ {0.8*\pgf@circ@res@step+0.7593*\@@factor*\pgflinewidth}
+ }
+ % The arrow size should be more or less the same of a currarrow, which is
+ % both filled and stroke, for backward output compatibility (more or less)
+ %
+ % angle \beta W is \pgf@circ@Rlen/\ctikzvalof{current arrow scale}
+ % |-\__ currarrow as the tip at (W,0)
+ % | | and the upper tail at (-0.7*W, 0.8*W)
+ % | \__ it then "overshoot" do to the linew width L
+ % | \__ xangle \alpha
+ % ---0------->
+ %
+ % \beta = atan(0.7/0.8) \alpha=atan(0.8/1.7)
+ % tip overshoot is (L/2)/sin(\alpha) = 1.743*L only in x direction
+ % tail overshoot is -(L/2) in x, and (L/2)/sin(\beta) = 0.7539*L in y
+ %
+ \savedanchor{\northwest}{%
+ \pgf@circ@res@step = \pgf@circ@Rlen
+ \divide \pgf@circ@res@step by \ctikzvalof{current arrow scale}
+ \pgf@circ@find@linescale
+ \pgfpoint{-0.7*\pgf@circ@res@step -0.5*\@@factor*\pgflinewidth}
+ {0.8*\pgf@circ@res@step+0.7593*\@@factor*\pgflinewidth}
+ }
+ \savedanchor{\tip}{%
+ \pgf@circ@res@step = \pgf@circ@Rlen
+ \divide \pgf@circ@res@step by \ctikzvalof{current arrow scale}
+ \pgf@circ@find@linescale
+ \pgfpoint{\pgf@circ@res@step + 1.743*\@@factor*\pgflinewidth}{0pt}
+ }
+ \anchor{north}{\northeast\pgf@x=0cm\relax}
+ \anchor{east}{\northeast\pgf@y=0cm\relax}
+ \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\relax}
+ \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x}
+ \anchor{north east}{\northeast}
+ \anchor{north west}{\northeast\pgf@x=-\pgf@x}
+ \anchor{south east}{\northeast\pgf@y=-\pgf@y}
+ \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x}
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{tip}{
+ \tip
+ }
+ \anchor{btip}{% this anchor is behind the tip of half a linewidth
+ \tip
+ \pgf@circ@find@linescale
+ \pgf@circ@res@temp=\@@factor\pgflinewidth
+ \advance\pgf@x by -.5\pgf@circ@res@temp
+ }
+ \behindforegroundpath{
+ \pgfscope
+ \northwest
+ \pgf@circ@res@up=\pgf@y
+ \pgf@circ@res@left=\pgf@x
+ \tip
+ \pgf@circ@res@step = \pgf@x
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
+ \pgfpathclose
+ \pgfsetcolor{\ctikzvalof{color}}
+ \pgfusepath{fill} % just fill
+ \endpgfscope
+ }
+}
%% Current arrow
@@ -506,6 +596,10 @@
\anchor{north west}{\northeast\pgf@x=-\pgf@x}
\anchor{south east}{\northeast\pgf@y=-\pgf@y}
\anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x}
+ \anchor{text}{% text centered above
+ \pgfpointorigin
+ \pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox}
+ }
\anchor{center}{
\pgfpointorigin
}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
index 73f1485b2b5..0f193cedccc 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
@@ -1343,6 +1343,10 @@
\pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
\pgf@x=-\ctikzvalof{tripoles/#1/width}\pgf@circ@scaled@Rlen
}
+ \savedanchor\right{%center right -- added by Burak Kelleci % this is really 0,0
+ \pgf@y=0pt
+ \pgf@x=0pt
+ }
\anchor{text}{
\northeast
\pgf@y=.7\pgf@y
@@ -1409,6 +1413,16 @@
\left
\pgf@y=-\ctikzvalof{tripoles/#1/curr direction}\pgf@circ@res@step
}
+ \anchor{bulk}{ %added by Burak Kelleci
+ \northeast
+ \pgf@circ@res@step=\ctikzvalof{tripoles/#1/conn height}\pgf@y
+ \right
+ \pgf@y=-\ctikzvalof{tripoles/#1/curr direction}\pgf@circ@res@step
+ }
+ \anchor{nobulk}{ %added by Burak Kelleci
+ \left
+ \pgf@x=\ctikzvalof{tripoles/#1/base width}\pgf@x
+ }
\anchor{G}{
\northeast
\pgf@circ@res@step=\ctikzvalof{tripoles/#1/conn height}\pgf@y
@@ -1537,7 +1551,16 @@
}
\long\def\declarebpt#1{
- \pgfcircdeclaretransistor{#1}{}{
+ \pgfcircdeclaretransistor{#1}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/#1/base height}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/#1/base height}\pgf@y
+ }
+ }{
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\ctikzvalof{tripoles/#1/base height}\pgf@circ@res@up}}
@@ -1572,7 +1595,7 @@
\edef\@@anchor{center}
\ifpgf@circuit@trans@ntype
\ifpgf@circuit@trans@arrowatend
- \edef\@@anchor{tip}
+ \edef\@@anchor{btip}
\pgftransformlineattime{1.0}{%
\pgfpoint%
{\ctikzvalof{tripoles/#1/base width}\pgf@circ@res@left}%
@@ -1591,7 +1614,7 @@
{\ctikzvalof{tripoles/#1/base height}\pgf@circ@res@down}%
}
\fi
- \else
+ \else % p-type
\ifpgf@circuit@trans@arrowatend
\edef\@@anchor{tip}
\pgftransformlineattime{1.0}{%
@@ -1611,7 +1634,7 @@
}
\fi
\fi
- \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+ \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
\endpgfscope
\ifpgf@circuit@bpt@drawphoto
@@ -1650,9 +1673,327 @@
\declarebpt{npn}
\declarebpt{pnp}
+%
+% multi-emitter and multi-collector BJTs by Romano Giannetti
+%
+\def\pgf@circ@bjt@C@anchor#1{% #1: collector number
+ \pgfextractx{\pgf@circ@res@temp}{\basedimension}
+ \pgfextracty{\pgf@circ@res@other}{\basedimension}
+ \ifnum\cdir>0 % NPN, above
+ \pgfpoint{\pgf@circ@res@temp}{%
+ \pgf@circ@res@other+\pgfverticaltransformationadjustment*.5*\pgflinewidth+(#1-1)*\multistep}
+ \else % PNP, below
+ \pgfpoint{\pgf@circ@res@temp}{%
+ -\pgf@circ@res@other-\pgfverticaltransformationadjustment*.5*\pgflinewidth-(#1-1)*\multistep}
+ \fi
+}
+\def\pgf@circ@bjt@E@anchor#1{% #1: collector number
+ \pgfextractx{\pgf@circ@res@temp}{\basedimension}
+ \pgfextracty{\pgf@circ@res@other}{\basedimension}
+ \ifnum\cdir<0 % PNP, above
+ \pgfpoint{\pgf@circ@res@temp}{%
+ \pgf@circ@res@other+\pgfverticaltransformationadjustment*.5*\pgflinewidth+(#1-1)*\multistep}
+ \else % PNP, below
+ \pgfpoint{\pgf@circ@res@temp}{%
+ -\pgf@circ@res@other-\pgfverticaltransformationadjustment*.5*\pgflinewidth-(#1-1)*\multistep}
+ \fi
+}
+
+\long\def\declarebjt#1{
+ \pgfdeclareshape{bjt#1}{
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{transistors}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ % \cdir is 1 for npn, -1 for pnp
+ \savedmacro{\cdir}{\edef\cdir{\ctikzvalof{tripoles/bjt/#1/curr direction}}}
+ \savedmacro{\numE}{\edef\numE{\ctikzvalof{tripoles/bjt/emitters}}}
+ \savedmacro{\numC}{\edef\numC{\ctikzvalof{tripoles/bjt/collectors}}}
+ % step up or down for the additional C/Es
+ \saveddimen{\multistep}{\pgfmathsetlength{\pgf@x}{%
+ \ctikzvalof{tripoles/bjt/height}*\ctikzvalof{tripoles/bjt/multi height}*
+ \ctikzvalof{\ctikzclass/scale}*\pgf@circ@Rlen}}
+ \saveddimen{\external}{\pgfmathsetlength{\pgf@x}{%
+ \ctikzvalof{tripoles/bjt/pins width}*\ctikzvalof{\ctikzclass/scale}*\pgf@circ@Rlen}}
+ \savedanchor\basedimension{% these are the dimensions if nC=1 y nE=1
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@y=\ctikzvalof{tripoles/bjt/height}\pgf@circ@scaled@Rlen
+ \pgf@y=.5\pgf@y
+ \pgf@x=\ctikzvalof{tripoles/bjt/width}\pgf@circ@scaled@Rlen
+ \pgf@x=.5\pgf@x
+ }
+ \savedanchor\northeast{% upper right
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgfmathsetlength{\pgf@circ@res@step}{%
+ \ctikzvalof{tripoles/bjt/height}*\ctikzvalof{tripoles/bjt/multi height}*
+ \ctikzvalof{\ctikzclass/scale}*\pgf@circ@Rlen}
+ \ifnum\cdir> 0
+ \edef\numup{\numC}\edef\numdown{\numE}
+ \else
+ \edef\numup{\numE}\edef\numdown{\numC}
+ \fi
+ \pgfmathsetlength{\pgf@y}{0.5*\ctikzvalof{tripoles/bjt/height}\pgf@circ@scaled@Rlen
+ + (\numup-1)*\pgf@circ@res@step+\pgfverticaltransformationadjustment*.5*\pgflinewidth
+ + \ctikzvalof{tripoles/bjt/pins width}*\ctikzvalof{\ctikzclass/scale}*\pgf@circ@Rlen}
+ \pgf@x=\ctikzvalof{tripoles/bjt/width}\pgf@circ@scaled@Rlen
+ \pgf@x=.5\pgf@x
+ }
+ \savedanchor\southeast{% lower right
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgfmathsetlength{\pgf@circ@res@step}{%
+ \ctikzvalof{tripoles/bjt/height}*\ctikzvalof{tripoles/bjt/multi height}*
+ \ctikzvalof{\ctikzclass/scale}*\pgf@circ@Rlen}
+ \ifnum\cdir> 0
+ \edef\numup{\numC}\edef\numdown{\numE}
+ \else
+ \edef\numup{\numE}\edef\numdown{\numC}
+ \fi
+ \pgfmathsetlength{\pgf@y}{-0.5*\ctikzvalof{tripoles/bjt/height}\pgf@circ@scaled@Rlen
+ - (\numdown-1)*\pgf@circ@res@step-\pgfverticaltransformationadjustment*.5*\pgflinewidth
+ - \ctikzvalof{tripoles/bjt/pins width}*\ctikzvalof{\ctikzclass/scale}*\pgf@circ@Rlen}
+ \pgf@x=\ctikzvalof{tripoles/bjt/width}\pgf@circ@scaled@Rlen
+ \pgf@x=.5\pgf@x
+ }
+ \savedanchor\southwest{% lower left
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgfmathsetlength{\pgf@circ@res@step}{%
+ \ctikzvalof{tripoles/bjt/height}*\ctikzvalof{tripoles/bjt/multi height}*
+ \ctikzvalof{\ctikzclass/scale}*\pgf@circ@Rlen}
+ \ifnum\cdir> 0
+ \edef\numup{\numC}\edef\numdown{\numE}
+ \else
+ \edef\numup{\numE}\edef\numdown{\numC}
+ \fi
+ \pgfmathsetlength{\pgf@y}{-0.5*\ctikzvalof{tripoles/bjt/height}\pgf@circ@scaled@Rlen
+ - (\numdown-1)*\pgf@circ@res@step-\pgfverticaltransformationadjustment*.5*\pgflinewidth
+ - \ctikzvalof{tripoles/bjt/pins width}*\ctikzvalof{\ctikzclass/scale}*\pgf@circ@Rlen}
+ \pgfmathsetlength{\pgf@x}{-0.5*\ctikzvalof{tripoles/bjt/width}*\pgf@circ@scaled@Rlen
+ - \ctikzvalof{tripoles/bjt/pins width}*\ctikzvalof{\ctikzclass/scale}*\pgf@circ@Rlen}
+ }
+ \anchor{center}{\pgfpointorigin}
+ \anchor{north}{\northeast\pgf@x=0cm\relax}
+ \anchor{east}{\northeast\pgf@y=0cm\relax}
+ \anchor{south}{\southwest\pgf@x=0cm\relax}
+ \anchor{west}{\southwest\pgf@y=0cm}
+ \anchor{north east}{\northeast}
+ \anchor{north west}{\northeast\pgf@ya=\pgf@y\southwest\pgf@y=\pgf@ya}
+ \anchor{south west}{\southwest}
+ \anchor{south east}{\southeast}
+
+ \anchor{text}{\northeast\pgf@y=\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax}
+ \anchor{B}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x\advance\pgf@x by -\external}
+ \anchor{base}{\basedimension\pgf@y=0cm\pgf@x=-\pgf@x\advance\pgf@x by -\external}
+ \anchor{nobase}{\basedimension\pgf@y=0cm\pgf@x=-\pgf@x}
+ % center of the base "bar"
+ \anchor{cbase}{\basedimension\pgf@x=-\pgf@x
+ \pgfmathsetlength{\pgf@y}{\cdir*(\numC-\numE)*\multistep/2}%
+ }
+ % geometrical centers
+ \anchor{vcenter}{\pgf@x=0cm\relax
+ \pgfmathsetlength{\pgf@y}{\cdir*(\numC-\numE)*\multistep/2}%
+ }
+ \anchor{gcenter}{%
+ \northeast\pgf@xa=0.5\pgf@x
+ \southwest\advance\pgf@xa by 0.5\pgf@x
+ \pgf@x=\pgf@xa
+ \pgfmathsetlength{\pgf@y}{\cdir*(\numC-\numE)*\multistep/2}%
+ }
+ % external connections
+ \anchor{E}{
+ \ifnum\cdir>0% npn, emitter down
+ \southeast
+ \else
+ \northeast
+ \fi
+ }% first emitter
+ \anchor{emitter}{\ifnum\cdir>0\southeast\else\northeast\fi}% first emitter
+ \anchor{C}{\ifnum\cdir<0\southeast\else\northeast\fi}
+ \anchor{collector}{\ifnum\cdir<0\southeast\else\northeast\fi}
+
+ \backgroundpath{
+ \pgftransformationadjustments
+ \pgfsetcolor{\ctikzvalof{color}}
+ %
+ % set the type and up and down number of connections
+ %
+ \ifnum\cdir> 0
+ \pgf@circuit@trans@ntypetrue
+ \edef\numup{\numC}
+ \edef\numdown{\numE}
+ \else
+ \pgf@circuit@trans@ntypefalse
+ \edef\numup{\numE}
+ \edef\numdown{\numC}
+ \fi
+ \basedimension
+ \pgf@circ@res@up = \pgf@y
+ \pgf@circ@res@down = -\pgf@y
+ \pgf@circ@res@right = \pgf@x
+ \pgf@circ@res@left = -\pgf@x
+ \pgf@circ@scaled@Rlen=\scaledRlen
+ \pgf@circ@res@step=\multistep
+ %
+ % set arrow positions options
+ %
+ \edef\@@anchor{center}\edef\@@pos{\ctikzvalof{tripoles/#1/arrow pos}}
+ \ifpgf@circuit@trans@arrowatend
+ \edef\@@pos{1.0}
+ \ifpgf@circuit@trans@ntype % arrow is toward outside, push it a bit
+ \edef\@@anchor{btip}
+ \else
+ \edef\@@anchor{tip}
+ \fi
+ \fi
+ %
+ % Drawing upper connections
+ %
+ \pgfscope
+ \pgf@circ@count@a=\numup\relax
+ \pgfmathloop%
+ \ifnum\pgf@circ@count@a>0
+ \advance\pgf@circ@count@a-1\relax
+ \pgfmathsetlength{\pgf@circ@res@other}{\the\pgf@circ@count@a*\multistep}%
+ \ifnum\pgf@circ@count@a=\numexpr\numup-1\relax % draw the external pin connection
+ \pgfpathmoveto{\pgfpoint
+ {\pgf@circ@res@right}%
+ {\pgf@circ@res@up+\external+\pgfverticaltransformationadjustment*.5*\pgflinewidth+\pgf@circ@res@other}}%
+ \pgfpathlineto{\pgfpoint
+ {\pgf@circ@res@right}%
+ {\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth+\pgf@circ@res@other}}%
+ \else
+ \pgfpathmoveto{\pgfpoint
+ {\pgf@circ@res@right}%
+ {\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth+\pgf@circ@res@other}}%
+ \fi
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/bjt/base width}\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/bjt/base height 2}\pgf@circ@res@up+\pgf@circ@res@other}}%
+ \pgfsetroundcap % better when connecting to sloped lines
+ \pgfusepath{draw}
+ \ifpgf@circuit@trans@ntype\else % it's a PNP; draw arrow
+ \pgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \pgftransformlineattime{\@@pos}{%
+ \pgfpoint
+ {\pgf@circ@res@right}%
+ {\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth+\pgf@circ@res@other}%
+ }{\pgfpoint
+ {\ctikzvalof{tripoles/bjt/base width}\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/bjt/base height 2}\pgf@circ@res@up+\pgf@circ@res@other}%
+ }
+ \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
+ \fi
+ \repeatpgfmathloop
+ \endpgfscope
+ %
+ % Drawing base
+ %
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/bjt/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/bjt/base height}\pgf@circ@res@up+(\numup-1)*\multistep}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/bjt/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/bjt/base height}\pgf@circ@res@down-(\numdown-1)*\multistep}}
+ \pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfsetroundcap % I like it more...
+ \pgfusepath{draw}
+ \endpgfscope
+ %
+ % draw base external connection
+ %
+ \pgfpathmoveto{\pgfpoint{\ctikzvalof{tripoles/bjt/base width}\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/bjt/base width}\pgf@circ@res@left-\external}{0pt}}
+ \pgfusepath{draw}
+ %
+ % Drawing lower connections
+ %
+ \pgfscope
+ \pgf@circ@count@a=\numdown\relax
+ \pgfmathloop%
+ \ifnum\pgf@circ@count@a>0
+ \advance\pgf@circ@count@a-1\relax
+ \pgfmathsetlength{\pgf@circ@res@other}{\the\pgf@circ@count@a*\multistep}%
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/bjt/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/bjt/base height 2}\pgf@circ@res@down-\pgf@circ@res@other}}
+ \pgfpathlineto{\pgfpoint
+ {\pgf@circ@res@right}
+ {\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth-\pgf@circ@res@other}}
+ \ifnum\pgf@circ@count@a=\numexpr\numdown-1\relax % draw the external pin connection
+ \pgfpathlineto{\pgfpoint
+ {\pgf@circ@res@right}
+ {\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth-\pgf@circ@res@other-\external}}
+ \fi
+ \pgfsetroundcap % better when connecting to sloped lines
+ \pgfusepath{draw}
+ \ifpgf@circuit@trans@ntype % it's a NPN; draw arrow
+ \pgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \pgftransformlineattime{\@@pos}{%
+ \pgfpoint
+ {\ctikzvalof{tripoles/bjt/base width}\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/bjt/base height 2}\pgf@circ@res@down-\pgf@circ@res@other}%
+ }{\pgfpoint
+ {\pgf@circ@res@right}%
+ {\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth-\pgf@circ@res@other}%
+ }
+ \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
+ \fi
+ \repeatpgfmathloop
+ \endpgfscope
+ }
+ % \pgf@sh@s@<name of the shape here> contains all the code for the shape
+ % and is executed just before a node is drawn.
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@bjt#1\endcsname{%
+ % Start with the maximum collector number and go backwards.
+ \pgf@circ@count@a=\numC\relax
+ \pgfmathloop%
+ \ifnum\pgf@circ@count@a>0
+ % we will create two anchors per pin: the "normal one" like `pin 1` for the
+ % electrical contact, and the "border one" like `bpin 1` for labels.
+ % they will coincide if `external pins width` is set to 0.
+ \expandafter\xdef\csname pgf@anchor@bjt#1@C\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@bjt@C@anchor{\the\pgf@circ@count@a}%
+ }
+ \advance\pgf@circ@count@a by -1\relax%
+ \repeatpgfmathloop%
+ % and emitters
+ \pgf@circ@count@a=\numE\relax
+ \pgfmathloop%
+ \ifnum\pgf@circ@count@a>0
+ % we will create two anchors per pin: the "normal one" like `pin 1` for the
+ % electrical contact, and the "border one" like `bpin 1` for labels.
+ % they will coincide if `external pins width` is set to 0.
+ \expandafter\xdef\csname pgf@anchor@bjt#1@E\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@bjt@E@anchor{\the\pgf@circ@count@a}%
+ }
+ \advance\pgf@circ@count@a by -1\relax%
+ \repeatpgfmathloop%
+ }%
+ }
+}
+
+\declarebjt{npn}
+\declarebjt{pnp}
+
+% end of multi-bjts
\long\def\declareigbt#1{
- \pgfcircdeclaretransistor{#1}{}
+ \pgfcircdeclaretransistor{#1}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/#1/gate height}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/#1/gate height}\pgf@y
+ }
+ }
{
%draw upper connection
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
@@ -1694,7 +2035,11 @@
\pgfallowupsidedownattimetrue
\pgfresetnontranslationattimefalse
\ifpgf@circuit@trans@arrowatend
- \edef\@@anchor{tip}\edef\@@pos{1.0}
+ \ifpgf@circuit@trans@ntype
+ \edef\@@anchor{btip}\edef\@@pos{1.0}
+ \else
+ \edef\@@anchor{tip}\edef\@@pos{1.0}
+ \fi
\else
\edef\@@anchor{center}\edef\@@pos{0.5}
\fi
@@ -1716,7 +2061,7 @@
{\ctikzvalof{tripoles/#1/gate height 2}\pgf@circ@res@up}%
}
\fi
- \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+ \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
\endpgfscope
%draw gate
\ifpgf@circuit@trans@ntype
@@ -1741,7 +2086,16 @@
\declareigbt{Lnigbt}
\declareigbt{Lpigbt}
-\pgfcircdeclaretransistor{nmos}{}{%
+\pgfcircdeclaretransistor{nmos}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/nmos/gate height}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/nmos/gate height}\pgf@y
+ }
+ }{%
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\ctikzvalof{tripoles/nmos/gate height}\pgf@circ@res@up}}
@@ -1780,7 +2134,7 @@
{\pgf@circ@res@right}%
{\ctikzvalof{tripoles/pmos/gate height}\pgf@circ@res@down}%
}
- \pgfnode{currarrow}{tip}{}{}{\pgfusepath{stroke}}
+ \pgfnode{trarrow}{btip}{}{}{\pgfusepath{stroke}}
\else
\pgfslopedattimetrue
\pgfallowupsidedownattimetrue
@@ -1806,9 +2160,26 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfusepath{draw}
\fi
+
+ \ifpgf@circuit@bpt@drawbulk % added by Burak Kelleci
+ \pgfpathmoveto{\pgfpoint{\ctikzvalof{tripoles/nmos/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
}
-\pgfcircdeclaretransistor{pmos}{}{%
+\pgfcircdeclaretransistor{pmos}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/pmos/gate height}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/pmos/gate height}\pgf@y
+ }
+ }{%
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\ctikzvalof{tripoles/pmos/gate height}\pgf@circ@res@up}}
@@ -1825,7 +2196,7 @@
{\ctikzvalof{tripoles/pmos/gate height}\pgf@circ@res@up}%
}
\pgftransformrotate{180}
- \pgfnode{currarrow}{tip}{}{}{\pgfusepath{stroke}}
+ \pgfnode{trarrow}{tip}{}{}{\pgfusepath{stroke}}
\else
\pgfslopedattimetrue
\pgfallowupsidedownattimetrue
@@ -1877,7 +2248,16 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfusepath{draw}
\fi
- \ifpgf@circuit@pmos@nocircle\else
+
+ \ifpgf@circuit@bpt@drawbulk % added by Burak Kelleci
+ \pgfpathmoveto{\pgfpoint{\ctikzvalof{tripoles/pmos/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
+
+ \ifpgf@circuit@pmos@nocircle\else
% we are not scaling the circle with the MOS --- I think it's better to have it
% coherent with the poles/nodes of the rest of the circuit.
\pgfpathcircle{\pgfpoint
@@ -1891,7 +2271,16 @@
}
%% HEMT FET Transistor
-\pgfcircdeclaretransistor{hemt}{}{%
+\pgfcircdeclaretransistor{hemt}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/hemt/gate height}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/hemt/gate height}\pgf@y
+ }
+ }{%
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\ctikzvalof{tripoles/hemt/gate height}\pgf@circ@res@up}}
@@ -1998,10 +2387,11 @@
\pgfallowupsidedownattimetrue
\pgfresetnontranslationattimefalse
\ifpgf@circuit@trans@arrowatend
- \edef\@@anchor{tip}
\ifpgf@circuit@trans@ntype
+ \edef\@@anchor{tip}
\edef\@@pos{1.0}
\else
+ \edef\@@anchor{btip}
\edef\@@pos{0.0}
\fi
\else
@@ -2020,7 +2410,7 @@
\else
\pgftransformrotate{180}
\fi
- \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+ \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
\endpgfscope
% GATE CONNECTION
@@ -2045,6 +2435,14 @@
{\pgfcircdeclaretransistor{#1}{
\anchor{bulk}{\left\pgf@x=0pt}
\anchor{B}{\left\pgf@x=0pt}%override Base anchor from npn&igbt
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/#1/gate height}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/#1/gate height}\pgf@y
+ }
#2
}
{#3}
@@ -2163,7 +2561,16 @@
\fi
}
-\pgfcircdeclaretransistor{njfet}{}{%
+\pgfcircdeclaretransistor{njfet}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/njfet/gate height 2}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/njfet/gate height 2}\pgf@y
+ }
+ }{%
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\ctikzvalof{tripoles/njfet/gate height 2}\pgf@circ@res@up}}
@@ -2208,7 +2615,7 @@
{\ctikzvalof{tripoles/njfet/gate width}\pgf@circ@res@left}%
{\ctikzvalof{tripoles/njfet/gate height 2}\pgf@circ@res@down}%
}
- \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+ \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
\endpgfscope
\pgfpathmoveto{\pgfpoint
@@ -2219,7 +2626,16 @@
\pgfusepath{draw}
}
-\pgfcircdeclaretransistor{pjfet}{}{%
+\pgfcircdeclaretransistor{pjfet}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/pjfet/gate height 2}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/pjfet/gate height 2}\pgf@y
+ }
+ }{%
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\ctikzvalof{tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
@@ -2251,7 +2667,7 @@
\pgfallowupsidedownattimetrue
\pgfresetnontranslationattimefalse
\ifpgf@circuit@trans@arrowatend
- \edef\@@anchor{tip}\edef\@@pos{1.0}
+ \edef\@@anchor{btip}\edef\@@pos{1.0}
\else
\edef\@@anchor{center}\edef\@@pos{0.4}
\fi
@@ -2263,7 +2679,7 @@
\pgfpoint{\pgf@circ@res@left}%
{\ctikzvalof{tripoles/pjfet/gate height 2}\pgf@circ@res@up}%
}
- \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+ \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
\endpgfscope
\pgfpathmoveto{\pgfpoint
@@ -2342,7 +2758,7 @@
{\ctikzvalof{tripoles/isfet/base width}\pgf@circ@res@left}%
{\pgf@circ@res@up+\pgf@circ@res@down}%
}
- \pgfnode{currarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+ \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
\endpgfscope
\pgfusepath{draw}
@@ -2856,33 +3272,33 @@
\pgf@circ@res@step=\pgf@circ@res@right
\advance\pgf@circ@res@step by -\pgf@circ@res@left
\pgf@circ@res@step=\ctikzvalof{tripoles/fd op amp/port width}\pgf@circ@res@step
-
+
% Initial point (right vertex)
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
-
+
% Negative output terminal
\pgfpathlineto{\pgfpointlineattime{\ctikzvalof{tripoles/fd op amp/output height}}{\pgfpoint{\pgf@circ@res@step}{0pt}}{\pgfpoint{0pt}{\pgf@circ@res@up}}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\ctikzvalof{tripoles/fd op amp/output height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpointlineattime{\ctikzvalof{tripoles/fd op amp/output height}}{\pgfpoint{\pgf@circ@res@step}{0pt}}{\pgfpoint{0pt}{\pgf@circ@res@up}}}
-
+
% Top vertex
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
-
+
% Bottom vertex
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
-
+
% Positive output terminal
\pgfpathlineto{\pgfpointlineattime{\ctikzvalof{tripoles/fd op amp/output height}}{\pgfpoint{\pgf@circ@res@step}{0pt}}{\pgfpoint{0pt}{\pgf@circ@res@down}}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\ctikzvalof{tripoles/fd op amp/output height}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpointlineattime{\ctikzvalof{tripoles/fd op amp/output height}}{\pgfpoint{\pgf@circ@res@step}{0pt}}{\pgfpoint{0pt}{\pgf@circ@res@down}}}
-
+
% Right vertex
\pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
-
+
\pgfpathclose
\pgf@circ@draworfill
\endpgfscope
-
+
% Negative input terminal
\pgfpathmoveto{\pgfpoint
{\pgf@circ@res@left}
@@ -3092,7 +3508,7 @@
\pgfscope
\newdimen\pgf@circ@res@right@double
\pgf@circ@res@right@double=2\pgf@circ@res@right
-
+
\pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
\pgftransformxshift{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@left}
\pgf@circ@res@step=\pgf@circ@res@right
@@ -3110,7 +3526,7 @@
\pgfpathclose
\pgf@circ@draworfill
\endpgfscope
-
+
% input terminal up
\pgfpathmoveto{\pgfpoint
{\pgf@circ@res@left}
@@ -3131,12 +3547,12 @@
{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@left}
{\ctikzvalof{tripoles/fd inst amp/input height}\pgf@circ@res@down}}
\pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@left}{\ctikzvalof{tripoles/fd inst amp/input height}\pgf@circ@res@down}]{\ctikzvalof{tripoles/fd inst amp/font} \ifpgf@circuit@oa@iplusup$-$\else$+$\fi}
-
+
% output leads down and up
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf@circ@res@down}} %
\pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf@circ@res@down}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf@circuit@oa@oplusup$-\;$\else$+\;$\fi}
-
+
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf@circ@res@up}} %
\pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf@circ@res@up}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf@circuit@oa@oplusup$+\;$\else$-\;$\fi}
@@ -3260,8 +3676,8 @@
\pgfscope
\newdimen\pgf@circ@res@right@double
- \pgf@circ@res@right@double=2\pgf@circ@res@right
-
+ \pgf@circ@res@right@double=2\pgf@circ@res@right
+
\pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
\pgftransformxshift{\ctikzvalof{tripoles/gm amp/port width}\pgf@circ@res@left}
\pgf@circ@res@step=\pgf@circ@res@right
@@ -3452,7 +3868,7 @@
\pgfscope
\newdimen\pgf@circ@res@right@double
\pgf@circ@res@right@double=2\pgf@circ@res@right
-
+
\pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
\pgftransformxshift{\ctikzvalof{tripoles/inst amp/port width}\pgf@circ@res@left}
\pgf@circ@res@step=\pgf@circ@res@right
@@ -3470,7 +3886,7 @@
\pgfpathclose
\pgf@circ@draworfill
\endpgfscope
-
+
% Negative input terminal
\pgfpathmoveto{\pgfpoint
{\pgf@circ@res@left}
@@ -3491,7 +3907,7 @@
{\ctikzvalof{tripoles/inst amp/port width}\pgf@circ@res@left}
{\ctikzvalof{tripoles/inst amp/input height}\pgf@circ@res@down}}
\pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/inst amp/port width}\pgf@circ@res@left}{\ctikzvalof{tripoles/inst amp/input height}\pgf@circ@res@down}]{\ctikzvalof{tripoles/inst amp/font} \ifpgf@circuit@oa@iplusup$-$\else$+$\fi}
-
+
% Output terminal
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
\pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/inst amp/port width}\pgf@circ@res@right}{0pt}} %
@@ -3675,7 +4091,7 @@
\pgf@circ@res@right = -\pgf@x
\pgf@circ@res@left = \pgf@x
\pgf@circ@scaled@Rlen=\scaledRlen
-
+
\newdimen\pgf@circ@res@right@double
\pgf@circ@res@right@double=2\pgf@circ@res@right
@@ -3715,8 +4131,8 @@
\pgfpathlineto{\pgfpoint
{\ctikzvalof{tripoles/inst amp ra/port width}\pgf@circ@res@left}
{-\ctikzvalof{tripoles/inst amp ra/ra pos}\pgf@circ@Rlen}}
-
- % Negative input terminal
+
+ % Negative input terminal
\pgfpathmoveto{\pgfpoint
{\pgf@circ@res@left}
{\ctikzvalof{tripoles/inst amp ra/input height}\pgf@circ@res@up}}
@@ -3736,7 +4152,7 @@
{\ctikzvalof{tripoles/inst amp ra/port width}\pgf@circ@res@left}
{\ctikzvalof{tripoles/inst amp ra/input height}\pgf@circ@res@down}}
\pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/inst amp ra/port width}\pgf@circ@res@left}{\ctikzvalof{tripoles/inst amp ra/input height}\pgf@circ@res@down}]{\ctikzvalof{tripoles/inst amp ra/font} \ifpgf@circuit@oa@iplusup$-$\else$+$\fi}
-
+
% Output terminal
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
\pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/inst amp ra/port width}\pgf@circ@res@right}{0pt}} %
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
index bad64d1bd8e..d7933202472 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
@@ -262,11 +262,11 @@
\else
\ifpgf@circuit@bipole@voltage@backward
(pgfcirc@Vto) .. controls (pgfcirc@Vcont2) and (pgfcirc@Vcont1) ..
- node[currarrow, sloped, allow upside down, pos=1] {}
+ node[currarrow, sloped, allow upside down, pos=1, anchor=tip] {}
(pgfcirc@Vfrom)
\else
(pgfcirc@Vfrom) .. controls (pgfcirc@Vcont1) and (pgfcirc@Vcont2) ..
- node[currarrow, sloped, allow upside down, pos=1] {}
+ node[currarrow, sloped, allow upside down, pos=1, anchor=tip] {}
(pgfcirc@Vto)
\fi
\fi
@@ -320,9 +320,9 @@
coordinate (pgfcirc@Vcont2) at (pgfcirc@Vfrom)
\ifpgf@circuit@europeanvoltage
\ifpgf@circuit@bipole@voltage@backward
- (pgfcirc@Vto) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vfrom)
+ (pgfcirc@Vto) -- node[currarrow, sloped, allow upside down, pos=1, anchor=tip] {} (pgfcirc@Vfrom)
\else
- (pgfcirc@Vfrom) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vto)
+ (pgfcirc@Vfrom) -- node[currarrow, sloped, allow upside down, pos=1, anchor=tip] {} (pgfcirc@Vto)
\fi
\else% american voltage
\ifpgf@circuit@bipole@voltageoutsideofsymbol
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
index 12893f68b8c..2801bfcaf35 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
@@ -9,8 +9,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{0.9.5}
-\def\pgfcircversiondate{2019/10/12}
+\def\pgfcircversion{0.9.6}
+\def\pgfcircversiondate{2019/11/09}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]