texlive[59054] Master/texmf-dist: circuitikz (2may21)

commits+karl at tug.org commits+karl at tug.org
Sun May 2 22:41:58 CEST 2021


Revision: 59054
          http://tug.org/svn/texlive?view=revision&revision=59054
Author:   karl
Date:     2021-05-02 22:41:58 +0200 (Sun, 02 May 2021)
Log Message:
-----------
circuitikz (2may21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
    trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
    trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
    trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
    trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty

Modified: trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2021-05-02 20:41:58 UTC (rev 59054)
@@ -1,19 +1,35 @@
 <!--- CircuiTikz - Changelog --->
 The major changes among the different CircuiTikZ versions are listed here. See <https://github.com/circuitikz/circuitikz/commits> for a full list of changes.
 
+* Version 1.3.5 (2021-05-02)
+
+    Power electronics devices are the main characters in this release: PUT, GTOs, a new style for thyristors, and a photovoltaic module.
+    Additionally, an **experimental** support for subcircuits has been added;
+    it could change in the future.
+    Fixed a nasty bug in rotary switches "in" anchor positioning in some cases.
+
+    - Added support for creating and using sub-circuits
+    - Added UJT transistors and GTO devices ([suggested by JetherReis](https://github.com/circuitikz/circuitikz/issues/522))
+    - Added (as an option) a different, more compact style for thyristor-type devices.
+    - Added a photovoltaic module ([suggested by André Alves](https://github.com/circuitikz/circuitikz/issues/524))
+    - Added a DC/DC converter block for symmetry ([suggested by Pratched](https://github.com/circuitikz/circuitikz/issues/529))
+    - Added the possibility to change the waveforms shown in the oscilloscope ([suggested by Mario Tafur](https://tex.stackexchange.com/q/595062/38080))
+    - In the manual, separate the component usage chapter from the big component list
+    - Fix wrong rotary switch "in" anchors for switches with more than 180 degrees coverage ([see bug](https://github.com/circuitikz/circuitikz/issues/532))
+
 * Version 1.3.4 (2021-04-20)
 
-    New things, like configurable modifier thickness, ferroelectric devices, and several transistor tweaks. Importantly, a bug that hindered compatibility with the internal Ti*k*Z `circuits` library (introduced in 1.3.3) has been fixed.
+    New things, like configurable modifier thickness, ferroelectric devices, and several transistor tweaks.
+    Importantly, a bug that hindered compatibility with the internal Ti*k*Z `circuits` library (introduced in 1.3.3) has been fixed.
 
     - Added separate configuration for the line thickness of resistors, capacitors, and inductors modifiers
-    - Added ferroelectric capacitors and ferroelectric gate MOS/FETs (suggested by Mayeul Cantan, https://github.com/circuitikz/circuitikz/issues/515)
+    - Added ferroelectric capacitors and ferroelectric gate MOS/FETs ([suggested by Mayeul Cantan](https://github.com/circuitikz/circuitikz/issues/515))
     - Added an option to fill the gate gap in MOSes, FETs and IGBTs with a color
     - Added a "centergap" anchor for transistors
     - Added the option "nogate" to the `hemt` symbol
     - Fixed a bug in thermistors not respecting their class line thickness
-    - Fixes in the manual (copy and paste of snippets without numbers, correct old usage of `siunitx`, factor out repetitions in the preamble; thanks to Ulrike Fischer:
-    https://tex.stackexchange.com/a/57160/38080)
-    - Fixed a bug introduced in 1.3.3 that would reduce compatibility with the `circuits` internal library; reported by JetherReis (https://github.com/circuitikz/circuitikz/issues/519)
+    - Fixes in the manual (copy and paste of snippets without numbers, correct old usage of `siunitx`, factor out repetitions in the preamble; [thanks to Ulrike Fischer](https://tex.stackexchange.com/a/57160/38080).
+    - Fixed a bug introduced in 1.3.3 that would reduce compatibility with the `circuits` internal library; [reported by JetherReis]( https://github.com/circuitikz/circuitikz/issues/519))
 
 * Version 1.3.3 (2021-04-04)
 
@@ -36,7 +52,7 @@
     - Added the simplified (2-waves) highpass and lowpass blocks
     - Added graphene FETs (suggested by Cees Keyer)
     - Added left/right anchors to transistors
-    - Fixed a bug in flip-flops (https://tex.stackexchange.com/q/587213/38080)
+    - Fixed a [bug in flip-flops](https://tex.stackexchange.com/q/587213/38080)
 
 * Version 1.3.1 (2021-02-20)
 

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2021-05-02 20:41:58 UTC (rev 59054)
@@ -5,6 +5,48 @@
 
 \begin{itemize}
 \item
+  Version 1.3.5 (2021-05-02)
+
+  Power electronics devices are the main characters in this release:
+  PUT, GTOs, a new style for thyristors, and a photovoltaic module.
+  Additionally, an \textbf{experimental} support for subcircuits has
+  been added; it could change in the future. Fixed a nasty bug in rotary
+  switches ``in'' anchor positioning in some cases.
+
+  \begin{itemize}
+  \tightlist
+  \item
+    Added support for creating and using sub-circuits
+  \item
+    Added UJT transistors and GTO devices
+    (\href{https://github.com/circuitikz/circuitikz/issues/522}{suggested
+    by JetherReis})
+  \item
+    Added (as an option) a different, more compact style for
+    thyristor-type devices.
+  \item
+    Added a photovoltaic module
+    (\href{https://github.com/circuitikz/circuitikz/issues/524}{suggested
+    by André Alves})
+  \item
+    Added a DC/DC converter block for symmetry
+    (\href{https://github.com/circuitikz/circuitikz/issues/529}{suggested
+    by Pratched})
+  \item
+    Added the possibility to change the waveforms shown in the
+    oscilloscope
+    (\href{https://tex.stackexchange.com/q/595062/38080}{suggested by
+    Mario Tafur})
+  \item
+    In the manual, separate the component usage chapter from the big
+    component list
+  \item
+    Fix wrong rotary switch ``in'' anchors for switches with more than
+    180 degrees coverage
+    (\href{https://github.com/circuitikz/circuitikz/issues/532}{see
+    bug})
+  \end{itemize}
+\item
   Version 1.3.4 (2021-04-20)
 
   New things, like configurable modifier thickness, ferroelectric
@@ -19,8 +61,8 @@
     capacitors, and inductors modifiers
   \item
     Added ferroelectric capacitors and ferroelectric gate MOS/FETs
-    (suggested by Mayeul Cantan,
-    https://github.com/circuitikz/circuitikz/issues/515)
+    (\href{https://github.com/circuitikz/circuitikz/issues/515}{suggested
+    by Mayeul Cantan})
   \item
     Added an option to fill the gate gap in MOSes, FETs and IGBTs with a
     color
@@ -33,12 +75,13 @@
   \item
     Fixes in the manual (copy and paste of snippets without numbers,
     correct old usage of \texttt{siunitx}, factor out repetitions in the
-    preamble; thanks to Ulrike Fischer:
-    https://tex.stackexchange.com/a/57160/38080)
+    preamble; \href{https://tex.stackexchange.com/a/57160/38080}{thanks
+    to Ulrike Fischer}.
   \item
     Fixed a bug introduced in 1.3.3 that would reduce compatibility with
-    the \texttt{circuits} internal library; reported by JetherReis
-    (https://github.com/circuitikz/circuitikz/issues/519)
+    the \texttt{circuits} internal library;
+    \href{https://github.com/circuitikz/circuitikz/issues/519}{reported
+    by JetherReis})
   \end{itemize}
 \item
   Version 1.3.3 (2021-04-04)
@@ -77,8 +120,8 @@
   \item
     Added left/right anchors to transistors
   \item
-    Fixed a bug in flip-flops
-    (https://tex.stackexchange.com/q/587213/38080)
+    Fixed a \href{https://tex.stackexchange.com/q/587213/38080}{bug in
+    flip-flops}
   \end{itemize}
 \item
   Version 1.3.1 (2021-02-20)

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2021-05-02 20:41:58 UTC (rev 59054)
@@ -953,7 +953,7 @@
 \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 @@
 
 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,14 +1467,183 @@
 \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 at 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}
 
 \subsubsection{Grounds}
@@ -1903,21 +2072,53 @@
     \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}
 \begin{LTXexample}[varwidth=true]
@@ -1928,6 +2129,20 @@
 ;\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 @@
     \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 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 @@
     \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,14 +3125,24 @@
     \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 @@
 \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 @@
     \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:

Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2021-05-02 20:41:58 UTC (rev 59054)
@@ -10,8 +10,8 @@
 %
 % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
 
-\def\pgfcircversion{1.3.4}
-\def\pgfcircversiondate{2021/04/20}
+\def\pgfcircversion{1.3.5}
+\def\pgfcircversiondate{2021/05/02}
 \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
 
 \usemodule[tikz]

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-legacy.tex	2021-05-02 20:41:58 UTC (rev 59054)
@@ -27,6 +27,7 @@
 diodes/scale=1.0,
 diodes/fill=none,
 diodes/thickness=none,
+thyristor style/.try=legacy,
 %
 % Batteries
 batteries/scale=1.0,

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/ctikzstyle-romano.tex	2021-05-02 20:41:58 UTC (rev 59054)
@@ -22,6 +22,7 @@
 % Diodes
 diodes/scale=0.6,
 diodes/thickness=1.0,
+thyristor style/.try=compact,
 %
 % Batteries
 batteries/scale=1.0,
@@ -53,6 +54,7 @@
 amplifiers/thickness=3.0,
 %
 % Logic ports
+logic ports/.try=ieee,
 logic ports/scale=1.0,
 logic ports/thickness=2.0,
 logic ports origin=center,

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex	2021-05-02 20:41:58 UTC (rev 59054)
@@ -22,6 +22,7 @@
 \pgf at circ@declare at family@arrows{tunable}
 \pgf at circ@declare at family@arrows{wiper}
 \pgf at circ@declare at family@arrows{switch}
+\pgf at circ@declare at family@arrows{gto gate}
 
 %>>>
 
@@ -1595,6 +1596,8 @@
 \ctikzset{bipoles/esource/width/.initial=.60}
 \ctikzset{bipoles/pvsource/height/.initial=.60}
 \ctikzset{bipoles/pvsource/width/.initial=.60}
+\ctikzset{bipoles/pvmodule/height/.initial=.60}
+\ctikzset{bipoles/pvmodule/width/.initial=1.20}
 \ctikzset{bipoles/isource/height/.initial=.60}
 \ctikzset{bipoles/isource/width/.initial=.60}
 \ctikzset{bipoles/oosource/height/.initial=.60}
@@ -1916,7 +1919,6 @@
     \endpgfscope
 }
 
-
 %% PV Source
 \pgfcircdeclarebipolescaled{sources}
 {}
@@ -1958,6 +1960,35 @@
 
 }
 
+%% PV Module - contributed by Andre Alves
+\pgfcircdeclarebipolescaled{sources}
+{}
+{\ctikzvalof{bipoles/pvmodule/height}}
+{pvmodule}
+{\ctikzvalof{bipoles/pvmodule/height}}
+{\ctikzvalof{bipoles/pvmodule/width}}
+{
+
+    % Draw rectangle
+    \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+    \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+    \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+    \pgfpathclose
+    \pgf at circ@draworfill
+
+    % Draw triangle
+  	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+  	\pgfpathlineto{\pgfpoint{0.5\pgf at circ@res at right}{0}}
+  	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+  	\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+  	\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+    \pgf at circ@draworfill
+
+  	\pgfusepath{draw}
+}
+
 %% Empty Source
 \pgfcircdeclarebipolescaled{sources}
 {}
@@ -2867,6 +2898,10 @@
     \circuitikzbasekey/bipole/is voltage=true,
     \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true}
 
+\pgfcirc at activate@bipole at simple@opt{v}{pvmodule}{%
+    \circuitikzbasekey/bipole/is voltage=true,
+    \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true}
+
 \pgfcirc at activate@bipole at simple@opt{v}{dcvsource}{%
     \circuitikzbasekey/bipole/is voltage=true,
     \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true}
@@ -2987,6 +3022,7 @@
 \ctikzset{bipoles/bidirectionaldiode/diode width right/.initial=.3}
 \ctikzset{bipoles/varcap/height/.initial=.50}
 \ctikzset{bipoles/varcap/width/.initial=.45}
+
 \ctikzset{tripoles/thyristor/height/.initial=1.10}
 \ctikzset{tripoles/thyristor/height 2/.initial=.5}
 \ctikzset{tripoles/thyristor/width/.initial=1.0}
@@ -2993,11 +3029,48 @@
 \ctikzset{tripoles/thyristor/diode height/.initial=.5}
 \ctikzset{tripoles/thyristor/diode width left/.initial=.4}
 \ctikzset{tripoles/thyristor/diode width right/.initial=.3}
+\ctikzset{tripoles/thyristor/gate height/.initial=0.0} % legacy 0
+\ctikzset{tripoles/thyristor/gate kink/.initial=1.0} % legacy 1.0
+\ctikzset{tripoles/thyristor/gto space up/.initial=0.5} % legacy 0.5
+\ctikzset{tripoles/thyristor/gto space down/.initial=0.0} % legacy 0.0
+\ctikzset{tripoles/thyristor/gto bar width/.initial=0.2} % legacy 0.2
 
 \ctikzset{tripoles/triac/height/.initial=1.1}
 \ctikzset{tripoles/triac/width/.initial=1}
 \ctikzset{tripoles/triac/diode width left/.initial=.3}
 \ctikzset{tripoles/triac/diode width right/.initial=.3}
+\ctikzset{tripoles/triac/gate kink/.initial=1}
+
+\ctikzset{thyristor style/.is choice}
+\ctikzset{thyristor style/legacy/.code={%
+    \ctikzset{tripoles/thyristor/height=1.1}%
+    \ctikzset{tripoles/thyristor/height 2=.5}%
+    \ctikzset{tripoles/thyristor/width=1.0}%
+    \ctikzset{tripoles/thyristor/diode height=.5}%
+    \ctikzset{tripoles/thyristor/diode width left=.4}%
+    \ctikzset{tripoles/thyristor/diode width right=.3}%
+    \ctikzset{tripoles/thyristor/gate height=0.0}%
+    \ctikzset{tripoles/thyristor/gate kink=1.0}%
+    \ctikzset{tripoles/thyristor/gto space up=0.5}%
+    \ctikzset{tripoles/thyristor/gto space down=0.0}%
+    \ctikzset{tripoles/thyristor/gto bar width=0.2}%
+    \ctikzset{tripoles/triac/gate kink=1}%
+}}
+\ctikzset{thyristor style/compact/.code={%
+    \ctikzset{tripoles/thyristor/height=0.8}% legacy 1.1
+    \ctikzset{tripoles/thyristor/height 2=.5}%
+    \ctikzset{tripoles/thyristor/width=1.0}%
+    \ctikzset{tripoles/thyristor/diode height=.5}%
+    \ctikzset{tripoles/thyristor/diode width left=.4}%
+    \ctikzset{tripoles/thyristor/diode width right=.4}%legacy 0.3
+    \ctikzset{tripoles/thyristor/gate height=0.5}% legacy 0
+    \ctikzset{tripoles/thyristor/gate kink=0.7}% legacy 1.0
+    \ctikzset{tripoles/thyristor/gto space up=0.25}% legacy 0.5
+    \ctikzset{tripoles/thyristor/gto space down=0.25}% legacy 0.0
+    \ctikzset{tripoles/thyristor/gto bar width=0.2}%
+    \ctikzset{tripoles/triac/gate kink=.7}%
+}}
+
 %
 % Flipping arrows in LED and photodiodes
 %
@@ -3563,212 +3636,279 @@
     \pgfusepath{draw}
 }
 
-%% Black thyristor
-\pgfcircdeclarebipolescaled{diodes}
-{
-    \anchor{gate}{\northeast}
-    \anchor{anode}{\southwest\pgf at y=0cm}
-    \anchor{G}{\northeast}
-    \anchor{cathode}{\northeast\pgf at y=0cm }
-}
-{\ctikzvalof{tripoles/thyristor/height 2}}
-{fullthyristor}
-{\ctikzvalof{tripoles/thyristor/height}}
-{\ctikzvalof{tripoles/thyristor/width}}
-{
+%%% Thyristors in general
 
-    \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
 
-    \pgf at circ@res at other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf at circ@res at left
-    \pgf at circ@res at step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf at circ@res at right
+\def\pgfcircdeclarethyristor#1#2#3#4{%name, fill (0-> black; 1-empty), gate position (1: catode, -1: anode), extra code
+    \pgfcircdeclarebipolescaled{diodes}
+    {
+        \savedmacro{\gatekink}{\edef\gatekink{\ctikzvalof{tripoles/thyristor/gate kink}}}
+        \anchor{gate}{\northeast\pgf at x=\gatekink\pgf at x\pgf at x=#3\pgf at x}
+        \anchor{G}{\northeast\pgf at x=\gatekink\pgf at x\pgf at x=#3\pgf at x}
+        \anchor{anode}{\southwest\pgf at y=0cm}
+        \anchor{cathode}{\northeast\pgf at y=0cm }
+    }
+    {\ctikzvalof{tripoles/thyristor/height 2}}
+    {#1}
+    {\ctikzvalof{tripoles/thyristor/height}}
+    {\ctikzvalof{tripoles/thyristor/width}}
+    {
+        \pgf at circ@res at other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf at circ@res at left
+        \pgf at circ@res at step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf at circ@res at right
 
-    \pgfscope
-        \pgftransformxshift{\pgf at circ@res at other}
-        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+        \pgfscope
+            % draw the thick parts here (shifted horizontally)
+            \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+            % draw the basic triangle
+            \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
 
-        \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
-        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
-        \pgfusepath{draw,fill}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at down}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+            \pgfpathclose
+            \ifnum#2=0\relax
+                \pgfusepath{draw,fill}
+            \else
+                \pgf at circ@draworfill
+            \fi
+            % draw the vertical bar
+            \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at down}}
+            \pgfusepath{draw}
+        \endpgfscope
 
-        \pgfsetlinewidth{\pgfstartlinewidth}
+        % back to normal linewidth
+        % stroke if needed
+        \ifpgf at circuit@bipole at strokedsymbol
+            \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+            \pgfusepath{draw}
+        \fi
 
-        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
-        \pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}}
-        \pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\pgf at circ@res at up}}
-        \pgfusepath{draw}
-    \endpgfscope
+        % draw the gate thing;
+        #4
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at down}}
+        % draw the leads in/out
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
 
-    \pgfusepath{draw}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
 
-    \pgfsetlinewidth{\pgfstartlinewidth}
+        \pgfusepath{draw}
+    }
+}
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-
+\def\pgfcirc at thyristor@simplegate{%
+    \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at step}
+        {\ctikzvalof{tripoles/thyristor/gate height}*\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at right}
+        {\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at right}
+        {\pgf at circ@res at up}
+    }
     \pgfusepath{draw}
-
 }
 
+%% Black thyristor
+\pgfcircdeclarethyristor{fullthyristor}{0}{1}{\pgfcirc at thyristor@simplegate}
 %% Empty thyristor
+\pgfcircdeclarethyristor{emptythyristor}{1}{1}{\pgfcirc at thyristor@simplegate}
+%% black and empty GTO (standard: double line symbol, no arrow)
 
-\pgfcircdeclarebipolescaled{diodes}
-{
-    \anchor{gate}{\northeast}
-    \anchor{anode}{\southwest\pgf at y=0cm}
-    \anchor{G}{\northeast}
-    \anchor{cathode}{\northeast\pgf at y=0cm }
-}
-{\ctikzvalof{tripoles/thyristor/height 2}}
-{emptythyristor}
-{\ctikzvalof{tripoles/thyristor/height}}
-{\ctikzvalof{tripoles/thyristor/width}}
-{
-
-    \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
-
-    \pgf at circ@res at other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf at circ@res at left
-    \pgf at circ@res at step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf at circ@res at right
-
+\def\pgfcirc at doublegate@gto at add{
+    % connection to gate terminal
+    \pgfpathmoveto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at right}
+        {\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up -
+        \ctikzvalof{tripoles/thyristor/gto space down}*\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at right}
+        {\pgf at circ@res at up}
+    }
+    \pgfusepath{draw}
     \pgfscope
-        \pgftransformxshift{\pgf at circ@res at other}
-        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
-
-        \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
-        \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
-        \pgfpathclose
-        \pgf at circ@draworfill
-        \pgfscope
-            % to allow filling, we need to draw explicitily the stroke here.
-            \pgfsetlinewidth{\pgfstartlinewidth}
-            \ifpgf at circuit@bipole at strokedsymbol
-                \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
-                \pgfpathlineto{\pgfpoint{0pt}{0pt}}
-                \pgfusepath{draw}
-            \fi
-        \endpgfscope
-
-        \pgfsetlinewidth{\pgfstartlinewidth}
-
-        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
-        \pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}}
-        \pgfpathlineto{\pgfpoint{2*\pgf at circ@res at step-2*\pgf at circ@res at other}{\pgf at circ@res at up}}
-        \pgfusepath{draw}
+    \pgfcirc at set@arrows{gto gate}{}{}
+    % \pgfsetarrowsstart{latexslim}
+    % first (lower) gto line: from body to gate
+    \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at step}
+        {(\ctikzvalof{tripoles/thyristor/gate height}-\ctikzvalof{tripoles/thyristor/gto space down})
+            *\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at right}
+        {\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up -
+        \ctikzvalof{tripoles/thyristor/gto space down}*\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up}
+    }
+    \pgfusepath{draw}
+    % second (higher) gto line: from gate to body
+    \pgfpathmoveto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at right}
+        {\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up +
+        \ctikzvalof{tripoles/thyristor/gto space up}*\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\pgf at circ@res at step}
+        {(\ctikzvalof{tripoles/thyristor/gate height}+\ctikzvalof{tripoles/thyristor/gto space up})
+            *\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up}
+    }
+    \pgfusepath{draw}
     \endpgfscope
+}
+\pgfcircdeclarethyristor{fullgto}{0}{1}{\pgfcirc at doublegate@gto at add}
+\pgfcircdeclarethyristor{emptygto}{1}{1}{\pgfcirc at doublegate@gto at add}
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-\pgf at circ@res at down}}
-
+\def\pgfcirc at bargate@gto at add{%
+    \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at step}
+        {\ctikzvalof{tripoles/thyristor/gate height}*\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at right}
+        {\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at right}
+        {\pgf at circ@res at up}
+    }
+    % draw bar line.
+    \pgfpathmoveto{\pgfpoint
+        {(\ctikzvalof{tripoles/thyristor/gate kink}-\ctikzvalof{tripoles/thyristor/gto bar width})*\pgf at circ@res at right}
+        {(1+\ctikzvalof{tripoles/thyristor/diode height})*0.5*\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {(\ctikzvalof{tripoles/thyristor/gate kink}+\ctikzvalof{tripoles/thyristor/gto bar width})*\pgf at circ@res at right}
+        {(1+\ctikzvalof{tripoles/thyristor/diode height})*0.5*\pgf at circ@res at up}
+    }
     \pgfusepath{draw}
+}
 
