summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex326
1 files changed, 308 insertions, 18 deletions
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
index c4e65e34c4..0d71c95156 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
@@ -953,7 +953,7 @@ Will create the final diagram:
\endgroup
-\section{The components}
+\section{The components: usage}
Components in \Circuitikz{} come in two forms: path-style, to be used in \texttt{to} path specifications, and node-style, which will be instantiated by a \texttt{node} specification.
@@ -1396,7 +1396,7 @@ Old textbooks used the two-color style quite extensively, filling with a kind of
You can change the line thickness for any class of component in an independent way. The default standard thickness of components is defined on a loose ``legacy'' category (like \texttt{bipoles}, \texttt{tripoles} and so on, see section~\ref{sec:legacy-thickness}); to override that you set the key \texttt{\emph{class}/thickness} to any number. The default is \texttt{none}, which means that the old way of selecting thickness is used.
-For example, \emph{amplifiers} have the legacy class of \texttt{tripoles}, as well as transistors and tubes.By default they are drawn with thickness 2 (relative to the base linewidth). To change them to be thicker, you can for example add to the previous style
+For example, \emph{amplifiers} have the legacy class of \texttt{tripoles}, as well as transistors and tubes. By default they are drawn with thickness 2 (relative to the base linewidth). To change them to be thicker, you can for example add to the previous style
\begin{lstlisting}
\ctikzset{amplifier/thickness=4}
@@ -1467,13 +1467,182 @@ This kind of style will \emph{add} to the existing style. If you want to have a
\begin{lstlisting}[frame=single, framesep=10pt]
\ctikzloadstyle{legacy}% start from a know state
\tikzset{romano circuit style/.style={%
-legacy circuit style, % load the legacy style
-\circuitikzbasekey/.cd,%
-% Resistors
-resistors/scale=0.8,
+ legacy circuit style, % load the legacy style
+ \circuitikzbasekey/.cd,%
+ % Resistors
+ resistors/scale=0.8,
[...]
+ }}
\end{lstlisting}
+If you want to add a setting to your style file that has been recently added to the package (for example, the thyristor compact shapes added in \texttt{1.3.5}), but you want that your style file is still compatible with older versions of \Circuitikz, you can use the \texttt{.try} statement:
+
+\begin{lstlisting}[frame=single, framesep=10pt]
+ % Diodes
+ diodes/scale=0.6,
+ diodes/thickness=1.0,
+ thyristor style/.try=compact,
+\end{lstlisting}
+
+\subsection{Subcircuits}
+
+Starting from version \texttt{1.3.5}, there is an \textbf{experimental}\footnote{That means that in future releases the interface can change; use it at your risk and if you need it to continue working as-is, please use the \href{https://circuitikz.github.io/circuitikz/}{GitHub project page} and download and save the \texttt{circuitikzgit.sty} file for future-proof use!} support for generating sub-circuits, or circuits blocks. The creation and use of subcircuits is somewhat limited, to keep them simple and easy to define and maintain.
+
+
+A subcircuit is basically a path (and just one path!) of generic \TikZ{} instructions, with a series of accessible coordinates that behave more or less like anchors in the ``real'' shapes. The basic limitation is that a subcircuit can be moved, replicated and placed around but it can't be easily personalized. Even if scaling and rotation is in principle possible, it is not easily done. Nevertheless, they can be quite useful to build complex components and reusable blocks.
+
+\subsubsection{Subcircuit definition}
+
+To define a block you use the \verb|\ctikzsubcircuitdef| macro; this macro has 3 arguments:
+\begin{itemize}
+ \item the first argument is the name of the subcircuit, and it must form a valid TeX command name when prepended with a backslash: so just letters (no spaces, nor numbers, nor symbols like underscores etc.);
+ \item the second one is a comma-separated list of anchors names; here you can use whatever you can use for naming a coordinate or a node (so it's much more relaxed that the first one);
+ \item finally, the commands that will draw the circuit. You must suppose you are in a \verb|\draw| command, with the start coordinate already set-up. You can (and should) use \verb|#1| as the name of the current node, and you \emph{must} define the coordinates of all the anchors listed before as \texttt{coordinate(\#-\emph{anchorname})}. You should \textbf{not} finish the path here and use \textbf{only relative coordinates or named ones} .
+\end{itemize}
+
+Let's see that with an example:
+
+\ctikzsubcircuitdef{optovishay}{in 1, out 1, in 2, out 2, center}{%
+ % reference anchor is -center
+ coordinate(#1-center)
+ (#1-center) +(-1.2,-1) rectangle +(1.2,1)
+ (#1-center) ++(-1.2,0.8) coordinate (#1-in 1)
+ (#1-center) ++(-1.2,-0.8) coordinate (#1-in 2)
+ (#1-center) ++(1.2,0.8) coordinate (#1-out 1)
+ (#1-center) ++(1.2,-0.8) coordinate (#1-out 2)
+ (#1-center) ++(0,1) coordinate (#1-up)
+ (#1-in 1) -- ++(0.5,0) coordinate(#1-tmp)
+ to[leD*, diodes/scale=0.6, led arrows from cathode]
+ (#1-tmp|- #1-in 2) -- (#1-in 2)
+ (#1-out 1) -- ++(-0.5,0) coordinate(#1-tmp)
+ to[pD*, diodes/scale=0.4, mirror] ++(0,-0.5)
+ edge[densely dashed] ++(0,-0.533) ++(0,-0.566)
+ to[pD*, diodes/scale=0.4,mirror] (#1-tmp|- #1-out 2) -- (#1-out 2)
+ % leave the position of the path at the center
+ (#1-center)
+}
+\begin{lstlisting}
+\ctikzsubcircuitdef{optovishay}{in 1, out 1, in 2, out 2, center}{%
+ % reference anchor is -center
+ coordinate(#1-center)
+ (#1-center) +(-1.2,-1) rectangle +(1.2,1)
+ (#1-center) ++(-1.2,0.8) coordinate (#1-in 1)
+ (#1-center) ++(-1.2,-0.8) coordinate (#1-in 2)
+ (#1-center) ++(1.2,0.8) coordinate (#1-out 1)
+ (#1-center) ++(1.2,-0.8) coordinate (#1-out 2)
+ (#1-center) ++(0,1) coordinate (#1-up)
+ (#1-in 1) -- ++(0.5,0) coordinate(#1-tmp)
+ to[leD*, diodes/scale=0.6, led arrows from cathode]
+ (#1-tmp|- #1-in 2) -- (#1-in 2)
+ (#1-out 1) -- ++(-0.5,0) coordinate(#1-tmp)
+ to[pD*, diodes/scale=0.4, mirror] ++(0,-0.5)
+ edge[densely dashed] ++(0,-0.533) ++(0,-0.566)
+ to[pD*, diodes/scale=0.4,mirror] (#1-tmp|- #1-out 2) -- (#1-out 2)
+ % leave the position of the path at the center
+ (#1-center)
+}
+\end{lstlisting}
+
+Our element is a symbol for an optocoupler; in this case is the symbol used for once cell of the double \href{https://www.vishay.com/docs/84639/vo1263aa.pdf}{Vishay vo1263 device}.
+
+The name of the subcircuit is \texttt{optovishay} --- notice we can use only letters here, upper or lowercase, and nothing more.
+Then we have a series of anchor names; here we can use letters, numbers, spaces and some symbol --- but avoid the dot (\texttt{.}) and the hyphen (\texttt{-}).
+Additionally, the anchor named \texttt{subckt@reference} is reserved and shouldn't be used.
+If you use spaces, be on the safe side and \emph{never} use two or more consecutive spaces.
+
+After that, you have to draw your subcircuit as if you where into a \verb|\draw| command, starting from a generic point.
+In this case, we decide to draw the circuit around this generic point so that it will result to be the center of the block; so as a first thing, we ``mark'' the position of the center anchor, with \texttt{coordinate(\#1-center)}.
+The \texttt{\#1} will be substituted with the specific name of the subcircuit's instance later --- so if you then call one instance of the optocoupler \texttt{opto1}, that coordinate will be called \texttt{opto1-center}.
+
+We continue by defining all our anchors (there is no need to do that at the start, but it's handy because then you can use them).
+You \textbf{must} define all the anchors!
+
+\textbf{Important}: all the coordinates used must be either relative, or named in the form \texttt{\#1-something}; absolute coordinate will not work when instantiating the block.
+The block is thought to be used inside a path specification, so the idea is not to end the path --- that means that changing line styles or colors is at best difficult.
+You can still use \texttt{edge}s, though (see~\ref{faqs:dashed}).
+
+After that, we draw our circuit; in this case a LED and a couple of smaller photodiodes will do.
+We also define a coordinate \texttt{-up} (you can define more coordinates, in addition to the anchors, or name elements with \texttt{name=\#1-\emph{something}} for later access) for adding text.
+
+\subsubsection{Using the subcircuit}
+
+To use the subcircuit, an additional step is needed. Somewhere you have to \emph{activate} it. This is needed to calculate the relative positions of anchors using the current set of style parameters. The normal place is to activate it just before usage; to do that you use the command \verb|\ctikzsubcircuitactivate| with the name of the subcircuit. That will define a new command, \texttt{\textbackslash\emph{nameofthesubcircuit}} that you can use then in your paths.
+
+So to check your subcircuit while defining it you can use this simple snippet:
+\begin{LTXexample}[varwidth=true]
+\ctikzsubcircuitactivate{optovishay}
+\begin{tikzpicture}
+ \draw (0,0) \optovishay{one}{};
+ \node [above] at (one-up) {O1};
+ \draw[color=blue] (one-out 1) -- ++(1,0)
+ \optovishay{two}{in 1};
+ \node [above] at (two-up) {O2};
+\end{tikzpicture}
+\end{LTXexample}
+
+\paragraph{Scaling, flipping and rotating subcircuits}
+
+To scale and rotate a subcircuit you have to include it into a \texttt{scope} with the appropriate \texttt{scale} and rotation commands. Notice that, as in general in \Circuitikz, global scales that affect rotation works only if \texttt{transform shape} is issued (see~\ref{sec:bugs}); nesting \texttt{transform shape} normally works, but it has been really lightly tested.
+
+\begin{LTXexample}[varwidth=true]
+\ctikzsubcircuitactivate{optovishay}
+\begin{tikzpicture}[scale=0.8, transform shape]
+ \draw (0,0) \optovishay{three}{};
+ \draw (three-out 1) -- ++(0.5,0) coordinate(here);
+ \begin{scope}[xscale=-1,rotate=-45,transform shape]
+ \draw (here) \optovishay{four}{out 1};
+ \end{scope}
+ \draw[blue] (three-out 2) -| (four-out 2);
+\end{tikzpicture}
+\end{LTXexample}
+
+\subsubsection{Parameters in subcircuits}
+
+There are no additional parameters definable for subcircuit shapes; this is a bit of a pity, because sometime they could be useful, especially for labels of objects.
+Given the need to use \texttt{transform shape} to translate and rotate them, though, it is better not to add invariant-direction things (like text) into the subcircuit, unless you are sure you will just translate them.
+One possibility is to use additional macros and anchors for positioning, like in the following example.
+
+Suppose you have defined
+
+\begin{lstlisting}
+ \ctikzsubcircuitdef{divider}{in, out}{%
+ coordinate (#1-in) to[R, l=~, name=#1-rh, -*] ++(2,0)
+ coordinate(#1-tmp) to[R, l=~, name=#1-rl] ++(0,-2)
+ node[tlground]{} (#1-tmp) --++(0.5,0) coordinate(#1-out)
+ }
+\end{lstlisting}
+
+\ctikzsubcircuitdef{divider}{in, out}{%
+ coordinate (#1-in) to[R, l=~, name=#1-rh, -*] ++(2,0)
+ coordinate(#1-tmp) to[R, l=~, name=#1-rl] ++(0,-2)
+ node[tlground]{} (#1-tmp) --++(0.5,0) coordinate(#1-out)
+}
+
+then you can additionally define:
+
+\begin{lstlisting}
+ \newcommand{\mydiv}[4]{
+ \divider{#1}{#2} (#1-rh.n) node[above]{#3}
+ (#1-rl.n) node[right]{#4} (#1-out)
+ }
+\end{lstlisting}
+
+\newcommand{\mydiv}[4]{
+ \divider{#1}{#2} (#1-rh.n) node[above]{#3}
+ (#1-rl.n) node[right]{#4} (#1-out)
+}
+
+And finally do:
+\begin{LTXexample}[varwidth=true]
+\ctikzsubcircuitactivate{divider}
+\begin{tikzpicture}
+ \draw (0,0) \mydiv{a}{in}{$R_1$}{$R_2$};
+ \draw (a-out) -- \mydiv{b}{in}{$R_3$}{$R_4$};
+\end{tikzpicture}
+\end{LTXexample}
+
+
+\section{The components: list}
\subsection{Grounds and supply voltages}
@@ -1903,20 +2072,52 @@ These shapes have no exact node-style counterpart, because the stroke line is bu
\circuitdescbip*[emptyvarcap]{stroke varcap}{Stroke varcap}{VC-}
\end{groupdesc}
-\subsubsection{Tripole-like diodes}\label{sec:othertrip} The following tripoles are entered with the usual command, of the form \texttt{to[Tr, \dots]}.
+\subsubsection{Tripole-like diodes}\label{sec:othertrip} The following tripoles are entered with the usual command, of the form \texttt{to[Tr, \dots]}. In the following list you can see the traditional, or \texttt{legacy}, shape of the Thyristors-type devices.
\begin{groupdesc}
+ \ctikzset{thyristor style=legacy}
+ \circuitdescbip[fulldiode] {full diode}{Full diode}{D*}
+ \circuitdescbip*[emptydiode] {stroke diode}{Stroke diode}{D-}
\circuitdescbip*[emptytriac]{triac}{Standard triac (shape depends on package option)}{Tr}( G/0/0.3, anode/-90/0.2, cathode/-90/0.2)
\circuitdescbip*[emptytriac]{empty triac}{Empty triac}{Tro}( gate/0/0.3 )
\circuitdescbip[fulltriac]{full triac}{Full triac}{Tr*}
- \circuitdescbip*[emptythyristor]{thyristor}{Standard thyristor (shape depends on package option)}{Ty}( G/0/0.3, anode/-90/0.2, cathode/-90/0.2)
+ \circuitdescbip*[emptythyristor]{thyristor}{Standard thyristor (shape depends on package option)}{Ty}( G/0/0.3, gate/45/0.3, anode/-90/0.2, cathode/-90/0.2)
\circuitdescbip*[emptythyristor]{empty thyristor}{Empty thyristor}{Tyo}
\circuitdescbip[fullthyristor]{full thyristor}{Full thyristor}{Ty*}
\circuitdescbip*[emptythyristor]{stroke thyristor}{Stroke thyristor}{Ty-}
+ \circuitdescbip*[emptyput]{put}{Standard Programmable Unipolar Transistor\footnotemark (shape depends on package option)}{PUT}( G/0/0.3, gate/45/0.3, anode/-90/0.2, cathode/-90/0.2)
+ \footnotetext{This components, and the GTO family, has been suggested by \href{https://github.com/circuitikz/circuitikz/issues/522}{GitHub user JetherReis}.}
+ \circuitdescbip*[emptyput]{empty put}{Empty PUT}{PUTo}
+ \circuitdescbip[fullput]{full put}{Full PUT}{PUT*}
+ \circuitdescbip*[emptyput]{stroke put}{Stroke PUT}{PUT-}
+ \circuitdescbip*[emptygto]{gto}{Standard GTO (shape depends on package option)}{GTO}( G/0/0.3, gate/45/0.3, anode/-90/0.2, cathode/-90/0.2)
+ \circuitdescbip*[emptygto]{empty gto}{Empty GTO}{GTOo}
+ \circuitdescbip[fullgto]{full gto}{Full GTO}{GTO*}
+ \circuitdescbip*[emptygto]{stroke gto}{Stroke GTO}{GTO-}
+ \circuitdescbip*[emptygtobar]{gtobar}{Standard GTO with bar-type gate (shape depends on package option)}{GTOb}( G/0/0.3, gate/45/0.3, anode/-90/0.2, cathode/-90/0.2)
+ \circuitdescbip*[emptygtobar]{empty gtobar}{Empty GTO, bar-type}{GTObo}
+ \circuitdescbip[fullgtobar]{full gtobar}{Full GTO, bar-type}{GTOb*}
+ \circuitdescbip*[emptygtobar]{stroke gtobar}{Stroke GTO, bar type}{GTOb-}
+ \circuitdescbip*[emptyagtobar]{agtobar}{Standard GTO with bar-type gate on anode (shape depends on package option)}{aGTOb}( G/0/0.3, gate/45/0.3, anode/-90/0.2, cathode/-90/0.2)
+ \circuitdescbip*[emptyagtobar]{empty agtobar}{Empty GTO, bar-type on anode}{aGTObo}
+ \circuitdescbip[fullagtobar]{full agtobar}{Full GTO, bar-type on anode}{aGTOb*}
+ \circuitdescbip*[emptyagtobar]{stroke agtobar}{Stroke GTO, bar-type on anode}{aGTOb-}
\end{groupdesc}
-\subsubsection{Triacs anchors}
+For basically stylistical reasons, there is a different, more compact, shape available for them, activated with the key \texttt{thyristor style=compact} (the default is \texttt{legacy}). All the devices above are present, we will show here just the automatic version for shortness.
+
+\begin{groupdesc}
+ \ctikzset{thyristor style=compact}
+ \circuitdescbip*[emptytriac]{triac}{Standard triac (shape depends on package option)}{Tr}(G/0/0.3, anode/-90/0.2, cathode/-90/0.2)
+ \circuitdescbip*[emptythyristor]{thyristor}{Standard thyristor (shape depends on package option)}{Ty}(G/0/0.3, gate/45/0.3, anode/-90/0.2, cathode/-90/0.2)
+ \circuitdescbip*[emptyput]{put}{Standard Programmable Unipolar Transistor (shape depends on package option)}{PUT}( G/0/0.3, gate/45/0.3, anode/-90/0.2, cathode/-90/0.2)
+ \circuitdescbip*[emptygto]{gto}{Standard gto (shape depends on package option)}{GTO}(G/0/0.3, gate/45/0.3, anode/-90/0.2, cathode/-90/0.2)
+ \circuitdescbip*[emptygtobar]{gtobar}{Standard GTO with a bar symbol on the gate (shape depends on package option)}{GTOb}( G/0/0.3, gate/45/0.3, anode/-90/0.2, cathode/-90/0.2)
+ \circuitdescbip*[emptyagtobar]{agtobar}{Standard GTO with bar-type gate on anode (shape depends on package option)}{aGTOb}( G/0/0.3, gate/45/0.3, anode/-90/0.2, cathode/-90/0.2)
+\end{groupdesc}
+
+\subsubsection{Thyristors anchors and customization}
When inserting a thrystor, a triac or a potentiometer, one needs to refer to the third node-gate (\texttt{gate} or \texttt{G}) for the former two; wiper (\texttt{wiper} or \texttt{W}) for the latter one. This is done by giving a name to the bipole:
\label{bipole-naming}
@@ -1928,6 +2129,20 @@ When inserting a thrystor, a triac or a potentiometer, one needs to refer to the
;\end{circuitikz}
\end{LTXexample}
+As commented above, you can change the shape of these devices (globally or locally) setting the key \texttt{thyristor style=compact} (the default is \texttt{legacy}). Additionally, normally the plain \texttt{GTO} symbols come without the arrows, but you can add them using a syntax similar to the one explained in section~\ref{sec:tunablearrows} using the arrow group \texttt{gto gate}.
+
+\begin{LTXexample}[varwidth=true]
+ \begin{circuitikz}[]
+ \ctikzset{thyristor style=compact}
+ \draw (0,0) to[GTO=$G_1$] ++(0,-3);
+ \ctikzset{gto gate end arrow=latexslim}
+ \draw (2,0) to[GTO*=$G_2$, mirror] ++(0,-3);
+ \draw (4,0) to[GTOb-=$G_2$, mirror] ++(0,-3);
+ \end{circuitikz}
+\end{LTXexample}
+
+Notice that you can set both \texttt{gto gate end arrow} and \texttt{gto gate start arrow} --- choosing just one of the two you can decide the ``rotation'' direction of the symbol. There is little space though, so don't overdo it.
+
\subsubsection{Diode customizations}\label{sec:tweak-d}
You can change the scale of the diodes by setting the key \texttt{diodes/scale} to something different from the default \texttt{1.0}. In Romano's opinion, diodes are somewhat big with the default style of the package, so a setting like \verb|\ctikzset{diode/scale=0.6}| is recommended.
@@ -2086,6 +2301,8 @@ Notice that if you choose the dashed style, the noise sources are fillable:
\circuitdescbip*{vsourcetri}{Triangle voltage source}{tV}
\circuitdescbip*{esource}{Empty voltage source}{}
\circuitdescbip*{pvsource}{Photovoltaic-voltage source}{}
+ \circuitdescbip*{pvmodule}{Photovoltaic module source\footnotemark}{}
+ \footnotetext{Added by André Alves in \texttt{v1.3.5}}
\circuitdescbip*[oosource]{ioosource}{Double Zero style current source}{}
\circuitdescbip*[oosource]{voosource}{Double Zero style voltage source}{}
\circuitdescbip*[oosourcetrans]{oosourcetrans}{transformer source}{}
@@ -2168,6 +2385,45 @@ You can do the same with the \texttt{american controlled voltage sources}, subst
You can change the scale of all the instruments (including the current loops) by setting the key \texttt{instruments/scale} to something different from the default \texttt{1.0}.
+\paragraph{Oscilloscope waveform.} You can change the waveform shown in the oscilloscope ``screen''\footnote{Suggested by \href{https://tex.stackexchange.com/q/595062/38080}{Mario Tafur on TeX.SX}}. To change it, you just set the key \texttt{bipoles/oscope/waveform} to one of the available shape. You have available the shapes in the following list (the default is \texttt{ramps}):
+
+\begin{LTXexample}[pos=t, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+ \foreach [count=\i] \wvf in {ramps, sin, square, triangle, lissajous, zero, none} {
+ \ctikzset{bipoles/oscope/waveform=\wvf}
+ \draw ({2*\i},1.4) node[oscopeshape](O){}
+ ({2*\i},0.65) node[anchor=base]{\texttt{\wvf}};
+ }
+ \ctikzset{bipoles/oscope/width=1.0}
+ \foreach [count=\i] \wvf in {ramps, sin, square, triangle, lissajous, zero, none} {
+ \ctikzset{bipoles/oscope/waveform=\wvf}
+ \draw ({2*\i},0) node[oscopeshape]{};
+ }
+\end{circuitikz}
+\end{LTXexample}
+
+If you want more or different shapes, you can define your owns, but you have to use low-level \texttt{pgf} commands (see part IX, ``The Basic Layer'', in the PGF/\TikZ{} manual). The code is executed into a \verb|\pgfscope| \dots \verb|\endpgfscope| environment, and it must use the path built with a \verb|\pgfusepath|. The coordinates have been scaled so that the external box of the scope is a rectangle between \texttt{(-1cm, -1cm)} and \texttt{(1cm, 1cm)}; the oscilloscope grid is fixed and painted between \texttt{(-0.75cm, -0.5cm)} and \texttt{(0,75cm, 0.5cm)}. If you stretch the scope with the \texttt{\dots width} or \texttt{\dots height} keys, the drawing will be stretched too.
+
+\begin{LTXexample}[varwidth=t, basicstyle=\small\ttfamily]
+ \ctikzset{%
+ bipoles/oscope/waveform/mywave/.code={%
+ \pgfsetcolor{red}
+ \pgfpathmoveto{\pgfpoint{-.75cm}{-.5cm}}
+ \pgfpathlineto{\pgfpoint{.75cm}{.5cm}}
+ \pgfusepath{draw}
+ \pgfsetcolor{green}
+ \pgfpathmoveto{\pgfpoint{-.75cm}{.5cm}}
+ \pgfpathlineto{\pgfpoint{.75cm}{-.5cm}}
+ \pgfusepath{draw}
+ }}
+ \begin{circuitikz}
+ \ctikzset{bipoles/oscope/waveform=mywave}
+ \draw (0,0) node[oscopeshape]{};
+ \end{circuitikz}
+\end{LTXexample}
+
+
+
\subsubsection{Rotation-invariant elements}
The \texttt{oscope} element will not rotate the ``graph'' shown with the component:
@@ -2619,11 +2875,12 @@ It also has a \texttt{zero} anchor if you need to rotate it about its real cente
\circuitdescbip*{phaseshifter}{phase shifter}{}
\circuitdescbip*{vphaseshifter}{var.\ phase shifter}{}
\circuitdescbip*{detector}{detector}{}
- \circuitdescbip*{sacdc}{sacdc}{}
- \circuitdescbip*{sdcac}{sdcac}{}
- \circuitdescbip*{tacdc}{tacdc}{}
- \circuitdescbip*{tdcac}{tdcac\footnotemark}{}(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)
- \footnotetext{the 4 converter blocks added by \texttt{olfline}}
+ \circuitdescbip*{sdcdc}{single wire DC/DC converter}{}
+ \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)
+ \footnotetext{the converter blocks added by \texttt{olfline}}
\end{groupdesc}
\begin{groupdesc}
@@ -2868,13 +3125,23 @@ Basically they are the same as the normal \texttt{npn} and \texttt{pnp}, and the
\circuitdesc{pigfetd}{pigfetd}{}
\end{groupdesc}
-\textsc{njfet} and \textsc{pjfet} have been incorporated based on code provided by Danilo Piazzalunga:
+\textsc{JFET} are also available\footnote{based on code provided by Danilo Piazzalunga}, both n-type and p-type.
+
\begin{groupdesc}
- \circuitdesc{njfet}{njfet}{Q}
- \circuitdesc{pjfet}{pjfet}{}
+ \circuitdesc{njfet}{n-type JFET}{Q}(G/-135/0.2,D/0/0.2,S/0/0.2)
+ \circuitdesc{pjfet}{p-type JFET}{}(G/-135/0.2,D/0/0.2,S/0/0.2)
\end{groupdesc}
-\textsc{isfet}
+\textsc{UJT} transistors\footnote{sugged by \href{https://github.com/circuitikz/circuitikz/issues/522}{user JetherReis on GitHub}.} have a different anchor names although \textbf{most} of the others, like \texttt{D} and \texttt{G}, work also (the exception is \texttt{E} and \texttt{emitter}!). Notice that if used with \texttt{nobase}, the anchor \texttt{E} follows the wire, while \texttt{G} is fixed (as is \texttt{kink}).
+
+\begin{groupdesc}
+ \circuitdesc{nujt}{n-type UJT}{Q}(G/-135/0.2,B1/0/0.2,B2/0/0.2 , kink/90/0.4, E/135/0.2)
+ \circuitdesc{pujt}{p-type UJT}{Q}(G/-135/0.2,B1/0/0.2,B2/0/0.2 , kink/90/0.4, E/135/0.2)
+ \circuitdesc{nujt, nobase}{n-type UJT with nobase option}{Q}(G/-135/0.2,B1/0/0.2,B2/0/0.2 , kink/90/0.4, E/135/0.2)
+\end{groupdesc}
+
+\textsc{isfet}:
+
\begin{groupdesc}
\circuitdesc{isfet}{isfet}{Q}
\end{groupdesc}
@@ -3044,6 +3311,26 @@ Normally, in bipolar IGBTs the outer base is the same size (height) of the inner
\end{circuitikz}
\end{LTXexample}
+\paragraph{UJT transistors.}\label{sec:ujt} They look better if you use \texttt{transistors/arrow pos=end}, especially if you use them with \texttt{tr circle}. If you use the key \texttt{nobase} with UJTs, the horizontal part of the controlling terminal is not drawn; notice that this \emph{will} move the \texttt{E} or \texttt{emitter} anchor, but not the generic ones like \texttt{G}.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\footnotesize\ttfamily]
+\begin{circuitikz}[scale=0.8]
+ \draw (0,5) node[nujt]{} ++(2,0) node[pujt]{}
+ ++(2,0) node[nujt, tr circle]{} ++(2,0)
+ node[pujt, tr circle]{};
+ \ctikzset{transistors/arrow pos=end}
+ \draw (0,2.5) node[nujt](A){} ++(2,0) node[pujt]{}
+ ++(2,0) node[nujt, tr circle]{} ++(2,0)
+ node[pujt, tr circle](C){};
+ \draw (0,0) node[nujt, nobase](B){} ++(2,0)
+ node[pujt, nobase]{} ++(2,0)
+ node[nujt, tr circle, nobase]{} ++(2,0)
+ node[pujt, tr circle, nobase](D){};
+ % "E" anchor follows the nobase option:
+ \draw[red] (A.E) |- (B.E) (C.E) |- (D.E);
+\end{circuitikz}
+\end{LTXexample}
+
\paragraph{Base/Gate terminal.} The Base/Gate connection of all transistors can be disabled by the options \textit{nogate} or \textit{nobase}, respectively. The Base/Gate anchors are floating, but there is an additional anchor \texttt{nogate}/\texttt{nobase} , which can be used to point to the unconnected base:
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -3371,6 +3658,9 @@ Finally, double-gated components (MOSes, FETs, IGBTs) have an extra anchor \text
\end{circuitikz}
\end{LTXexample}
+For UJT transistors anchors, see section~\ref{sec:ujt}.
+
+
\subsubsection{Transistor paths}\label{sec:transasbip}
For syntactical convenience standard transistors (not multi-terminal ones) can be placed using the normal path notation used for bipoles. The transitor type can be specified by simply adding a ``T'' (for transistor) in front of the node name of the transistor. It will be placed with the base/gate orthogonal to the direction of the path: