summaryrefslogtreecommitdiff
path: root/graphics/pgf
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-10-05 03:00:57 +0000
committerNorbert Preining <norbert@preining.info>2020-10-05 03:00:57 +0000
commit07723a50707217d2d397c098ec67af793cdfa916 (patch)
tree419906c34d6f422224cdb60740b38a7db16c57d4 /graphics/pgf
parent62f3109ec0fcb4a3309966bdcb9e4f307ff35dd2 (diff)
CTAN sync 202010050300
Diffstat (limited to 'graphics/pgf')
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/changelog.tex25
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdfbin17353 -> 17743 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdfbin1046144 -> 1083975 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex269
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex76
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex134
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex266
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex10
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex135
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex249
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
13 files changed, 1153 insertions, 23 deletions
diff --git a/graphics/pgf/contrib/circuitikz/doc/changelog.tex b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
index 5a0a5fe1cc..0a7467452b 100644
--- a/graphics/pgf/contrib/circuitikz/doc/changelog.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
@@ -5,6 +5,29 @@ full list of changes.
\begin{itemize}
\item
+ Version 1.2.4 (2020-10-04)
+
+ \begin{itemize}
+ \tightlist
+ \item
+ several documentation enhancment
+ \item
+ added a couple of block elements: allpass filter, generic two-sides
+ block (suggested by user \texttt{@myzinsky})
+ \item
+ added transmission gate (only IEEE style version) suggested by
+ several users (\texttt{@SJulianS} on github, Philipp Birkl on
+ \texttt{TeX.SX})
+ \item
+ added a resistive splitter block symbol by \texttt{@matthuszagh}
+ \item
+ added depletion-type \texttt{nmosd} and \texttt{pmosd} MOSFET
+ simplified symbols
+ \item
+ added depletion-type \texttt{nfetd} and \texttt{pfetd} for plain
+ full-symbol MOSFET
+ \end{itemize}
+\item
Version 1.2.3 (2020-08-07)
Several fixes and small enhancement all over the map, changes in the
@@ -648,7 +671,7 @@ A detailed list of changes can be seen below.
\item
Fixed varcap symbol at small scalings
\item
- New packet-option ``straightvoltages, to draw straight(no curved)
+ New packet-option "straightvoltages, to draw straight(no curved)
voltage arrows
\item
New option ``invert'' to revert the node direction at paths
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
index 413e57e5aa..5fe1659424 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
index a94f709061..e1ccb1f821 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
index af718172c9..b952bdc291 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
@@ -2539,6 +2539,8 @@ It also has a \texttt{zero} anchor if you need to rotate it about its real cente
\circuitdesc*{oscillator}{oscillator}{}( w/180/0.1,s/-90/0.1,e/0/0.1,n/90/0.1 )
\circuitdesc*{circulator}{circulator}{}( left/180/0.1,down/-90/0.1,right/0/0.1, up/90/0.1 )
\circuitdesc*{wilkinson}{wilkinson divider}{}( in/180/0.1, out2/45/0.1, out1/-45/0.1 )
+ \circuitdesc*{splitter}{resistive splitter\footnotemark}{}( in/180/0.1, out2/45/0.1, out1/-45/0.1 )
+ \footnotetext{added by \texttt{matthuszagh}}
\circuitdesc*{gridnode}{gridnode\footnotemark}{}(left/135/0.2, right/45/0.2, center/-100/0.4, up/90/0.2, down/-45/.2)
\footnotetext{added by \texttt{olfline}}
\circuitdesc*{mzm}{Mach Zehnder Modulator\footnotemark}{}( in/180/0.1, mod/90/0.1, out/0/0.1)
@@ -2546,13 +2548,14 @@ It also has a \texttt{zero} anchor if you need to rotate it about its real cente
\end{groupdesc}
\begin{groupdesc}
- \circuitdescbip*{twoport}{generic two port\footnotemark}{}
- \footnotetext{To specify text to be put in the component: \texttt{twoport[t=text]}): \tikz \draw[scale=.5, transform shape] (0,0) to[twoport,>,t=text] (2,0); }
+ \circuitdescbip*{twoport}{generic two port (use \texttt{t=\dots} to specify text)}{}
+ \circuitdescbip*{twoportsplit}{generic two port split (use \texttt{t1=\dots} and \texttt{t2=\dots} to specify text)}{}
\circuitdescbip*{vco}{vco}{}
\circuitdescbip*{bandpass}{bandpass}{}
\circuitdescbip*{bandstop}{bandstop}{}
\circuitdescbip*{highpass}{highpass}{}
\circuitdescbip*{lowpass}{lowpass}{}
+ \circuitdescbip*{allpass}{allpass}{}
\circuitdescbip*{adc}{A/D converter}{}
\circuitdescbip*{dac}{D/A converter}{}
\circuitdescbip*{dsp}{DSP}{}
@@ -2704,16 +2707,28 @@ Since inputs and outputs can vary, input arrows can be placed as nodes. Note tha
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
(0,0) node[mixer] (m) {}
- (m.1) to[short,-o] ++(-1,0)
- (m.2) to[short,-o] ++(0,-1)
- (m.3) to[short,-o] ++(1,0)
- (m.1) node[inputarrow] {}
- (m.2) node[inputarrow,rotate=90] {};
+ (m.w) to[short,-o] ++(-1,0)
+ (m.s) to[short,-o] ++(0,-1)
+ (m.e) to[short,-o] ++(1,0)
+ (m.w) node[inputarrow] {}
+ (m.s) node[inputarrow,rotate=90] {};
\end{circuitikz}
\end{LTXexample}
\paragraph{Labels and custom two-port boxes}
+
+You can use the keys \texttt{t}, \texttt{t1}, \texttt{t2} (shorthands for \texttt{text}, \texttt{text in}, \texttt{text out}) to fill the generic blocks:
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz} \draw
+ (0,0) to[short,o-] ++(0.3,0)
+ to[allpass,>] ++(2,0)
+ to[twoport,>,t={B}] ++(2,0)
+ to[twoportsplit,t1={\tiny in},
+ t2={\tiny\color{red}out}] ++(0,-2.5);
+\end{circuitikz}
+\end{LTXexample}
+
Some two-ports have the option to place a normal label (\texttt{l=}) and a inner label (\texttt{t=}).
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -2722,7 +2737,6 @@ Some two-ports have the option to place a normal label (\texttt{l=}) and a inner
\end{circuitikz}
\end{LTXexample}
-
\paragraph{Box option}
Some devices have the possibility to add a box around them. The inner symbol scales down to fit inside the box.
\begin{LTXexample}[varwidth=true]
@@ -2782,6 +2796,8 @@ Basically they are the same as the normal \texttt{npn} and \texttt{pnp}, and the
\begin{groupdesc}
\circuitdesc{nmos}{nmos}{Q}( G/180/0.2,D/0/0.2,S/0/0.2 )
\circuitdesc{pmos}{pmos}{}
+ \circuitdesc{nmosd}{nmos depletion}{Q}( G/180/0.2,D/0/0.2,S/0/0.2 )
+ \circuitdesc{pmosd}{pmos depletion}{}
\circuitdesc{hemt}{hemt}{}
\end{groupdesc}
@@ -2789,11 +2805,13 @@ Basically they are the same as the normal \texttt{npn} and \texttt{pnp}, and the
\begin{groupdesc}
\circuitdesc{nfet}{nfet}{Q}
+ \circuitdesc{nfetd}{nfet depletion}{Q}
\circuitdesc{nigfete}{nigfete}{Q}
\circuitdesc{nigfete,solderdot}{nigfete}{}
\circuitdesc{nigfetebulk}{nigfetebulk}{}
\circuitdesc{nigfetd}{nigfetd}{}
\circuitdesc{pfet}{pfet}{Q}
+ \circuitdesc{pfetd}{pfet depletion}{Q}
\circuitdesc{pigfete}{pigfete}{}
\circuitdesc{pigfetebulk}{pigfetebulk}{}
\circuitdesc{pigfetd}{pigfetd}{}
@@ -2853,6 +2871,8 @@ If the option \texttt{arrowmos} is used (or after the command \verb!\ctikzset{tr
\ctikzset{tripoles/mos style/arrows}
\circuitdesc{nmos}{nmos}{}
\circuitdesc{pmos}{pmos}{}
+ \circuitdesc{nmosd}{nmos depletion}{}
+ \circuitdesc{pmosd}{pmos depletion}{}
\end{groupdesc}
You can go back to the no-arrows mos with \texttt{noarrowmos} locally or with
@@ -2958,6 +2978,8 @@ To draw the PMOS circle non-solid, use the option \texttt{emptycircle} or the co
\ctikzset{tripoles/mos style/arrows}
\circuitdesc{nmos, bulk}{pmos}{}(bulk/45/0.3, nobulk/-30/.4)
\circuitdesc{pmos, bulk}{pmos}{}
+ \circuitdesc{nmosd, bulk}{nmos depletion}{}(bulk/45/0.3, nobulk/-30/.4)
+ \circuitdesc{pmosd, bulk}{pmos depletion}{}
\end{groupdesc}
\begin{LTXexample}[varwidth=true]
@@ -2974,7 +2996,48 @@ To draw the PMOS circle non-solid, use the option \texttt{emptycircle} or the co
\ctikzset{tripoles/mos style/no arrows}
\draw (0,-8) node[info, red]{no circle, no arrows, DON'T do it}
node[pmos]{} (2,-8) node[nmos]{};
-\end{circuitikz}\end{LTXexample}
+\end{circuitikz}
+\end{LTXexample}
+
+\paragraph{Simplified symbols for depletion-mode MOSFETs}.
+The \texttt{nmosd}, \texttt{pmosd} (symplified) symbols for depletion-mode MOSFET (introduced in \texttt{1.2.4}) behave exactly like the normal (without the final \texttt{d}) ones.
+
+By default, the thick bar (indicating the pre-formed channel) is filled with the same color as the drawing:
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[ ]
+ \draw (0,2) to[R] ++(2,0) node[nmosd, anchor=G]{};
+ \draw[color=red] (0,0) to[R] ++(2,0) node[pmosd, anchor=G]{};
+\end{circuitikz}
+\end{LTXexample}
+
+You can change this behavior by setting the key
+\texttt{tripoles/nmosd/depletion color} (default value \texttt{default}, which means ``use the draw color'') to the color you want; using \texttt{none} will lead to an unfilled channel (note that in this case the color does not change automatically with the path!):
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[ ]
+ \ctikzset{tripoles/nmosd/depletion color=gray}
+ \draw (0,2) to[R] ++(2,0) node[nmosd, anchor=G]{};
+ \ctikzset{tripoles/pmosd/depletion color=none}
+ \draw[color=red] (0,0) to[R] ++(2,0)
+ node[pmosd, anchor=G]{};
+ \ctikzset{tripoles/pmosd/depletion color=
+ {cyan!50!white}}
+ \draw[color=blue] (0,-2) to[R] ++(2,0)
+ node[pmosd, anchor=G, bulk]{};
+\end{circuitikz}
+\end{LTXexample}
+
+
+Obviously you have the equivalent \texttt{tripoles/pmosd/depletion color} for type-P transistors.
+
+They also have path-style syntax, as the other transistors.
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[ ]
+ \draw (0,0) to[Tnmosd] ++(2,0)
+ to[Tpmosd, invert] ++(0,-2)
+ ;
+\end{circuitikz}
+\end{LTXexample}
\subsubsection{Multiple terminal transistors customization}
@@ -4255,6 +4318,8 @@ In addition to the legacy ports, since release 1.1.0, logic ports following the
These ports are completely independent from the legacy set (either \texttt{american} or \texttt{european}); they are not eanbled by default because the relative size of the ports is very different from the legacy ones, and that will disrupt every schematic (especially if drawn with absolute coordinate). If you want to use them as default, you can use the command \verb|\ctikzset{logic ports=ieee}| and by default the shapes \texttt{and port}, \texttt{or port} and so on will be the IEEE standard ones.
+The transmission gate (also known as ``bowtie'') components are not described in the IEEE standard, so they are simply inspired by the other IEEE ports --- this is why their name is prefixed by \texttt{ieee} and not by \texttt{ieeestd}. They are aliased to \texttt{tgate} and \texttt{double tgate} though, and it is recommended to use those names (maybe in the future there will be \texttt{american ports} and/or \texttt{european ports} versions available).
+
\begin{groupdesc}
\circuitdesc*{ieeestd and port}{IEEE standard ``and'' port}{}(in 1/180/0.2, in 2/180/0.2, out/0/0.2, bout/45/0.2)
\circuitdesc*{ieeestd nand port}{IEEE standard ``nand'' port}{}(in 1/180/0.2, out/0/0.2, bout/45/0.2)
@@ -4268,8 +4333,11 @@ These ports are completely independent from the legacy set (either \texttt{ameri
\circuitdesc*{ieeestd not port}{IEEE standard ``not'' port}{}(in/180/0.2, bin/-155/0.2, out/0/0.2, bout/45/0.2)
\circuitdesc*{ieeestd schmitt port}{Schmitt port matched to IEEE standard ports}{}(in/180/0.2, out/0/0.2, bout/45/0.2)
\circuitdesc*{ieeestd invschmitt port}{Inverting Schmitt port matched to IEEE standard ports}{}
+ \circuitdesc*{ieee tgate}{IEEE style transmission gate}{}(in 1/180/0.2, bin 1/-155/0.2, up/30/0.2, down/-30/0.2, out/0/0.2, bout/45/0.2, notgate/135/0.4, gate/-135/0.4)
+ \circuitdesc*{ieee double tgate}{IEEE style double transmission gate}{}(in/180/0.2, bin/-155/0.2, out/0/0.2, bout/45/0.2, up/30/0.2, down/-30/0.2, bnotgate/135/0.4, bgate/-115/0.4)
\circuitdesc*{notcirc}{Inverting dot for IEEE ports}{}(west/180/0.1, east/0/0.1)
\circuitdesc*{schmitt symbol}{Schmitt symbol to add to input pins if needed}{}(north west/145/0.1, south east/-45/0.1)
+
\end{groupdesc}
\subsubsection{European Logic gates}
@@ -4302,6 +4370,8 @@ The one-input, one-output ports have a handy path-style equivalent; they are the
\circuitdescbip*{inline buffer}<buffer port>{``buffer'' logic port}{}
\circuitdescbip*{inline schmitt}<schmitt port>{Schmitt logic port}{}
\circuitdescbip*{inline invschmitt}<invschmitt port>{Inverting Schmitt logic port}{}
+ \circuitdescbip*{inline tgate}<tgate>{transmission gate}{}(bgate/-90/0.2, bnotgate/90/0.2)
+ \circuitdescbip*{inline double tgate}<double tgate>{double transmission gate}{}(bgate/-90/0.2, bnotgate/90/0.2)
\end{groupdesc}
Those ports follows the current selected style, although you can change it on the fly (even if it has not a lot of sense); you can apply labels, annotations and (again, not a lot of sense) voltages to them. The assigned value is typeset as if it were the main text of the node.
@@ -4314,6 +4384,19 @@ Those ports follows the current selected style, although you can change it on th
\end{circuitikz}
\end{LTXexample}
+Notice that in the inline version the leading pins are not drawn,
+so in the case of the transmission gates
+you have to use the border pins to connect the gates.
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[ ]
+ \ctikzset{logic ports=ieee,
+ logic ports/fill=yellow}
+ \draw (0,0) to[inline not] ++(2,0)
+ to[inline double tgate, name=P] ++(3,0)
+ (P.bnotgate) |- ++(-3,1);
+\end{circuitikz}
+\end{LTXexample}
\subsubsection{American ports usage}
@@ -4780,6 +4863,51 @@ Finally, the internal \texttt{notcirc} node used for the output negation is acce
\endgroup % for IEEE ports ctikzset
%%
+\paragraph{Transmission gate symbols.}\label{sec:passgate}
+
+
+The \texttt{tgate} and \texttt{double tgate} components are available since \texttt{1.2.4} but only in the IEEE style. An additional parameter \texttt{tgate scale} (default \texttt{0.7}; if you set this to \texttt{1} the triangles will have the same size as a \texttt{ieeestd buffer port}) select the relative scale of the components.
+
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \ctikzset{logic ports=ieee}
+ \draw (0,0) to[inline not, *-*] ++(2,0)
+ node[tgate, anchor=in]{};
+\end{circuitikz}
+\end{LTXexample}
+
+The anchors for the tgate's control point are called \texttt{gate} and \texttt{notgate} (and the corresponding \texttt{bgate} and \texttt{bnotgate} for the border anchors).
+
+\begin{quote}
+ \begin{circuitikz}
+ \ctikzset{logic ports=ieee, tgate scale=1}
+ \node[ieee tgate](A) at (0,0) {};
+ \path (A.in) \showcoord(in)<180:0.2>;
+ \path (A.bin) \showcoordb(bin)<-135:0.2>;
+ \path (A.out) \showcoord(out)<0:0.2>;
+ \path (A.bout) \showcoordb(bout)<-45:0.2>;
+ \path (A.left) \showcoord(left)<135:0.4>;
+ \path (A.right) \showcoord(right)<45:0.4>;
+ \path (A.gate) \showcoord(gate)<-160:0.3>;
+ \path (A.bgate) \showcoordb(bgate)<-75:0.3>;
+ \path (A.notgate) \showcoord(notgate)<160:0.3>;
+ \path (A.bnotgate) \showcoordb(bnotgate)<75:0.3>;
+ \node[ieee double tgate](A) at (5,0) {};
+ \path (A.in) \showcoord(in)<180:0.2>;
+ \path (A.bin) \showcoordb(bin)<-135:0.2>;
+ \path (A.out) \showcoord(out)<0:0.2>;
+ \path (A.bout) \showcoordb(bout)<-45:0.2>;
+ \path (A.left) \showcoord(left)<135:0.4>;
+ \path (A.right) \showcoord(right)<45:0.4>;
+ \path (A.gate) \showcoord(gate)<-160:0.3>;
+ \path (A.bgate) \showcoordb(bgate)<-75:0.3>;
+ \path (A.notgate) \showcoord(notgate)<160:0.3>;
+ \path (A.bnotgate) \showcoordb(bnotgate)<75:0.3>;
+ \end{circuitikz}
+\end{quote}
+
+
\subsubsection{European logic port usage}
European logic port are the same class as american and IEEE-style ones, and they obey the same class modifier. Moreover, you can use the \texttt{no inputs pin} as in the other logic ports to suppress input pins.
@@ -5200,7 +5328,7 @@ The code that implemented the printing of the numbers (which in \texttt{muxdemux
}
\end{lstlisting}
-You can use these shapes to draw a lot of symbols that are unavailable; using a bit of \LaTeX{} command trickery you can use them quite naturally too...
+You can use these shapes to draw a lot of symbols that are unavailable; using a bit of \LaTeX{} command trickery you can use them quite naturally too... For example, this was used before the introduction of the \texttt{double tgate} symbol in \texttt{1.2.4} (see ~\ref{sec:passgate}:
\begin{LTXexample}[varwidth=true]
\def\tgate#1{
@@ -5676,7 +5804,35 @@ However, you can override the properties \texttt{voltage/distance from node} (de
\tikz \draw (0,0) to[R, v=1<\volt>] (2,0);
\end{LTXexample}
-The same concept as \texttt{distance from node} applies to the key \texttt{current/distance} for the position of the current's arrow:
+You can also use a global \texttt{ctikzset} on the key \texttt{voltage/distance from node} (and similar) that will act as a default value. Notice however that the specific component value \textbf{overrides} the global one, and several components have pre-defined overrides, so they will ignore the default value. The components that have out of the box predefined overrides for \texttt{distance from node} are \texttt{generic}, \texttt{ageneric}, \texttt{fullgeneric} and \texttt{memristor} (set to \texttt{0.4}), and the ones that have it for \texttt{bump b} are
+\texttt{generic}, \texttt{ageneric}, \texttt{fullgeneric}, \texttt{memristor}, \texttt{tline}, \texttt{varistor}, \texttt{photoresistor}, \texttt{thermistor}, \texttt{thermistorntc}, \texttt{thermistorptc}, \texttt{ccapacitor}, \texttt{emptyzzdiode}, \texttt{fullzzdiode}, \texttt{emptythyristor}, \texttt{fullthyristor}, \texttt{emptytriac} and \texttt{fulltriac},, with several values (you can look at them in the file \texttt{pgfcirc.defines.tex})
+
+
+Notice also that normally \texttt{distance from node} is a relative displacement, computed on the node-component wire. So that this will put the start and stop point $1/4$ of the way between node and component:
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \ctikzset{voltage/distance from node=0.25}
+ \draw (0, 2) to[D, v=$v_1$] ++(4,0);
+ \draw (0, 1) to[D, v=$v_1$] ++(3,0);
+ \draw (0, 0) to[D, v=$v_1$] ++(2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+The value of \texttt{distance from node} can be also an absolute distance; in that case is measured from the start of the connection toward the component on the left (and symmetrically on the right), so this will put the start and end point to \SI{0.25}{\cm} from the start of the node:
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \ctikzset{voltage/distance from node=0.25cm}
+ \draw (0, 2) to[D, v=$v_1$] ++(4,0);
+ \draw (0, 1) to[D, v=$v_1$] ++(3,0);
+ \draw (0, 0) to[D, v=$v_1$] ++(2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+There is currently no way to specify the position at a fixed distance from the component (as opposed as from the node).
+
+The same concept as \texttt{distance from node} applies to the key \texttt{current/distance} for the position of the current's arrow (and to \texttt{flow/distance} for the flow arrow position):
\begin{LTXexample}[varwidth=true]
\tikz \draw (0,0) to[C, i=$\imath$] (2,0); \par
@@ -5684,7 +5840,7 @@ The same concept as \texttt{distance from node} applies to the key \texttt{curre
\tikz \draw (0,0) to[C, i=$\imath$] (2,0);
\end{LTXexample}
-You can change globally these parameters by defining a component-specific key; you have to use the internal name of the component (in the component list, is the \texttt{nodename} without the terminal ``\texttt{shape}'' part):
+If you want to change those parameters by defining a component-specific key you have to use the internal name of the component (in the component list, is the \texttt{nodename} without the terminal ``\texttt{shape}'' part):
\begin{LTXexample}[varwidth=true]
\tikz \draw (0,0) to[R, v=1<\volt>] (1.5,0)
@@ -6136,7 +6292,7 @@ Notes that \texttt{american voltage} also affects batteries.
\end{circuitikz}
\end{LTXexample}
-When using \texttt{american} or \texttt{straight} voltage style, the \texttt{open} component is treated differently, and the voltage is placed in the middle of the open space\footnote{Since \texttt{v1.1.2}, thank to an \href{https://github.com/circuitikz/circuitikz/issues/374}{issue opened by user \texttt{rhandley} on GitHub}.}:
+Additionally, the \texttt{open} component is treated differently; the voltage is placed in the middle of the open space\footnote{Since \texttt{v1.1.2}, thank to an \href{https://github.com/circuitikz/circuitikz/issues/374}{issue opened by user \texttt{rhandley} on GitHub}.}:
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[american voltages]
@@ -6148,7 +6304,7 @@ When using \texttt{american} or \texttt{straight} voltage style, the \texttt{ope
\end{circuitikz}
\end{LTXexample}
-If you want or need to maintain the old behavior for \texttt{open} voltage, you can set the key \texttt{american open voltage} to \texttt{legacy} (the default is the new behavior, which correspond to the value \texttt{center}).
+If you want or need to maintain the old behavior for \texttt{open} voltage, you can set the key \texttt{open voltage position} to \texttt{legacy} (the default is the new behavior, which correspond to the value \texttt{center}).
\subsubsection{American voltages customization}
@@ -6984,6 +7140,91 @@ You can see more example and more reasoning on GitHub; start from the
So finally it was decided\footnote{well, Romano decided, so you can blame him. \emph{I do not think that workarounds to correct malformed circuits are really maintainable; just see the bunch of code removed by the patch! --- Romano.}} to remove the change, to simplify the code and to make the package more maintainable.
+\subsection{Using dashed (or colored) wires in circuits}\label{faqs:dashed}
+
+\faqQ How can I make part of the wires dashed (or colored)? This does not work:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+ \draw (0,0) to[R] ++(2,0)
+ to[short, dashed, red] ++(1,0)
+ to [R] ++(2,0); % surprise!
+\end{circuitikz}
+\end{LTXexample}
+
+Nor this one, which is even stranger:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+ \draw (0,0) to[R] ++(2,0)
+ [dashed, red] -- ++(1,0)
+ to [R] ++(2,0); % surprise!
+\end{circuitikz}
+\end{LTXexample}
+
+\faqA This is an effect on how \TikZ{} builds and draws path. As explained in the \TikZ{} manual,\footnote{in 3.1.5b, section~14, ``syntax for path specification''} most path options are globally valid for the whole path; color and dash/dot is one of this. You have two options in this case. The first one is to use two paths.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+ \draw (0,0) to[R] ++(2,0) coordinate(a);
+ \draw [dashed, red] (a) -- ++(1,0) coordinate(b);
+ \draw (b) to [R] ++(2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+The other one is to use \texttt{edge} operations\footnote{I took the idea form \href{https://tex.stackexchange.com/a/554905/38080}{this answer by \texttt{@LaTeXdraw-com} user on TeX.SE}, thanks!}; be sure to read about it on the \TikZ{} manual\footnote{in 3.1.5b, section~17.12, ``connecting nodes: use the \texttt{edge} operation''} --- but basically this is similar to the \texttt{to} operation but it builds another path (added at the end of the current path, like nodes are). This means that it can use different options, and that it \textbf{does not} moves the path coordinates.
+
+So, for example:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+ \draw (0,0) to[R] ++(2,0)
+ edge[dashed, red] ++(1,0)
+ % we have to move the path position here!
+ ++(1,0) to [R] ++(2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+The only problem with this approach is that the \texttt{edge}s are added \emph{after} the nodes, so it can create problems with nodes (look carefully!):
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+ \draw (0,0) to[R,-o] ++(2,0)
+ edge[dashed, red] ++(1,0)
+ ++(1,0) to [R] ++(2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+So it's better, in this case, to add the nodes manually after the path (there is no perfect solution!)
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+ \draw (0,0) to[R] ++(2,0) coordinate(a)
+ edge[dashed, red] ++(1,0)
+ ++(1,0) to [R] ++(2,0);
+ \node [ocirc] at (a){};
+\end{circuitikz}
+\end{LTXexample}
+
+
+A more complex example can be seen (look at the comments!) in the following circuit.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[american]
+ \draw (0,0) to[R, v=$v_1$] ++(2,0)
+ edge[dashed] ++(1,0)
+ ++(1,0) to[R]
+ ++(2,0) to [R] ++(0,2) coordinate(a)
+ edge[red, dashed] ++(0,1)
+ % several edges start from the same position
+ edge[dashed, ->] node[above]{here} ++(-1,0)
+ % notice that the path here is still
+ % at coordinate (a)!
+ ++(0,1) to[R] ++(0,2)
+ (a) ++(-1,0) to[sV] ++(-2,0);
+\end{circuitikz}
+\end{LTXexample}
+
\subsection{Errors when externalizing pictures}\label{faqs:externalize}
\faqQ When using \verb!\tikzexternalize! I get the following error:
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index d3fa441ab7..3fdb137c4b 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -12,8 +12,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{1.2.3}
-\def\pgfcircversiondate{2020/08/07}
+\def\pgfcircversion{1.2.4}
+\def\pgfcircversiondate{2020/10/04}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
index fe87271f5e..cf0e4ee28b 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
@@ -969,11 +969,27 @@
\ctikzset{bipoles/twoport/width/.initial=.7}
\ctikzset{bipoles/twoport/height/.initial=.7}
\ctikzset{bipoles/twoport/text/.initial=}
+\ctikzset{bipoles/twoportsplit/width/.initial=.7}
+\ctikzset{bipoles/twoport/text in/.initial=}
+\ctikzset{bipoles/twoport/text out/.initial=}
+\ctikzset{text/.style={t=#1}}
+\ctikzset{t/.code={%
+ \ctikzsetvalof{bipoles/twoport/text}{#1}%
+}}
+\ctikzset{text in/.style={t1=#1}}
+\ctikzset{t1/.code={%
+ \ctikzsetvalof{bipoles/twoport/text in}{#1}%
+}}
+\ctikzset{text out/.style={t2=#1}}
+\ctikzset{t2/.code={%
+ \ctikzsetvalof{bipoles/twoport/text out}{#1}%
+}}
\ctikzset{bipoles/vco/width/.initial=.7}
\ctikzset{bipoles/bandpass/width/.initial=.7}
\ctikzset{bipoles/bandstop/width/.initial=.7}
\ctikzset{bipoles/highpass/width/.initial=.7}
\ctikzset{bipoles/lowpass/width/.initial=.7}
+\ctikzset{bipoles/allpass/width/.initial=.7}
\ctikzset{bipoles/adc/width/.initial=.7}
\ctikzset{bipoles/dac/width/.initial=.7}
\ctikzset{bipoles/dsp/width/.initial=.7}
@@ -995,6 +1011,9 @@
\ctikzset{tripoles/wilkinson/height/.initial=1.3}
\ctikzset{tripoles/wilkinson/width/.initial=1.3}
+\ctikzset{tripoles/splitter/height/.initial=1.3}
+\ctikzset{tripoles/splitter/width/.initial=1.3}
+
\ctikzset{tripoles/mzm/height/.initial=1.3}
\ctikzset{tripoles/mzm/width/.initial=1.3}
%%>>>
@@ -1124,6 +1143,35 @@
\ctikzset{tripoles/pmos/bodydiode conn/.initial=.6}
\ctikzset{tripoles/pmos/curr direction/.initial=-1}
+\ctikzset{tripoles/nmosd/width/.initial=.7}
+\ctikzset{tripoles/nmosd/gate height/.initial=.35}
+\ctikzset{tripoles/nmosd/base height/.initial=.5}
+\ctikzset{tripoles/nmosd/conn height/.initial=0}
+\ctikzset{tripoles/nmosd/height/.initial=1.1}
+\ctikzset{tripoles/nmosd/base width/.initial=.5}
+\ctikzset{tripoles/nmosd/gate width/.initial=.62}
+\ctikzset{tripoles/nmosd/arrow pos/.initial=.6}
+\ctikzset{tripoles/nmosd/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nmosd/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nmosd/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nmosd/curr direction/.initial=1}
+\ctikzset{tripoles/nmosd/depletion width/.initial=.1}
+\ctikzset{tripoles/nmosd/depletion color/.initial=default}
+
+\ctikzset{tripoles/pmosd/width/.initial=.7}
+\ctikzset{tripoles/pmosd/gate height/.initial=.35}
+\ctikzset{tripoles/pmosd/base height/.initial=.5}
+\ctikzset{tripoles/pmosd/conn height/.initial=0}
+\ctikzset{tripoles/pmosd/height/.initial=1.1}
+\ctikzset{tripoles/pmosd/base width/.initial=.5}
+\ctikzset{tripoles/pmosd/gate width/.initial=.62}
+\ctikzset{tripoles/pmosd/arrow pos/.initial=.4}
+\ctikzset{tripoles/pmosd/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pmosd/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pmosd/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pmosd/curr direction/.initial=-1}
+\ctikzset{tripoles/pmosd/depletion width/.initial=.1}
+\ctikzset{tripoles/pmosd/depletion color/.initial=default}
\ctikzset{tripoles/hemt/width/.initial=.7}
\ctikzset{tripoles/hemt/gate height/.initial=.35}
\ctikzset{tripoles/hemt/base height/.initial=.5}
@@ -1160,6 +1208,30 @@
\ctikzset{tripoles/pfet/bodydiode conn/.initial=.6}
\ctikzset{tripoles/pfet/curr direction/.initial=-1}
+\ctikzset{tripoles/nfetd/width/.initial=.7}
+\ctikzset{tripoles/nfetd/gate height/.initial=.35}
+\ctikzset{tripoles/nfetd/base height/.initial=.5}
+\ctikzset{tripoles/nfetd/conn height/.initial=0}
+\ctikzset{tripoles/nfetd/height/.initial=1.1}
+\ctikzset{tripoles/nfetd/base width/.initial=.5}
+\ctikzset{tripoles/nfetd/gate width/.initial=.62}
+\ctikzset{tripoles/nfetd/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nfetd/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nfetd/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nfetd/curr direction/.initial=1}
+
+\ctikzset{tripoles/pfetd/width/.initial=.7}
+\ctikzset{tripoles/pfetd/gate height/.initial=.35}
+\ctikzset{tripoles/pfetd/base height/.initial=.5}
+\ctikzset{tripoles/pfetd/conn height/.initial=0}
+\ctikzset{tripoles/pfetd/height/.initial=1.1}
+\ctikzset{tripoles/pfetd/base width/.initial=.5}
+\ctikzset{tripoles/pfetd/gate width/.initial=.62}
+\ctikzset{tripoles/pfetd/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pfetd/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pfetd/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pfetd/curr direction/.initial=-1}
+
\ctikzset{tripoles/nigfete/width/.initial=.7}
\ctikzset{tripoles/nigfete/gate height/.initial=.35}
\ctikzset{tripoles/nigfete/base height/.initial=.5}
@@ -2159,6 +2231,10 @@
% american open voltage adjusting
%
\newif\ifpgf@adjust@open@voltage\pgf@adjust@open@voltagetrue
+\ctikzset{open voltage position/.is choice}
+\ctikzset{open voltage position/center/.code={\pgf@adjust@open@voltagetrue}}
+\ctikzset{open voltage position/legacy/.code={\pgf@adjust@open@voltagefalse}}
+% bad names, kept for compatibility, don't use
\ctikzset{american open voltage/.is choice}
\ctikzset{american open voltage/center/.code={\pgf@adjust@open@voltagetrue}}
\ctikzset{american open voltage/legacy/.code={\pgf@adjust@open@voltagefalse}}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index d9b8e7ca4d..7cd5baff47 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -4040,6 +4040,72 @@
}
+%% twoport split
+\pgfcircdeclarebipolescaled{blocks}
+{}
+{\ctikzvalof{bipoles/twoportsplit/width}}
+{twoportsplit}
+{\ctikzvalof{bipoles/twoportsplit/width}}
+{\ctikzvalof{bipoles/twoportsplit/width}}
+{
+ \pgf@circ@res@step = \ctikzvalof{bipoles/twoportsplit/width}\pgf@circ@scaled@Rlen
+ \divide \pgf@circ@res@step by 2
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgf@circ@res@other = \pgf@circ@res@left
+ \advance\pgf@circ@res@other by \pgf@circ@res@step
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
+ % draw outer box
+ \pgf@circ@twoportbox
+
+ \ifpgf@circuit@inputarrow
+ {
+ \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
+ }
+ \fi
+
+ %get texts
+ \def\pgfcirc@tin{\ctikzvalof{bipoles/twoport/text in}}
+ \def\pgfcirc@tout{\ctikzvalof{bipoles/twoport/text out}}
+
+ % rotate inner symbol
+ \def\texti{\pgfcirc@tin}
+ \def\textii{\pgfcirc@tout}
+ \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+ \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+ \def\texti{\pgfcirc@tout}
+ \def\textii{\pgfcirc@tin}
+ \pgftransformrotate{270}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
+ \def\texti{\pgfcirc@tout}
+ \def\textii{\pgfcirc@tin}
+ \pgftransformrotate{180}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+ \pgftransformrotate{90}
+ \def\texti{\pgfcirc@tin}
+ \def\textii{\pgfcirc@tout}
+ \fi\fi
+
+ % draw inner symbol
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\texti}
+ \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textii}
+}
+
%% voltage controled oscillator
\pgfcircdeclarebipolescaled{blocks}
{}
@@ -4389,6 +4455,74 @@
\pgfusepath{draw}
}
+%% allpass filter
+\pgfcircdeclarebipolescaled{blocks}
+{}
+{\ctikzvalof{bipoles/allpass/width}}
+{allpass}
+{\ctikzvalof{bipoles/allpass/width}}
+{\ctikzvalof{bipoles/allpass/width}}
+{
+ \pgf@circ@res@step = \ctikzvalof{bipoles/allpass/width}\pgf@circ@scaled@Rlen
+ \divide \pgf@circ@res@step by 2
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgf@circ@res@other = \pgf@circ@res@left
+ \advance\pgf@circ@res@other by \pgf@circ@res@step
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
+ % draw outer box
+ \pgf@circ@twoportbox
+
+ \ifpgf@circuit@inputarrow
+ {
+ \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
+ }
+ \fi
+
+ % rotate inner symbol
+ \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+ \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+ \pgftransformrotate{270}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
+ \pgftransformrotate{180}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+ \pgftransformrotate{90}
+ \fi\fi
+
+ % draw inner symbol
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfusepath{draw}
+}
+
%% ADC
\pgfcircdeclarebipolescaled{blocks}
{}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
index 2c4407045c..a83279ee8c 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
@@ -297,10 +297,6 @@
\fi%
}
-\ctikzset{text/.style={t=#1}}
-\ctikzset{t/.code={%
- \ctikzsetvalof{bipoles/twoport/text}{#1}%
-}}
%%%% Stacked labels
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
index ad7b791397..315ba32e4e 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
@@ -2758,4 +2758,270 @@
}
}
+%%%% Transmission gates
+% tgates are only ieee style for now
+\tikzset{%
+ tgate/.style ={shape=ieee tgate},
+ double tgate/.style ={shape=ieee double tgate},
+}
+\ctikzset{tgate scale/.initial=0.7}
+% Buffer and inverters
+%
+% #1: name
+% #2: 1: one-not, 2:double-not
+% #3: content
+\long\def\pgfcircdeclareieeetgate#1#2#3{%
+ \pgfdeclareshape{ieee #1}%
+ {%
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{logic ports}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ \savedmacro{\thisshape}{\def\thisshape{\tikz@fig@name}}
+ \saveddimen{\baselen}{%
+ \pgf@circ@ieeestd@baselen\pgf@x=\pgf@circ@res@temp
+ }
+ \saveddimen{\stdH}{% This is HALF the height of the inner port
+ \pgf@circ@ieeestd@stdH\pgf@x=\pgf@circ@res@temp
+ }
+ \saveddimen{\notdiameter}{
+ \pgf@circ@notradius\pgf@x=2\pgf@circ@res@temp
+ }
+ \saveddimen{\notradius}{
+ \pgf@circ@notradius\pgf@x=\pgf@circ@res@temp
+ }
+ \saveddimen{\pinlen}{%
+ \pgf@circ@ieeestd@pinlen\pgf@x=\pgf@circ@res@temp
+ }
+ % anchors for the body (no pins included here)
+ % Notice that 0.8660254 is cos(30)
+ \savedanchor{\bodyleft}{% This DOES NOT take into account the pointy or/xor thing
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{-2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\topleft}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{-2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\bodyright}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\bottomright}{% Here it is the same as \bodyright
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ % geographical anchors --- must be rectangulars!
+ \savedanchor{\northwest}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{-2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\southwest}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{-2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{-#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\southeast}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{-#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\northeast}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \anchor{center}{\pgfpointorigin}
+ \anchor{text}{
+ \ifpgf@circ@center@text
+ \pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}
+ \else
+ \pgf@circ@ieeestd@stdH
+ \pgfpoint{-0.8660254*\pgf@circ@res@temp + \ctikzvalof{left text distance}}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}
+ \fi
+ }
+ % input anchors
+ \anchor{in}{\bodyleft\pgf@y=0pt\advance\pgf@x by-\pinlen}
+ \anchor{in 1}{\bodyleft\pgf@y=0pt\advance\pgf@x by-\pinlen}
+ \anchor{bin}{\bodyleft\pgf@y=0pt\relax}
+ \anchor{bin 1}{\bodyleft\pgf@y=0pt\relax}
+ % gates
+ \anchor{gate}{\bodyleft\pgf@circ@res@up=\pgf@y
+ \pgf@x=0pt\pgfmathsetlength{\pgf@y}{-(#2-1)*0.5*\pgf@circ@res@up-\pinlen}}
+ \anchor{bgate}{\bodyleft\pgf@circ@res@up=\pgf@y
+ \pgf@x=0pt\pgfmathsetlength{\pgf@y}{-(#2-1)*0.5*\pgf@circ@res@up}}
+ % gate (up) (2.1547 = 1+1/cos(30)
+ \anchor{notgate}{\bodyleft\pgf@circ@res@up=\pgf@y
+ \pgf@x=0pt\relax
+ \pgfmathsetlength{\pgf@circ@res@temp}{2.1547*\notradius}
+ \ifdim\pinlen>\pgf@circ@res@temp
+ \pgfmathsetlength{\pgf@y}{(#2-1)*0.5*\pgf@circ@res@up+\pinlen}
+ \else
+ \pgf@y=\pgf@circ@res@temp
+ \fi
+ }
+ \anchor{bnotgate}{\bodyleft\pgf@circ@res@up=\pgf@y
+ \pgf@x=0pt\pgfmathsetlength{\pgf@y}{(#2-1)*0.5*\pgf@circ@res@up+2.1547*\notradius}}
+
+ % output anchors
+ \anchor{out}{%
+ \pgfextractx{\pgf@circ@res@other}{\bodyright} %body border, without not ball
+ \advance\pgf@circ@res@other by\pinlen
+ \pgfextractx{\pgf@circ@res@temp}{\bottomright} %body + ball border
+ \ifdim \pgf@circ@res@temp > \pgf@circ@res@other
+ \pgf@circ@res@other = \pgf@circ@res@temp % do not enter in the ball...
+ \fi
+ \pgf@x=\pgf@circ@res@other\pgf@y=0pt
+ }
+ \anchor{bout}{\bottomright\pgf@y=0pt}
+
+ \anchor{body right}{\bodyright\pgf@y=0pt}
+ \anchor{right}{\bottomright\pgf@y=0pt}
+ \anchor{body left}{\bodyleft\pgf@y=0pt}% central edge of the body
+ \anchor{left}{\bodyleft\pgf@y=0pt}
+ \anchor{up}{%
+ \bodyleft
+ \pgf@x=0pt
+ \ifnum#2=1\relax
+ \pgf@y=0pt
+ \else
+ \pgf@y=.5\pgf@y
+ \fi
+ \advance\pgf@y by \notdiameter
+ }
+ \anchor{down}{%
+ \bodyleft
+ \pgf@x=0pt
+ \ifnum#2=1\relax
+ \pgf@y=0pt
+ \else
+ \pgf@y=-.5\pgf@y
+ \fi
+ }
+ % this is for when it's used as a bipole
+ % we use the enclosing rectangle (see below)
+ \anchorborder{%
+ %
+ % this is the square border to position the path label with a bit of horizontal space
+ %
+ \pgf@xa=\pgf@x
+ \pgf@ya=\pgf@y
+ \pgfextracty{\pgf@circ@res@up}{\bodyleft}
+ \pgfextractx{\pgf@circ@res@left}{\bodyleft}
+ \pgfpointborderrectangle{\pgfpoint{\pgf@xa}{\pgf@ya}}
+ {\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
+ }
+ % geographical anchors
+ \anchor{nw}{\northwest}
+ \anchor{ne}{\northeast}
+ \anchor{se}{\southeast}
+ \anchor{sw}{\southwest}
+ \anchor{north west}{\northwest}
+ \anchor{north east}{\northeast}
+ \anchor{south east}{\southeast}
+ \anchor{south west}{\southwest}
+ % over 0,0 even if asymmetric
+ % will break if the geocoords are not rectangular
+ \anchor{n}{\northwest\pgf@x=0pt\relax}
+ \anchor{e}{\northeast\pgf@y=0pt\relax}
+ \anchor{s}{\southwest\pgf@x=0pt\relax}
+ \anchor{w}{\northwest\pgf@y=0pt\relax}
+ \anchor{north}{\northwest\pgf@x=0pt\relax}
+ \anchor{east}{\northeast\pgf@y=0pt\relax}
+ \anchor{south}{\southwest\pgf@x=0pt\relax}
+ \anchor{west}{\northwest\pgf@y=0pt\relax}
+
+ \backgroundpath{
+ \pgfscope
+ \pgfsetcolor{\ctikzvalof{color}}
+ \pgfextractx{\pgf@circ@res@left}{\bodyleft}
+ \pgfextracty{\pgf@circ@res@up}{\bodyleft}
+ \pgfextractx{\pgf@circ@res@right}{\bodyright}
+ % \draw input pins
+ \ifpgfcirc@draw@input@leads
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pinlen}{0pt}}
+ % gate (down)
+ \pgfpathmoveto{\pgfpoint{0pt}{-(#2-1)*0.5*\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{-(#2-1)*0.5*\pgf@circ@res@up-\pinlen}}
+ % gate (up) (2.1547 = 1+1/cos(30)
+ \pgfmathsetlength{\pgf@circ@res@temp}{2.1547*\notradius}
+ \ifdim\pinlen>\pgf@circ@res@temp
+ \pgfpathmoveto{\pgfpoint{0pt}{(#2-1)*0.5*\pgf@circ@res@up+\pgf@circ@res@temp}}
+ \pgfpathlineto{\pgfpoint{0pt}{(#2-1)*0.5*\pgf@circ@res@up+\pinlen}}
+ \fi
+ \pgfusepath{draw}
+ \fi
+ #3
+ \endpgfscope
+ % output lead:
+ \pgfextractx{\pgf@circ@res@right}{\bottomright} %body+ball border
+ \pgfextractx{\pgf@circ@res@other}{\bodyright} %body border, without "not" ball
+ \advance\pgf@circ@res@other by \pinlen\relax
+ \ifdim \pgf@circ@res@other > \pgf@circ@res@right
+ \ifpgfcirc@draw@output@leads
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}}
+ \pgfusepath{draw}
+ \fi
+ \fi
+ }
+ }
+}
+
+\pgfcircdeclareieeetgate{tgate}{1}{%
+ \pgfscope
+ \pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@up}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \endpgfscope
+ \pgfscope
+ % 1.1547 is 1/cos(30)
+ \pgftransformshift{\pgfpoint{0pt}{1.1547*\notradius}}
+ \pgfnode{notcirc}{center}{}{\thisshape-not}{\pgfusepath{stroke}}
+ \endpgfscope
+}
+
+\pgfcircdeclareieeetgate{double tgate}{2}{%
+ \pgfscope
+ \pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ % bottom triangles
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{-.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{-.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \endpgfscope
+ \pgfscope
+ % 1.1547 is 1/cos(30)
+ \pgftransformshift{\pgfpoint{0pt}{.5*\pgf@circ@res@up+1.1547*\notradius}}
+ \pgfnode{notcirc}{center}{}{\thisshape-not}{\pgfusepath{stroke}}
+ \endpgfscope
+}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
index 3f748f293d..e4926c9931 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
@@ -370,11 +370,13 @@
\def\pgf@circ@americangfsurgearrester@path#1{\pgf@circ@bipole@path{american gas filled surge arrester}{#1}}
\def\pgf@circ@twoport@path#1{\pgf@circ@bipole@path{twoport}{#1}}
+\def\pgf@circ@twoportsplit@path#1{\pgf@circ@bipole@path{twoportsplit}{#1}}
\def\pgf@circ@vco@path#1{\pgf@circ@bipole@path{vco}{#1}}
\def\pgf@circ@bandpass@path#1{\pgf@circ@bipole@path{bandpass}{#1}}
\def\pgf@circ@bandstop@path#1{\pgf@circ@bipole@path{bandstop}{#1}}
\def\pgf@circ@highpass@path#1{\pgf@circ@bipole@path{highpass}{#1}}
\def\pgf@circ@lowpass@path#1{\pgf@circ@bipole@path{lowpass}{#1}}
+\def\pgf@circ@allpass@path#1{\pgf@circ@bipole@path{allpass}{#1}}
\def\pgf@circ@adc@path#1{\pgf@circ@bipole@path{adc}{#1}}
\def\pgf@circ@dac@path#1{\pgf@circ@bipole@path{dac}{#1}}
\def\pgf@circ@dsp@path#1{\pgf@circ@bipole@path{dsp}{#1}}
@@ -501,11 +503,13 @@
\compattikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@afuse@path}}
\compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoport@path}}
+\compattikzset{twoportsplit/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoportsplit@path}}
\compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vco@path}}
\compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandpass@path}}
\compattikzset{bandstop/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandstop@path}}
\compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@highpass@path}}
\compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lowpass@path}}
+\compattikzset{allpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@allpass@path}}
\compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@adc@path}}
\compattikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dac@path}}
\compattikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dsp@path}}
@@ -924,6 +928,8 @@
\pgf@circ@definetranspath{elmech}
\pgf@circ@definetranspath{nmos}
\pgf@circ@definetranspath{pmos}
+\pgf@circ@definetranspath{nmosd}
+\pgf@circ@definetranspath{pmosd}
\pgf@circ@definetranspath{hemt}
\pgf@circ@definetranspath{npn}
\pgf@circ@definetranspath{pnp}
@@ -957,3 +963,7 @@
\pgfcirc@port@node@to@path{buffer port}{inline buffer}
\pgfcirc@port@node@to@path{schmitt port}{inline schmitt}
\pgfcirc@port@node@to@path{invschmitt port}{inline invschmitt}
+
+\pgfcirc@port@node@to@path{tgate}{inline tgate}
+\pgfcirc@port@node@to@path{double tgate}{inline double tgate}
+
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
index d889f4ab0a..469f7aa8e4 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
@@ -1271,6 +1271,141 @@
}
}
+%% resistive splitter
+\pgfdeclareshape{splitter}{
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{blocks}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ \savedanchor\northwest{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@y=\ctikzvalof{tripoles/wilkinson/height}\pgf@circ@scaled@Rlen
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgf@circ@scaled@Rlen
+ \pgf@x=.5\pgf@x
+ \pgf@x=-\ctikzvalof{tripoles/wilkinson/width}\pgf@x
+ }
+ \anchor{center}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=0pt
+ }
+ \anchor{north}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{south}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{west}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{east}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{south west}{
+ \northwest
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ }
+ \anchor{north west}{
+ \northwest
+ }
+ \anchor{south east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchor{in}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{out1}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=-0.5\pgf@y
+ }
+ \anchor{out2}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=0.5\pgf@y
+ }
+ \anchor{text}{
+ \northwest
+ \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
+ \pgf@x=-.5\wd\pgfnodeparttextbox
+ }
+ \backgroundpath{
+ \pgfsetcolor{\ctikzvalof{color}}
+ \pgf@circ@scaled@Rlen=\scaledRlen
+
+ \northwest
+ \pgf@circ@res@up = \pgf@y
+ \pgf@circ@res@down = -\pgf@y
+ \pgf@circ@res@right = -\pgf@x
+ \pgf@circ@res@left = \pgf@x
+
+ \pgfstartlinewidth=\pgflinewidth
+
+ % draw outer box
+ \pgf@circ@twoportbox
+
+ % draw inner stuff
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
+
+ \pgfusepath{draw}
+
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ % draw inner resisitors - european or american style is recognised
+ \foreach \respt/\resang/\linepta/\lineptb in %
+ { \pgfpoint{0.5\pgf@circ@res@right}{0pt}/90/%
+ \pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}/\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down},%
+ \pgfpoint{0}{0.25\pgf@circ@res@up}/25/%
+ \pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}/\pgfpoint{0.5\pgf@circ@res@left}{0},%
+ \pgfpoint{0}{0.25\pgf@circ@res@down}/-25/%
+ \pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}/\pgfpoint{0.5\pgf@circ@res@left}{0}}
+ {
+ {
+ \pgftransformshift{\respt}
+ \pgftransformrotate{\resang}
+
+ % calculate size of resistor
+ \ifpgf@circuit@europeanresistor
+ \pgfmathparse{\pgf@circ@res@up / \pgf@circ@scaled@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
+ \pgftransformscale{\pgfmathresult}
+ \pgfnode{genericshape}{center}{}{wilk@int@R}{\pgfusepath{fill}}
+ \else
+ \pgfmathparse{\pgf@circ@res@up / \pgf@circ@scaled@Rlen / \ctikzvalof{bipoles/resistor/width} / 2}
+ \pgftransformscale{\pgfmathresult}
+ \pgfnode{resistorshape}{center}{}{wilk@int@R}{\pgfusepath{fill}}
+ \fi
+ }
+
+ \pgfpathmoveto{\linepta}
+ \pgfpathlineto{\pgfpointanchor{wilk@int@R}{right}}
+
+ \pgfpathmoveto{\pgfpointanchor{wilk@int@R}{left}}
+ \pgfpathlineto{\lineptb}
+ \pgfusepath{draw}
+ }
+ }
+}
+
%% couplers generics
\long\def\pgfcircdeclarefourport#1#2{
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
index 9b1fd385c3..95f001618e 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
@@ -2642,6 +2642,246 @@
\fi
}
+%%% depletion MOSFET (simplified symbols)
+
+\long\def\pgfcirc@filldraw@depletion#1{%
+ \ifx\tikz@fillcolor\pgfutil@empty
+ % if there is no explicit fill check the specific key
+ \edef\@@tmp{\ctikzvalof{tripoles/#1/depletion color}}\edef\@@none{none}%
+ \ifx\@@tmp\@@none % if it's none
+ \pgfusepath{draw}%
+ \else
+ \edef\@@default{default}%
+ \ifx\@@tmp\@@default % fill with the pen color
+ \pgfusepath{draw, fill}%
+ \else
+ \pgfsetfillcolor{\@@tmp}%
+ \pgfusepath{draw, fill}%
+ \fi
+ \fi
+ \else
+ \pgfsetfillcolor{\tikz@fillcolor}%
+ \pgfusepath{draw, fill}%
+ \fi
+}
+
+\pgfcircdeclaretransistor{nmosd}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/nmosd/gate height}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/nmosd/gate height}\pgf@y
+ }
+ \anchor{nobulk}{ %override
+ \left
+ \pgf@circ@res@temp=\ctikzvalof{tripoles/nmosd/depletion width}\pgf@x
+ \pgf@x=\ctikzvalof{tripoles/nmosd/base width}\pgf@x
+ \advance\pgf@x by -\pgf@circ@res@temp
+ }
+ }{%
+ % draw depletion channel
+ \pgfscope
+ \pgfpathrectanglecorners
+ {\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@up}}
+ {\pgfpoint
+ {(\ctikzvalof{tripoles/nmosd/base width} - \ctikzvalof{tripoles/nmosd/depletion width})*\pgf@circ@res@left}
+ {-\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@up}}
+ \pgfcirc@filldraw@depletion{nmosd}
+ \endpgfscope
+ % draw drain and source terminals
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@up}}
+
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfusepath{draw}
+
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/base height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/base height}\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/gate width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/gate width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@down}}
+ \pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+ \ifpgf@circuit@mos@arrows
+ \pgfscope
+ \ifpgf@circuit@trans@arrowatend
+ \pgftransformshift{\pgfpoint
+ {\pgf@circ@res@right}%
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@down}%
+ }
+ \pgfnode{trarrow}{btip}{}{}{\pgfusepath{stroke}}
+ \else
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \pgftransformlineattime{\ctikzvalof{tripoles/nmosd/arrow pos}}{%
+ \pgfpoint%
+ {\ctikzvalof{tripoles/nmosd/gate width}\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@down}%
+ }{%
+ \pgfpoint
+ {\pgf@circ@res@right-\ctikzvalof{tripoles/nmosd/depletion width}*\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@down}%
+ }
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \fi
+ \endpgfscope
+ \fi
+
+ \ifpgf@circuit@bpt@drawgate
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/gate width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \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/nmosd/base width}\pgf@circ@res@left-\ctikzvalof{tripoles/nmosd/depletion 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{pmosd}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/pmosd/gate height}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/pmosd/gate height}\pgf@y
+ }
+ \anchor{nobulk}{ %override
+ \left
+ \pgf@circ@res@temp=\ctikzvalof{tripoles/pmosd/depletion width}\pgf@x
+ \pgf@x=\ctikzvalof{tripoles/pmosd/base width}\pgf@x
+ \advance\pgf@x by -\pgf@circ@res@temp
+ }
+ }{%
+ % draw depletion channel
+ \pgfscope
+ \pgfpathrectanglecorners
+ {\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}}
+ {\pgfpoint
+ {(\ctikzvalof{tripoles/pmosd/base width} - \ctikzvalof{tripoles/pmosd/depletion width})*\pgf@circ@res@left}
+ {-\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}}
+ \pgfcirc@filldraw@depletion{pmosd}
+ \endpgfscope
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ \ifpgf@circuit@mos@arrows
+ \pgfscope
+ \ifpgf@circuit@trans@arrowatend
+ \pgftransformshift{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left-\ctikzvalof{tripoles/nmosd/depletion width}*\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}%
+ }
+ \pgftransformrotate{180}
+ \pgfnode{trarrow}{tip}{}{}{\pgfusepath{stroke}}
+ \else
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \pgftransformlineattime{\ctikzvalof{tripoles/pmosd/arrow pos}}{%
+ \pgfpoint%
+ {\pgf@circ@res@right-\ctikzvalof{tripoles/nmosd/depletion width}*\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}%
+ }{%
+ \pgfpoint
+ {\ctikzvalof{tripoles/pmosd/gate width}\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}%
+ }
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \fi
+ \endpgfscope
+ \fi
+
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/base height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/base height}\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/gate width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/gate width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@down}}
+ \pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+
+
+ \pgfusepath{draw}
+ \ifpgf@circuit@bpt@drawgate
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/gate width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \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/pmosd/base width}\pgf@circ@res@left-\ctikzvalof{tripoles/nmosd/depletion 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
+ {\ctikzvalof{tripoles/pmosd/gate width}\pgf@circ@res@left - \ctikzvalof{nodes width}*\pgf@circ@Rlen}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}{\ctikzvalof{nodes width}*\pgf@circ@Rlen}
+ \ifpgf@circuit@pmos@emptycircle
+ \pgfsetfillcolor{white}
+ \fi
+ \pgfusepath{draw,fill}
+ \fi
+}
%% HEMT FET Transistor
\pgfcircdeclaretransistor{hemt}{
\anchor{inner up}{
@@ -2830,6 +3070,15 @@
\drawfetcore{pfet}
}
+\pgfdeclaretransistorwrapperaddbulk{nfetd}{}{%
+ \pgf@circuit@trans@depletiontypetrue
+ \drawfetcore{nfetd}
+}
+
+\pgfdeclaretransistorwrapperaddbulk{pfetd}{}{%
+ \pgf@circuit@trans@depletiontypetrue
+ \drawfetcore{pfetd}
+}
% N-CHANNEL IGFET ENHANCEMENT TYPE
\pgfdeclaretransistorwrapperaddbulk{nigfete}{}{%
\pgf@circuit@trans@depletiontypefalse
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index 473dc34f43..1b45f630bd 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -10,8 +10,8 @@
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
-\def\pgfcircversion{1.2.3}
-\def\pgfcircversiondate{2020/08/07}
+\def\pgfcircversion{1.2.4}
+\def\pgfcircversiondate{2020/10/04}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]