summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-12-11 21:34:32 +0000
committerKarl Berry <karl@freefriends.org>2022-12-11 21:34:32 +0000
commit2c7b0bb96d88d7d2b6676c8a3b760d3165c6cc6c (patch)
treecdb12d025bf5ce0da99448112c35d13391cfca0b /Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
parent7cd2f8ab760d1e3271c094ac5b725796dac52267 (diff)
circuitikz (11dec22)
git-svn-id: svn://tug.org/texlive/trunk@65240 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex')
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex205
1 files changed, 163 insertions, 42 deletions
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
index 9302ccee3ba..9a375b69dc5 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
@@ -213,6 +213,9 @@ Arrows with \texttt{to[]} components don't work, anyway, so basically avoid this
\end{circuitikz}
\end{LTXexample}
+Lastly, voltage styles interacts in strange ways with general (such as \texttt{american}, \texttt{european} style), in the sense that sometimes the order in which you enact them is important. That should be arguably fixed, but it will change (read break) a lot of existing code, so it'll stay; more information and workarounds in section~\ref{sec:mixing-voltage-styles}.
+
+As a final notice, if you want to use the \texttt{externalize} library, do not use the \texttt{circuitikz} environment: use \texttt{tikzpicture} (which is really the same thing, see the FAQ~\ref{faqs:externalize}).
\subsection{Scale factor inaccuracies}\label{sec:usefpu}
@@ -246,6 +249,7 @@ The \texttt{use fpu reciprocal} key seems to have no side effects, but given tha
Here, we will provide a list of incompabilities between different version of \Circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than include a lot of switches and compatibility layers. In general, changes that would invalidate a circuit (changes of polarity of components and so on) are almost always protected by a flag; the same is not true for purely aesthetic changes.
If unsure, you can check the version in your local installation by using the macro \verb!\pgfcircversion{}!.
\begin{itemize}
+ \item Version \texttt{1.6.0} has a big rewrite of the block's code. In principle the changes are backward-compatible, but there were several bugs (wrong anchors, errors with rotations, and so on) that have been fixed in the process.
\item Since \texttt{v1.5.1}\footnote{Do not use \texttt{v1.5.0}, it's buggy.} color management (see section~\ref{sec:colors}) and the details of how the shapes are drawn and protected by the external drawing options has changed. There should be no substantial changes to the circuits, though.
\item The \TikZ{} fix for \texttt{to[...] +(x,y)} behavior (see~\ref{sec:path-relative-coordinates}) uncovered a bug in the positioning of the labels in \Circuitikz{} that had been present since \texttt{v0.8}. So you \textbf{must} upgrade to \texttt{v1.4.1} or better if you have \TikZ{} newer than \texttt{3.1.8} (and you want/need to use the \texttt{+(x,y)} syntax).
\item There have been changes in (internal) parameters for capacitors in \texttt{v1.4.1}; now to change them you should use the style interface (see~\ref{sec:capacitors-styling}).
@@ -1705,7 +1709,7 @@ Basically, to write the style \texttt{example}, you edit a file named \texttt{ct
This kind of style will \emph{add} to the existing style. If you want to have a style that \emph{substitute} the current style, you should do like this:
\begin{lstlisting}[frame=single, framesep=10pt]
-\ctikzloadstyle{legacy}% start from a know state
+\ctikzloadstyle{legacy}% start from a known state
\tikzset{romano circuit style/.style={%
legacy circuit style, % load the legacy style
\circuitikzbasekey/.cd,%
@@ -2019,9 +2023,9 @@ If \texttt{americanresistors} option is active (or the style \texttt{[american r
\begin{groupdesc}
\ctikzset{resistor=american}
\circuitdescbip[resistor]{R}{Resistor}{american resistor}
- \circuitdescbip[vresistor]{vR}{Variable resistor}{variable american resistor}
- \circuitdescbip[potentiometer]{pR}{Potentiometer}{american potentiometer}( wiper/0/0.3 )
- \circuitdescbip[resistivesens]{sR}{Resistive sensor}{american resistive sensor}( label/0/0.3 )
+ \circuitdescbip[vresistor]{vR}{Variable resistor}{variable american resistor}(wiper/180/0.3, tip/0/0.3)
+ \circuitdescbip[potentiometer]{pR}{Potentiometer}{american potentiometer}(wiper/0/0.3, tip/135/0.2)
+ \circuitdescbip[resistivesens]{sR}{Resistive sensor}{american resistive sensor}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
\circuitdescbip*[ldresistor]{ldR}{Ligth-Dependent resistor}{american light dependent resistor}(arrows/-45/0.3)
\end{groupdesc}
@@ -2029,9 +2033,9 @@ If instead \texttt{europeanresistors} option is active (or the style \texttt{[e
\begin{groupdesc}
\ctikzset{resistor=european}
\circuitdescbip*[generic]{R}{Resistor}{european resistor}
- \circuitdescbip*[tgeneric]{vR}{Variable resistor}{variable european resistor}
- \circuitdescbip*[genericpotentiometer]{pR}{Potentiometer}{european potentiometer}( wiper/0/0.3 )
- \circuitdescbip*[thermistor]{sR}{Resistive sensor}{european resistive sensor}( label/0/0.3 )
+ \circuitdescbip*[tgeneric]{vR}{Variable resistor}{variable european resistor}(wiper/180/0.3, tip/0/0.3)
+ \circuitdescbip*[genericpotentiometer]{pR}{Potentiometer}{european potentiometer}(wiper/0/0.3, tip/135/0.2)
+ \circuitdescbip*[thermistor]{sR}{Resistive sensor}{european resistive sensor}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
\circuitdescbip*[ldgeneric]{ldR}{Ligth-Dependent resistor}{european light dependent resistor}(arrows/-45/0.3)
\ctikzset{resistor=american} % reset default
\end{groupdesc}
@@ -2063,6 +2067,23 @@ Since version \texttt{0.9.5}, you can control the position of the wiper in poten
\end{circuitikz}
\end{LTXexample}
+Since version \texttt{1.6.0}, potentiometers and variable resistors have extra anchors\footnote{Thanks to a suggestion by \href{https://github.com/circuitikz/circuitikz/issues/663}{Dr. Matthias Jung on GitHub}}, to allow this kind of circuits (that seems to be common in some region):
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[european]
+ \draw (0,0) to[battery2, l=E] ++(0,4.5)
+ -- ++(2,0) coordinate(tmp)
+ to[vR, l2_=$P_1$ and \SI{10}{\kohm}, mirror,
+ invert, name=P]
+ (0,0-|tmp) -- (0,0);
+ \draw (0,0-|tmp) -- ++(1.5,0)
+ to[R=$R_1$, -*] ++(0,2) coordinate(p)
+ |- (P.wiper);
+ \draw (p) to[rmeterwa, t=V] (tmp-|p) -- (tmp);
+\end{circuitikz}
+\end{LTXexample}
+
+
\subsubsection{Generic sensors anchors}\label{sec:sensors-anchors}
Generic sensors have an extra anchor named \texttt{label} to help position the type of dependence, if needed:
@@ -2141,8 +2162,8 @@ For the \texttt{photoresistor} and the two ``flavors'' of the light-dependent re
\circuitdescbip*{capacitor}{Capacitor}{C}
\circuitdescbip*[ccapacitor]{curved capacitor}{Curved (polarized) capacitor}{cC}
\circuitdescbip*{ecapacitor}{Electrolytic capacitor}{eC,elko}
- \circuitdescbip*[vcapacitor]{variable capacitor}{Variable capacitor}{vC}
- \circuitdescbip*[capacitivesens]{capacitive sensor}{Capacitive sensor}{sC}(label/0/0.3)
+ \circuitdescbip*[vcapacitor]{variable capacitor}{Variable capacitor}{vC}(wiper/180/0.3, tip/0/0.3)
+ \circuitdescbip*[capacitivesens]{capacitive sensor}{Capacitive sensor}{sC}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
\circuitdescbip*{piezoelectric}{Piezoelectric Element}{PZ}
\circuitdescbip*{cpe}{Constant Phase Element}{cpe}
\circuitdescbip*[ferrocap]{feC}{Ferroelectric capacitor\footnotemark}{ferrocap}(kink left/180/0.2, kink right/0/0.2, curve left/160/0.3, curve right/-20/0.2, center/45/0.3)
@@ -2207,24 +2228,24 @@ If the \texttt{cuteinductors} option is active (default behaviour), or the style
\begin{groupdesc}
\ctikzset{inductor=cute}
\circuitdescbip[cuteinductor]{L}{Inductor}{cute inductor}(midtap/90/0.1)
- \circuitdescbip[vcuteinductor]{vL}{Variable inductor}{variable cute inductor}(core west/135/0.1, core east/45/0.1)
- \circuitdescbip[scuteinductor]{sL}{Inductive sensor}{cute inductive sensor}(label/0/0.3)
+ \circuitdescbip[vcuteinductor]{vL}{Variable inductor}{variable cute inductor}(wiper/180/0.3, tip/0/0.3)
+ \circuitdescbip[scuteinductor]{sL}{Inductive sensor}{cute inductive sensor}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
\end{groupdesc}
If the \texttt{americaninductors} option is active (or the style \texttt{[american inductors]} is used), the inductors are displayed as follows:
\begin{groupdesc}
\ctikzset{inductor=american}
\circuitdescbip[americaninductor]{L}{Inductor}{american inductor}(midtap/90/0.3)
- \circuitdescbip[vamericaninductor]{vL}{Variable inductor}{variable american inductor}(core west/135/0.1, core east/45/0.1)
- \circuitdescbip[samericaninductor]{sL}{Inductive sensor}{american inductive sensor}( label/0/0.3 )
+ \circuitdescbip[vamericaninductor]{vL}{Variable inductor}{variable american inductor}(core west/135/0.1, core east/45/0.1, wiper/180/0.3, tip/90/0.1)
+ \circuitdescbip[samericaninductor]{sL}{Inductive sensor}{american inductive sensor}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
\end{groupdesc}
Finally, if the \texttt{europeaninductors} option is active (or the style \texttt{[european inductors]} is used), the inductors are displayed as follows:
\begin{groupdesc}
\ctikzset{inductor=european}
\circuitdescbip[fullgeneric]{L}{Inductor}{european inductor}(midtap/90/0.1)
- \circuitdescbip[tfullgeneric]{vL}{Variable inductor}{variable european inductor}(core west/135/0.1, core east/45/0.1)
- \circuitdescbip[sfullgeneric]{sL}{Inductive sensor}{european inductive sensor}( label/0/0.3 )
+ \circuitdescbip[tfullgeneric]{vL}{Variable inductor}{variable european inductor}(wiper/180/0.3, tip/90/0.1,core west/135/0.1, core east/45/0.1)
+ \circuitdescbip[sfullgeneric]{sL}{Inductive sensor}{european inductive sensor}(label/0/0.3, wiper/180/0.3, tip/0/0.3)
\ctikzset{inductor=cute} % back to default
\end{groupdesc}
@@ -3406,12 +3427,15 @@ You can use the \texttt{plug center} anchor to add the IEC ``multiplier'':
\begin{groupdesc}
\circuitdesc*{mixer}{mixer}{}( w/180/0.1,s/-90/0.1,e/0/0.1,n/90/0.1, center/-120/0.3, geocenter/-60/.3 )
+ \circuitdesc*{mixer, boxed}{mixer, boxed}{}(right up/30/0.1, right down/-30/0.1, left up/150/0.1, left down/-150/0.1)
\circuitdesc*{adder}{adder}{}( west/180/0.1,south/-90/0.1,east/0/0.1,north/90/0.1 )
\circuitdesc*{oscillator}{oscillator}{}( w/180/0.1,s/-90/0.1,e/0/0.1,n/90/0.1, center/45/0.2, geocenter/-45/.3 )
\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*{genericsplitter}{generic splitter\footnotemark}{$\SI{-3}{\deci\bel}$}( in/180/0.1, out2/45/0.1, out1/-45/0.1 )
+ \footnotetext{added by \texttt{frankplow}}
\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)
@@ -3419,9 +3443,10 @@ You can use the \texttt{plug center} anchor to add the IEC ``multiplier'':
\end{groupdesc}
\begin{groupdesc}
- \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*{twoport}{generic two port (use \texttt{t=\dots} to specify text)}{}(w/180/0.1,s/-90/0.1,e/0/0.1,n/90/0.1, center/-120/0.3)
+ \circuitdescbip*{twoportsplit}{generic two port split (use \texttt{t1=\dots} and \texttt{t2=\dots} to specify text)}{}(right up/30/0.1, right down/-30/0.1, left up/150/0.1, left down/-150/0.1)
\circuitdescbip*{vco}{vco}{}
+ \circuitdescbip*{vco,box}{vco,box}{}(right up/30/0.1, right down/-30/0.1, left up/150/0.1, left down/-150/0.1)
\circuitdescbip*{bandpass}{bandpass}{}
\circuitdescbip*{bandstop}{bandstop}{}
\circuitdescbip*{highpass}{highpass}{}
@@ -3442,12 +3467,14 @@ You can use the \texttt{plug center} anchor to add the IEC ``multiplier'':
\circuitdescbip*{phaseshifter}{phase shifter}{}
\circuitdescbip*{vphaseshifter}{var.\ phase shifter}{}
\circuitdescbip*{detector}{detector}{}
- \circuitdescbip*{sdcdc}{single wire DC/DC converter\footnotemark}{}
+ \circuitdescbip*{sdcdc}{single wire DC/DC converter\footnotemark}{}(dc up in/135/.3, dc down in/185/.3, dc up out/45/.3, dc down out/-35/.3)
\footnotetext{the converter blocks added by \texttt{olfline}}
- \circuitdescbip*{sacdc}{single phase AC/DC converter}{}
- \circuitdescbip*{sdcac}{single phase DC/AC converter}{}
- \circuitdescbip*{tacdc}{three phases AC/DC converter}{}
- \circuitdescbip*{tdcac}{three phases AC/DC converter}{}(left/170/0.5, right/5/0.5, center/-90/0.3, ac1/45/0.1, ac2/-5/.3, ac3/-45/.1, dc1/135/.3, dc2/185/.3)
+ \circuitdescbip*{sacdc}{single phase AC/DC converter}{}(ac up in/135/.3, ac down in/185/.3, dc up out/45/.3, dc down out/-35/.3)
+ \circuitdescbip*{sdcac}{single phase DC/AC converter}{}(dc up in/135/.3, dc down in/185/.3, ac up out/45/.3, ac down out/-35/.3)
+ \circuitdescbip*{sacac}{single phase AC/AC converter}{}(ac up in/135/.3, ac down in/185/.3, ac up out/45/.3, ac down out/-35/.3)
+ \circuitdescbip*{tacdc}{three phases AC/DC converter}{}(ac up in/135/.3, ac mid in/185/.3, ac down in/-135/.3, dc up out/45/.3, dc down out/-35/.3)
+ \circuitdescbip*{tdcac}{three phases AC/DC converter}{}(ac up out/45/0.1, ac mid out/-5/.3, ac down out/-45/.1, dc up in/135/.3, dc down in/185/.3)
+ \circuitdescbip*{tacac}{three phases AC/DC converter}{}(ac up in/135/.3, ac mid in/185/.3, ac down in/-135/.3, ac up out/45/.3, ac mid out/-5/.3, ac down out/-45/.3)
\end{groupdesc}
\begin{groupdesc}
@@ -3470,6 +3497,39 @@ The ports of the \texttt{mixer}, \texttt{adder}, \texttt{oscillator} and \texttt
;\end{circuitikz}
\end{LTXexample}
+In addition, since \texttt{v1.6.0}, most blocks have also the \texttt{left up}, \texttt{left down}, \texttt{right up} and \texttt{right down} anchors:
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz} \draw
+ (0,0) to[bandpass, name=bp] ++(2,0)
+ (bp.left up) node[circ, red]{}
+ (bp.left down) node[circ, blue]{}
+ (bp.right up) node[circ, green]{}
+ (bp.right down) node[circ, yellow]{}
+;\end{circuitikz}
+\end{LTXexample}
+
+You can use those anchors to build ``mixed-type'' circuits, positioning the node-shapes:
+\begin{LTXexample}[pos=t, varwidth=true]
+\begin{tikzpicture}[
+ big/.style={circuitikz/blocks/scale=1.5},
+ long/.style={circuitikz/bipoles/twoportsplit/width=1.5}]
+ \path (0,0) node[sacdcshape, big](A){}
+ (5,0) node[twoportsplitshape, big, long, t1=LNA, t2=Digital](B){};
+ \draw (A.right up) -- (B.left up) (A.right down) to[cute choke] (B.left down);
+\end{tikzpicture}
+\end{LTXexample}
+Notice also form the previous example that the generic blocks (\texttt{twoport} and \texttt{twoportsplit}) can be made ``longer'' by setting different \texttt{width} and \texttt{height} (the other blocks are square, and just use the \texttt{width} key for bth dimensions).
+O
+Also, for \texttt{amp} and \texttt{vamp}, the \texttt{up} and \texttt{down} anchors follow the shape when they are not boxed.
+\begin{LTXexample}[varwidth=true]
+\begin{tikzpicture}
+ \draw (0,0) to[vamp, name=a] ++(1.5,0)
+ to [vamp, boxed, name=ab] ++(1.5,0);
+ \path (a.up) node[circ, blue]{} (ab.up) node[circ, blue]{};
+ \path (a.down) node[circ, red]{} (ab.down) node[circ, red]{};
+\end{tikzpicture}
+\end{LTXexample}
+
The \texttt{oscillator} has a displaced \texttt{center} anchor, to simplify the task of putting it at the left side of a circuit; it also as a special position for the node text. The four round elements (mixer, circulator, adder, and the oscillator) have a \texttt{geocenter} anchor which corresponds always to the center of the circle.
\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
\begin{tikzpicture}[>=Stealth]
@@ -3635,14 +3695,21 @@ Several devices have the possibility to add a box around them with the \texttt{b
\paragraph{Dash optional parts}
-To show that a device is optional, you can dash it. The inner symbol will be kept with solid lines.
+To show that a device is optional, you can dash it. The inner symbol will be kept with solid lines, unless you set the key \texttt{inner blocks dashed} to true.
+Moreover, the key \texttt{dashed blocks pattern} (default \verb|{{1mm}{1mm}}|), be careful with the number of braces!.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
-\draw (0,2) to[amp,l=\SI{10}{dB}] ++(2.5,0);
-\draw[dashed] (2.5,2) to[lowpass,l=opt.] ++(2.5,0);
+\draw (0,1.5) to[amp,l=\SI{10}{dB}] ++(2.5,0);
+\draw[dashed] (2.5,1.5) to[lowpass,l=opt.] ++(2.5,0);
% or just the block
\draw (0,0) to[amp,l=\SI{10}{dB}] ++(2.5,0)
to[lowpass,l=opt., dashed] ++(2.5,0);
+% or everything
+\ctikzset{inner blocks dashed,
+ dashed blocks pattern={{1.5pt}{1pt}},
+}
+\draw (0,-1.5) to[amp,l=\SI{10}{dB}] ++(2.5,0)
+ to[lowpass,l=opt., dashed] ++(2.5,0);
\end{circuitikz}
\end{LTXexample}
@@ -3692,19 +3759,52 @@ Basically they are the same as the normal \texttt{npn} and \texttt{pnp}, and the
\textsc{nfet}s and \textsc{pfet}s have been incorporated based on code provided by Clemens Helfmeier and Theodor Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} to enable/disable solderdot at some fet-transistors. Additionally, the solderdot option can be enabled/disabled for single transistors with the option \texttt{solderdot} and \texttt{nosolderdot}, respectively.
\begin{groupdesc}
- \circuitdesc{nfet}{nfet}{Q}
- \circuitdesc{nfetd}{nfet depletion}{Q}
- \circuitdesc{nigfete}{nigfete}{Q}
+ \circuitdesc{nfet}{nfet}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
+ \circuitdesc{nfetd}{nfet depletion}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
+ \circuitdesc{nigfete}{nigfete}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
\circuitdesc{nigfete,solderdot}{nigfete}{}(centergap/0/0.5)
\circuitdesc{nigfetebulk}{nigfetebulk}{}
\circuitdesc{nigfetd}{nigfetd}{}(centergap/0/0.5)
- \circuitdesc{pfet}{pfet}{Q}
- \circuitdesc{pfetd}{pfet depletion}{Q}
- \circuitdesc{pigfete}{pigfete}{}(centergap/0/0.5)
+ \circuitdesc{pfet}{pfet}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
+ \circuitdesc{pfetd}{pfet depletion}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
+ \circuitdesc{pigfete}{pigfete}{}(centergap/0/0.5, G/180/0.1, D/0/0.1, S/0/0.1)
\circuitdesc{pigfetebulk}{pigfetebulk}{}
\circuitdesc{pigfetd}{pigfetd}{}
\end{groupdesc}
+Since version \texttt{1.6.0}, you can add the \texttt{doublegate} option to the \texttt{*igfet*} family of devices to have a double gate MOS --- the additional gate is called \texttt{G2} or \texttt{gate2} (the plain \texttt{G} is where it will be without the \texttt{doublegate} option).
+
+\begin{groupdesc}
+ \circuitdesc{nigfete, doublegate}{nigfete, doublegate}{Q}(G/180/0.1, G2/180/0.1, D/0/0.1, S/0/0.1)
+ \circuitdesc{nigfete,solderdot, doublegate}{nigfete, doublegate}{}(G1/180/0.1, centergap/0/0.5, G2/180/0.1)
+ \circuitdesc{nigfetebulk, doublegate}{nigfetebulk, doublegate}{}(G/180/0.1, G2/180/0.1)
+ \circuitdesc{nigfetd, doublegate}{nigfetd, doublegate}{}(G1/180/0.1, centergap/0/0.5, G2/180/0.1)
+ \circuitdesc{pigfete, doublegate}{pigfete, doublegate}{}(G/180/0.1, centergap/0/0.5, G2/180/0.1, D/0/0.1, S/0/0.1)
+ \circuitdesc{pigfetebulk, doublegate}{pigfetebulk, doublegate}{}(G/180/0.1, G2/180/0.1)
+ \circuitdesc{pigfetd, doublegate}{pigfetd, doublegate}{}(G1/180/0.1, G2/180/0.1)
+\end{groupdesc}
+
+You can use the double-gated transistor for example like this:%
+\footnote{Found at \href{https://www.electronics-notes.com/articles/electronic_components/fet-field-effect-transistor/dual-gate-mosfet.php}{this page on electronics notes}.}
+
+\begin{LTXexample}[varwidth=true, basicstyle=\scriptsize\ttfamily]
+\begin{circuitikz}[european, scale=0.7, transform shape,
+ circuitikz/resistors/scale=0.7]
+ \draw (0,0) to[C, o-*] ++(1,0) coordinate(in)
+ to[R, -*] ++(0,-3) coordinate(GND)
+ ++(1,0) to[C, *-] ++(0,4) -- ++(1,0) coordinate(div)
+ to[R, *-*] ++(0,2) coordinate(vdd)
+ (div) to[R, -*] (div|-GND)
+ (in) -- ++(2.5,0) node[nigfetd, doublegate, anchor=G1](Q){Q}
+ (Q.G2) to[short, -*] (Q.G2-|div)
+ (Q.D) to[R, -*] (Q.D|-vdd)
+ (Q.D) to[C, *-o] ++(2,0) coordinate(out)
+ (Q.S) to[R, *-*] (Q.S|-GND) (Q.S) -- ++(1,0) coordinate(Sd)
+ (Sd) to[C, -*] (Sd |- GND);
+ \draw (0,0|-GND) -- (out|-GND) (0,0|-vdd) -- (out|-vdd);
+\end{circuitikz}
+\end{LTXexample}
+
\textsc{JFET} are also available\footnote{based on code provided by Danilo Piazzalunga}, both n-type and p-type.
\begin{groupdesc}
@@ -8136,6 +8236,24 @@ This could be especially useful if you define a style, to use like this:
\end{circuitikz}
\end{LTXexample}
+\subsubsection{Combining different styles}\label{sec:mixing-voltage-styles}
+
+Due to an historical hiccup, you need to be careful if you want to mix styles, like for example having \texttt{american} styled components and straight voltages (which are basically \texttt{european} style, at least in \Circuitikz{}). The problem is that the order of style parameters can change the output\footnote{%
+thanks to Stack Exchange user \href{https://tex.stackexchange.com/q/665466/38080}{Mads P Olesen} for noticing.} as you can see in the following example, where in the red case the voltage generator shape reverted to the \texttt{european} one.
+
+\begin{LTXexample}
+\begin{circuitikz}[straight voltages, american]
+ \draw (0,0) to [V, v=$V_P$] ++(0,3);
+ \draw (1,0) to [R, v=$V_P$] ++(0,3);
+\end{circuitikz}\color{red}%
+\begin{circuitikz}[american, straight voltages]
+ \draw (0,0) to [V, v=$V_P$] ++(0,3);
+ \draw (1,0) to [R, v=$V_P$] ++(0,3);
+\end{circuitikz}
+\end{LTXexample}
+
+This is arguably a bug, but fixing it (separating the voltage generator shapes from the voltage style) would break havoc with older circuits, so this will not be fixed for now.
+
\subsection{Changing the style of labels, voltages, and other text ornaments}\label{sec:ornament-style}
@@ -8843,7 +8961,7 @@ To correct the line ending, there are support shapes to fill the missing rectang
\section{Colors}\label{sec:colors}
-Color support in \Circuitikz{} has been quite limited up to version 1.5.1; form that one onward there has been an effort to make component's behavior more intuitive.
+Color support in \Circuitikz{} has been quite limited up to version 1.5.1; from that one onward there has been an effort to make component's behavior more intuitive.
Part of the problem is how colors in paths are treated by \TikZ{} itself; you can see part of the discussion \href{https://github.com/circuitikz/circuitikz/issues/605}{this issue} and in \href{https://tex.stackexchange.com/questions/634987/pgf-basic-layer-struggling-again-with-colors}{this question on TeX.SX} --- many thanks to \texttt{@muzimuzhi} for helping there. Basically, nodes are drawn \emph{after} the path is completed, and color is applied to the path at the end. Look at this code (pure \TikZ, no \Circuitikz{} here):
@@ -9090,7 +9208,7 @@ Also, since \texttt{v1.2.3}, you can set the key \texttt{open poles fill} (defau
in your preamble.
-But really, your circuit definition is buggy, so the best thing to do is fix that; if you want to name a point in you circuit, you should use a \texttt{coordinate}, not a \texttt{node}.\footnote{Yes, I understand from where the confusion arise --- in circuit theory they are called nodes.} Here is a small tutorial on \emph{why} you should change your circuit.
+But really, your circuit definition is buggy, so the best thing to do is fix that; if you want to name a point in your circuit, you should use a \texttt{coordinate}, not a \texttt{node}.\footnote{Yes, I understand from where the confusion arise --- in circuit theory they are called nodes.} Here is a small tutorial on \emph{why} you should change your circuit.
Nodes, in \TikZ, have normally a non-zero size even when they are empty; moreover, connections are supposed to join the border of nodes. Please study the following (pure \TikZ, not \Circuitikz):
@@ -9582,7 +9700,7 @@ The best way of contributing is forking the project, adding your component in th
\section{Examples}
-Here a series of example, contributed by several people, is shown with their code.
+Here a series of examples, contributed by several people, is shown with their code.
\subsection{A red diode}
@@ -9851,20 +9969,23 @@ Here a series of example, contributed by several people, is shown with their cod
\begin{LTXexample}[varwidth=true,pos=t]
\begin{circuitikz}[smallR/.style={european resistor, resistors/scale=0.5}]
- \draw (0,0) node[tacdcshape, anchor=ac2](acdc){} to[smallR] ++(-2,0)
+ \draw (0,0) node[tacdcshape, anchor=ac mid in](acdc){} to[smallR] ++(-2,0)
-- coordinate(point) node[circ](){} ++(-.5,0);
- \draw (acdc.ac1) to[nos, invert, mirror, name=switch,color=red] ++(-2,0) -- (point);
- \draw (acdc.ac3) to[smallR] ++(-2,0)
+ \draw (acdc.ac up in)
+ to[nos, invert, mirror, name=switch,color=red] ++(-2,0)
+ -- (point);
+ \draw (acdc.ac down in) to[smallR] ++(-2,0)
-- (point)
to[oosourcetrans,prim=wye,sec=delta,l=transformer] ++(-1.5,0)
to[tmultiwire] ++(-.5,0)
node[gridnode, anchor=right]{};
\node[above=.3cm,color=red] at (switch) {fault};
- \draw (acdc.dc1) to[smallR,l=HVDC line] ++(2,0 )
- node[tdcacshape, anchor=dc1](dcac){};
- \draw (acdc.dc2) -- (dcac.dc2);
- \draw (dcac.right) to[ooosource,prim=delta,sec=delta,tert=wye,invert] ++(1.5,0)
- to[tmultiwire] ++(.5,0) node[gridnode,anchor=left]{};
+ \draw (acdc.dc up out) to[smallR,l=HVDC line] ++(2,0 )
+ node[tdcacshape, anchor=dc up in](dcac){};
+ \draw (acdc.dc down out) -- (dcac.dc down in);
+ \draw (dcac.right)
+ to[ooosource,prim=delta,sec=delta,tert=wye,invert] ++(1.5,0)
+ to[tmultiwire] ++(.5,0) node[gridnode,anchor=left]{};
\end{circuitikz}
\end{LTXexample}