texlive[63269] Master/texmf-dist: circuitikz (9may22)
commits+karl at tug.org
commits+karl at tug.org
Mon May 9 22:28:17 CEST 2022
Revision: 63269
http://tug.org/svn/texlive?view=revision&revision=63269
Author: karl
Date: 2022-05-09 22:28:17 +0200 (Mon, 09 May 2022)
Log Message:
-----------
circuitikz (9may22)
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/pgfcircbipoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.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 2022-05-09 20:27:13 UTC (rev 63268)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md 2022-05-09 20:28:17 UTC (rev 63269)
@@ -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.
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2022-05-09 20:27:13 UTC (rev 63268)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2022-05-09 20:28:17 UTC (rev 63269)
@@ -5,6 +5,27 @@
\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.
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 2022-05-09 20:27:13 UTC (rev 63268)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex 2022-05-09 20:28:17 UTC (rev 63269)
@@ -2339,6 +2339,8 @@
\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 @@
\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 @@
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,7 +4012,49 @@
\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}
For \textsc{nmos}, \textsc{pmos}, \textsc{nfet}, \textsc{nigfete}, \textsc{nigfetd}, \textsc{pfet}, \textsc{pigfete}, and \textsc{pigfetd} transistors one has \texttt{base}, \texttt{gate}, \texttt{source} and \texttt{drain} anchors (which can be abbreviated with \texttt{B}, \texttt{G}, \texttt{S} and \texttt{D}):
@@ -4094,6 +4141,12 @@
\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 @@
\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 @@
\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,7 +5318,32 @@
\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}
Rotary switches are a kind of generic multipole switches; they are implemented as a strongly customizable element (and a couple of styles to simplify its usage). The basic element is the following one, and it has the same basic anchors of the cute switches, included the access to internal nodes (shown in blue here).
Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2022-05-09 20:27:13 UTC (rev 63268)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2022-05-09 20:28:17 UTC (rev 63269)
@@ -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]
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex 2022-05-09 20:27:13 UTC (rev 63268)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex 2022-05-09 20:28:17 UTC (rev 63269)
@@ -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 at border@extend at updown{1.3}{1.3}
+}
+{\ctikzvalof{bipoles/diode/height}}
+{emptytvsdiode}
+{\ctikzvalof{bipoles/diode/height}}
+{\ctikzvalof{bipoles/ddiode/width}}
+{
+ \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfscope
+ \pgfscope
+ \pgftransformxscale{0.5}
+ \pgftransformxshift{\pgf at circ@res at left}
+ \pgf at circ@basicdiodeshape
+ \endpgfscope
+ \pgfscope
+ \pgftransformxscale{-0.5}
+ \pgftransformxshift{\pgf at circ@res at left}
+ \pgf at circ@basicdiodeshape
+ \endpgfscope
+ \pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at left}{1.3\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at right}{1.3\pgf at circ@res at down}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+%% Black zigzag TVS diode (transorb)
+\pgfcircdeclarebipolescaled{diodes}
+{% fix the anchor border
+ \pgfcirc at border@extend at updown{1.3}{1.3}
+}
+{\ctikzvalof{bipoles/diode/height}}
+{fulltvsdiode}
+{\ctikzvalof{bipoles/diode/height}}
+{\ctikzvalof{bipoles/ddiode/width}}
+{
+ \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfscope
+ \pgftransformxscale{0.5}
+ \pgftransformxshift{\pgf at circ@res at left}
+ \pgf at circ@fulldiode at triangle@shift
+ \endpgfscope
+ \pgfscope
+ \pgftransformxscale{-0.5}
+ \pgftransformxshift{\pgf at circ@res at left}
+ \pgf at circ@fulldiode at triangle@shift
+ \endpgfscope
+ \pgfpathmoveto{\pgfpoint{0.4\pgf at circ@res at left}{1.3\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{0.4\pgf at circ@res at right}{1.3\pgf at circ@res at down}}
+ \pgfusepath{draw}
+}
+
+
%% Empty bidirectionaldiode
\pgfcircdeclarebipolescaled{diodes}
{}
@@ -4174,6 +4236,8 @@
\pgfcirc at style@to at style{#1 photodiode}{pD#2}
\pgfcirc at activate@bipole{l}{#1varcap}{#1varcap}{#1 varcap}
\pgfcirc at style@to at style{#1 varcap}{VC#2}
+ \pgfcirc at activate@bipole{l}{#1tvsdiode}{#1tvsdiode}{#1 TVS diode}
+ \pgfcirc at style@to at style{#1 TVS diode}{tvsD#2}
\pgfcirc at activate@bipole{l}{#1bidirectionaldiode}{#1bidirectionaldiode}{#1 bidirectionaldiode}
\pgfcirc at style@to at style{#1 bidirectionaldiode}{biD#2}
\pgfcirc at activate@bipole{l}{#1thyristor}{#1thyristor}{#1 thyristor}
@@ -4210,6 +4274,8 @@
\pgfcirc at style@to at style{#1 photodiode}{pD#2}
\pgfcirc at node@to at style{l}{emptyvarcap}{#1 varcap}{\circuitikzbasekey/bipole/is strokedsymbol=true}
\pgfcirc at style@to at style{#1 varcap}{VC#2}
+ \pgfcirc at node@to at style{l}{emptytvsdiode}{#1 TVS diode}{\circuitikzbasekey/bipole/is strokedsymbol=true}
+ \pgfcirc at style@to at style{#1 TVS diode}{tvsD#2}
\pgfcirc at node@to at style{l}{emptybidirectionaldiode}{#1 bidirectionaldiode}{\circuitikzbasekey/bipole/is strokedsymbol=true}
\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}
@@ -4242,12 +4308,12 @@
\pgfcirc at style@to at style{led}{leD}
\pgfcirc at style@to at style{\pgfcircdiodestylemacro photodiode}{photodiode}
\pgfcirc at style@to at style{photodiode}{pD}
-
\pgfcirc at style@to at style{\pgfcircdiodestylemacro laser diode}{laser diode}
\pgfcirc at style@to at style{laser diode}{lasD}
-
\pgfcirc at style@to at style{\pgfcircdiodestylemacro varcap}{varcap}
\pgfcirc at style@to at style{varcap}{VC}
+\pgfcirc at style@to at style{\pgfcircdiodestylemacro TVS diode}{TVS diode}
+\pgfcirc at style@to at style{TVS diode}{tvsD}
\pgfcirc at style@to at style{\pgfcircdiodestylemacro bidirectionaldiode}{bidirectionaldiode}
\pgfcirc at style@to at style{bidirectionaldiode}{biD}
\pgfcirc at style@to at style{\pgfcircdiodestylemacro thyristor}{thyristor}
@@ -4966,6 +5032,90 @@
\pgfcirc at activate@bipole{l}{cuteopeningswitch}{cuteopeningswitch}{cute opening switch}
\pgfcirc at style@to at 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 at x}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}}
+ \savedmacro{\hlinepos}{\edef\hlinepos{\ctikzvalof{proximeter/hlines position}}}
+ \savedanchor\northeast{%
+ \pgfmathsetlength{\pgf at y}{\ctikzvalof{proximeter/width}*\ctikzvalof{\ctikzclass/scale}*\pgf at circ@Rlen}
+ \pgf at x=\pgf at y
+ }
+ \anchor{center}{\pgfpointorigin}
+ % geo anchors based on north-east
+ \pgfcirc at northeast@symmetric at geoanchors
+ \anchor{text}{%
+ \northeast
+ \pgf at x=\dimexpr -.5\wd\pgfnodeparttextbox\relax
+ \advance\pgf at y by .6\ht\pgfnodeparttextbox\relax
+ }
+ \anchor{hlines ne}{%
+ \northeast
+ \pgf at y=\hlinepos\pgf at y
+ \advance\pgf at x by -\pgf at y
+ }
+ \anchor{hlines nw}{%
+ \northeast
+ \pgf at y=\hlinepos\pgf at y
+ \advance\pgf at x by -\pgf at y\pgf at x=-\pgf at x
+ }
+ \anchor{hlines se}{%
+ \northeast
+ \pgf at y=\hlinepos\pgf at y
+ \advance\pgf at x by -\pgf at y
+ \pgf at y=-\pgf at y
+ }
+ \anchor{hlines sw}{%
+ \northeast
+ \pgf at y=\hlinepos\pgf at y
+ \advance\pgf at x by -\pgf at y\pgf at x=-\pgf at x
+ \pgf at y=-\pgf at y
+ }
+ \anchorborder{
+ % \typeout{IN\space X:\the\pgf at x\space Y:\the\pgf at y}
+ \pgfmathsetmacro{\@@switchx}{ifthenelse(\pgf at x>0,1,-1)}
+ \pgfmathsetmacro{\@@switchy}{ifthenelse(\pgf at y>0,1,-1)}
+ \pgfmathsetlength{\pgf at xa}{abs(\pgf at x)}
+ \pgfmathsetlength{\pgf at ya}{abs(\pgf at y)}
+ \pgfextracty{\pgf at circ@res at up}{\northeast}
+ % \typeout{MID\space X:\the\pgf at xa\space Y:\the\pgf at ya\space L:\the\pgf at circ@res at up}
+ % \typeout{MID\space SX:\@@switchx\space SY:\@@switchy}
+ \pgfpointintersectionoflines
+ {\pgfpointorigin}{\pgfqpoint{\pgf at xa}{\pgf at ya}}
+ {\pgfqpoint{0pt}{\pgf at circ@res at up}}{\pgfqpoint{\pgf at circ@res at up}{0pt}}
+ % \typeout{CROSS \space X:\the\pgf at x\space Y:\the\pgf at y}
+ \pgf at x=\@@switchx\pgf at x
+ \pgf at y=\@@switchy\pgf at y
+ }
+ \pgf at circ@draw at component{
+ \northeast\pgf at circ@res at temp=\pgf at y
+ \pgf at circ@setcolor
+ \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at temp}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at temp}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at temp}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at temp}}
+ \pgfpathclose
+ \pgf at circ@draworfill
+ \pgfsetlinewidth{\ctikzvalof{proximeter/hlines thickness}*\pgflinewidth}
+ \pgfmathsetlength{\pgf at circ@res at up}{\hlinepos*\pgf at circ@res at temp}
+ \pgfmathsetlength{\pgf at circ@res at right}{\pgf at circ@res at temp-\pgf at circ@res at up}
+ \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 up}}
+ \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 up}}
+ \pgfusepath{draw}
+ }
+
+}
+\pgfcirc at node@to at path{proximeter}{inline proximeter}{}
+% %>>>
+
%%%%%%%%%%%%%%%%%
%% Instruments
%%%%%%%%%%%%%%%%%
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex 2022-05-09 20:27:13 UTC (rev 63268)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex 2022-05-09 20:28:17 UTC (rev 63269)
@@ -3370,11 +3370,64 @@
\newif\ifpgf at circ@trcircle\pgf at circ@trcirclefalse
\ctikzset{tr circle/.is if=pgf at circ@trcircle}
\tikzset{tr circle/.is if=pgf at 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 at circ@trcircle at split#1#2#3#4\relax{%split the six numbers
+ \edef\@@a{#1}\edef\@@b{#2}\edef\@@c{#3}\edef\@@d{#4}%
+}
+\def\pgf at circ@trcircle at 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 at circ@trcircle at draw@style#1{%
+ \ifcase#1
+ \pgfusepath{discard}% case 0, will discard the path
+ \or
+ \pgfsetdash{}{0pt}\pgfusepath{draw}% case 1, solid
+ \or
+ \pgf at circ@trcircle at setdash\pgfusepath{draw}% case 2, dashed
+ \else
+ \pgfutil at packagewarning{circuitikz}{Transistor circle draw style not known!}%
+ \pgfusepath{draw}%
+ \fi
+}
+%
% add a circle to the transistor:
+\def\pgf at circ@trcircle at draw@partial#1{%
+ \expandafter\pgf at circ@trcircle at split#1\relax
+ \typeout{PARTIAL: \@@a:\@@b:\@@c:\@@d}
+ \pgfscope % right side upper arc
+ \pgfpathmoveto{\pgfpoint{\circleleft+\circleradius}{\circleradius}}
+ \pgfpatharc{90}{0}{\circleradius}
+ \pgf at circ@trcircle at draw@style{\@@a}
+ \endpgfscope
+ \pgfscope % right side lower arc
+ \pgfpathmoveto{\pgfpoint{\circleleft+2*\circleradius}{0pt}}
+ \pgfpatharc{0}{-90}{\circleradius}
+ \pgf at circ@trcircle at draw@style{\@@b}
+ \endpgfscope
+ \pgfscope % left side lower arc
+ \pgfpathmoveto{\pgfpoint{\circleleft+\circleradius}{-\circleradius}}
+ \pgfpatharc{-90}{-180}{\circleradius}
+ \pgf at circ@trcircle at draw@style{\@@c}
+ \endpgfscope
+ \pgfscope % left side upper arc
+ \pgfpathmoveto{\pgfpoint{\circleleft}{0pt}}
+ \pgfpatharc{-180}{-270}{\circleradius}
+ \pgf at circ@trcircle at draw@style{\@@d}
+ \endpgfscope
+}
%
\def\pgfcirc at transistorcircle{
\ifpgf at circ@trcircle
@@ -3394,7 +3447,15 @@
% \pgfmathsetlength{\pgf at circ@res at temp}{((#2+\extrabodydiodelen)-(#1)+(#3)*(#3)/((#2+\extrabodydiodelen)-(#1)))/2}
% \pgfpathcircle{\pgfpoint{#1+\pgf at circ@res at temp}{0pt}}{\pgf at circ@res at temp}
\pgfpathcircle{\pgfpoint{\circleleft+\circleradius}{0pt}}{\circleradius}
- \pgf at circ@draworfill
+ \edef\@@partial{\ctikzvalof{transistor circle/partial borders}}
+ \ifx\@@partial\pgf at nonetext
+ % Circle fill and draw if it's not partial... for speed
+ \pgf at circ@draworfill
+ \else
+ % otherwise, just fill and do the partial fill
+ \pgf at circ@maybefill
+ \pgf at circ@trcircle at draw@partial{\@@partial}
+ \fi
\endpgfscope
\fi
}
@@ -3539,6 +3600,19 @@
\anchor{circle center}{
\pgf at y=0pt\pgf at x=\circleleft\advance\pgf at x by\circleradius
}
+ \anchor{circle top}{
+ \pgf at y=\circleradius\pgf at x=\circleleft\advance\pgf at x by\circleradius
+ }
+ \anchor{circle bottom}{
+ \pgf at y=-\circleradius\pgf at x=\circleleft\advance\pgf at x by\circleradius
+ }
+ \anchor{circle left}{
+ \pgf at y=0pt\pgf at x=\circleleft
+ }
+ \anchor{circle right}{
+ \pgf at y=0pt\pgf at x=\circleleft
+ \advance\pgf at x by \circleradius\advance\pgf at x by \circleradius
+ }
\savedanchor{\centergap}{% this is the center position between gate and base
% get "left"
\pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at 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 at circ@tubes at 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 at circ@tubes at 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 at circ@tubes at draw@style#1{%
+ \ifcase#1
+ \pgfusepath{discard}% case 0, will discard the path
+ \or
+ \pgfsetdash{}{0pt}\pgfusepath{draw}% case 1, solid
+ \or
+ \pgf at circ@tubes at setdash\pgfusepath{draw}% case 2, dashed
+ \else
+ \pgfutil at packagewarning{circuitikz}{Tube border draw style not known!}%
+ \pgfusepath{draw}%
+ \fi
+}
+\def\pgf at circ@tubes at draw@partial#1{%
+ \expandafter\pgf at circ@tubes at split#1\relax
+ % \typeout{PARTIAL: \@@a:\@@b:\@@c:\@@d:\@@e:\@@f}
+ \ifdim\ctikzvalof{tubes/width}pt>\ctikzvalof{tubes/height}pt\relax
+ % horizontal tube
+ \pgfutil at tempdima=\pgf at circ@res at right
+ \advance\pgfutil at tempdima by -\pgf at circ@res at up
+ \pgfscope % left side upper arc
+ \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at right}{0pt}}
+ \pgfpatharc{180}{90}{\pgf at circ@res at up}
+ \pgf at circ@tubes at draw@style{\@@a}
+ \endpgfscope
+ \pgfscope % upper horizontal part
+ \pgfpathmoveto{\pgfpoint{-\pgfutil at tempdima}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgfutil at tempdima}{\pgf at circ@res at up}}
+ \pgf at circ@tubes at draw@style{\@@b}
+ \endpgfscope
+ \pgfscope % right side upper arc
+ \pgfpathmoveto{\pgfpoint{\pgfutil at tempdima}{\pgf at circ@res at up}}
+ \pgfpatharc{90}{0}{\pgf at circ@res at up}
+ \pgf at circ@tubes at draw@style{\@@c}
+ \endpgfscope
+ \pgfscope % right side lower arc
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+ \pgfpatharc{0}{-90}{\pgf at circ@res at up}
+ \pgf at circ@tubes at draw@style{\@@d}
+ \endpgfscope
+ \pgfscope % lower horizontal part
+ \pgfpathmoveto{\pgfpoint{\pgfutil at tempdima}{-\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{-\pgfutil at tempdima}{-\pgf at circ@res at up}}
+ \pgf at circ@tubes at draw@style{\@@e}
+ \endpgfscope
+ \pgfscope % left side lower arc
+ \pgfpathmoveto{\pgfpoint{-\pgfutil at tempdima}{-\pgf at circ@res at up}}
+ \pgfpatharc{270}{180}{\pgf at circ@res at up}
+ \pgf at circ@tubes at draw@style{\@@f}
+ \endpgfscope
+ \else
+ % vertical tube
+ \pgfutil at tempdima=\pgf at circ@res at up
+ \advance\pgfutil at tempdima by -\pgf at circ@res at right
+ \pgfscope % left side upper arc
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+ \pgfpatharc{90}{0}{\pgf at circ@res at right}
+ \pgf at circ@tubes at draw@style{\@@a}
+ \endpgfscope
+ \pgfscope % right vertical part
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgfutil at tempdima}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-\pgfutil at tempdima}}
+ \pgf at circ@tubes at draw@style{\@@b}
+ \endpgfscope
+ \pgfscope % right side lower arc
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{-\pgfutil at tempdima}}
+ \pgfpatharc{0}{-90}{\pgf at circ@res at right}
+ \pgf at circ@tubes at draw@style{\@@c}
+ \endpgfscope
+ \pgfscope % right side lower arc
+ \pgfpathmoveto{\pgfpoint{0pt}{-\pgf at circ@res at up}}
+ \pgfpatharc{-90}{-180}{\pgf at circ@res at right}
+ \pgf at circ@tubes at draw@style{\@@d}
+ \endpgfscope
+ \pgfscope % left vertical part
+ \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at right}{-\pgfutil at tempdima}}
+ \pgfpathlineto{\pgfpoint{-\pgf at circ@res at right}{\pgfutil at tempdima}}
+ \pgf at circ@tubes at draw@style{\@@e}
+ \endpgfscope
+ \pgfscope % left side upper arc
+ \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at right}{\pgfutil at tempdima}}
+ \pgfpatharc{180}{90}{\pgf at circ@res at right}
+ \pgf at circ@tubes at draw@style{\@@f}
+ \endpgfscope
+ \fi
+}
% Draw tube outline
\def\pgf at circ@tubes at drawtube{%
- \ifdim\ctikzvalof{tubes/width}pt>\ctikzvalof{tubes/height}pt\relax
- \pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
- \pgfutil at tempdima=\pgf at circ@res at right
- \advance\pgfutil at tempdima by -\pgf at circ@res at up
- \pgfpathlineto{\pgfpoint{\pgfutil at tempdima}{\pgf at circ@res at up}}
- \pgfpatharc{90}{-90}{\pgf at circ@res at up}
- \pgfpathlineto{\pgfpoint{-\pgfutil at tempdima}{-\pgf at circ@res at up}}
- \pgfpatharc{270}{90}{\pgf at circ@res at up}
- \else
- \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at right}{0pt}}
- \pgfutil at tempdima=\pgf at circ@res at up
- \advance\pgfutil at tempdima by -\pgf at circ@res at right
- \pgfpathlineto{\pgfpoint{-\pgf at circ@res at right}{\pgfutil at tempdima}}
- \pgfpatharc{180}{0}{\pgf at circ@res at right}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-\pgfutil at tempdima}}
- \pgfpatharc{180}{0}{-\pgf at circ@res at right}
- \fi
- \pgfpathclose
+ \ifdim\ctikzvalof{tubes/width}pt>\ctikzvalof{tubes/height}pt\relax
+ % horizontal tube
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+ \pgfutil at tempdima=\pgf at circ@res at right
+ \advance\pgfutil at tempdima by -\pgf at circ@res at up
+ \pgfpathlineto{\pgfpoint{\pgfutil at tempdima}{\pgf at circ@res at up}}
+ \pgfpatharc{90}{-90}{\pgf at circ@res at up}
+ \pgfpathlineto{\pgfpoint{-\pgfutil at tempdima}{-\pgf at circ@res at up}}
+ \pgfpatharc{270}{90}{\pgf at circ@res at up}
+ \else
+ % vertical tube
+ \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at right}{0pt}}
+ \pgfutil at tempdima=\pgf at circ@res at up
+ \advance\pgfutil at tempdima by -\pgf at circ@res at right
+ \pgfpathlineto{\pgfpoint{-\pgf at circ@res at right}{\pgfutil at tempdima}}
+ \pgfpatharc{180}{0}{\pgf at circ@res at right}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-\pgfutil at tempdima}}
+ \pgfpatharc{180}{0}{-\pgf at circ@res at right}
+ \fi
+ \pgfpathclose
+ \edef\@@partial{\ctikzvalof{tubes/partial borders}}
+ \ifx\@@partial\pgf at nonetext
+ % Tube fill and draw if it's not partial... for speed
+ \pgf at circ@draworfill
+ \else
+ % otherwise, just fill and do the partial fill
+ \pgf at circ@maybefill
+ \pgf at circ@tubes at 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 at x}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}}
- \anchor{center}{
- \pgfpointorigin
- }
\savedanchor\northwest{%
\pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
\pgf at circ@res at up=\ctikzvalof{tubes/height}\pgf at circ@scaled at Rlen
@@ -8182,40 +8366,58 @@
\pgf at x=-\pgf at circ@res at right
\pgf at x=.5\pgf at x
}
- \anchor{north} {%
- \northwest
- \pgf at x=0pt
+ \savedanchor\tubene{%
+ \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+ \pgf at circ@res at temp=\ctikzvalof{tubes/height}\pgf at circ@scaled at Rlen
+ \pgf at circ@res at other=\ctikzvalof{tubes/width}\pgf at circ@scaled at Rlen
+ \pgf at circ@res at up=\ctikzvalof{tubes/tube radius}\pgf at circ@res at temp
+ \pgf at circ@res at right=\ctikzvalof{tubes/tube radius}\pgf at circ@res at other
+ \pgf at y=\pgf at circ@res at up
+ \pgf at x=\pgf at circ@res at right
}
- \anchor{east}{%
- \northwest
- \pgf at x=-\pgf at x
- \pgf at y=0pt
+ \savedanchor\tubesquarene{%
+ \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+ \pgf at circ@res at temp=\ctikzvalof{tubes/height}\pgf at circ@scaled at Rlen
+ \pgf at circ@res at other=\ctikzvalof{tubes/width}\pgf at circ@scaled at Rlen
+ \pgf at circ@res at up=\ctikzvalof{tubes/tube radius}\pgf at circ@res at temp
+ \pgf at circ@res at right=\ctikzvalof{tubes/tube radius}\pgf at circ@res at other
+ \ifdim\ctikzvalof{tubes/width}pt>\ctikzvalof{tubes/height}pt\relax
+ % horizontal
+ \pgf at y=\pgf at circ@res at up
+ \pgf at x=\pgf at circ@res at right\advance\pgf at x by -\pgf at circ@res at up
+ \else
+ % vertical
+ \pgf at x=\pgf at circ@res at right
+ \pgf at y=\pgf at circ@res at up\advance\pgf at y by -\pgf at circ@res at right
+ \fi
}
- \anchor{south}{%
- \northwest
- \pgf at y=-\pgf at y
- \pgf at x=0pt
+ \anchor{tube ne}{\tubene}
+ \anchor{tubesq ne}{\tubesquarene}
+ % tube shape anchors: geo
+ \anchor{tube top}{\tubene\pgf at x=0pt\relax}
+ \anchor{tube bottom}{\tubene\pgf at x=0pt\pgf at y=-\pgf at y}
+ \anchor{tube right}{\tubene\pgf at y=0pt\relax}
+ \anchor{tube left}{\tubene\pgf at y=0pt\pgf at x=-\pgf at x}
+ % tube shape straight part anchors
+ \anchor{tube top right}{\tubesquarene}
+ \anchor{tube bottom right}{\tubesquarene\pgf at y=-\pgf at y}
+ \anchor{tube top left}{\tubesquarene\pgf at x=-\pgf at x}
+ \anchor{tube bottom left}{\tubesquarene\pgf at y=-\pgf at y\pgf at x=-\pgf at x}
+ % tube shape centers
+ \anchor{tube top center}{\tubesquarene\pgf at x=0pt\relax}
+ \anchor{tube bottom center}{\tubesquarene\pgf at y=-\pgf at y\pgf at x=0pt\relax}
+ \anchor{tube right center}{\tubesquarene\pgf at y=0pt\relax}
+ \anchor{tube left center}{\tubesquarene\pgf at x=-\pgf at x\pgf at y=0pt\relax}
+ % rest of anchors
+ \anchor{center}{\pgfpointorigin}
+ % geo anchors based on north-west
+ \pgfcirc at northwest@symmetric at geoanchors
+ % text anchor
+ \anchor{text}{%
+ \northwest\pgf at x=-\pgf at x
+ \pgf at y=-.5\ht\pgfnodeparttextbox
}
- \anchor{west}{%
- \northwest
- \pgf at y=0pt
- }
- \anchor{north west}{%
- \northwest
- }
- \anchor{north east}{%
- \northwest
- \pgf at x=-\pgf at x
- }
- \anchor{south east}{
- \northwest
- \pgf at x=-\pgf at x
- \pgf at y=-\pgf at y
- }
- \anchor{south west}{
- \northwest
- \pgf at y=-\pgf at y
- }
+ % specific anchors
\anchor{anode} {%
\northwest
\pgf at x=0pt
@@ -8271,9 +8473,6 @@
\pgf at circ@res at up=0.5\pgf at circ@res at up
\pgf at circ@res at right=0.5\pgf at circ@res at right
- % Tube fill color (if any)
- \pgf at circ@draworfill
-
% Grid drawing
#3%
Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2022-05-09 20:27:13 UTC (rev 63268)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2022-05-09 20:28:17 UTC (rev 63269)
@@ -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}
More information about the tex-live-commits
mailing list.