summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdfbin17645 -> 17645 bytes
-rw-r--r--Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md8
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/changelog.tex21
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdfbin1520552 -> 1544857 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex146
-rw-r--r--Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex4
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex154
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex315
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty4
9 files changed, 587 insertions, 65 deletions
diff --git a/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf b/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
index f4602c8d5d5..8fac207e51c 100644
--- a/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
+++ b/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
index bac4ff05133..864531155b8 100644
--- a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
+++ b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
@@ -1,6 +1,14 @@
<!--- 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.5.2 (2022-05-08)
+
+ Adding a couple of new component and a nice feature to transistors and tubes.
+
+ - Added TVS diodes (transorb), suggested by [Anisio Rogerio Braga](https://tex.stackexchange.com/q/642219/38080)
+ - Added proximity switches, suggested by [Anisio Rogerio Braga](https://github.com/circuitikz/circuitikz/issues/631)
+ - Added partially drawn tube and transistor borders, suggested by [Jether Fernandes Reis](https://github.com/circuitikz/circuitikz/issues/602)
+
* Version 1.5.1 (2022-04-26)
Bug fix release.
diff --git a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
index 283d1ca4f1e..ded454a0281 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
@@ -5,6 +5,27 @@ full list of changes.
\begin{itemize}
\item
+ Version 1.5.2 (2022-05-08)
+
+ Adding a couple of new component and a nice feature to transistors and
+ tubes.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Added TVS diodes (transorb), suggested by
+ \href{https://tex.stackexchange.com/q/642219/38080}{Anisio Rogerio
+ Braga}
+ \item
+ Added proximity switches, suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/631}{Anisio
+ Rogerio Braga}
+ \item
+ Added partially drawn tube and transistor borders, suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/602}{Jether
+ Fernandes Reis}
+ \end{itemize}
+\item
Version 1.5.1 (2022-04-26)
Bug fix release.
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
index 4d8265968eb..b03c2d5f54c 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
index 04431723a11..74d74b4dcd8 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
@@ -2339,6 +2339,8 @@ The package options \texttt{fulldiode}, \texttt{strokediode}, and \texttt{emptyd
\circuitdescbip*[emptylaserdiode]{empty laser diode}{Empty laser diode\footnotemark}{lasD}
\footnotetext{Added by André Alves in \texttt{v1.4.4}}
\circuitdescbip*[emptyvarcap]{empty varcap}{Empty varcap}{VCo}
+ \circuitdescbip*[emptytvsdiode]{empty TVS diode}{Empty TVS diode, transorb\footnotemark}{tvsDo}
+ \footnotetext{Transobs were suggested by \href{Anisio Braga}{https://tex.stackexchange.com/q/642219/38080}}
\circuitdescbip*[emptybidirectionaldiode]{empty bidirectionaldiode}{Empty bidirectionaldiode}{biDo}
\circuitdescbip[fulldiode] {full diode}{Full diode}{D*}
\circuitdescbip[fullsdiode]{full Schottky diode}{Full Schottky diode}{sD*}
@@ -2349,6 +2351,7 @@ The package options \texttt{fulldiode}, \texttt{strokediode}, and \texttt{emptyd
\circuitdescbip[fulllediode]{full led}{Full led}{leD*}
\circuitdescbip[fulllaserdiode]{full laser diode}{Full laser diode}{lasD*}
\circuitdescbip[fullvarcap]{full varcap}{Full varcap}{VC*}
+ \circuitdescbip[fulltvsdiode]{full TVS diode}{Full TVS diode, transorb}{tvsD*}
\circuitdescbip[fullbidirectionaldiode]{full bidirectionaldiode}{Full bidirectionaldiode}{biD*}
\end{groupdesc}
@@ -3977,6 +3980,8 @@ The position of the circle on collector and emitter by default is the one shown
relative thickness & 1.0 & multiply the class thickness \\
color & default & stroke color: \texttt{default} is the same as the component \\
dash & none & dash pattern: none means unbroken line\footnotemark \\
+ partial borders & none & draw only part of the circle border: none means draw all \\
+ partial border dash & \{\{2pt\}\{2pt\}\} & dash pattern used in partial borders \\
\bottomrule
\end{tabular}
\footnotetext{Follows the syntax of the pattern sequence \texttt{\textbackslash pgfsetdash} --- see \TikZ{} manual for details; phase is always zero. Basically you pass pairs of dash-length -- blank-length dimensions, see the examples.}
@@ -4007,6 +4012,48 @@ Finally, using the class style you can do quite interesting things.
\end{circuitikz}
\end{LTXexample}
+\paragraph{Partially drawn circle borders}
+
+In some circuits, transistor are drawn with partial or dashed border (to convey the meaning of several active components encased in the same physical package, or to signify thermal contact). To achieve this effect, you can use the \texttt{transistor circle/partial border}\footnote{Suggested by \href{https://github.com/circuitikz/circuitikz/issues/602}{Jether Fernandes Reis} for tubes, implemented by Romano in \texttt{v1.5.2}.} key (default \texttt{none}). This key can be set to \texttt{none}, or must be a sequence of \textbf{exactly} 4 numbers, that can have value \texttt{0}, \texttt{1}, or \texttt{2}. Each number define the style of a part of the border to be not drawn, solid or dashed respectively.
+
+The part of the border are numbered from 1 to 4 as shown below:
+\begin{quote}
+\begin{circuitikz}[circuitikz/transistors/fill=cyan!20,
+ circuitikz/transistor circle/partial borders=1212]
+ \draw (0,0) node[npn, tr circle](T){};
+ \draw[red, font=\ttfamily\small\bfseries]
+ ([shift={(.3,-.2)}]T.north east) node{1}
+ ([shift={(.3,.2)}]T.south east) node{2}
+ ([shift={(.2,.2)}]T.south west) node{3}
+ ([shift={(.2,-.2)}]T.north west) node{4}
+ ;
+ \end{circuitikz}
+\end{quote}
+The dashed line pattern can be changed by setting the key \texttt{transistor circle/partial border dash} (default \verb|{{2pt}{2pt}}|). Be careful with the extra set of braces here.
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[]
+ \ctikzset{transistors/thickness=4, transistors/fill=cyan!30,
+ transistor circle/relative thickness=0.25,
+ transistor circle/partial borders=2211}
+ \draw (0,0) node[npn, tr circle](Q1){};
+ \ctikzset{transistor circle/dash={{2pt}{2pt}}}
+ \draw (1.5,0) node[npn, tr circle, xscale=-1](Q2){};
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[]
+ \ctikzset{transistors/thickness=4, transistors/fill=cyan!30,
+ transistor circle/relative thickness=0.25,
+ transistor circle/partial borders=0011}
+ \draw (0,0) node[npn, tr circle](Q1){};
+ \ctikzset{transistor circle/dash={{2pt}{2pt}}}
+ \draw (1.5,0) node[npn, tr circle, xscale=-1](Q2){};
+ \draw[dashed] (Q1.circle top) -- (Q2.circle top);
+ \draw[dashed] (Q1.circle bottom) -- (Q2.circle bottom);
+\end{circuitikz}
+\end{LTXexample}
\subsubsection{Transistors anchors}
@@ -4094,6 +4141,12 @@ Additionally, you can access the position for the flyback diodes and possibly sn
\showanchors{pnp}{}(body C in/-45/0.4, body E in/45/0.4, body C out/0/0.4, body E out/0/0.4)
\end{quote}
+Transistor circles also have several anchors on them:
+\begin{quote}
+\showanchors{npn, tr circle}{}(circle center/-135/0.6, circle top/90/0.3, circle left/180/0.2, circle right/0/0.2, circle bottom/-90/0.3, circle C/45/0.2, circle E/-45/0.2)
+\showanchors{pigfete, bodydiode, tr circle}{}(circle center/-135/0.6, circle top/90/0.3, circle left/180/0.2, circle right/0/0.2, circle bottom/-90/0.3, circle C/-45/0.2, circle E/45/0.2)
+\end{quote}
+
The multi-terminal transistors have all the geographical anchors; note though that the \texttt{center} anchor is not the geometrical center of the component, but the logical one (at the same height than the base).
The additional anchors \texttt{vcenter} (vertical geometric center of the collector--emitter zone) and \texttt{gcenter} (graphical center) are provided, as shown in the following picture. They have no bodydiode anchors nor \texttt{inner \emph{up/down}} ones.
@@ -4301,7 +4354,7 @@ Example triode amplifier:
\end{circuitikz}
\end{lstlisting}
-\begin{circuitikz}
+\begin{circuitikz}[scale=0.7, transform shape]
\draw (0,0) node (start) {}
to[sV=$V_i$] ++(0,2+\ctikzvalof{tubes/height})
to[C=$C_i$] ++(2,0) coordinate(Rg)
@@ -4321,6 +4374,72 @@ Example triode amplifier:
\draw (Tri.east) node[right] {12AX7};
\end{circuitikz}
+\subsubsection{Tubes anchors}
+
+Apart from the geographic anchors, which take into account the leads of the components, you have several anchors on the border:
+\begin{quote}
+\geolrcoord{pentode, scale=0.8}
+\geolrcoord{triode, circuitikz/tubes/width=1.4, circuitikz/tubes/height=1, scale=0.8}
+\geolrcoord{triode, circuitikz/tubes/width=1, circuitikz/tubes/height=1, scale=0.8}
+
+\showanchors{pentode, circuitikz/tubes/height=1.8}{}(%
+tube top/90/0.3, tube left/180/0.2, tube right/0/0.2, tube bottom/-90/0.3,
+tube top right/30/0.2, tube top left/150/0.4, tube bottom right/-45/0.4, tube bottom left/-150/0.2,
+tube top center/75/0.5, tube bottom center/-105/0.5)
+\showanchors{pentode,circuitikz/tubes/width=2.6, circuitikz/tubes/tube radius=0.3}{}(%
+tube top/90/0.5, tube left/160/0.5, tube right/0/0.2, tube bottom/-90/0.6,
+tube top right/70/0.4, tube top left/150/0.4, tube bottom right/-45/0.4, tube bottom left/-120/0.4,
+tube right center/30/0.4, tube left center/-120/0.4)
+\end{quote}
+
+\subsubsection{Partially drawn tube borders}\label{sec:partial-tube-borders}
+
+In some circuits, tubes are drawn with partial or dashed border (to convey the meaning of several active components encased in the same physical tube). To achieve this effect, you can use the \texttt{tubes/partial border}\footnote{Suggested by \href{https://github.com/circuitikz/circuitikz/issues/602}{Jether Fernandes Reis}, implemented by Romano in \texttt{v1.5.2}.} key (default \texttt{none}). This key can be set to \texttt{none}, or must be a sequence of \textbf{exactly} 6 numbers, that can have value \texttt{0}, \texttt{1}, or \texttt{2}. Each number define the style of a part of the border to be not drawn, solid or dashed respectively.
+
+The part of the border are numbered from 1 to 6 as shown below:
+\begin{quote}
+\begin{circuitikz}[circuitikz/tubes/fill=cyan!20,
+ circuitikz/tubes/partial borders=121212]
+ \draw (0,0) node[pentode,anchor=control](V){};
+ \draw (4,0) node[pentode,anchor=control,
+ circuitikz/tubes/width=1.4,
+ circuitikz/tubes/height=1](H){};
+ \draw[red, font=\ttfamily\small\bfseries]
+ ([shift={(-.2,-.2)}]V.ne) node{1}
+ ([shift={(.1,0)}]V.e) node{2}
+ ([shift={(-.2,.2)}]V.se) node{3}
+ ([shift={(.2,.2)}]V.sw) node{4}
+ ([shift={(-.1,0)}]V.w) node{5}
+ ([shift={(.2,-.2)}]V.nw) node{6}
+ ([shift={(.2,-.2)}]H.nw) node{1}
+ ([shift={(0,.1)}]H.n) node{2}
+ ([shift={(-.2,-.2)}]H.ne) node{3}
+ ([shift={(-.2,.2)}]H.se) node{4}
+ ([shift={(0,-.1)}]H.s) node{5}
+ ([shift={(.2,.2)}]H.sw) node{6}
+ ;
+ \end{circuitikz}
+\end{quote}
+(notice that the straight parts, if they exist, are numbered \texttt{2} and \texttt{5} in both tubes, vertical or horizontal).
+
+The dashed line pattern can be changed by setting the key \texttt{tubes/partial border dash} (default \verb|{{2pt}{2pt}}|).\footnote{Follows the syntax of the pattern sequence \texttt{\textbackslash pgfsetdash} --- see \TikZ{} manual for details; phase is always zero. Basically you pass pairs of dash-length -- blank-length dimensions, see the examples.} Be careful with the extra set of braces here.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[circuitikz/tubes/fill=cyan!20,
+ circuitikz/tubes/partial borders=012012]
+ \draw (0,0) node[pentode]{};
+ \draw (2,0) node[pentode,
+ circuitikz/tubes/width=1.4,
+ circuitikz/tubes/height=1]{};
+ \draw (1,-2) node[triode,
+ circuitikz/tubes/height=1,
+ circuitikz/tubes/partial border dash=%
+ {{3pt}{1pt}{1pt}{1pt}}]{};
+\end{circuitikz}
+\end{LTXexample}
+
+
+
\subsubsection{Other tubes-like components}
The \texttt{magnetron} and \texttt{dynode} shapes will also scale with \texttt{tubes/scale}.
@@ -5199,6 +5318,31 @@ Finally, the switches are normally drawn using the \texttt{ocirc} shape, but you
\end{circuitikz}
\end{LTXexample}
+\subsubsection{Proximity switches}
+
+\begin{groupdesc}
+ \circuitdesc*{proximeter}{proximeter}{text}(hlines nw/135/0.4, hlines ne/45/0.4, hlines sw/-135/0.4, hlines se/-45/0.4, center/-90/0.4)
+ \circuitdescbip*{inline proximeter}<proximeter>{proximeter switch, inline}{}(left/135/0.4, right/45/0.4)
+\end{groupdesc}
+
+The \texttt{proximeter} shape\footnote{Suggested by \href{https://github.com/circuitikz/circuitikz/issues/631}{Anisio Rogerio Braga}, implemented in \texttt{v1.5.2}; see also \href{https://knowledge.autodesk.com/support/autocad-electrical/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-Electrical/files/GUID-1B18023D-241C-4E50-822A-94F873FC258B-htm.html}{here}.} can be used as a dipole with the \texttt{inline proximeter} variant.
+
+It has been assigned to the \texttt{switches} class; you can adjust the (relative) thickness of the inside horizontal lines with the key \texttt{proximeter/hlines thickness} (default \texttt{0.5}) and their vertical position with \texttt{proximeter/hlines position} (default \texttt{0.3}). You can also change the default size of \emph{all} proximeter symbols by changing \texttt{proximeter/width} (only safe at picture level; better set in the preamble if you need to change it. The default value is \texttt{0.3}).
+
+Notice in the following example that, as ever for node-type shape, the text is not included in the bounding box:
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \tikzset{small up proxi/.style={proximeter, solid,
+ circuitikz/switches/scale=0.707,
+ circuitikz/proximeter/hlines thickness=1,
+ circuitikz/proximeter/hlines position=0.1}}
+ \draw (0,0) to[inline proximeter, l=P1] ++(2,0)
+ to[ccgsw, name=P2] ++(2,0);
+ \draw[dashed] (P2.mid) -- ++(0,0.5)
+ node[small up proxi, above](P2p){Fe}
+ (P2p.north) ++ (0,0.5); % extend bounding box
+\end{tikzpicture}
+\end{LTXexample}
\subsubsection{Rotary switches}
diff --git a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
index 261eeafcc52..7cf1d37aa07 100644
--- a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
+++ b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
@@ -10,8 +10,8 @@
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
-\def\pgfcircversion{1.5.1}
-\def\pgfcircversiondate{2022/02/26}
+\def\pgfcircversion{1.5.2}
+\def\pgfcircversiondate{2022/05/08}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
index 94212962fb4..d09e907a8de 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
@@ -3239,6 +3239,9 @@
\ctikzset{bipoles/diode/height/.initial=.50}
\ctikzset{bipoles/diode/width/.initial=.40}
+% for horizontally-double-sided diodes, like tvs diodes (transorb)
+\ctikzset{bipoles/ddiode/width/.initial=.80}% must be 2*diode width
+% for vertically taller diodes
\ctikzset{bipoles/bidirectionaldiode/height/.initial=1.1}
\ctikzset{bipoles/bidirectionaldiode/width/.initial=1}
\ctikzset{bipoles/bidirectionaldiode/diode width left/.initial=.3}
@@ -3803,6 +3806,65 @@
\pgfusepath{draw}
}
+%% Transorbs
+%% Empty zigzag TVS diode (transorb)
+\pgfcircdeclarebipolescaled{diodes}
+{% fix the anchor border
+ \pgfcirc@border@extend@updown{1.3}{1.3}
+}
+{\ctikzvalof{bipoles/diode/height}}
+{emptytvsdiode}
+{\ctikzvalof{bipoles/diode/height}}
+{\ctikzvalof{bipoles/ddiode/width}}
+{
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfscope
+ \pgfscope
+ \pgftransformxscale{0.5}
+ \pgftransformxshift{\pgf@circ@res@left}
+ \pgf@circ@basicdiodeshape
+ \endpgfscope
+ \pgfscope
+ \pgftransformxscale{-0.5}
+ \pgftransformxshift{\pgf@circ@res@left}
+ \pgf@circ@basicdiodeshape
+ \endpgfscope
+ \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{1.3\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{1.3\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+%% Black zigzag TVS diode (transorb)
+\pgfcircdeclarebipolescaled{diodes}
+{% fix the anchor border
+ \pgfcirc@border@extend@updown{1.3}{1.3}
+}
+{\ctikzvalof{bipoles/diode/height}}
+{fulltvsdiode}
+{\ctikzvalof{bipoles/diode/height}}
+{\ctikzvalof{bipoles/ddiode/width}}
+{
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfscope
+ \pgftransformxscale{0.5}
+ \pgftransformxshift{\pgf@circ@res@left}
+ \pgf@circ@fulldiode@triangle@shift
+ \endpgfscope
+ \pgfscope
+ \pgftransformxscale{-0.5}
+ \pgftransformxshift{\pgf@circ@res@left}
+ \pgf@circ@fulldiode@triangle@shift
+ \endpgfscope
+ \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{1.3\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{1.3\pgf@circ@res@down}}
+ \pgfusepath{draw}
+}
+
+
%% Empty bidirectionaldiode
\pgfcircdeclarebipolescaled{diodes}
{}
@@ -4174,6 +4236,8 @@
\pgfcirc@style@to@style{#1 photodiode}{pD#2}
\pgfcirc@activate@bipole{l}{#1varcap}{#1varcap}{#1 varcap}
\pgfcirc@style@to@style{#1 varcap}{VC#2}
+ \pgfcirc@activate@bipole{l}{#1tvsdiode}{#1tvsdiode}{#1 TVS diode}
+ \pgfcirc@style@to@style{#1 TVS diode}{tvsD#2}
\pgfcirc@activate@bipole{l}{#1bidirectionaldiode}{#1bidirectionaldiode}{#1 bidirectionaldiode}
\pgfcirc@style@to@style{#1 bidirectionaldiode}{biD#2}
\pgfcirc@activate@bipole{l}{#1thyristor}{#1thyristor}{#1 thyristor}
@@ -4210,6 +4274,8 @@
\pgfcirc@style@to@style{#1 photodiode}{pD#2}
\pgfcirc@node@to@style{l}{emptyvarcap}{#1 varcap}{\circuitikzbasekey/bipole/is strokedsymbol=true}
\pgfcirc@style@to@style{#1 varcap}{VC#2}
+ \pgfcirc@node@to@style{l}{emptytvsdiode}{#1 TVS diode}{\circuitikzbasekey/bipole/is strokedsymbol=true}
+ \pgfcirc@style@to@style{#1 TVS diode}{tvsD#2}
\pgfcirc@node@to@style{l}{emptybidirectionaldiode}{#1 bidirectionaldiode}{\circuitikzbasekey/bipole/is strokedsymbol=true}
\pgfcirc@style@to@style{#1 bidirectionaldiode}{biD#2}
\pgfcirc@node@to@style{l}{emptythyristor}{#1 thyristor}{\circuitikzbasekey/bipole/is strokedsymbol=true}
@@ -4242,12 +4308,12 @@
\pgfcirc@style@to@style{led}{leD}
\pgfcirc@style@to@style{\pgfcircdiodestylemacro photodiode}{photodiode}
\pgfcirc@style@to@style{photodiode}{pD}
-
\pgfcirc@style@to@style{\pgfcircdiodestylemacro laser diode}{laser diode}
\pgfcirc@style@to@style{laser diode}{lasD}
-
\pgfcirc@style@to@style{\pgfcircdiodestylemacro varcap}{varcap}
\pgfcirc@style@to@style{varcap}{VC}
+\pgfcirc@style@to@style{\pgfcircdiodestylemacro TVS diode}{TVS diode}
+\pgfcirc@style@to@style{TVS diode}{tvsD}
\pgfcirc@style@to@style{\pgfcircdiodestylemacro bidirectionaldiode}{bidirectionaldiode}
\pgfcirc@style@to@style{bidirectionaldiode}{biD}
\pgfcirc@style@to@style{\pgfcircdiodestylemacro thyristor}{thyristor}
@@ -4966,6 +5032,90 @@
\pgfcirc@activate@bipole{l}{cuteopeningswitch}{cuteopeningswitch}{cute opening switch}
\pgfcirc@style@to@style{cute opening switch}{cogsw}% %>>>
+%% Proximity switch auxiliary shapes%<<<
+%% proximeter shape, for usage with switches
+\ctikzset{proximeter/width/.initial=0.3}
+\ctikzset{proximeter/hlines thickness/.initial=0.5}
+\ctikzset{proximeter/hlines position/.initial=0.3}
+\pgfdeclareshape{proximeter}
+{
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{switches}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ \savedmacro{\hlinepos}{\edef\hlinepos{\ctikzvalof{proximeter/hlines position}}}
+ \savedanchor\northeast{%
+ \pgfmathsetlength{\pgf@y}{\ctikzvalof{proximeter/width}*\ctikzvalof{\ctikzclass/scale}*\pgf@circ@Rlen}
+ \pgf@x=\pgf@y
+ }
+ \anchor{center}{\pgfpointorigin}
+ % geo anchors based on north-east
+ \pgfcirc@northeast@symmetric@geoanchors
+ \anchor{text}{%
+ \northeast
+ \pgf@x=\dimexpr -.5\wd\pgfnodeparttextbox\relax
+ \advance\pgf@y by .6\ht\pgfnodeparttextbox\relax
+ }
+ \anchor{hlines ne}{%
+ \northeast
+ \pgf@y=\hlinepos\pgf@y
+ \advance\pgf@x by -\pgf@y
+ }
+ \anchor{hlines nw}{%
+ \northeast
+ \pgf@y=\hlinepos\pgf@y
+ \advance\pgf@x by -\pgf@y\pgf@x=-\pgf@x
+ }
+ \anchor{hlines se}{%
+ \northeast
+ \pgf@y=\hlinepos\pgf@y
+ \advance\pgf@x by -\pgf@y
+ \pgf@y=-\pgf@y
+ }
+ \anchor{hlines sw}{%
+ \northeast
+ \pgf@y=\hlinepos\pgf@y
+ \advance\pgf@x by -\pgf@y\pgf@x=-\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchorborder{
+ % \typeout{IN\space X:\the\pgf@x\space Y:\the\pgf@y}
+ \pgfmathsetmacro{\@@switchx}{ifthenelse(\pgf@x>0,1,-1)}
+ \pgfmathsetmacro{\@@switchy}{ifthenelse(\pgf@y>0,1,-1)}
+ \pgfmathsetlength{\pgf@xa}{abs(\pgf@x)}
+ \pgfmathsetlength{\pgf@ya}{abs(\pgf@y)}
+ \pgfextracty{\pgf@circ@res@up}{\northeast}
+ % \typeout{MID\space X:\the\pgf@xa\space Y:\the\pgf@ya\space L:\the\pgf@circ@res@up}
+ % \typeout{MID\space SX:\@@switchx\space SY:\@@switchy}
+ \pgfpointintersectionoflines
+ {\pgfpointorigin}{\pgfqpoint{\pgf@xa}{\pgf@ya}}
+ {\pgfqpoint{0pt}{\pgf@circ@res@up}}{\pgfqpoint{\pgf@circ@res@up}{0pt}}
+ % \typeout{CROSS \space X:\the\pgf@x\space Y:\the\pgf@y}
+ \pgf@x=\@@switchx\pgf@x
+ \pgf@y=\@@switchy\pgf@y
+ }
+ \pgf@circ@draw@component{
+ \northeast\pgf@circ@res@temp=\pgf@y
+ \pgf@circ@setcolor
+ \pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@temp}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@temp}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@temp}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \pgfsetlinewidth{\ctikzvalof{proximeter/hlines thickness}*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@up}{\hlinepos*\pgf@circ@res@temp}
+ \pgfmathsetlength{\pgf@circ@res@right}{\pgf@circ@res@temp-\pgf@circ@res@up}
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{-\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ }
+
+}
+\pgfcirc@node@to@path{proximeter}{inline proximeter}{}
+% %>>>
+
%%%%%%%%%%%%%%%%%
%% Instruments
%%%%%%%%%%%%%%%%%
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
index 711276dd77f..596171c5add 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
@@ -3370,11 +3370,64 @@
\newif\ifpgf@circ@trcircle\pgf@circ@trcirclefalse
\ctikzset{tr circle/.is if=pgf@circ@trcircle}
\tikzset{tr circle/.is if=pgf@circ@trcircle}
+% partial borders styles
+% this can be "none" or 4 numbers saying the style for each part:
+% 0 --- nothing, 1 --- solid, 2 --- dashed
+\ctikzset{transistor circle/partial borders/.initial=none} % Value none for normal borders
+\ctikzset{transistor circle/partial border dash/.initial={{2pt}{2pt}}}
%%>>>
%% definitions of transistor shapes%<<<
%
+% draw partial transistor outline
+%
+\def\pgf@circ@trcircle@split#1#2#3#4\relax{%split the six numbers
+ \edef\@@a{#1}\edef\@@b{#2}\edef\@@c{#3}\edef\@@d{#4}%
+}
+\def\pgf@circ@trcircle@setdash{%
+ \edef\@@dash{\ctikzvalof{transistor circle/partial border dash}}%
+ % \typeout{DASH:\@@dash}%
+ \expandafter\pgfsetdash\expandafter{\@@dash}{0pt}%
+}
+% this is the same as the tubes' one, but let's keep it separated
+\def\pgf@circ@trcircle@draw@style#1{%
+ \ifcase#1
+ \pgfusepath{discard}% case 0, will discard the path
+ \or
+ \pgfsetdash{}{0pt}\pgfusepath{draw}% case 1, solid
+ \or
+ \pgf@circ@trcircle@setdash\pgfusepath{draw}% case 2, dashed
+ \else
+ \pgfutil@packagewarning{circuitikz}{Transistor circle draw style not known!}%
+ \pgfusepath{draw}%
+ \fi
+}
+%
% add a circle to the transistor:
+\def\pgf@circ@trcircle@draw@partial#1{%
+ \expandafter\pgf@circ@trcircle@split#1\relax
+ \typeout{PARTIAL: \@@a:\@@b:\@@c:\@@d}
+ \pgfscope % right side upper arc
+ \pgfpathmoveto{\pgfpoint{\circleleft+\circleradius}{\circleradius}}
+ \pgfpatharc{90}{0}{\circleradius}
+ \pgf@circ@trcircle@draw@style{\@@a}
+ \endpgfscope
+ \pgfscope % right side lower arc
+ \pgfpathmoveto{\pgfpoint{\circleleft+2*\circleradius}{0pt}}
+ \pgfpatharc{0}{-90}{\circleradius}
+ \pgf@circ@trcircle@draw@style{\@@b}
+ \endpgfscope
+ \pgfscope % left side lower arc
+ \pgfpathmoveto{\pgfpoint{\circleleft+\circleradius}{-\circleradius}}
+ \pgfpatharc{-90}{-180}{\circleradius}
+ \pgf@circ@trcircle@draw@style{\@@c}
+ \endpgfscope
+ \pgfscope % left side upper arc
+ \pgfpathmoveto{\pgfpoint{\circleleft}{0pt}}
+ \pgfpatharc{-180}{-270}{\circleradius}
+ \pgf@circ@trcircle@draw@style{\@@d}
+ \endpgfscope
+}
%
\def\pgfcirc@transistorcircle{
\ifpgf@circ@trcircle
@@ -3394,7 +3447,15 @@
% \pgfmathsetlength{\pgf@circ@res@temp}{((#2+\extrabodydiodelen)-(#1)+(#3)*(#3)/((#2+\extrabodydiodelen)-(#1)))/2}
% \pgfpathcircle{\pgfpoint{#1+\pgf@circ@res@temp}{0pt}}{\pgf@circ@res@temp}
\pgfpathcircle{\pgfpoint{\circleleft+\circleradius}{0pt}}{\circleradius}
- \pgf@circ@draworfill
+ \edef\@@partial{\ctikzvalof{transistor circle/partial borders}}
+ \ifx\@@partial\pgf@nonetext
+ % Circle fill and draw if it's not partial... for speed
+ \pgf@circ@draworfill
+ \else
+ % otherwise, just fill and do the partial fill
+ \pgf@circ@maybefill
+ \pgf@circ@trcircle@draw@partial{\@@partial}
+ \fi
\endpgfscope
\fi
}
@@ -3539,6 +3600,19 @@
\anchor{circle center}{
\pgf@y=0pt\pgf@x=\circleleft\advance\pgf@x by\circleradius
}
+ \anchor{circle top}{
+ \pgf@y=\circleradius\pgf@x=\circleleft\advance\pgf@x by\circleradius
+ }
+ \anchor{circle bottom}{
+ \pgf@y=-\circleradius\pgf@x=\circleleft\advance\pgf@x by\circleradius
+ }
+ \anchor{circle left}{
+ \pgf@y=0pt\pgf@x=\circleleft
+ }
+ \anchor{circle right}{
+ \pgf@y=0pt\pgf@x=\circleleft
+ \advance\pgf@x by \circleradius\advance\pgf@x by \circleradius
+ }
\savedanchor{\centergap}{% this is the center position between gate and base
% get "left"
\pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
@@ -7965,6 +8039,11 @@
\ctikzset{tubes/cathode right extend/.initial=0.075} % extension at the right side
\ctikzset{tubes/filament distance/.initial=0.1} % distance from cathode
\ctikzset{tubes/filament angle/.initial=15} % Angle from centerpoint
+% partial borders styles
+% this can be "none" or 6 numbers saying the style for each part:
+% 0 --- nothing, 1 --- solid, 2 --- dashed
+\ctikzset{tubes/partial borders/.initial=none} % Value none for normal borders
+\ctikzset{tubes/partial border dash/.initial={{2pt}{2pt}}}
\ctikzset{/tikz/circuitikz/tripoles/magnetron/width/.initial=1}
@@ -8138,27 +8217,135 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Electronic tubes, submitted by J. op den Brouw
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
+%
+% draw partial tube outline
+%
+\def\pgf@circ@tubes@split#1#2#3#4#5#6\relax{%split the six numbers
+ \edef\@@a{#1}\edef\@@b{#2}\edef\@@c{#3}\edef\@@d{#4}\edef\@@e{#5}\edef\@@f{#6}%
+}
+\def\pgf@circ@tubes@setdash{%
+ \edef\@@dash{\ctikzvalof{tubes/partial border dash}}%
+ % \typeout{DASH:\@@dash}%
+ \expandafter\pgfsetdash\expandafter{\@@dash}{0pt}%
+}
+% this is the same as the transistor circles' one, but let's keep it separated
+\def\pgf@circ@tubes@draw@style#1{%
+ \ifcase#1
+ \pgfusepath{discard}% case 0, will discard the path
+ \or
+ \pgfsetdash{}{0pt}\pgfusepath{draw}% case 1, solid
+ \or
+ \pgf@circ@tubes@setdash\pgfusepath{draw}% case 2, dashed
+ \else
+ \pgfutil@packagewarning{circuitikz}{Tube border draw style not known!}%
+ \pgfusepath{draw}%
+ \fi
+}
+\def\pgf@circ@tubes@draw@partial#1{%
+ \expandafter\pgf@circ@tubes@split#1\relax
+ % \typeout{PARTIAL: \@@a:\@@b:\@@c:\@@d:\@@e:\@@f}
+ \ifdim\ctikzvalof{tubes/width}pt>\ctikzvalof{tubes/height}pt\relax
+ % horizontal tube
+ \pgfutil@tempdima=\pgf@circ@res@right
+ \advance\pgfutil@tempdima by -\pgf@circ@res@up
+ \pgfscope % left side upper arc
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{0pt}}
+ \pgfpatharc{180}{90}{\pgf@circ@res@up}
+ \pgf@circ@tubes@draw@style{\@@a}
+ \endpgfscope
+ \pgfscope % upper horizontal part
+ \pgfpathmoveto{\pgfpoint{-\pgfutil@tempdima}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgfutil@tempdima}{\pgf@circ@res@up}}
+ \pgf@circ@tubes@draw@style{\@@b}
+ \endpgfscope
+ \pgfscope % right side upper arc
+ \pgfpathmoveto{\pgfpoint{\pgfutil@tempdima}{\pgf@circ@res@up}}
+ \pgfpatharc{90}{0}{\pgf@circ@res@up}
+ \pgf@circ@tubes@draw@style{\@@c}
+ \endpgfscope
+ \pgfscope % right side lower arc
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpatharc{0}{-90}{\pgf@circ@res@up}
+ \pgf@circ@tubes@draw@style{\@@d}
+ \endpgfscope
+ \pgfscope % lower horizontal part
+ \pgfpathmoveto{\pgfpoint{\pgfutil@tempdima}{-\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-\pgfutil@tempdima}{-\pgf@circ@res@up}}
+ \pgf@circ@tubes@draw@style{\@@e}
+ \endpgfscope
+ \pgfscope % left side lower arc
+ \pgfpathmoveto{\pgfpoint{-\pgfutil@tempdima}{-\pgf@circ@res@up}}
+ \pgfpatharc{270}{180}{\pgf@circ@res@up}
+ \pgf@circ@tubes@draw@style{\@@f}
+ \endpgfscope
+ \else
+ % vertical tube
+ \pgfutil@tempdima=\pgf@circ@res@up
+ \advance\pgfutil@tempdima by -\pgf@circ@res@right
+ \pgfscope % left side upper arc
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfpatharc{90}{0}{\pgf@circ@res@right}
+ \pgf@circ@tubes@draw@style{\@@a}
+ \endpgfscope
+ \pgfscope % right vertical part
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgfutil@tempdima}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgfutil@tempdima}}
+ \pgf@circ@tubes@draw@style{\@@b}
+ \endpgfscope
+ \pgfscope % right side lower arc
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{-\pgfutil@tempdima}}
+ \pgfpatharc{0}{-90}{\pgf@circ@res@right}
+ \pgf@circ@tubes@draw@style{\@@c}
+ \endpgfscope
+ \pgfscope % right side lower arc
+ \pgfpathmoveto{\pgfpoint{0pt}{-\pgf@circ@res@up}}
+ \pgfpatharc{-90}{-180}{\pgf@circ@res@right}
+ \pgf@circ@tubes@draw@style{\@@d}
+ \endpgfscope
+ \pgfscope % left vertical part
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{-\pgfutil@tempdima}}
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdima}}
+ \pgf@circ@tubes@draw@style{\@@e}
+ \endpgfscope
+ \pgfscope % left side upper arc
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdima}}
+ \pgfpatharc{180}{90}{\pgf@circ@res@right}
+ \pgf@circ@tubes@draw@style{\@@f}
+ \endpgfscope
+ \fi
+}
% Draw tube outline
\def\pgf@circ@tubes@drawtube{%
- \ifdim\ctikzvalof{tubes/width}pt>\ctikzvalof{tubes/height}pt\relax
- \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
- \pgfutil@tempdima=\pgf@circ@res@right
- \advance\pgfutil@tempdima by -\pgf@circ@res@up
- \pgfpathlineto{\pgfpoint{\pgfutil@tempdima}{\pgf@circ@res@up}}
- \pgfpatharc{90}{-90}{\pgf@circ@res@up}
- \pgfpathlineto{\pgfpoint{-\pgfutil@tempdima}{-\pgf@circ@res@up}}
- \pgfpatharc{270}{90}{\pgf@circ@res@up}
- \else
- \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{0pt}}
- \pgfutil@tempdima=\pgf@circ@res@up
- \advance\pgfutil@tempdima by -\pgf@circ@res@right
- \pgfpathlineto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdima}}
- \pgfpatharc{180}{0}{\pgf@circ@res@right}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgfutil@tempdima}}
- \pgfpatharc{180}{0}{-\pgf@circ@res@right}
- \fi
- \pgfpathclose
+ \ifdim\ctikzvalof{tubes/width}pt>\ctikzvalof{tubes/height}pt\relax
+ % horizontal tube
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfutil@tempdima=\pgf@circ@res@right
+ \advance\pgfutil@tempdima by -\pgf@circ@res@up
+ \pgfpathlineto{\pgfpoint{\pgfutil@tempdima}{\pgf@circ@res@up}}
+ \pgfpatharc{90}{-90}{\pgf@circ@res@up}
+ \pgfpathlineto{\pgfpoint{-\pgfutil@tempdima}{-\pgf@circ@res@up}}
+ \pgfpatharc{270}{90}{\pgf@circ@res@up}
+ \else
+ % vertical tube
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{0pt}}
+ \pgfutil@tempdima=\pgf@circ@res@up
+ \advance\pgfutil@tempdima by -\pgf@circ@res@right
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdima}}
+ \pgfpatharc{180}{0}{\pgf@circ@res@right}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgfutil@tempdima}}
+ \pgfpatharc{180}{0}{-\pgf@circ@res@right}
+ \fi
+ \pgfpathclose
+ \edef\@@partial{\ctikzvalof{tubes/partial borders}}
+ \ifx\@@partial\pgf@nonetext
+ % Tube fill and draw if it's not partial... for speed
+ \pgf@circ@draworfill
+ \else
+ % otherwise, just fill and do the partial fill
+ \pgf@circ@maybefill
+ \pgf@circ@tubes@draw@partial{\@@partial}
+ %
+ \fi
}
%% The diode (tube), triode, tetrode and pentode only differ in the
@@ -8169,9 +8356,6 @@
\pgfdeclareshape{#1}{
\savedmacro{\ctikzclass}{\edef\ctikzclass{tubes}}
\saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
- \anchor{center}{
- \pgfpointorigin
- }
\savedanchor\northwest{%
\pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
\pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@scaled@Rlen
@@ -8182,40 +8366,58 @@
\pgf@x=-\pgf@circ@res@right
\pgf@x=.5\pgf@x
}
- \anchor{north} {%
- \northwest
- \pgf@x=0pt
- }
- \anchor{east}{%
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=0pt
- }
- \anchor{south}{%
- \northwest
- \pgf@y=-\pgf@y
- \pgf@x=0pt
- }
- \anchor{west}{%
- \northwest
- \pgf@y=0pt
- }
- \anchor{north west}{%
- \northwest
- }
- \anchor{north east}{%
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{south east}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
+ \savedanchor\tubene{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@circ@res@temp=\ctikzvalof{tubes/height}\pgf@circ@scaled@Rlen
+ \pgf@circ@res@other=\ctikzvalof{tubes/width}\pgf@circ@scaled@Rlen
+ \pgf@circ@res@up=\ctikzvalof{tubes/tube radius}\pgf@circ@res@temp
+ \pgf@circ@res@right=\ctikzvalof{tubes/tube radius}\pgf@circ@res@other
+ \pgf@y=\pgf@circ@res@up
+ \pgf@x=\pgf@circ@res@right
}
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
+ \savedanchor\tubesquarene{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@circ@res@temp=\ctikzvalof{tubes/height}\pgf@circ@scaled@Rlen
+ \pgf@circ@res@other=\ctikzvalof{tubes/width}\pgf@circ@scaled@Rlen
+ \pgf@circ@res@up=\ctikzvalof{tubes/tube radius}\pgf@circ@res@temp
+ \pgf@circ@res@right=\ctikzvalof{tubes/tube radius}\pgf@circ@res@other
+ \ifdim\ctikzvalof{tubes/width}pt>\ctikzvalof{tubes/height}pt\relax
+ % horizontal
+ \pgf@y=\pgf@circ@res@up
+ \pgf@x=\pgf@circ@res@right\advance\pgf@x by -\pgf@circ@res@up
+ \else
+ % vertical
+ \pgf@x=\pgf@circ@res@right
+ \pgf@y=\pgf@circ@res@up\advance\pgf@y by -\pgf@circ@res@right
+ \fi
}
+ \anchor{tube ne}{\tubene}
+ \anchor{tubesq ne}{\tubesquarene}
+ % tube shape anchors: geo
+ \anchor{tube top}{\tubene\pgf@x=0pt\relax}
+ \anchor{tube bottom}{\tubene\pgf@x=0pt\pgf@y=-\pgf@y}
+ \anchor{tube right}{\tubene\pgf@y=0pt\relax}
+ \anchor{tube left}{\tubene\pgf@y=0pt\pgf@x=-\pgf@x}
+ % tube shape straight part anchors
+ \anchor{tube top right}{\tubesquarene}
+ \anchor{tube bottom right}{\tubesquarene\pgf@y=-\pgf@y}
+ \anchor{tube top left}{\tubesquarene\pgf@x=-\pgf@x}
+ \anchor{tube bottom left}{\tubesquarene\pgf@y=-\pgf@y\pgf@x=-\pgf@x}
+ % tube shape centers
+ \anchor{tube top center}{\tubesquarene\pgf@x=0pt\relax}
+ \anchor{tube bottom center}{\tubesquarene\pgf@y=-\pgf@y\pgf@x=0pt\relax}
+ \anchor{tube right center}{\tubesquarene\pgf@y=0pt\relax}
+ \anchor{tube left center}{\tubesquarene\pgf@x=-\pgf@x\pgf@y=0pt\relax}
+ % rest of anchors
+ \anchor{center}{\pgfpointorigin}
+ % geo anchors based on north-west
+ \pgfcirc@northwest@symmetric@geoanchors
+ % text anchor
+ \anchor{text}{%
+ \northwest\pgf@x=-\pgf@x
+ \pgf@y=-.5\ht\pgfnodeparttextbox
+ }
+ % specific anchors
\anchor{anode} {%
\northwest
\pgf@x=0pt
@@ -8271,9 +8473,6 @@
\pgf@circ@res@up=0.5\pgf@circ@res@up
\pgf@circ@res@right=0.5\pgf@circ@res@right
- % Tube fill color (if any)
- \pgf@circ@draworfill
-
% Grid drawing
#3%
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
index 73ef1085793..cfd7d63e701 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
@@ -16,8 +16,8 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
-\def\pgfcircversion{1.5.1}
-\def\pgfcircversiondate{2022/02/26}
+\def\pgfcircversion{1.5.2}
+\def\pgfcircversiondate{2022/05/08}
\DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
\DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}