summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-07-13 21:39:36 +0000
committerKarl Berry <karl@freefriends.org>2019-07-13 21:39:36 +0000
commit8e8c05aa6d6db2c28633a8924de4a0b941b52030 (patch)
treeed7cecc6f4771974edc2e2e0fd76c60597e99dab
parentac24b25f17ff492d41266a15f5c9aa894ffd74d7 (diff)
circuitikz (13jul19)
git-svn-id: svn://tug.org/texlive/trunk@51634 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdfbin15488 -> 15488 bytes
-rw-r--r--Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md5
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/changelog.tex13
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdfbin647031 -> 651414 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex109
-rw-r--r--Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex4
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex17
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex8
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex273
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex41
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex462
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty8
12 files changed, 543 insertions, 397 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 32c4c907ccc..8e89da7cb24 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 c39e7406605..a9c30cfded5 100644
--- a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
+++ b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
@@ -1,6 +1,11 @@
<!--- 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 0.9.3 (2019-07-13)
+ - Added the option to have "dotless" P-MOS (to use with arrowmos option)
+ - Fixed a (puzzling) problem with coupler2
+ - Fixed a compatibility problem with newer PGF (>3.0.1a)
+
* Version 0.9.2 (2019-06-21)
- (hopefully) fixed ConTeXt compatibility. Most new functionality is not tested; testers and developers for the ConTeXt side are needed.
- Added old ConTeXt version for 0.8.3
diff --git a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
index 19739d0356b..d4359dbb54e 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
@@ -6,6 +6,19 @@ full list of changes.
\begin{itemize}
\tightlist
\item
+ Version 0.9.3 (2019-07-13)
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Added the option to have ``dotless'' P-MOS (to use with arrowmos
+ option)
+ \item
+ Fixed a (puzzling) problem with coupler2
+ \item
+ Fixed a compatibility problem with newer PGF (\textgreater{}3.0.1a)
+ \end{itemize}
+\item
Version 0.9.2 (2019-06-21)
\begin{itemize}
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
index 22804d83253..9c4d66502a7 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 3a4d22a06a4..7c13501b12f 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
@@ -320,10 +320,10 @@ Feel free to load the package with your own cultural options:
\begin{itemize}
\item \texttt{oldvoltagedirection}: Use old way of voltage direction having a difference between european and american direction, with wrong default labelling for batteries;
\item \texttt{nooldvoltagedirection}: The standard from 0.5 onward, utilize the (German?) standard of voltage arrows in the direction of electric fields (without fixing batteries);
- \item \texttt{RPvoltages} (meaning Rising Potential voltages): the arrow is in direction of rising potential, like in \texttt{oldvoltagedirections}, but batteries and current sources are fixed to follow the passive/active standard;
- \item \texttt{EFvoltages} (meaning Electric Field voltages): the arrow is in direction of the electric field, like in \texttt{nooldvoltagedirections}, but batteries are fixed;
+ \item \texttt{RPvoltages} (meaning Rising Potential voltages): the arrow is in direction of rising potential, like in \texttt{oldvoltagedirection}, but batteries and current sources are fixed to follow the passive/active standard;
+ \item \texttt{EFvoltages} (meaning Electric Field voltages): the arrow is in direction of the electric field, like in \texttt{nooldvoltagedirection}, but batteries are fixed;
\end{itemize}
- If none of these option are given, the package will default to \texttt{nooldvoltagedirections}, but will give a warning. The behavior is also selectable circuit by circuit with the \texttt{voltage dir} style.
+ If none of these option are given, the package will default to \texttt{nooldvoltagedirection}, but will give a warning. The behavior is also selectable circuit by circuit with the \texttt{voltage dir} style.
\item \texttt{betterproportions}\footnote{May change in the future!}: nicer proportions of transistors in comparision to resistors;
\end{itemize}
@@ -1579,17 +1579,17 @@ To show that a device is optional, you can dash it. The inner symbol will be kep
\subsection{Transistors}
\begin{groupdesc}
- \circuitdesc{nmos}{\scshape nmos}{}( G/180/0.2,D/0/0.2,S/0/0.2 )
- \circuitdesc{pmos}{\scshape pmos}{}
- \circuitdesc{hemt}{\scshape hemt}{}
- \circuitdesc{npn}{\scshape npn}{}( B/180/0.2,C/0/0.2,E/0/0.2 )
- \circuitdesc{pnp}{\scshape pnp}{}
- \circuitdesc{npn,photo}{\scshape npn}{}( nobase/0/0.4 )
- \circuitdesc{pnp,photo}{\scshape pnp}{}
- \circuitdesc{nigbt}{\scshape nigbt}{}
- \circuitdesc{pigbt}{\scshape pigbt}{}
- \circuitdesc{Lnigbt}{\scshape Lnigbt}{}
- \circuitdesc{Lpigbt}{\scshape Lpigbt}{}
+ \circuitdesc{nmos}{nmos}{}( G/180/0.2,D/0/0.2,S/0/0.2 )
+ \circuitdesc{pmos}{pmos}{}
+ \circuitdesc{hemt}{hemt}{}
+ \circuitdesc{npn}{npn}{}( B/180/0.2,C/0/0.2,E/0/0.2 )
+ \circuitdesc{pnp}{pnp}{}
+ \circuitdesc{npn,photo}{npn}{}( nobase/0/0.4 )
+ \circuitdesc{pnp,photo}{pnp}{}
+ \circuitdesc{nigbt}{nigbt}{}
+ \circuitdesc{pigbt}{pigbt}{}
+ \circuitdesc{Lnigbt}{Lnigbt}{}
+ \circuitdesc{Lpigbt}{Lpigbt}{}
\end{groupdesc}
For all transistors a body diode (or freewheeling diode) can automatically be drawn. Just use the global option bodydiode, or for single transistors, the tikz-option bodydiode:
@@ -1614,19 +1614,39 @@ The Base/Gate connection of all transistors can be disabled by the options \text
\end{LTXexample}
If the option \texttt{arrowmos} is used (or after the command \verb!\ctikzset{tripoles/mos style/arrows}! is given), this is the output:
-\ctikzset{tripoles/mos style/arrows}
\begin{groupdesc}
- \circuitdesc{nmos}{\scshape nmos}{}
- \circuitdesc{pmos}{\scshape pmos}{}
+ \ctikzset{tripoles/mos style/arrows}
+ \circuitdesc{nmos}{nmos}{}
+ \circuitdesc{pmos}{pmos}{}
\end{groupdesc}
-\ctikzset{tripoles/mos style/no arrows}
+
+You can go back to the no-arrows mos with \texttt{noarrowmos} locally or with
+\texttt{\textbackslash ctikzset\{tripoles/mos style/no arrows\}}.
+
To draw the PMOS circle non-solid, use the option \texttt{emptycircle} or the command
-\\\verb!\ctikzset{tripoles/pmos style/emptycircle}!.
+\\\verb!\ctikzset{tripoles/pmos style/emptycircle}!. To remove the dot completely (only useful if you have \texttt{arrowmos} enabled, otherwise ther ewill be no difference between P-MOS and N-MOS), you can use the option \texttt{nocircle} or \verb|\ctikzset{tripoles/pmos style/nocircle}|.
\begin{groupdesc}
- \circuitdesc{pmos,emptycircle}{\scshape pmos}{}
+ \circuitdesc{pmos,emptycircle}{pmos}{}
+ \circuitdesc{pmos,nocircle,arrowmos}{pmos}{}
\end{groupdesc}
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[
+ info/.style={left=1cm, blue, text width=5em, align=right},]
+ \draw (0,1) node{pmos} (2,1) node{nmos};
+ \draw (0,0) node[info]{default} node[pmos]{} (2,0) node[nmos]{};
+ \ctikzset{tripoles/mos style/arrows}
+ \draw (0,-2) node[info]{arrows} node[pmos]{} (2,-2) node[nmos]{};
+ \ctikzset{tripoles/pmos style/emptycircle}
+ \draw (0,-4) node[info]{emptycircle} node[pmos]{} (2,-4) node[nmos]{};
+ \ctikzset{tripoles/pmos style/nocircle}
+ \draw (0,-6) node[info]{nocircle} node[pmos]{} (2,-6) node[nmos]{};
+ \ctikzset{tripoles/mos style/no arrows}
+ \draw (0,-8) node[info, red]{no circle, no arrows, DON'T do it}
+ node[pmos]{} (2,-8) node[nmos]{};
+\end{circuitikz}\end{LTXexample}
+
If you prefer a different position of the arrows in transistors and FETs, you can adjust them like this (it works for the other BJT-based transistors, too):
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -1647,26 +1667,26 @@ Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} t
\begin{groupdesc}
- \circuitdesc{nfet}{\scshape nfet}{}
- \circuitdesc{nigfete}{\scshape nigfete}{}
- \circuitdesc{nigfete,solderdot}{\scshape nigfete}{}
- \circuitdesc{nigfetebulk}{\scshape nigfetebulk}{}
- \circuitdesc{nigfetd}{\scshape nigfetd}{}
- \circuitdesc{pfet}{\scshape pfet}{}
- \circuitdesc{pigfete}{\scshape pigfete}{}
- \circuitdesc{pigfetebulk}{\scshape pigfetebulk}{}
- \circuitdesc{pigfetd}{\scshape pigfetd}{}
+ \circuitdesc{nfet}{nfet}{}
+ \circuitdesc{nigfete}{nigfete}{}
+ \circuitdesc{nigfete,solderdot}{nigfete}{}
+ \circuitdesc{nigfetebulk}{nigfetebulk}{}
+ \circuitdesc{nigfetd}{nigfetd}{}
+ \circuitdesc{pfet}{pfet}{}
+ \circuitdesc{pigfete}{pigfete}{}
+ \circuitdesc{pigfetebulk}{pigfetebulk}{}
+ \circuitdesc{pigfetd}{pigfetd}{}
\end{groupdesc}
\textsc{njfet} and \textsc{pjfet} have been incorporated based on code provided by Danilo Piazzalunga:
\begin{groupdesc}
- \circuitdesc{njfet}{\scshape njfet}{}
- \circuitdesc{pjfet}{\scshape pjfet}{}
+ \circuitdesc{njfet}{njfet}{}
+ \circuitdesc{pjfet}{pjfet}{}
\end{groupdesc}
\textsc{isfet}
\begin{groupdesc}
- \circuitdesc{isfet}{\scshape isfet}{}
+ \circuitdesc{isfet}{isfet}{}
\end{groupdesc}
\subsubsection{Transistors anchors}
@@ -1785,9 +1805,15 @@ Electronic tubes, also known as vacuum tubes, control current flow between elect
\begin{groupdesc}
\circuitdesc*{diodetube}{Tube Diode}{}(anode/90/0.2, cathode/-90/0.2 )
- \circuitdesc*{triode}{Triode}{}(anode/90/0.2, cathode/-90/0.2, grid/180/0.2 )
- \circuitdesc*{tetrode}{Tetrode}{}(anode/90/0.2, cathode/-90/0.2, grid/190/0.2,screen/170/0.2 )
- \circuitdesc*{pentode}{Pentode}{}(anode/90/0.2, cathode/-90/0.2, grid/190/0.2,screen/180/0.2,suppressor/170/0.2 )
+ \circuitdesc*{triode}{Triode}{}(anode/90/0.2, cathode/-90/0.2, control/180/0.2 )
+ \circuitdesc*{tetrode}{Tetrode}{}(anode/90/0.2, cathode/-90/0.2, control/190/0.2,screen/170/0.2 )
+ \circuitdesc*{pentode}{Pentode}{}(anode/90/0.2, cathode/-90/0.2, control/190/0.2,screen/180/0.2,suppressor/170/0.2 )
+\end{groupdesc}
+
+Some pentodes have the suppressor grid internally connected to the control grid, which saves a pin on the tube's housing.
+
+\begin{groupdesc}
+ \circuitdesc*{pentode suppressor to cathode}{Pentode with suppressor grid connected to cathode}{}( anode/90/0.2, cathode/-90/0.2, control/190/0.2,screen/180/0.2 )
\end{groupdesc}
Note that the \verb|diodetube| is used as component name to avoid clashes with the semiconductor diode.
@@ -1853,7 +1879,7 @@ Example triode amplifier:
to[C=$C_i$] ++(2,0) node (Rg) {}
to[R=$R_g$] (Rg |- start)
(Rg) to[short,*-] ++(1,0)
- node[triode,anchor=grid] (Tri) {} ++(2,0)
+ node[triode,anchor=control] (Tri) {} ++(2,0)
(Tri.cathode) to[R=$R_c$,-*] (Tri.cathode |- start)
(Tri.anode) to [R=$R_a$] ++(0,2)
to [short] ++(3.5,0) node(Vatop) {}
@@ -1874,7 +1900,7 @@ Example triode amplifier:
to[C=$C_i$] ++(2,0) node (Rg) {}
to[R=$R_g$] (Rg |- start)
(Rg) to[short,*-] ++(1,0)
- node[triode,anchor=grid] (Tri) {} ++(2,0)
+ node[triode,anchor=control] (Tri) {} ++(2,0)
(Tri.cathode) to[R=$R_c$,-*] (Tri.cathode |- start)
(Tri.anode) to [R=$R_a$] ++(0,2)
to [short] ++(3.5,0) node(Vatop) {}
@@ -3286,13 +3312,14 @@ From version 0.9.0 onward, the maintainers agreed a new policy for the direction
\begin{itemize}
\item \texttt{oldvoltagedirection}, or the key style \texttt{voltage dir=old}: Use old way of voltage direction having a difference between european and american direction, with wrong default labelling for batteries (it was the default before version 0.5);
\item \texttt{nooldvoltagedirection}, or the key style \texttt{voltage dir=noold}: The standard from version 0.5 onward, utilize the (German?) standard of voltage arrows in the direction of electric fields (without fixing batteries);
- \item \texttt{RPvoltages} (meaning Rising Potential voltages), or the key style \texttt{voltage dir=RP}: the arrow is in direction of rising potential, like in \texttt{oldvoltagedirections}, but batteries and current sources are fixed so that they follow the passive/active standard: the default direction of \texttt{v} and \texttt{i} are chosen so that, when both values are positive:
+ \item \texttt{RPvoltages} (meaning Rising Potential voltages), or the key style \texttt{voltage dir=RP}: the arrow is in direction of rising potential, like in \texttt{oldvoltagedirection}, but batteries and current sources are fixed so that they follow the passive/active standard: the default direction of \texttt{v} and \texttt{i} are chosen so that, when both values are positive:
\begin{itemize}
\item in passive component, the element is \emph{dissipating power};
\item in active components (generators), the element is \emph{generating power}.
\end{itemize}
- \item \texttt{EFvoltages} (meaning Electric Field voltages), or the key style \texttt{voltage dir=EF}: the arrow is in direction of the electric field, like in \texttt{nooldvoltagedirections}, but batteries are fixed;
+ \item \texttt{EFvoltages} (meaning Electric Field voltages), or the key style \texttt{voltage dir=EF}: the arrow is in direction of the electric field, like in \texttt{nooldvoltagedirection}, but batteries are fixed;
\end{itemize}
+Notice that the four styles are designed to be used at the environment level: that is, you should use them at the start of your environment as in \verb|\begin{circuitikz}[voltage dir=old] ...| and not as a key for single components, in which case the behaviour is not guaranteed.
The standard direction of currents, flows and voltages are changed by these options; notice that the default drops in case of passive and active elements is normally different. Take care that in the case of \texttt{noold} and \texttt{EFvoltages} also the currents can switch directions. It is much easier to understand the several behaviors by looking at the following examples, that have been generated by the code:
@@ -3717,7 +3744,7 @@ This could be especially useful if you define a style, to use like this:
\tikz \draw (0,0) to[C, i=$\imath$] (2,0);
\end{LTXexample}
-\noindent However, you can override the properties \verb!voltage/distance from node!\footnote{That is, how distant from the initial and final points of the path the arrow starts and ends.}, \verb!voltage/bump b!\footnote{Controlling how high the bump of the arrow is --- how curved it is.} and \verb!voltage/european label distance!\footnote{Controlling how distant from the bipole the voltage label will be.} on a per-component basis, in order to fine-tune the voltages:
+\noindent However, you can override the properties \texttt{voltage/distance from node}\footnote{That is, how distant from the initial and final points of the path the arrow starts and ends.}, \texttt{voltage/bump b}\footnote{Controlling how high the bump of the arrow is --- how curved it is.} and \texttt{voltage/european label distance}\footnote{Controlling how distant from the bipole the voltage label will be.} on a per-component basis, in order to fine-tune the voltages:
\begin{LTXexample}[varwidth=true]
\tikz \draw (0,0) to[R, v=1<\volt>] (1.5,0)
@@ -3760,7 +3787,7 @@ These bipole nodes are added after the path is drawn, as every node in Ti\emph{k
\end{circuitikz}
\end{LTXexample}
-You can define shortcuts for the \texttt{bipole bodes} you use most; for example if you want a shortcut for a bipole with open square node in red in the right side you can:
+You can define shortcuts for the \texttt{bipole nodes} you use most; for example if you want a shortcut for a bipole with open square node in red in the right side you can:
\begin{LTXexample}[varwidth=true,
basicstyle=\small\ttfamily
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 6f8a6d3d9ff..8432d8c672d 100644
--- a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
+++ b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
@@ -1,5 +1,5 @@
-\def\pgfcircversion{0.9.2}
-\def\pgfcircversiondate{2019/06/21}
+\def\pgfcircversion{0.9.3}
+\def\pgfcircversiondate{2019/07/13}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
index ca121a6e0c7..22bcf58f930 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
@@ -1,6 +1,8 @@
+%% Counters
-%% Options
-
+\newcount\pgf@circ@count@a
+\newcount\pgf@circ@count@b
+\newcount\pgf@circ@count@c
%%%%%%%%%%%%
%% Dimensions
@@ -427,6 +429,8 @@
\ctikzset{tripoles/mos style/.is choice}
\ctikzset{tripoles/mos style/no arrows/.code={\pgf@circuit@mos@arrowsfalse}}
\ctikzset{tripoles/mos style/arrows/.code={\pgf@circuit@mos@arrowstrue}}
+\pgfkeys{/tikz/arrowmos/.add code={}{\pgf@circuit@mos@arrowstrue}}
+\pgfkeys{/tikz/noarrowmos/.add code={}{\pgf@circuit@mos@arrowsfalse}}
% Option solderdot for fet
\newif\ifpgf@circuit@fet@solderdot
@@ -468,10 +472,17 @@
% Option draw pmos with empty circle
\newif\ifpgf@circuit@pmos@emptycircle
-\newif\ifpgf@circuit@pmos@emptycircle
\pgf@circuit@pmos@emptycirclefalse
\pgfkeys{/tikz/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
\ctikzset{tripoles/pmos style/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
+% Option draw pmos with no circle
+\newif\ifpgf@circuit@pmos@nocircle
+\pgf@circuit@pmos@nocirclefalse
+\pgfkeys{/tikz/nocircle/.add code={}{\pgf@circuit@pmos@nocircletrue}}
+\ctikzset{tripoles/pmos style/nocircle/.add code={}{\pgf@circuit@pmos@nocircletrue}}
+% back to normal
+\pgfkeys{/tikz/fullcircle/.add code={}{\pgf@circuit@pmos@emptycirclefalse\pgf@circuit@pmos@nocirclefalse}}
+\ctikzset{tripoles/pmos style/fullcircle/.add code={}{\pgf@circuit@pmos@emptycirclefalse\pgf@circuit@pmos@nocirclefalse}}
\newif\ifpgf@circuit@trans@ntype
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex
index 7c7dccb2f27..c6fe8bfdb29 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex
@@ -286,11 +286,11 @@
\pgfpathclose
\pgfusepath{clip}
% ...and build the waves as clipped circles
- \c@pgf@counta=8\pgf@circ@res@other=0.5\pgf@circ@res@step
+ \pgf@circ@count@a=8\pgf@circ@res@other=0.5\pgf@circ@res@step
\pgfmathloop%
- \ifnum\c@pgf@counta>2
- \pgfpathcircle{\pgfpoint{0pt}{\pgf@circ@res@step}}{\the\c@pgf@counta*\pgf@circ@res@other}
- \advance\c@pgf@counta-1\relax%
+ \ifnum\pgf@circ@count@a>2
+ \pgfpathcircle{\pgfpoint{0pt}{\pgf@circ@res@step}}{\the\pgf@circ@count@a*\pgf@circ@res@other}
+ \advance\pgf@circ@count@a-1\relax%
\repeatpgfmathloop
\pgfusepath{draw}
\endpgfscope
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex
index b2a626b63d9..04734a19543 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex
@@ -13,8 +13,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% counters for pin accounting...
-\newcount\pgf@circ@count@c
-\newcount\pgf@circ@count@b
\def\pgf@circ@dip@pin@shift{0.5}
\def\pgf@circ@qfp@pin@shift{0.25}
@@ -28,8 +26,8 @@
\pgfdeclareshape{dipchip}{
\savedmacro\numpins{%
- \c@pgf@counta=\pgfkeysvalueof{/tikz/circuitikz/multipoles/dipchip/num pins}%
- \def\numpins{\the\c@pgf@counta}
+ \pgf@circ@count@a=\pgfkeysvalueof{/tikz/circuitikz/multipoles/dipchip/num pins}%
+ \def\numpins{\the\pgf@circ@count@a}
}
\savedanchor\centerpoint{%
\pgf@x=-.5\wd\pgfnodeparttextbox%
@@ -94,8 +92,8 @@
\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
% Adding the pin number
\ifpgf@circuit@chip@shownumbers
- \c@pgf@counta=\numpins\relax
- \divide\c@pgf@counta by 2 \pgf@circ@count@b=\c@pgf@counta
+ \pgf@circ@count@a=\numpins\relax
+ \divide\pgf@circ@count@a by 2 \pgf@circ@count@b=\pgf@circ@count@a
% thanks to @marmot: https://tex.stackexchange.com/a/473571/38080
\ifpgf@circuit@chip@straightnumbers
\pgfgettransformentries\a\b\temp\temp\temp\temp
@@ -108,85 +106,85 @@
\def\pgf@circ@strut{\vrule width 0pt height 1em depth 0.4em\relax}
\def\mytext{\pgfkeysvalueof{/tikz/circuitikz/multipoles/font}\space\pgf@circ@strut\the\pgf@circ@count@c\space}
\pgfmathloop%
- \ifnum\c@pgf@counta>0
+ \ifnum\pgf@circ@count@a>0
\ifcase\quadrant % rotation 0
% left
- \pgf@circ@count@c=\c@pgf@counta
+ \pgf@circ@count@c=\pgf@circ@count@a
\pgftext[left,
- at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% right
- \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\c@pgf@counta+1\relax
+ \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\pgf@circ@count@a+1\relax
\pgftext[right,
- at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
\or % rotation -90
% left
- \pgf@circ@count@c=\c@pgf@counta
+ \pgf@circ@count@c=\pgf@circ@count@a
\pgftext[top,
- at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% right
- \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\c@pgf@counta+1\relax
+ \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\pgf@circ@count@a+1\relax
\pgftext[bottom,
- at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
\or %rotation 180
% left
- \pgf@circ@count@c=\c@pgf@counta
+ \pgf@circ@count@c=\pgf@circ@count@a
\pgftext[right,
- at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% right
- \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\c@pgf@counta+1\relax
+ \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\pgf@circ@count@a+1\relax
\pgftext[left,
- at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
\or % rotation +90
% left
- \pgf@circ@count@c=\c@pgf@counta
+ \pgf@circ@count@c=\pgf@circ@count@a
\pgftext[bottom,
- at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% right
- \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\c@pgf@counta+1\relax
+ \pgf@circ@count@c=\numexpr2*\pgf@circ@count@b-\pgf@circ@count@a+1\relax
\pgftext[top,
- at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
\fi
- \advance\c@pgf@counta-1\relax%
+ \advance\pgf@circ@count@a-1\relax%
\repeatpgfmathloop
\fi
\endpgfscope
\ifdim\pgf@circ@res@other>0pt
\pgfscope
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/multipoles/external pins thickness}\pgflinewidth}
- \c@pgf@counta=\numpins\relax
- \divide\c@pgf@counta by 2 \pgf@circ@count@b=\c@pgf@counta
+ \pgf@circ@count@a=\numpins\relax
+ \divide\pgf@circ@count@a by 2 \pgf@circ@count@b=\pgf@circ@count@a
\pgfmathloop%
- \ifnum\c@pgf@counta>0
+ \ifnum\pgf@circ@count@a>0
\edef\padfrac{\pgfkeysvalueof{/tikz/circuitikz/multipoles/external pad fraction}}
\ifnum\padfrac>0
\pgf@circ@res@temp=\pgf@circ@res@step\divide\pgf@circ@res@temp by \padfrac
% left side pads
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
% right side pads
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
\else
% left side pins
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
% right side pins
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@dip@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
\fi
- \advance\c@pgf@counta by -1\relax%
+ \advance\pgf@circ@count@a by -1\relax%
\repeatpgfmathloop
\pgfusepath{stroke}
\endpgfscope
@@ -196,19 +194,19 @@
% and is executed just before a node is drawn.
\pgfutil@g@addto@macro\pgf@sh@s@dipchip{%
% Start with the maximum pin number and go backwards.
- \c@pgf@counta=\numpins\relax
+ \pgf@circ@count@a=\numpins\relax
\pgfmathloop%
- \ifnum\c@pgf@counta>0
+ \ifnum\pgf@circ@count@a>0
% we will create two anchors per pin: the "normal one" like `pin 1` for the
% electrical contact, and the "border one" like `bpin 1` for labels.
% they will coincide if `external pins width` is set to 0.
- \expandafter\xdef\csname pgf@anchor@dipchip@pin\space\the\c@pgf@counta\endcsname{%
- \noexpand\pgf@circ@dippinanchor{\the\c@pgf@counta}{1}%
+ \expandafter\xdef\csname pgf@anchor@dipchip@pin\space\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@dippinanchor{\the\pgf@circ@count@a}{1}%
}
- \expandafter\xdef\csname pgf@anchor@dipchip@bpin\space\the\c@pgf@counta\endcsname{%
- \noexpand\pgf@circ@dippinanchor{\the\c@pgf@counta}{0}%
+ \expandafter\xdef\csname pgf@anchor@dipchip@bpin\space\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@dippinanchor{\the\pgf@circ@count@a}{0}%
}
- \advance\c@pgf@counta by -1\relax%
+ \advance\pgf@circ@count@a by -1\relax%
\repeatpgfmathloop%
}%
}
@@ -217,8 +215,8 @@
\pgfdeclareshape{qfpchip}{
\savedmacro\numpins{%
- \c@pgf@counta=\pgfkeysvalueof{/tikz/circuitikz/multipoles/qfpchip/num pins}%
- \def\numpins{\the\c@pgf@counta}
+ \pgf@circ@count@a=\pgfkeysvalueof{/tikz/circuitikz/multipoles/qfpchip/num pins}%
+ \def\numpins{\the\pgf@circ@count@a}
}
\savedanchor\centerpoint{%
\pgf@x=-.5\wd\pgfnodeparttextbox%
@@ -291,8 +289,8 @@
% Adding the pin number
\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
\ifpgf@circuit@chip@shownumbers
- \c@pgf@counta=\numpins%
- \divide\c@pgf@counta by 4 \pgf@circ@count@b=\c@pgf@counta
+ \pgf@circ@count@a=\numpins%
+ \divide\pgf@circ@count@a by 4 \pgf@circ@count@b=\pgf@circ@count@a
% thanks to @marmot: https://tex.stackexchange.com/a/473571/38080
\ifpgf@circuit@chip@straightnumbers
\pgfgettransformentries\a\b\temp\temp\temp\temp
@@ -305,141 +303,141 @@
\def\pgf@circ@strut{\vrule width 0pt height 1em depth 0.4em\relax}
\def\mytext{\pgfkeysvalueof{/tikz/circuitikz/multipoles/font}\space\pgf@circ@strut\the\pgf@circ@count@c\space}
\pgfmathloop%
- \ifnum\c@pgf@counta>0
+ \ifnum\pgf@circ@count@a>0
\ifcase\quadrant % rotation 0
% left
- \pgf@circ@count@c=\c@pgf@counta
+ \pgf@circ@count@c=\pgf@circ@count@a
\pgftext[left,
- at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% bottom
- \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\c@pgf@counta\relax
+ \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\pgf@circ@count@a\relax
\pgftext[bottom,
- at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@down},
+ at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down},
rotate=\rot]{\mytext}
% right
- \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\c@pgf@counta+1\relax
+ \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\pgf@circ@count@a+1\relax
\pgftext[right,
- at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% top
- \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\c@pgf@counta\relax
+ \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\pgf@circ@count@a\relax
\pgftext[top,
- at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@up},
+ at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up},
rotate=\rot]{\mytext}
\or % rotation -90
% left
- \pgf@circ@count@c=\c@pgf@counta
+ \pgf@circ@count@c=\pgf@circ@count@a
\pgftext[top,
- at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% bottom
- \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\c@pgf@counta\relax
+ \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\pgf@circ@count@a\relax
\pgftext[left,
- at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@down},
+ at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down},
rotate=\rot]{\mytext}
% right
- \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\c@pgf@counta+1\relax
+ \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\pgf@circ@count@a+1\relax
\pgftext[bottom,
- at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% top
- \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\c@pgf@counta\relax
+ \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\pgf@circ@count@a\relax
\pgftext[right,
- at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@up},
+ at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up},
rotate=\rot]{\mytext}
\or %rotation 180
% left
- \pgf@circ@count@c=\c@pgf@counta
+ \pgf@circ@count@c=\pgf@circ@count@a
\pgftext[right,
- at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% bottom
- \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\c@pgf@counta\relax
+ \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\pgf@circ@count@a\relax
\pgftext[top,
- at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@down},
+ at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down},
rotate=\rot]{\mytext}
% right
- \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\c@pgf@counta+1\relax
+ \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\pgf@circ@count@a+1\relax
\pgftext[left,
- at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% top
- \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\c@pgf@counta\relax
+ \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\pgf@circ@count@a\relax
\pgftext[bottom,
- at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@up},
+ at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up},
rotate=\rot]{\mytext}
\or % rotation +90
% left
- \pgf@circ@count@c=\c@pgf@counta
+ \pgf@circ@count@c=\pgf@circ@count@a
\pgftext[bottom,
- at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% bottom
- \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\c@pgf@counta\relax
+ \pgf@circ@count@c=\numexpr\pgf@circ@count@b+\pgf@circ@count@a\relax
\pgftext[right,
- at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@down},
+ at=\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down},
rotate=\rot]{\mytext}
% right
- \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\c@pgf@counta+1\relax
+ \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b-\pgf@circ@count@a+1\relax
\pgftext[top,
- at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step},
+ at=\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step},
rotate=\rot]{\mytext}
% top
- \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\c@pgf@counta\relax
+ \pgf@circ@count@c=\numexpr3*\pgf@circ@count@b+\pgf@circ@count@a\relax
\pgftext[left,
- at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@up},
+ at=\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up},
rotate=\rot]{\mytext}
\fi
- \advance\c@pgf@counta-1\relax%
+ \advance\pgf@circ@count@a-1\relax%
\repeatpgfmathloop
\fi
\endpgfscope
\ifdim\pgf@circ@res@other>0pt
\pgfscope
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/multipoles/external pins thickness}\pgflinewidth}
- \c@pgf@counta=\numpins%
- \divide\c@pgf@counta by 4 \pgf@circ@count@b=\c@pgf@counta
+ \pgf@circ@count@a=\numpins%
+ \divide\pgf@circ@count@a by 4 \pgf@circ@count@b=\pgf@circ@count@a
\pgfmathloop%
- \ifnum\c@pgf@counta>0
+ \ifnum\pgf@circ@count@a>0
\edef\padfrac{\pgfkeysvalueof{/tikz/circuitikz/multipoles/external pad fraction}}
\ifnum\padfrac>0
\pgf@circ@res@temp=\pgf@circ@res@step\divide\pgf@circ@res@temp by \padfrac
% left side pads
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
% bottom side pads
- \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@down-\pgf@circ@res@other}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@down-\pgf@circ@res@other}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down-\pgf@circ@res@other}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down-\pgf@circ@res@other}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down}}
% right side pads
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@temp+\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
% top side pads
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@up+\pgf@circ@res@other}}
- \pgfpathlineto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@up+\pgf@circ@res@other}}
- \pgfpathlineto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up+\pgf@circ@res@other}}
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up+\pgf@circ@res@other}}
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@temp+\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up}}
\else
% left side pins
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
% bottom side pins
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@down-\pgf@circ@res@other}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@down-\pgf@circ@res@other}}
% right side pins
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@other}{\pgf@circ@res@up+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}}
% top side pins
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\c@pgf@counta)*\pgf@circ@res@step}{\pgf@circ@res@up+\pgf@circ@res@other}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+(\pgf@circ@qfp@pin@shift-\the\pgf@circ@count@a)*\pgf@circ@res@step}{\pgf@circ@res@up+\pgf@circ@res@other}}
\fi
- \advance\c@pgf@counta-1\relax%
+ \advance\pgf@circ@count@a-1\relax%
\repeatpgfmathloop
\pgfusepath{stroke}
\endpgfscope
@@ -449,16 +447,16 @@
% and is executed just before a node is drawn.
\pgfutil@g@addto@macro\pgf@sh@s@qfpchip{%
% Start with the maximum pin number and go backwards.
- \c@pgf@counta=\numpins%
+ \pgf@circ@count@a=\numpins%
\pgfmathloop%
- \ifnum\c@pgf@counta>0
- \expandafter\xdef\csname pgf@anchor@qfpchip@pin\space\the\c@pgf@counta\endcsname{%
- \noexpand\pgf@circ@qfppinanchor{\the\c@pgf@counta}{1}%
+ \ifnum\pgf@circ@count@a>0
+ \expandafter\xdef\csname pgf@anchor@qfpchip@pin\space\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@qfppinanchor{\the\pgf@circ@count@a}{1}%
}
- \expandafter\xdef\csname pgf@anchor@qfpchip@bpin\space\the\c@pgf@counta\endcsname{%
- \noexpand\pgf@circ@qfppinanchor{\the\c@pgf@counta}{0}%
+ \expandafter\xdef\csname pgf@anchor@qfpchip@bpin\space\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@qfppinanchor{\the\pgf@circ@count@a}{0}%
}
- \advance\c@pgf@counta-1\relax%
+ \advance\pgf@circ@count@a-1\relax%
\repeatpgfmathloop%
}%
}
@@ -619,18 +617,19 @@
\endpgfscope
\fi
- % \typeout{CHANNELS\space\channels\space ANGLE\space\angle}
- \c@pgf@counta=\channels\relax
+ % \typeout{CHANNELS\space\channels\space ANGLE\space\angle STEPA\space\stepa}
+ \pgf@circ@count@a=\channels\relax
\pgfmathsetmacro{\currenta}{-\angle}
\pgfmathloop%
- \ifnum\c@pgf@counta>0
- % \typeout{LOOP\space\the\c@pgf@counta\space CURRENTA\space\currenta\space RIGHT\space\the\pgf@circ@res@right}
+ \ifnum\pgf@circ@count@a>0
+ % \typeout{LOOPIN\space\space\the\pgf@circ@count@a\space CURRENTA\space\currenta\space RIGHT\space\the\pgf@circ@res@right}
\pgfscope
\pgftransformshift{\pgfpointadd{\pgfpoint{\pgf@circ@res@left}{0pt}}{\pgfpointpolar{\currenta}{2\pgf@circ@res@right}}}
- \pgfnode{\cshape}{center}{}{\thisshape-out \the\c@pgf@counta}{\pgfusepath{stroke}}
+ \pgfnode{\cshape}{center}{}{\thisshape-out \the\pgf@circ@count@a}{\pgfusepath{stroke}}
\endpgfscope
\pgfmathsetmacro{\currenta}{\currenta+\stepa}
- \advance\c@pgf@counta by -1\relax%
+ % \typeout{LOOPOUT\space\the\pgf@circ@count@a\space CURRENTA\space\currenta\space RIGHT\space\the\pgf@circ@res@right}
+ \advance\pgf@circ@count@a by -1\relax%
\repeatpgfmathloop
\pgfscope % input
@@ -642,25 +641,25 @@
% and is executed just before a node is drawn.
\pgfutil@g@addto@macro\pgf@sh@s@rotaryswitch{%
% Start with the maximum pin number and go backwards.
- \c@pgf@counta=\channels\relax
+ \pgf@circ@count@a=\channels\relax
\pgfmathloop%
- \ifnum\c@pgf@counta>0
+ \ifnum\pgf@circ@count@a>0
% we will create two anchors per pin: the "normal one" like `pin 1` for the
% electrical contact, and the "border one" like `bpin 1` for labels.
% they will coincide if `external pins width` is set to 0.
- \expandafter\xdef\csname pgf@anchor@rotaryswitch@out\space\the\c@pgf@counta\endcsname{%
- \noexpand\pgf@circ@rotaryanchor{\the\c@pgf@counta}{1}{0}%
+ \expandafter\xdef\csname pgf@anchor@rotaryswitch@out\space\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@rotaryanchor{\the\pgf@circ@count@a}{1}{0}%
}
- \expandafter\xdef\csname pgf@anchor@rotaryswitch@cout\space\the\c@pgf@counta\endcsname{%
- \noexpand\pgf@circ@rotaryanchor{\the\c@pgf@counta}{0}{0}%
+ \expandafter\xdef\csname pgf@anchor@rotaryswitch@cout\space\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@rotaryanchor{\the\pgf@circ@count@a}{0}{0}%
}
- \expandafter\xdef\csname pgf@anchor@rotaryswitch@aout\space\the\c@pgf@counta\endcsname{%
- \noexpand\pgf@circ@rotaryanchor{\the\c@pgf@counta}{0}{1}%
+ \expandafter\xdef\csname pgf@anchor@rotaryswitch@aout\space\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@rotaryanchor{\the\pgf@circ@count@a}{0}{1}%
}
- \expandafter\xdef\csname pgf@anchor@rotaryswitch@sqout\space\the\c@pgf@counta\endcsname{%
- \noexpand\pgf@circ@rotarysqanchor{\the\c@pgf@counta}{0}%
+ \expandafter\xdef\csname pgf@anchor@rotaryswitch@sqout\space\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@rotarysqanchor{\the\pgf@circ@count@a}{0}%
}
- \advance\c@pgf@counta by -1\relax%
+ \advance\pgf@circ@count@a by -1\relax%
\repeatpgfmathloop%
}%
}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
index a09d2076e66..fc9960b4a09 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
@@ -464,23 +464,30 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
\pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
- \pgfpatharc{0}{90} {0.4\pgf@circ@res@up}
- \pgfsetarrowsend{latex}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
- \pgfpatharc{0}{-90} {0.4\pgf@circ@res@up}
- \pgfsetarrowsend{latex}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
- \pgfpatharc{180}{90} {0.4\pgf@circ@res@up}
- \pgfsetarrowsend{latex}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
- \pgfpatharc{-180}{-90} {0.4\pgf@circ@res@up}
- \pgfsetarrowsend{latex}
- \pgfusepath{draw}
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
+ \pgfpatharc{0}{90} {0.4\pgf@circ@res@up}
+ \pgfsetarrowsend{latex}
+ \pgfusepath{draw}
+ \endpgfscope
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@left}{0pt}}
+ \pgfpatharc{0}{-90} {0.4\pgf@circ@res@up}
+ \pgfsetarrowsend{latex}
+ \pgfusepath{draw}
+ \endpgfscope
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
+ \pgfpatharc{180}{90} {0.4\pgf@circ@res@up}
+ \pgfsetarrowsend{latex}
+ \pgfusepath{draw}
+ \endpgfscope
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint{0.1\pgf@circ@res@right}{0pt}}
+ \pgfpatharc{-180}{-90} {0.4\pgf@circ@res@up}
+ \pgfsetarrowsend{latex}
+ \pgfusepath{draw}
+ \endpgfscope
}
% contrib Kristofer M. Monisit
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
index bfcffe9d359..c64f400d214 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
@@ -1644,13 +1644,15 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfusepath{draw}
\fi
- \pgfpathcircle{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
- {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
- \ifpgf@circuit@pmos@emptycircle
- \pgfsetfillcolor{white}
+ \ifpgf@circuit@pmos@nocircle\else
+ \pgfpathcircle{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
+ \ifpgf@circuit@pmos@emptycircle
+ \pgfsetfillcolor{white}
+ \fi
+ \pgfusepath{draw,fill}
\fi
- \pgfusepath{draw,fill}
}
%% HEMT FET Transistor
@@ -4193,21 +4195,21 @@
% 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}
+ \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}
+ \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
}
@@ -4218,52 +4220,52 @@
%% \pgfcircdeclaretube{tube name}{grid anchors}{grid drawing code}
\long\def\pgfcircdeclaretube#1#2#3{%
\pgfdeclareshape{#1}{
- \anchor{center}{
- \pgfpointorigin
- }
- \savedanchor\northwest{%
- \pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@Rlen
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \savedanchor\northwest{%
+ \pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@Rlen
\pgf@circ@res@right=\ctikzvalof{tubes/width}\pgf@circ@Rlen
% x and y should be half the Rlen
- \pgf@y=\pgf@circ@res@up
- \pgf@y=.5\pgf@y
- \pgf@x=-\pgf@circ@res@right
- \pgf@x=.5\pgf@x
- }
+ \pgf@y=\pgf@circ@res@up
+ \pgf@y=.5\pgf@y
+ \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{east}{%
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=0pt
+ }
\anchor{south}{%
- \northwest
- \pgf@y=-\pgf@y
+ \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
- }
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
- }
+ \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
+ }
+ \anchor{south west}{
+ \northwest
+ \pgf@y=-\pgf@y
+ }
\anchor{anode} {%
\northwest
\pgf@x=0pt
@@ -4295,85 +4297,85 @@
\pgf@x=-\pgfmathresult\pgf@x
\pgf@y=-\pgf@y
}
-
+
% Extra anchors
#2
-
+
\backgroundpath{
\pgfscope
- % Line width for tripoles
- \pgfsetlinewidth{\ctikzvalof{tripoles/thickness}\pgflinewidth}
-
- % Setup to draw tube
- \pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@Rlen
- \pgf@circ@res@right=\ctikzvalof{tubes/width}\pgf@circ@Rlen
- \pgf@circ@res@up=\ctikzvalof{tubes/tube radius}\pgf@circ@res@up
- \pgf@circ@res@right=\ctikzvalof{tubes/tube radius}\pgf@circ@res@right
-
- % Tube fill color (if any)
- \ifx\tikz@fillcolor\pgfutil@empty
- \else
- \pgfscope
- \pgfsetfillcolor{\tikz@fillcolor}
- \pgf@circ@tubes@drawtube
- \pgfusepath{fill}
- \endpgfscope
- \fi
-
- % Tube outline
- \pgf@circ@tubes@drawtube
-
- % Setup to draw grid, filament, anode and cathode
- \pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@Rlen
- \pgf@circ@res@right=\ctikzvalof{tubes/width}\pgf@circ@Rlen
- \pgf@circ@res@up=0.5\pgf@circ@res@up
- \pgf@circ@res@right=0.5\pgf@circ@res@right
-
- % Grid drawing
- #3
-
- % Filament (is not drawn by default)
- \ifpgf@circuit@tubes@filament
- \pgf@circ@res@temp=-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up
- \advance\pgf@circ@res@temp by -\ctikzvalof{tubes/filament distance}\pgf@circ@res@up
- \pgfmathparse{(\ctikzvalof{tubes/tube radius}*sin(\ctikzvalof{tubes/filament angle})}
- \pgf@xa=\pgfmathresult\pgf@circ@res@right
- \pgfmathparse{\ctikzvalof{tubes/tube radius}+\ctikzvalof{tubes/tube radius}*cos(\ctikzvalof{tubes/filament angle}}
- \pgf@ya=\pgfmathresult\pgf@circ@res@up
- \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@temp}}
- \pgfpathlineto{\pgfpoint{-\pgf@xa}{-\pgf@ya}}
- \pgfpathlineto{\pgfpoint{-\pgf@xa}{-\pgf@circ@res@up}}
- \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@temp}}
- \pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@ya}}
- \pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@circ@res@up}}
- \pgf@circuit@tubes@filamentfalse
- \fi
-
- % Anode (or plate)
- \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} % north
- \pgfpathlineto{\pgfpoint{0pt}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}}
- \pgfpathmoveto{\pgfpoint{-\ctikzvalof{tubes/anode width}\pgf@circ@res@right}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/anode width}\pgf@circ@res@right}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}}
-
- % Cathode
- \ifpgf@circuit@tubes@nocathode
- \pgf@circuit@tubes@nocathodefalse
- \else
- \pgfsetcornersarced{\pgfpoint{\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}{\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}}
- \pgfpathmoveto{\pgfpoint{-\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{-\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up}}
- \ifpgf@circuit@tubes@fullcathode
- \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\pgf@circ@res@up}}
- \pgf@circuit@tubes@fullcathodefalse
- \else
- \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up-\ctikzvalof{tubes/cathode right extend}\pgf@circ@res@up}}
- \fi
- \fi
-
- % Draw the background
- \pgfusepath{draw}
-
+ % Line width for tripoles
+ \pgfsetlinewidth{\ctikzvalof{tripoles/thickness}\pgflinewidth}
+
+ % Setup to draw tube
+ \pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@Rlen
+ \pgf@circ@res@right=\ctikzvalof{tubes/width}\pgf@circ@Rlen
+ \pgf@circ@res@up=\ctikzvalof{tubes/tube radius}\pgf@circ@res@up
+ \pgf@circ@res@right=\ctikzvalof{tubes/tube radius}\pgf@circ@res@right
+
+ % Tube fill color (if any)
+ \ifx\tikz@fillcolor\pgfutil@empty
+ \else
+ \pgfscope
+ \pgfsetfillcolor{\tikz@fillcolor}
+ \pgf@circ@tubes@drawtube
+ \pgfusepath{fill}
+ \endpgfscope
+ \fi
+
+ % Tube outline
+ \pgf@circ@tubes@drawtube
+
+ % Setup to draw grid, filament, anode and cathode
+ \pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@Rlen
+ \pgf@circ@res@right=\ctikzvalof{tubes/width}\pgf@circ@Rlen
+ \pgf@circ@res@up=0.5\pgf@circ@res@up
+ \pgf@circ@res@right=0.5\pgf@circ@res@right
+
+ % Grid drawing
+ #3
+
+ % Filament (is not drawn by default)
+ \ifpgf@circuit@tubes@filament
+ \pgf@circ@res@temp=-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up
+ \advance\pgf@circ@res@temp by -\ctikzvalof{tubes/filament distance}\pgf@circ@res@up
+ \pgfmathparse{(\ctikzvalof{tubes/tube radius}*sin(\ctikzvalof{tubes/filament angle})}
+ \pgf@xa=\pgfmathresult\pgf@circ@res@right
+ \pgfmathparse{\ctikzvalof{tubes/tube radius}+\ctikzvalof{tubes/tube radius}*cos(\ctikzvalof{tubes/filament angle}}
+ \pgf@ya=\pgfmathresult\pgf@circ@res@up
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@temp}}
+ \pgfpathlineto{\pgfpoint{-\pgf@xa}{-\pgf@ya}}
+ \pgfpathlineto{\pgfpoint{-\pgf@xa}{-\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@temp}}
+ \pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@ya}}
+ \pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@circ@res@up}}
+ \pgf@circuit@tubes@filamentfalse
+ \fi
+
+ % Anode (or plate)
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}} % north
+ \pgfpathlineto{\pgfpoint{0pt}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{-\ctikzvalof{tubes/anode width}\pgf@circ@res@right}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/anode width}\pgf@circ@res@right}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}}
+
+ % Cathode
+ \ifpgf@circuit@tubes@nocathode
+ \pgf@circuit@tubes@nocathodefalse
+ \else
+ \pgfsetcornersarced{\pgfpoint{\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}{\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{-\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up}}
+ \ifpgf@circuit@tubes@fullcathode
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\pgf@circ@res@up}}
+ \pgf@circuit@tubes@fullcathodefalse
+ \else
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up-\ctikzvalof{tubes/cathode right extend}\pgf@circ@res@up}}
+ \fi
+ \fi
+
+ % Draw the background
+ \pgfusepath{draw}
+
\endpgfscope
}
}
@@ -4383,10 +4385,14 @@
\pgfcircdeclaretube{triode}
{
- \anchor{grid} {%
- \northwest
+ \anchor{grid} {% should not be used
+ \northwest
\pgf@y=\ctikzvalof{tubes/grid shift}\pgf@y
- }
+ }
+ \anchor{control} {%
+ \northwest
+ \pgf@y=\ctikzvalof{tubes/grid shift}\pgf@y
+ }
}
{
% Grid protrusion
@@ -4397,40 +4403,47 @@
% Grid dashes: calculations
\pgf@xb=2\pgf@circ@res@right
\pgf@circ@res@step=\ctikzvalof{tubes/tube radius}\pgf@xb
- \@tempcnta=\ctikzvalof{tubes/grid dashes} % dashes*2+1
- \multiply\@tempcnta by 2\relax
- \advance\@tempcnta by 1\relax
+ \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} % dashes*2+1
+ \multiply\pgf@circ@count@a by 2\relax
+ \advance\pgf@circ@count@a by 1\relax
\advance\pgf@circ@res@step by -\pgf@xa
- \divide\pgf@circ@res@step by \@tempcnta
+ \divide\pgf@circ@res@step by \pgf@circ@count@a
% Grid dashes: draw
\pgf@circ@res@temp=\pgf@xa
- \@tempcnta=\ctikzvalof{tubes/grid dashes}
+ \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes}
\loop
- \advance\pgf@circ@res@temp by\pgf@circ@res@step
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\ctikzvalof{tubes/grid shift}\pgf@circ@res@up}}
- \advance\pgf@circ@res@temp by\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp}{\ctikzvalof{tubes/grid shift}\pgf@circ@res@up}}
- \advance\@tempcnta by-1
- \ifnum\@tempcnta>0\relax
+ \advance\pgf@circ@res@temp by\pgf@circ@res@step
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\ctikzvalof{tubes/grid shift}\pgf@circ@res@up}}
+ \advance\pgf@circ@res@temp by\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp}{\ctikzvalof{tubes/grid shift}\pgf@circ@res@up}}
+ \advance\pgf@circ@count@a by-1
+ \ifnum\pgf@circ@count@a>0\relax
\repeat
}
\pgfcircdeclaretube{tetrode}
{
- \anchor{grid} {%
- \northwest
+ \anchor{grid} {% should not be used
+ \northwest
\pgfutil@tempdima=\pgf@y
\pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y
\pgf@y=0.5\pgf@y
\advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima
- }
+ }
+ \anchor{control} {%
+ \northwest
+ \pgfutil@tempdima=\pgf@y
+ \pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y
+ \pgf@y=0.5\pgf@y
+ \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima
+ }
\anchor{screen} {%
- \northwest
+ \northwest
\pgfutil@tempdima=\pgf@y
\pgf@y=\ctikzvalof{tubes/grid separation}\pgf@y
\pgf@y=0.5\pgf@y
\advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima
- }
+ }
}
{
% Grid x/y points
@@ -4450,44 +4463,50 @@
% Grid dashes: calculations
\pgf@xb=2\pgf@circ@res@right
\pgf@circ@res@step=\ctikzvalof{tubes/tube radius}\pgf@xb
- \@tempcnta=\ctikzvalof{tubes/grid dashes} % dashes*2+1
- \multiply\@tempcnta by 2\relax
- \advance\@tempcnta by 1\relax
+ \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} % dashes*2+1
+ \multiply\pgf@circ@count@a by 2\relax
+ \advance\pgf@circ@count@a by 1\relax
\advance\pgf@circ@res@step by -\pgf@xa
- \divide\pgf@circ@res@step by \@tempcnta
+ \divide\pgf@circ@res@step by \pgf@circ@count@a
% Grid dashes: draw
\pgf@circ@res@temp=\pgf@xa
- \@tempcnta=\ctikzvalof{tubes/grid dashes}
+ \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes}
\loop
- \advance\pgf@circ@res@temp by\pgf@circ@res@step
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdima}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdima}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdimb}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdimb}}
- \advance\pgf@circ@res@temp by\pgf@circ@res@step
- \advance\@tempcnta by-1
- \ifnum\@tempcnta>0\relax
+ \advance\pgf@circ@res@temp by\pgf@circ@res@step
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdima}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdima}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdimb}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdimb}}
+ \advance\pgf@circ@res@temp by\pgf@circ@res@step
+ \advance\pgf@circ@count@a by-1
+ \ifnum\pgf@circ@count@a>0\relax
\repeat
}
\pgfcircdeclaretube{pentode}
{
- \anchor{grid} {%
- \northwest
+ \anchor{grid} {% should not be used
+ \northwest
\pgfutil@tempdima=\pgf@y
\pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y
\advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima
- }
+ }
+ \anchor{control} {%
+ \northwest
+ \pgfutil@tempdima=\pgf@y
+ \pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y
+ \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima
+ }
\anchor{screen} {%
- \northwest
+ \northwest
\pgf@y=\ctikzvalof{tubes/grid shift}\pgf@y
- }
+ }
\anchor{suppressor} {%
- \northwest
+ \northwest
\pgfutil@tempdima=\pgf@y
\pgf@y=\ctikzvalof{tubes/grid separation}\pgf@y
\advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima
- }
+ }
}
{
% Grid x/y points
@@ -4497,37 +4516,102 @@
\pgfutil@tempdimb=-\pgfutil@tempdima
\advance\pgfutil@tempdima by \ctikzvalof{tubes/grid shift}\pgf@circ@res@up
\advance\pgfutil@tempdimb by \ctikzvalof{tubes/grid shift}\pgf@circ@res@up
- \@tempdimc=\ctikzvalof{tubes/grid shift}\pgf@circ@res@up
+ \pgf@circ@res@other=\ctikzvalof{tubes/grid shift}\pgf@circ@res@up
% Grid protrusion
\pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdimb}}
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgfutil@tempdimb}}
\pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdima}}
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgfutil@tempdima}}
- \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\@tempdimc}}
- \pgfpathlineto{\pgfpoint{\pgf@xa}{\@tempdimc}}
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgf@circ@res@other}}
+ \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@circ@res@other}}
+ % Grid dashes: calculations
+ \pgf@xb=2\pgf@circ@res@right
+ \pgf@circ@res@step=\ctikzvalof{tubes/tube radius}\pgf@xb
+ \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} % dashes*2+1
+ \multiply\pgf@circ@count@a by 2\relax
+ \advance\pgf@circ@count@a by 1\relax
+ \advance\pgf@circ@res@step by -\pgf@xa
+ \divide\pgf@circ@res@step by \pgf@circ@count@a
+ % Grid dashes: draw
+ \pgf@circ@res@temp=\pgf@xa
+ \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes}
+ \loop
+ \advance\pgf@circ@res@temp by\pgf@circ@res@step
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdima}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdima}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdimb}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdimb}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@other}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgf@circ@res@other}}
+ \advance\pgf@circ@res@temp by\pgf@circ@res@step
+ \advance\pgf@circ@count@a by-1
+ \ifnum\pgf@circ@count@a>0\relax
+ \repeat
+}
+
+\pgfcircdeclaretube{pentode suppressor to cathode}
+{
+ \anchor{grid} {% should not be used
+ \northwest
+ \pgfutil@tempdima=\pgf@y
+ \pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y
+ \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima
+ }
+ \anchor{control} {%
+ \northwest
+ \pgfutil@tempdima=\pgf@y
+ \pgf@y=-\ctikzvalof{tubes/grid separation}\pgf@y
+ \advance\pgf@y by \ctikzvalof{tubes/grid shift}\pgfutil@tempdima
+ }
+ \anchor{screen} {%
+ \northwest
+ \pgf@y=\ctikzvalof{tubes/grid shift}\pgf@y
+ }
+}
+{
+ % Grid x/y points
+ \pgf@xa=-\ctikzvalof{tubes/tube radius}\pgf@circ@res@right
+ \advance\pgf@xa by -\ctikzvalof{tubes/grid protrusion}\pgf@circ@res@right
+ \pgfutil@tempdima=\ctikzvalof{tubes/grid separation}\pgf@circ@res@up
+ \pgfutil@tempdimb=-\pgfutil@tempdima
+ \advance\pgfutil@tempdima by \ctikzvalof{tubes/grid shift}\pgf@circ@res@up
+ \advance\pgfutil@tempdimb by \ctikzvalof{tubes/grid shift}\pgf@circ@res@up
+ \pgf@circ@res@other=\ctikzvalof{tubes/grid shift}\pgf@circ@res@up
+ % Grid protrusion
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgfutil@tempdimb}}
+ \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgfutil@tempdimb}}
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\pgf@circ@res@other}}
+ \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@circ@res@other}}
% Grid dashes: calculations
\pgf@xb=2\pgf@circ@res@right
\pgf@circ@res@step=\ctikzvalof{tubes/tube radius}\pgf@xb
- \@tempcnta=\ctikzvalof{tubes/grid dashes} % dashes*2+1
- \multiply\@tempcnta by 2\relax
- \advance\@tempcnta by 1\relax
+ \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes} % dashes*2+1
+ \multiply\pgf@circ@count@a by 2\relax
+ \advance\pgf@circ@count@a by 1\relax
\advance\pgf@circ@res@step by -\pgf@xa
- \divide\pgf@circ@res@step by \@tempcnta
+ \divide\pgf@circ@res@step by \pgf@circ@count@a
% Grid dashes: draw
\pgf@circ@res@temp=\pgf@xa
- \@tempcnta=\ctikzvalof{tubes/grid dashes}
+ \pgf@circ@count@a=\ctikzvalof{tubes/grid dashes}
\loop
- \advance\pgf@circ@res@temp by\pgf@circ@res@step
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdima}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdima}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdimb}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdimb}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\@tempdimc}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\@tempdimc}}
- \advance\pgf@circ@res@temp by\pgf@circ@res@step
- \advance\@tempcnta by-1
- \ifnum\@tempcnta>0\relax
+ \advance\pgf@circ@res@temp by\pgf@circ@res@step
+ \ifnum\pgf@circ@count@a>1\relax
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdimb}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdimb}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgf@circ@res@other}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgf@circ@res@other}}
+ \fi
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdima}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp+\pgf@circ@res@step}{\pgfutil@tempdima}}
+ \advance\pgf@circ@res@temp by\pgf@circ@res@step
+ \advance\pgf@circ@count@a by-1
+ \ifnum\pgf@circ@count@a>0\relax
\repeat
+ % Grid: connection from suppressor to cathode
+ \pgfsetcornersarced{\pgfpoint{\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}{\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@temp}{\pgfutil@tempdima-2*\ctikzvalof{tubes/grid separation}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{tubes/cathode width}\pgf@circ@res@right-0.4142136*\ctikzvalof{tubes/cathode corners}\pgf@circ@res@right}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up-0.4142136*\ctikzvalof{tubes/cathode corners}\pgf@circ@res@up}}
+
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
index fddee78a01a..c480dc90ff6 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
@@ -9,8 +9,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{0.9.2}
-\def\pgfcircversiondate{2019/06/21}
+\def\pgfcircversion{0.9.3}
+\def\pgfcircversiondate{2019/07/13}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
@@ -344,7 +344,7 @@
\input pgfcirccurrent.tex
\input pgfcircflow.tex
-% notice that the default is nooldvoltagedirections; it's not explicitly set to allow for the warning
+% notice that the default is nooldvoltagedirection; it's not explicitly set to allow for the warning
\ExecuteOptions{nofetbodydiode, nofetsolderdot, europeancurrents, europeanvoltages,americanports, americanresistors, cuteinductors ,europeangfsurgearrester, nosiunitx, noarrowmos, smartlabels}
\ProcessOptions\relax
@@ -360,7 +360,7 @@
\ifpgf@circ@explicitvdir\else
\PackageWarningNoLine{circuitikz}{%
You did not specify one of the voltage directions:\MessageBreak
- \space\space oldvoltagedirections, nooldvoltagedirections, \MessageBreak
+ \space\space oldvoltagedirection, nooldvoltagedirection, \MessageBreak
\space\space RPvoltages or EFvoltages \MessageBreak
Default directions may have changed, \MessageBreak
please check the manual%