-    \pgfsetlinewidth{\pgfstartlinewidth}
+\pgfcircdeclarethyristor{fullgtobar}{0}{1}{\pgfcirc at bargate@gto at add}
+\pgfcircdeclarethyristor{emptygtobar}{1}{1}{\pgfcirc at bargate@gto at add}
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+%% Thyristors with anode-connected gate
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-
+\def\pgfcirc at thyristor@anodegate{%
+    \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at other}
+        {\ctikzvalof{tripoles/thyristor/gate height}*\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at left}
+        {\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at left}
+        {\pgf at circ@res at up}
+    }
     \pgfusepath{draw}
 }
 
-%% Empty triac
-\pgfcircdeclarebipolescaled{diodes}
-{
-    \anchor{gate}{\northeast}
-    \anchor{anode}{\southwest\pgf at y=0cm}
-    \anchor{G}{\northeast}
-    \anchor{cathode}{\northeast\pgf at y=0cm }
+%% Black PUT
+\pgfcircdeclarethyristor{fullput}{0}{-1}{\pgfcirc at thyristor@anodegate}
+%% Empty PUT
+\pgfcircdeclarethyristor{emptyput}{1}{-1}{\pgfcirc at thyristor@anodegate}
+%% black and empty GTO (standard: double line symbol, no arrow)
+
+\def\pgfcirc at anodebargate@gto at add{%
+    \pgfpathmoveto{\pgfpoint
+        {\pgf at circ@res at other}
+        {\ctikzvalof{tripoles/thyristor/gate height}*\ctikzvalof{tripoles/thyristor/diode height}*\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at left}
+        {\ctikzvalof{tripoles/thyristor/diode height}\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {\ctikzvalof{tripoles/thyristor/gate kink}*\pgf at circ@res at left}
+        {\pgf at circ@res at up}
+    }
+    % draw bar line.
+    \pgfpathmoveto{\pgfpoint
+        {(\ctikzvalof{tripoles/thyristor/gate kink}-\ctikzvalof{tripoles/thyristor/gto bar width})*\pgf at circ@res at left}
+        {(1+\ctikzvalof{tripoles/thyristor/diode height})*0.5*\pgf at circ@res at up}
+    }
+    \pgfpathlineto{\pgfpoint
+        {(\ctikzvalof{tripoles/thyristor/gate kink}+\ctikzvalof{tripoles/thyristor/gto bar width})*\pgf at circ@res at left}
+        {(1+\ctikzvalof{tripoles/thyristor/diode height})*0.5*\pgf at circ@res at up}
+    }
+    \pgfusepath{draw}
 }
-{\ctikzvalof{tripoles/triac/height}}
-{emptytriac}
-{\ctikzvalof{tripoles/triac/height}}
-{\ctikzvalof{tripoles/triac/width}}
-{
 
-    \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+\pgfcircdeclarethyristor{fullagtobar}{0}{-1}{\pgfcirc at anodebargate@gto at add}
+\pgfcircdeclarethyristor{emptyagtobar}{1}{-1}{\pgfcirc at anodebargate@gto at add}
 
-    \pgf at circ@res at other = \ctikzvalof{tripoles/triac/diode width left}\pgf at circ@res at left
-    \pgf at circ@res at step = \ctikzvalof{tripoles/triac/diode width right}\pgf at circ@res at right
+% Triacs
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
-    \pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at step}{0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+\def\pgfcircdeclaretriac#1#2{%name, fill (0-> black; 1-empty)
+    \pgfcircdeclarebipolescaled{diodes}
+    {
+        \savedmacro{\gatekink}{\edef\gatekink{\ctikzvalof{tripoles/triac/gate kink}}}
+        \anchor{gate}{\northeast\pgf at x=\gatekink\pgf at x}
+        \anchor{G}{\northeast\pgf at x=\gatekink\pgf at x}
+        \anchor{anode}{\southwest\pgf at y=0cm}
+        \anchor{cathode}{\northeast\pgf at y=0cm }
+    }
+    {\ctikzvalof{tripoles/triac/height}}
+    {#1}
+    {\ctikzvalof{tripoles/triac/height}}
+    {\ctikzvalof{tripoles/triac/width}}
+    {
+        \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-    \pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at other}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+        \pgf at circ@res at other = \ctikzvalof{tripoles/triac/diode width left}\pgf at circ@res at left
+        \pgf at circ@res at step = \ctikzvalof{tripoles/triac/diode width right}\pgf at circ@res at right
 
-    \pgf at circ@draworfill
+        % diodes forms
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+        \pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at step}{0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
 
-    \pgfsetlinewidth{\pgfstartlinewidth}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+        \pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at other}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}} % sqrt(1/2)
+        \ifnum#2=0\relax
+                \pgfusepath{draw,fill}
+        \else
+            \pgf at circ@draworfill
+        \fi
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+        \pgfsetlinewidth{\pgfstartlinewidth}
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+        % draw gate
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+        \pgfpathlineto{\pgfpoint
+            {\ctikzvalof{tripoles/triac/gate kink}*\pgf at circ@res at right}
+            {-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
+        \pgfpathlineto{\pgfpoint{\ctikzvalof{tripoles/triac/gate kink}*\pgf at circ@res at right}{\pgf at circ@res at up}} % sqrt(1/2)
 
-    \pgfusepath{draw}
-}
+        % draw leads
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
 
-%% Full triac
-\pgfcircdeclarebipolescaled{diodes}
-{
-    \anchor{gate}{\northeast}
-    \anchor{anode}{\southwest\pgf at y=0cm}
-    \anchor{G}{\northeast}
-    \anchor{cathode}{\northeast\pgf at y=0cm }
-}
-{\ctikzvalof{tripoles/triac/height}}
-{fulltriac}
-{\ctikzvalof{tripoles/triac/height}}
-{\ctikzvalof{tripoles/triac/width}}
-{
-    \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
 
-    \pgf at circ@res at other = \ctikzvalof{tripoles/triac/diode width left}\pgf at circ@res at left
-    \pgf at circ@res at step = \ctikzvalof{tripoles/triac/diode width right}\pgf at circ@res at right
+        \pgfusepath{draw}
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
-    \pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at step}{0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+    }
+}
 
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-    \pgfpathlineto{\pgfpoint{0.95\pgf at circ@res at other}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}}
+\pgfcircdeclaretriac{fulltriac}{0}
+\pgfcircdeclaretriac{emptytriac}{1}
 
-    \pgfusepath{draw,fill}
+% end of shape definitions for diodes%>>>
 
-    \pgfsetlinewidth{\pgfstartlinewidth}
-
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{-0.707*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-1.414*(\pgf at circ@res at other-\pgf at circ@res at step)}} % sqrt(1/2)
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}} % sqrt(1/2)
-
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{0pt}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{0pt}}
-
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}}
-
-    \pgfusepath{draw}
-}% %>>>
-
 %% Paths definitions for Diodes%<<<
 
 \def\pgfcirc at tmp@generatediodes#1#2{
@@ -3792,6 +3932,14 @@
     \pgfcirc at style@to at style{#1 bidirectionaldiode}{biD#2}
     \pgfcirc at activate@bipole{l}{#1thyristor}{#1thyristor}{#1 thyristor}
     \pgfcirc at style@to at style{#1 thyristor}{Ty#2}
+    \pgfcirc at activate@bipole{l}{#1put}{#1put}{#1 put}
+    \pgfcirc at style@to at style{#1 put}{PUT#2}
+    \pgfcirc at activate@bipole{l}{#1gto}{#1gto}{#1 gto}
+    \pgfcirc at style@to at style{#1 gto}{GTO#2}
+    \pgfcirc at activate@bipole{l}{#1gtobar}{#1gtobar}{#1 gtobar}
+    \pgfcirc at style@to at style{#1 gtobar}{GTOb#2}
+    \pgfcirc at activate@bipole{l}{#1agtobar}{#1agtobar}{#1 agtobar}
+    \pgfcirc at style@to at style{#1 agtobar}{aGTOb#2}
     \pgfcirc at activate@bipole{l}{#1triac}{#1triac}{#1 triac}
     \pgfcirc at style@to at style{#1 triac}{Tr#2}
 }
@@ -3818,6 +3966,14 @@
     \pgfcirc at style@to at style{#1 bidirectionaldiode}{biD#2}
     \pgfcirc at node@to at style{l}{emptythyristor}{#1 thyristor}{\circuitikzbasekey/bipole/is strokedsymbol=true}
     \pgfcirc at style@to at style{#1 thyristor}{Ty#2}
+    \pgfcirc at node@to at style{l}{emptyput}{#1 put}{\circuitikzbasekey/bipole/is strokedsymbol=true}
+    \pgfcirc at style@to at style{#1 put}{PUT#2}
+    \pgfcirc at node@to at style{l}{emptygto}{#1 gto}{\circuitikzbasekey/bipole/is strokedsymbol=true}
+    \pgfcirc at style@to at style{#1 gto}{GTO#2}
+    \pgfcirc at node@to at style{l}{emptygtobar}{#1 gtobar}{\circuitikzbasekey/bipole/is strokedsymbol=true}
+    \pgfcirc at style@to at style{#1 gtobar}{GTOb#2}
+    \pgfcirc at node@to at style{l}{emptyagtobar}{#1 agtobar}{\circuitikzbasekey/bipole/is strokedsymbol=true}
+    \pgfcirc at style@to at style{#1 agtobar}{aGTOb#2}
     \pgfcirc at node@to at style{l}{emptytriac}{#1 triac}{\circuitikzbasekey/bipole/is strokedsymbol=true}
     \pgfcirc at style@to at style{#1 triac}{Tr#2}
 }
@@ -3844,6 +4000,14 @@
 \pgfcirc at style@to at style{bidirectionaldiode}{biD}
 \pgfcirc at style@to at style{\pgfcircdiodestylemacro thyristor}{thyristor}
 \pgfcirc at style@to at style{thyristor}{Ty}
+\pgfcirc at style@to at style{\pgfcircdiodestylemacro put}{put}
+\pgfcirc at style@to at style{put}{PUT}
+\pgfcirc at style@to at style{\pgfcircdiodestylemacro gto}{gto}
+\pgfcirc at style@to at style{gto}{GTO}
+\pgfcirc at style@to at style{\pgfcircdiodestylemacro gtobar}{gtobar}
+\pgfcirc at style@to at style{gtobar}{GTOb}
+\pgfcirc at style@to at style{\pgfcircdiodestylemacro agtobar}{agtobar}
+\pgfcirc at style@to at style{agtobar}{aGTOb}
 \pgfcirc at style@to at style{\pgfcircdiodestylemacro triac}{triac}
 \pgfcirc at style@to at style{triac}{Tr}
 % %>>>
@@ -4657,6 +4821,62 @@
 }
 
 % oscilloscope, suggested by @nobrl https://github.com/circuitikz/circuitikz/issues/176
+%
+% oscilloscope waveforms
+
+\ctikzset{%
+    bipoles/oscope/waveform/sin/.code={%
+        \pgfpathmoveto{\pgfpoint{-0.6cm}{0cm}}
+        \pgfpathsine{\pgfpoint{0.3cm}{0.4cm}}
+        \pgfpathcosine{\pgfpoint{0.3cm}{-0.4cm}}
+        \pgfpathsine{\pgfpoint{0.3cm}{-0.4cm}}
+        \pgfpathcosine{\pgfpoint{0.3cm}{0.4cm}}
+        \pgfusepath{draw}
+    },
+    bipoles/oscope/waveform/ramps/.code={%
+        \pgfpathmoveto{\pgfpoint{-0.75cm}{-0.25cm}}
+        \pgfpathlineto{\pgfpoint{-0.05cm}{0.25cm}}
+        \pgfpathlineto{\pgfpoint{-0.05cm}{-0.25cm}}
+        \pgfpathlineto{\pgfpoint{0.65cm}{0.25cm}}
+        \pgfpathlineto{\pgfpoint{0.65cm}{-0.25cm}}
+        \pgfusepath{draw}
+    },
+    bipoles/oscope/waveform/square/.code={%
+        \pgfpathmoveto{\pgfpoint{-0.75cm}{-0.25cm}}
+        \pgfpathlineto{\pgfpoint{-0.6cm}{-0.25cm}}
+        \pgfpathlineto{\pgfpoint{-0.6cm}{0.25cm}}
+        \pgfpathlineto{\pgfpoint{0cm}{0.25cm}}
+        \pgfpathlineto{\pgfpoint{0cm}{-0.25cm}}
+        \pgfpathlineto{\pgfpoint{0.6cm}{-0.25cm}}
+        \pgfpathlineto{\pgfpoint{0.6cm}{0.25cm}}
+        \pgfpathlineto{\pgfpoint{0.75cm}{0.25cm}}
+        \pgfusepath{draw}
+    },
+    bipoles/oscope/waveform/triangle/.code={%
+        \pgfpathmoveto{\pgfpoint{-0.75cm}{0cm}}
+        \pgfpathlineto{\pgfpoint{-0.6cm}{-0.25cm}}
+        \pgfpathlineto{\pgfpoint{-0.3cm}{0.25cm}}
+        \pgfpathlineto{\pgfpoint{0cm}{-0.25cm}}
+        \pgfpathlineto{\pgfpoint{0.3cm}{0.25cm}}
+        \pgfpathlineto{\pgfpoint{0.6cm}{-0.25cm}}
+        \pgfpathlineto{\pgfpoint{0.75cm}{0cm}}
+        \pgfusepath{draw}
+    },
+    bipoles/oscope/waveform/zero/.code={
+        \pgfpathmoveto{\pgfpoint{-0.75cm}{0cm}}
+        \pgfpathlineto{\pgfpoint{0.75cm}{0cm}}
+        \pgfusepath{draw}
+        },%
+    bipoles/oscope/waveform/lissajous/.code={%
+        \pgfpathellipse{\pgfpoint{0cm}{0cm}}
+            {\pgfpoint{0.5cm}{0.35cm}}{\pgfpoint{-0.3cm}{0.2cm}}
+        \pgfusepath{draw}
+    },
+    bipoles/oscope/waveform/none/.code={},%
+}
+% default waveform (backward compatible)
+\ctikzset{bipoles/oscope/waveform/.initial=ramps}
+
 \pgfcircdeclarebipolescaled{instruments}
 {
     \anchor{in 1}{\southwest\pgf at y=0.75\pgf at y\pgf at x=0.4\pgf at x}
@@ -4682,8 +4902,6 @@
     \pgfscope
         \pgfsetcornersarced{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at step}}
         \pgfpathrectanglecorners{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
-        % this would create a round (analog?) scope...
-        % \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf at circ@res at up}}{\pgfpoint{\pgf at circ@res at left}{0}}
         \pgf at circ@draworfill
     \endpgfscope
     % get the rotation
@@ -4700,23 +4918,24 @@
         \pgfscope
             \pgfsetlinewidth{0.5\pgfstartlinewidth}
             \pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0.25\pgf at circ@res at down}}
-            \pgfpathgrid[stepx=\pgf at circ@res at step, stepy=\pgf at circ@res at step]%
+            % the "almost one" make the grid complete most of the time --- beware of antialiasing
+            \pgfpathgrid[stepx=0.995\pgf at circ@res at step, stepy=0.995\pgf at circ@res at step]%
             {\pgfpoint{0.75\pgf at circ@res at left}{0.5\pgf at circ@res at down}}
             {\pgfpoint{0.75\pgf at circ@res at right}{0.5\pgf at circ@res at up}}
             \pgfsetstrokeopacity{0.5}
             \pgfusepath{draw}
         \endpgfscope
-        % function displayed, thanks to
-        \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
-        \pgfpathmoveto{\pgfpoint{0.75\pgf at circ@res at left}{0.25\pgf at circ@res at down}}
-        \pgfpathlineto{\pgfpoint{0.05\pgf at circ@res at left}{0.25\pgf at circ@res at up}}
-        \pgfpathlineto{\pgfpoint{0.05\pgf at circ@res at left}{0.25\pgf at circ@res at down}}
-        \pgfpathlineto{\pgfpoint{0.65\pgf at circ@res at right}{0.25\pgf at circ@res at up}}
-        \pgfpathlineto{\pgfpoint{0.65\pgf at circ@res at right}{0.25\pgf at circ@res at down}}
-        \pgfusepath{draw}
+        % function displayed
+        \pgfscope
+            \pgfmathsetmacro{\@@scalex}{\pgf at circ@res at right/1cm}
+            \pgfmathsetmacro{\@@scaley}{\pgf at circ@res at up/1cm}
+            \pgftransformxscale{\@@scalex}
+            \pgftransformyscale{\@@scaley}
+            \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+            \pgfkeys{\circuitikzbasekey/bipoles/oscope/waveform/\ctikzvalof{bipoles/oscope/waveform}}
+        \endpgfscope
     \endpgfscope
 }
-
 % generic round meter with always horizontal text, no arrow
 \pgfcircdeclarebipolescaled{instruments}
 {}

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex	2021-05-02 20:41:58 UTC (rev 59054)
@@ -687,11 +687,15 @@
         \pgfmathsetlength{\pgf at x}{\pgf at circ@res at temp*(-1+cos(\wiper))}
         \pgfmathsetlength{\pgf at y}{\pgf at circ@res at temp*sin(\wiper)}
     }
+    %
+    % Notice that the "in" anchors must mimic "ext center", otherwise they are
+    % wrong for angles > 90 degrees!
+    %
     % center anchors
-    \anchor{cin}{ \northwest \pgf at y=0pt\advance\pgf at x by \radius}
+    \anchor{cin}{ \pgf at y=0pt \pgf at x=0pt \advance\pgf at x by -\width}
     % horizontal angles
-    \anchor{in}{ \northwest \pgf at y=0pt}
-    \anchor{ain}{ \northwest \pgf at y=0pt}
+    \anchor{in}{ \pgf at y=0pt \pgf at x=0pt \advance\pgf at x by -\width \advance\pgf at x by -\radius}
+    \anchor{ain}{ \pgf at y=0pt \pgf at x=0pt \advance\pgf at x by -\width \advance\pgf at x by -\radius}
 
     \anchor{center}{ \central \pgf at y=0pt }
     \anchor{east}{ \northeast \pgf at y=0pt }

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex	2021-05-02 20:41:58 UTC (rev 59054)
@@ -470,6 +470,7 @@
 % powerelectronic blocks
 \ctikzset{bipoles/sacdc/width/.initial=.7}
 \ctikzset{bipoles/sdcac/width/.initial=.7}
+\ctikzset{bipoles/sdcdc/width/.initial=.7}
 \ctikzset{bipoles/tacdc/width/.initial=.7}
 \ctikzset{bipoles/tdcac/width/.initial=.7}
 \ctikzset{quadpoles/gridnode/width/.initial=.7} %not sure if quadpole?
@@ -1950,7 +1951,85 @@
 }
 
 
+%% dc/dc converter
+\pgfcircdeclarebipolescaled{blocks}
+{
+    \anchor{dc1}{
+        \northeast
+        \pgf at y=.4\pgf at y
+        \pgf at x=-\pgf at x
+    }
+    \anchor{dc2}{
+        \northeast
+        \pgf at y=-.4\pgf at y
+        \pgf at x=-\pgf at x
+    }
+}
+{\ctikzvalof{bipoles/sdcdc/width}}
+{sdcdc}
+{\ctikzvalof{bipoles/sdcdc/width}}
+{\ctikzvalof{bipoles/sdcdc/width}}
+{
+    \pgf at circ@res at step = \ctikzvalof{bipoles/sdcdc/width}\pgf at circ@scaled at Rlen
+    \divide \pgf at circ@res at step by 2
 
+    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+    \pgf at circ@res at other = \pgf at circ@res at left
+    \advance\pgf at circ@res at other by \pgf at circ@res at step
+
+    \ifpgf at circuit@dashed
+        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \fi
+
+    % draw outer box
+    \pgf at circ@twoportbox
+
+    \ifpgf at circuit@inputarrow
+        {
+            \advance \pgf at circ@res at left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+            \pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+            \pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+        }
+    \fi
+
+    % rotate inner symbol
+    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at 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 > 225 \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{\pgf at circ@res at left}{\pgf at circ@res at down}}
+    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+    \pgfusepath{draw}
+
+    % draw equal sign
+    \pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at step}{-.375\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at step}{-0.375\pgf at circ@res at step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{.2\pgf at circ@res at step}{-.625\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{0.7\pgf at circ@res at step}{-0.625\pgf at circ@res at step}}
+    \pgfusepath{draw}
+
+    % draw equal sign
+    \pgfpathmoveto{\pgfpoint{-.2\pgf at circ@res at step}{.375\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{-0.7\pgf at circ@res at step}{0.375\pgf at circ@res at step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{-.2\pgf at circ@res at step}{.625\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{-0.7\pgf at circ@res at step}{0.625\pgf at circ@res at step}}
+    \pgfusepath{draw}
+}
+
+
 %% single phase dc/ac converter
 \pgfcircdeclarebipolescaled{blocks}
 {
@@ -2270,6 +2349,7 @@
 \pgfcirc at activate@bipole at simple{l}{detector}
 \pgfcirc at activate@bipole at simple{l}{sacdc}
 \pgfcirc at activate@bipole at simple{l}{sdcac}
+\pgfcirc at activate@bipole at simple{l}{sdcdc}
 \pgfcirc at activate@bipole at simple{l}{tacdc}
 \pgfcirc at activate@bipole at simple{l}{tdcac}
 % %>>>

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2021-05-02 20:41:58 UTC (rev 59054)
@@ -3231,7 +3231,9 @@
 \ctikzset{tripoles/njfet/gate height 2/.initial=.35}
 \ctikzset{tripoles/njfet/gate width/.initial=.5}
 \ctikzset{tripoles/njfet/base width/.initial=.5}
-\ctikzset{tripoles/njfet/conn height/.initial=.35}
+\ctikzset{tripoles/njfet/conn height/.initial=.35}% at the exterior
+\ctikzset{tripoles/njfet/union height/.initial=.35}% at the gate
+\ctikzset{tripoles/njfet/conn kink/.initial=1}% 1=no kink
 \ctikzset{tripoles/njfet/height/.initial=1.1}
 \ctikzset{tripoles/njfet/bodydiode scale/.initial=.3}
 \ctikzset{tripoles/njfet/bodydiode distance/.initial=.3}
@@ -3244,6 +3246,8 @@
 \ctikzset{tripoles/pjfet/gate width/.initial=.5}
 \ctikzset{tripoles/pjfet/base width/.initial=.5}
 \ctikzset{tripoles/pjfet/conn height/.initial=.35}
+\ctikzset{tripoles/pjfet/union height/.initial=.35}% at the gate
+\ctikzset{tripoles/pjfet/conn kink/.initial=1}% 1=no kink
 \ctikzset{tripoles/pjfet/height/.initial=1.1}
 \ctikzset{tripoles/pjfet/bodydiode scale/.initial=.3}
 \ctikzset{tripoles/pjfet/bodydiode distance/.initial=.3}
@@ -3250,6 +3254,34 @@
 \ctikzset{tripoles/pjfet/bodydiode conn/.initial=.6}
 \ctikzset{tripoles/pjfet/curr direction/.initial=-1}
 
+\ctikzset{tripoles/nujt/width/.initial=.7}
+\ctikzset{tripoles/nujt/gate height/.initial=.5}
+\ctikzset{tripoles/nujt/gate height 2/.initial=.35}
+\ctikzset{tripoles/nujt/gate width/.initial=.5}
+\ctikzset{tripoles/nujt/base width/.initial=.5}
+\ctikzset{tripoles/nujt/conn height/.initial=.35}
+\ctikzset{tripoles/nujt/union height/.initial=0}% at the gate
+\ctikzset{tripoles/nujt/conn kink/.initial=.82}% to match the circle position
+\ctikzset{tripoles/nujt/height/.initial=1.1}
+\ctikzset{tripoles/nujt/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nujt/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nujt/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nujt/curr direction/.initial=1}
+
+\ctikzset{tripoles/pujt/width/.initial=.7}
+\ctikzset{tripoles/pujt/gate height/.initial=.5}
+\ctikzset{tripoles/pujt/gate height 2/.initial=.35}
+\ctikzset{tripoles/pujt/gate width/.initial=.5}
+\ctikzset{tripoles/pujt/base width/.initial=.5}
+\ctikzset{tripoles/pujt/conn height/.initial=.35}
+\ctikzset{tripoles/pujt/union height/.initial=0}% at the gate
+\ctikzset{tripoles/pujt/conn kink/.initial=.82}% to match the circle position
+\ctikzset{tripoles/pujt/height/.initial=1.1}
+\ctikzset{tripoles/pujt/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pujt/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pujt/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pujt/curr direction/.initial=-1}
+
 \ctikzset{tripoles/isfet/width/.initial=1}
 \ctikzset{tripoles/isfet/gate height/.initial=.35}
 \ctikzset{tripoles/isfet/base height/.initial=.5}
@@ -5417,139 +5449,159 @@
     \fi
 }
 
-\pgfcircdeclaretransistor{njfet}{
-        \anchor{inner up}{
-            \northeast
-            \pgf at y=\ctikzvalof{tripoles/njfet/gate height 2}\pgf at y
-        }
-        \anchor{inner down}{
-            \northeast
-            \pgf at y=-\ctikzvalof{tripoles/njfet/gate height 2}\pgf at y
-        }
-    }{%
-    % add the circle if requested (before everything else, so we can fill it)
-    \pgfcirc at transistorcircle
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-    {\ctikzvalof{tripoles/njfet/gate height 2}\pgf at circ@res at up}}
-    \pgfpathlineto{\pgfpoint
-        {\ctikzvalof{tripoles/njfet/gate width}\pgf at circ@res at left}
-    {\ctikzvalof{tripoles/njfet/gate height 2}\pgf at circ@res at up}}
+%%% uni-junction transistors: jfets, ujts
 
-    \pgfpathmoveto{\pgfpoint
-        {\ctikzvalof{tripoles/njfet/gate width}\pgf at circ@res at left}
-    {\ctikzvalof{tripoles/njfet/gate height 2}\pgf at circ@res at down}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-    {\ctikzvalof{tripoles/njfet/gate height 2}\pgf at circ@res at down}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
-    \pgfusepath{draw}
+\long\def\pgfcircdeclarejunctiontransistor#1#2#3{% name, extra anchors, extra draw
+    \pgfcircdeclaretransistor{#1}{
+            \anchor{inner up}{
+                \northeast
+                \pgf at y=\ctikzvalof{tripoles/#1/gate height 2}\pgf at y
+            }
+            \anchor{inner down}{
+                \northeast
+                \pgf at y=-\ctikzvalof{tripoles/#1/gate height 2}\pgf at y
+            }
+            \anchor{kink}{
+                \northeast
+                \pgf at ya=-\ctikzvalof{tripoles/#1/gate height 2}\pgf at y
+                \left
+                \pgf at y=\ctikzvalof{tripoles/#1/curr direction}\pgf at ya
+                \pgf at x=\ctikzvalof{tripoles/#1/conn kink}\pgf at x
+            }
+            % extra anchors (or override)
+            #2
+        }{%
+        % add the circle if requested (before everything else, so we can fill it)
+        \pgfcirc at transistorcircle
 
-    \pgfscope
+        % get direction
+        \edef\@@dir{\ctikzvalof{tripoles/#1/curr direction}}
+
+        % draw drain/source connections: up
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at up}}
+        \pgfpathlineto{\pgfpoint
+            {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+        {\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at up}}
+
+        % down
         \pgfpathmoveto{\pgfpoint
-            {\ctikzvalof{tripoles/njfet/gate width}\pgf at circ@res at left}
-        {\ctikzvalof{tripoles/njfet/gate height}\pgf at circ@res at up}}
-        \pgfpathlineto{\pgfpoint
-            {\ctikzvalof{tripoles/njfet/gate width}\pgf at circ@res at left}
-        {\ctikzvalof{tripoles/njfet/gate height}\pgf at circ@res at down}}
-        \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
+            {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+        {\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+        {\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
         \pgfusepath{draw}
-    \endpgfscope
 
-    % arrow
-    \pgfscope
-        \pgfslopedattimetrue
-        \pgfallowupsidedownattimetrue
-        \pgfresetnontranslationattimefalse
-        \ifpgf at circuit@trans at arrowatend
-            \edef\@@anchor{tip}\edef\@@pos{1.0}
-        \else
-            \edef\@@anchor{center}\edef\@@pos{0.6}
-        \fi
-        \pgftransformlineattime{\@@pos}{%
-            \pgfpoint{\pgf at circ@res at left}%
-            {\ctikzvalof{tripoles/njfet/gate height 2}\pgf at circ@res at down}%
-            }{%
-            \pgfpoint
-            {\ctikzvalof{tripoles/njfet/gate width}\pgf at circ@res at left}%
-            {\ctikzvalof{tripoles/njfet/gate height 2}\pgf at circ@res at down}%
-        }
-        \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
-    \endpgfscope
+        \pgfscope
+            \pgfpathmoveto{\pgfpoint
+                {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+            {\ctikzvalof{tripoles/#1/gate height}\pgf at circ@res at up}}
+            \pgfpathlineto{\pgfpoint
+                {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+            {\ctikzvalof{tripoles/#1/gate height}\pgf at circ@res at down}}
+            \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
+            \pgfusepath{draw}
+        \endpgfscope
 
-    \pgfpathmoveto{\pgfpoint
-        {\ctikzvalof{tripoles/njfet/gate width}\pgf at circ@res at left}
-    {\ctikzvalof{tripoles/njfet/gate height 2}\pgf at circ@res at down}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
-    {\ctikzvalof{tripoles/njfet/gate height 2}\pgf at circ@res at down}}
-    \pgfusepath{draw}
+        % arrow
+        \pgfscope
+            \pgfslopedattimetrue
+            \pgfallowupsidedownattimetrue
+            \pgfresetnontranslationattimefalse
+            \ifpgf at circuit@trans at arrowatend
+                \ifnum\@@dir>0
+                    \edef\@@anchor{tip}\edef\@@pos{1.0}
+                \else
+                    \edef\@@anchor{btip}\edef\@@pos{1.0}
+                \fi
+            \else
+                \ifnum\@@dir>0
+                    \edef\@@anchor{center}\edef\@@pos{0.6}
+                \else
+                    \edef\@@anchor{center}\edef\@@pos{0.4}
+                \fi
+            \fi
+            % find x1, x2 and y for the base arrow
+            \ifnum\@@dir>0
+                \pgf at circ@res at step=\ctikzvalof{tripoles/#1/conn kink}\pgf at circ@res at left
+                \pgf at circ@res at other=\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left
+                \pgf at circ@res at zero=\ctikzvalof{tripoles/#1/union height}\pgf at circ@res at down
+                \pgf at circ@res at temp=\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at down
+            \else
+                \pgf at circ@res at step=\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left
+                \pgf at circ@res at other=\ctikzvalof{tripoles/#1/conn kink}\pgf at circ@res at left
+                \pgf at circ@res at zero=\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at up
+                \pgf at circ@res at temp=\ctikzvalof{tripoles/#1/union height}\pgf at circ@res at up
+            \fi
+            %
+            % gate line (called emitter in UJT)
+            %
+            \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at temp}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+            %
+            % horizontal gate line
+            %
+            \ifpgf at circuit@bpt at drawgate
+                \ifnum\@@dir>0
+                    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at temp}}
+                    \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at temp}}
+                \else
+                    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}}
+                    \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+                \fi
+            \fi
+            \pgfusepath{draw}
+            %
+            % gate arrows (called emitter in UJT)
+            %
+            \pgftransformlineattime{\@@pos}{%
+                \pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at temp}
+                }{%
+                \pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at zero}
+            }
+            \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+            %
+            % gate line (called emitter in UJT)
+            %
+        \endpgfscope
+
+        % extra drawings
+        #3
+    }
 }
 
-\pgfcircdeclaretransistor{pjfet}{
-        \anchor{inner up}{
-            \northeast
-            \pgf at y=\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at y
-        }
-        \anchor{inner down}{
-            \northeast
-            \pgf at y=-\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at y
-        }
-    }{%
-    % add the circle if requested (before everything else, so we can fill it)
-    \pgfcirc at transistorcircle
-    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-    {\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
-    \pgfpathlineto{\pgfpoint
-        {\ctikzvalof{tripoles/pjfet/gate width}\pgf at circ@res at left}
-    {\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
+% NJFET and PJFET
 
-    \pgfpathmoveto{\pgfpoint
-        {\ctikzvalof{tripoles/pjfet/gate width}\pgf at circ@res at left}
-    {\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at circ@res at down}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
-    {\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at circ@res at down}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
-    \pgfusepath{draw}
+\pgfcircdeclarejunctiontransistor{njfet}{}{}
+\pgfcircdeclarejunctiontransistor{pjfet}{}{}
 
-    \pgfscope
-        \pgfpathmoveto{\pgfpoint
-            {\ctikzvalof{tripoles/pjfet/gate width}\pgf at circ@res at left}
-        {\ctikzvalof{tripoles/pjfet/gate height}\pgf at circ@res at up}}
-        \pgfpathlineto{\pgfpoint
-            {\ctikzvalof{tripoles/pjfet/gate width}\pgf at circ@res at left}
-        {\ctikzvalof{tripoles/pjfet/gate height}\pgf at circ@res at down}}
-        \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
-        \pgfusepath{draw}
-    \endpgfscope
-
-    \pgfscope
-        \pgfslopedattimetrue
-        \pgfallowupsidedownattimetrue
-        \pgfresetnontranslationattimefalse
-        \ifpgf at circuit@trans at arrowatend
-            \edef\@@anchor{btip}\edef\@@pos{1.0}
-        \else
-            \edef\@@anchor{center}\edef\@@pos{0.4}
+\def\@ujtanchoroverride#1{
+    \savedanchor{\ujtrealemitter}{
+        \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+        \pgf at y=\ctikzvalof{tripoles/#1/height}\pgf at circ@scaled at Rlen
+        \pgf at y=.5\pgf at y %north anchor height
+        % kink AND conn height, they're the same
+        \pgf at y=-\ctikzvalof{tripoles/#1/gate height 2}\pgf at y
+        \pgf at y=\ctikzvalof{tripoles/#1/curr direction}\pgf at y
+        % horizontal
+        \pgf at x=-\ctikzvalof{tripoles/#1/width}\pgf at circ@scaled at Rlen % left
+        \ifpgf at circuit@bpt at drawgate\else
+            \pgf at x=\ctikzvalof{tripoles/#1/conn kink}\pgf at x
         \fi
-        \pgftransformlineattime{\@@pos}{%
-            \pgfpoint%
-            {\ctikzvalof{tripoles/pjfet/gate width}\pgf at circ@res at left}%
-            {\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at circ@res at up}%
-            }{%
-            \pgfpoint{\pgf at circ@res at left}%
-            {\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at circ@res at up}%
-        }
-        \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
-    \endpgfscope
-
-    \pgfpathmoveto{\pgfpoint
-        {\ctikzvalof{tripoles/pjfet/gate width}\pgf at circ@res at left}
-    {\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
-    \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
-    {\ctikzvalof{tripoles/pjfet/gate height 2}\pgf at circ@res at up}}
-    \pgfusepath{draw}
+    }
+    \anchor{E}{\ujtrealemitter}
+    \anchor{emitter}{\ujtrealemitter}
+    \anchor{B2}{\northeast\pgf at y=-\pgf at y}
+    \anchor{B1}{\northeast}
 }
 
+
+\pgfcircdeclarejunctiontransistor{nujt}{\@ujtanchoroverride{nujt}}{}
+\pgfcircdeclarejunctiontransistor{pujt}{\@ujtanchoroverride{pujt}}{}
+
+
 \pgfdeclaretransistorwrapperaddbulk{isfet}{
     }{%
     % add the circle if requested (before everything else, so we can fill it)

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex	2021-05-02 20:41:58 UTC (rev 59054)
@@ -89,4 +89,35 @@
     }}}%
 }
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% subcircuits (experimental)
+%%
+%% introduced by Romano Giannetti around April 2021
+%%
+%%
+\newbox\ctikz at scratchbox
+\long\def\ctikzsubcircuitdef#1#2#3{%
+    \expandafter\gdef\csname #1 at Anchor\endcsname{}
+    \expandafter\gdef\csname #1 at setanchors\endcsname{
+        \setbox\ctikz at scratchbox=\hbox{%
+        \begin{circuitikz}
+        \draw (0,0) \csname#1\endcsname{T-#1}{};
+        \foreach [count=\i] \anchor in {#2}
+        % reference anchor is -center
+        \draw (0,{2-\i/2}) let \p1 = ($(T-#1-subckt at reference)-(T-#1-\anchor)$) in
+            node[right]{\anchor: \x1,\y1 \expandafter\xdef\csname #1 at Anchor\anchor\endcsname{++(\x1,\y1)}};
+        \end{circuitikz}
+        }
+    }
+    \expandafter\gdef\csname#1\endcsname##1##2{\csname#1aux\endcsname{##1}{\csname #1 at Anchor##2\endcsname}}
+    \expandafter\gdef\csname#1aux\endcsname##1##2{%
+    % move to the anchor
+    ##2
+    % reference anchor should be -reference
+    coordinate (##1-subckt at reference)
+    #3
+    }
+}
+\long\def\ctikzsubcircuitactivate#1{\csname #1 at setanchors\endcsname}
+
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2021-05-02 20:41:39 UTC (rev 59053)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2021-05-02 20:41:58 UTC (rev 59054)
@@ -12,8 +12,8 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\pgfcircversion{1.3.4}
-\def\pgfcircversiondate{2021/04/20}
+\def\pgfcircversion{1.3.5}
+\def\pgfcircversiondate{2021/05/02}
 
 \ProvidesPackage{circuitikz}%
 [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]



More information about the tex-live-commits mailing list.