summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-05-05 19:41:50 +0000
committerKarl Berry <karl@freefriends.org>2024-05-05 19:41:50 +0000
commit29e4041bd4be321db779bf35b0d5e875975a3796 (patch)
treef4297543d6f32b82cda2a59723919e42ee2f068c
parent98e33c2d326e4dc0ac6afad4aadc28669638a64c (diff)
circuitikz (5may24)
git-svn-id: svn://tug.org/texlive/trunk@71178 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdfbin13460 -> 13862 bytes
-rw-r--r--Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md11
-rw-r--r--Master/texmf-dist/doc/generic/circuitikz/README.md4
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/changelog.tex33
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdfbin1761778 -> 2422724 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex124
-rw-r--r--Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex4
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex167
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex202
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty4
10 files changed, 422 insertions, 127 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 add5ceae2a7..d4f9bc36a2f 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 d484303de37..6f6bcd4f95e 100644
--- a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
+++ b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
@@ -1,6 +1,17 @@
<!--- 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.6.8 (2024-05-05)
+
+ Several new components, more anchors, a bit of documentation enhancement; maybe the biggest change is the new "flexible" tube.
+
+ - Added `mid` anchor to all traditional switches
+ - Added a slashed generic European-style resistor (thanks to [Jana](https://tex.stackexchange.com/q/711702/38080))
+ - Added a multi-anode tube for implementing nixies and vfd (thanks to [GitHub user nogger33](https://github.com/circuitikz/circuitikz/issues/785))
+ - Switch the default compiler to pdflatex (see https://tex.stackexchange.com/q/709273/38080)
+ - Added a warning about color and engine in the documentation
+ - Enhanced the documentation for instruments (thanks to [Github user mxxmxm](https://github.com/circuitikz/circuitikz/issues/787))
+
* Version 1.6.7 (2024-02-09)
Several new blocks, more flexible generic anchors for blocks, and a new option to align the signs on american-style voltage sources.
diff --git a/Master/texmf-dist/doc/generic/circuitikz/README.md b/Master/texmf-dist/doc/generic/circuitikz/README.md
index 584e271042a..30e3589b743 100644
--- a/Master/texmf-dist/doc/generic/circuitikz/README.md
+++ b/Master/texmf-dist/doc/generic/circuitikz/README.md
@@ -37,6 +37,8 @@ in the preamble and compile away, both with PS and PDF target output.
It is higly recommended to go through the [tutorials in the manual](https://circuitikz.github.io/circuitikz/circuitikzmanualgit.pdf#c) and to learn a bit of Ti*k*Z before for example, go through at least the [basic Ti*k*Z one](https://tikz.dev/tutorial), but there are more suggestions in the documentation.
+*Notice* that for the time being, due to [this bug](https://bugs.launchpad.net/ubuntu/+source/context/+bug/2058409), automatic (CI) checks for ConTeXt compatibility is disabled. I (Romano) am still checking it at home, but I am not able to have it integrated in the CI.
+
### Development or newer version
If you want to use the git version, go to the [GitHub page for the project](https://circuitikz.github.io/circuitikz/), download the last version (or the one you want to use) — it's the links called "download the latest version in a single file". You will have a file called `circuitikzgit.sty` that you should put somewhere in your LaTeX input path; the best place is in the same directory where your main file live. Then, just use it instead of the normal one:
@@ -53,7 +55,7 @@ Be aware that options and style files can (and do) change between versions, so y
### Older version
-There is a roll-back mechanism in the package, that let you use older versions if you need them; the details are in the manual, look at the section named *"Incompabilities between versions"* for details.
+There is a roll-back mechanism in the package, that let you use older versions if you need them; the details are in the manual, look at the section named *"Incompatibilities between versions"* for details.
You have all the code and the corresponding manual available in the [in the github page](http://circuitikz.github.io/circuitikz/) of the project, since version 0.6 onward.
diff --git a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
index c79304aa167..d9594dc1fcd 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
@@ -5,6 +5,33 @@ full list of changes.
\begin{itemize}
\item
+ Version 1.6.8 (2024-05-05)
+
+ Several new components, more anchors, a bit of documentation
+ enhancement; maybe the biggest change is the new ``flexible'' tube.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Added \texttt{mid} anchor to all traditional switches
+ \item
+ Added a slashed generic European-style resistor (thanks to
+ \href{https://tex.stackexchange.com/q/711702/38080}{Jana})
+ \item
+ Added a multi-anode tube for implementing nixies and vfd (thanks to
+ \href{https://github.com/circuitikz/circuitikz/issues/785}{GitHub
+ user nogger33})
+ \item
+ Switch the default compiler to pdflatex (see
+ https://tex.stackexchange.com/q/709273/38080)
+ \item
+ Added a warning about color and engine in the documentation
+ \item
+ Enhanced the documentation for instruments (thanks to
+ \href{https://github.com/circuitikz/circuitikz/issues/787}{Github
+ user mxxmxm})
+ \end{itemize}
+\item
Version 1.6.7 (2024-02-09)
Several new blocks, more flexible generic anchors for blocks, and a
@@ -325,7 +352,7 @@ full list of changes.
B. Cameron, user \texttt{@cameroncb1} on GitHub)
\item
Added Shockley diode (suggested by
- {[}@dauph{]}(https://tex.stackexchange.com/questions/646039/creating-a-shockley-diode-in-circuitikz))
+ \href{https://tex.stackexchange.com/questions/646039/creating-a-shockley-diode-in-circuitikz}{@dauph})
\end{itemize}
\item
Version 1.5.2 (2022-05-08)
@@ -439,7 +466,7 @@ full list of changes.
Robustify some shapes: do not let arrows option pass to the inner
drawing (see
\href{https://tex.stackexchange.com/a/632084/38080}{here} and
- \href{https://matrix.to/\#/!NuxCISwYQJuyWwNsEI:matrix.org/$vQO6luq1F66LJ79dERmaqKI46qMBcjStqYCPi725uZE?via=matrix.org\&via=2krueger.de\&via=im.f3l.de}{here})
+ \href{https://matrix.to/\#/!NuxCISwYQJuyWwNsEI:matrix.org/$vQO6luq1F66LJ79dERmaqKI46qMBcjStqYCPi725uZE?via=matrix.org&via=2krueger.de&via=im.f3l.de}{here})
\item
Add warning about global draw options in the manual
\item
@@ -1503,7 +1530,7 @@ A detailed list of changes can be seen below.
\item
Fixed varcap symbol at small scalings
\item
- New packet-option "straightvoltages, to draw straight(no curved)
+ New packet-option ``straightvoltages, to draw straight(no curved)
voltage arrows
\item
New option ``invert'' to revert the node direction at paths
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
index c21540a9bea..9d1e52303dc 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 c775d7f9fc6..20a79f3d681 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
@@ -193,6 +193,13 @@ Finally, the \TikZ{} library \texttt{bending} is loaded by the package, and its
\subsection{Related and extension packages}
+\subsubsection{Related packages}
+
+At the Friedrich-Alexander-Universität, a group of developers are implementing a graphical interface to draw circuits with \Circuitikz{}.
+You can find more information \href{https://github.com/circuitikz/circuitikz/issues/782}{in this GitHub issue} or, better, in their \href{https://ussi.e-technik.uni-erlangen.de/}{main site}.
+
+\subsubsection{Extension packages}
+
\Circuitikz{} is meant to be, as much as possible, format-agnostic (which means that it can be used from \LaTeX{}, plain \TeX{} and~\ConTeXt). It is growing in functionality and components, but not everything can be added to the package. In this section, there is a list of packages, available at CTAN, that extend or enhance \Circuitikz{} but are distributed separately.\footnote{If you have a package or know a package that should be listed here, please contact the \Circuitikz{} authors, or, better, send a pull request to the project and it will be added.}
\begin{description}
@@ -212,6 +219,7 @@ This same issue creates a lot of problems with compatibility between \Circuitikz
Also, notice that several components will interact in a funny way with global path options. Depending on the specific component, some parameters are inherited by the internal shape, and some others are reset. This is not easy to fix in general. We want some options to go through --- fill color, dashed pattern for example --- and some others to stay only in the outer path; and if the background shape needs some option for drawing the internal shape, like for example a rounded corner, it \emph{must} reset the external option. So there is no perfect solution, although since \texttt{v1.5.0} the shapes have been ``robustified'', so that by default arced corners and arrows parameters will \emph{not} be propagated into the shape.
Arrows with \texttt{to[]} components don't work, anyway, so basically avoid this situation.
+In some cases, also the engine you are using (as \texttt{pdflatex}, \texttt{xelatex}, and so on) can impact coloring in corner cases (or even not so in the corner, like in \href{https://tex.stackexchange.com/q/709273/38080}{american-style voltage source signs}).
\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
\begin{circuitikz}[]
@@ -2049,6 +2057,7 @@ If you want the arrows to behave like the legacy symbols (which are shapes), \em
\circuitdescbip{open}{Open circuit}{}
\circuitdescbip*{generic}{Generic (symmetric) bipole}{}
\circuitdescbip*{xgeneric}{Crossed generic (symmetric) bipole}{}
+ \circuitdescbip*{sgeneric}{Slashed generic bipole}{}
\circuitdescbip*{tgeneric}{Tunable generic bipole}{}
\circuitdescbip*{ageneric}{Generic asymmetric bipole}{}
\circuitdescbip*{memristor}{Memristor}{Mr}
@@ -2961,16 +2970,50 @@ A similar approach can be used for dependent sources. Just remember that the anc
\subsection{Instruments}
+\subsubsection{Basic round instruments}
+
\begin{groupdesc}
- \circuitdescbip*{ammeter}{Ammeter}{}
- \circuitdescbip*{voltmeter}{Voltmeter}{}
- \circuitdescbip*{ohmmeter}{Ohmmeter}{}
\circuitdescbip*{rmeter}{Round meter (use \texttt{t=...} for the symbol)}{}(left/135/0.2, right/45/0.2, center/-90/0.3)
\circuitdescbip*{rmeterwa}{Round meter with arrow (use \texttt{t=...} for the symbol)}{}(left/135/0.2, right/45/0.2, center/-90/0.3)
+ \circuitdescbip*{ammeter}{Legacy ammeter}{}
+ \circuitdescbip*{voltmeter}{Legacy voltmeter}{}
+ \circuitdescbip*{ohmmeter}{Legacy ohmmeter}{}
+\end{groupdesc}
+
+You can define styles if you want to use the new shapes for round instrument similarly to the legacy ones:%
+\footnote{Suggested by \href{https://github.com/circuitikz/circuitikz/issues/787}{user mxxmxn on GitHub}.}
+
+\begin{LTXexample}[varwidth=true]
+\tikzset{vmeter/.style={rmeterwa, t=V}}
+\tikzset{ameter/.style={rmeterwa, t=A}}
+\tikzset{ometer/.style={rmeterwa, t=$\Omega$}}
+
+\begin{tikzpicture}
+ % Old meter style
+ \draw (0,2) to[voltmeter] ++(2,0)
+ to[ammeter] ++(2,0)
+ to[ohmmeter] ++(2,0);
+ % New meter style
+ \draw (0,0) to[vmeter] ++(2,0)
+ to[ameter] ++(2,0)
+ to[ometer] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+
+\subsubsection{Square instruments}
+
+Sometimes it is better to use a shape for instruments which is very different from the round symbols used for sources.
+
+\begin{groupdesc}
\circuitdescbip*{smeter}{Square meter (use \texttt{t=...} for the symbol)}{}(left/135/0.2, right/45/0.2, center/-90/0.3, in 1/-135/.5, in 2/-45/.5)
\circuitdescbip*{qiprobe}{QUCS-style current probe}{}(left/135/0.2, right/45/0.2, center/-90/0.3)
\circuitdescbip*{qvprobe}{QUCS-style voltage probe}{}(left/135/0.2, right/45/0.2, center/-90/0.3)
\circuitdescbip*{qpprobe}{QUCS-style power probe}{}(left/135/0.2, right/45/0.2, center/-90/0.3, v+/-135/.5, v-/-45/.5)
+\end{groupdesc}
+
+\subsubsection{Oscilloscopes and current probes}
+
+\begin{groupdesc}
\circuitdescbip*[oscope]{oscope}{Oscilloscope\footnotemark}{}(left/135/0.2, right/45/0.2,
in 1/-135/0.4, in 2/-45/0.4)
\footnotetext{Suggested by \texttt{@nobrl} on GitHub}
@@ -4947,6 +4990,60 @@ The dashed line pattern can be changed by setting the key \texttt{tubes/partial
\end{LTXexample}
+\subsubsection{Multi-anode tube}
+
+The multi-anode tube (\texttt{matube}) is a component thought to be tailored for several different usages,\footnote{It was added in \texttt{v1.6.8} after suggestions by user \texttt{bogger33} on GitHub \href{https://github.com/circuitikz/circuitikz/issues/781}{here} and \href{https://github.com/circuitikz/circuitikz/issues/785}{here}.} as shown in the examples below.
+
+The anchors for the multiple anodes have also alias names to ease the use in the case of implementing nixie tubes, because in that case the anode/cathode roles are swapped.
+
+\begin{groupdesc}
+ \circuitdesc*{matube}{Multi-anode tube}{}(anode 1/110/0.2, anode 2/60/0.2, anode 3/-30/0.2, cathode/-90/0.2, control/180/0.2 )
+ \circuitdesc*{matube, nixieanode, anodedot, nogrid}{Multi-anode tube used for nixie tubes}{}(nixie k1/110/0.2, nixie k2/60/0.2, nixie k3/-30/0.2, nixie a/-90/0.2)
+\end{groupdesc}
+
+Basically all the parameters available for triodes are available. The main difference is that the \texttt{anode width} parameter define the length of \emph{all} the anodes; those tubes are normally used with a \texttt{width} parameter bigger than \texttt{height}, to have an elongated device.
+
+The additional parameters/flags available only for \texttt{matube}s are the following.
+
+\begin{tabular}{l | l | l}
+ Key/Flag & Default value & Description\\
+ \hline
+ \texttt{anodes} & 3 & number of anodes \\
+ \texttt{anodedot} & false & substitute anodes bar for dots \\
+ \texttt{nixieanode} & false & substitute the cathode for the nixie-style anode \\
+ \texttt{nogrid} & false & suppresses the drawing of the grid \\
+\end{tabular}
+
+In the next example, we define a 10-anodes VFD tube:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\tikzset{vfd 10/.style={matube, filament, nocathode,
+ circuitikz/tubes/.cd,
+ width=3.6, height=1, anodes=10, anode width=0.6,
+ cathode width=0.1,
+}}
+\begin{circuitikz}[european]
+ \draw (0,0) node[vfd 10](A){};
+ \foreach \i in {1,...,10} \path (A.anode \i)
+ node[red, ocirc]{} node[above]{\tiny \i};
+\end{circuitikz}
+\end{LTXexample}
+
+And a 10-cathodes nixie tube:
+
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\tikzset{nixie/.style={matube, nogrid, nixieanode,
+ anodedot, circuitikz/tubes/.cd, cathode width=0.6,
+ width=3.6, height=1, anodes=10, anode width=0.6,
+}}
+\begin{circuitikz}[european]
+\draw (0,0) node[nixie](A){};
+\foreach \i in {1,...,10} \path (A.nixie k\i)
+ node[red, ocirc]{} node[above]{\tiny \i};
+ \path (A.nixie a) node[red, ocirc]{};
+\end{circuitikz}
+\end{LTXexample}
\subsubsection{Other tubes-like components}
@@ -5831,28 +5928,28 @@ The switches can be scaled with the key \texttt{switches/scale} (default \texttt
These are all of the to-style type:
\begin{groupdesc}
- \circuitdescbip[cspst]{switch}{Switch}{spst}
+ \circuitdescbip[cspst]{switch}{Switch}{spst}(left/135/0.1, right/45/0.1, mid/90/0.3)
\circuitdescbip[cspst]{closing switch}{Closing switch}{cspst}
\circuitdescbip[ospst]{opening switch}{Opening switch}{ospst}
- \circuitdescbip[nos]{normal open switch}{Normally open switch}{nos}
+ \circuitdescbip[nos]{normal open switch}{Normally open switch}{nos}(left/135/0.1, right/45/0.1, mid/90/0.3)
\circuitdescbip[ncs]{normal closed switch}{Normally closed switch}{ncs}
\circuitdescbip[oncs]{opening normal closed switch}{Opening normally closed switch}{oncs}
\circuitdescbip[cncs]{closing normal closed switch}{Closing normally closed switch}{cncs}
\circuitdescbip[onos]{opening normal open switch}{Opening normally open switch}{onos}
\circuitdescbip[cnos]{closing normal open switch}{Closing normally open switch\footnotemark}{cnos}
\footnotetext{These last four were contributed by \href{https://tex.stackexchange.com/questions/693446/new-switch-components-for-circuitikz}{Jakob «DraUX»}}
- \circuitdescbip[pushbutton]{push button}{Normally open push button}{normally open push button, nopb}(tip/0/0.2)
- \circuitdescbip[ncpushbutton]{normally closed push button}{Normally closed push button}{ncpb}(tip/0/0.2)
- \circuitdescbip[pushbuttonc]{normally open push button closed}{Normally open push button (in closed position)}{nopbc}(tip/0/0.2)
- \circuitdescbip[ncpushbuttono]{normally closed push button open}{Normally closed push button (in open position)}{ncpbo}(tip/0/0.2)
- \circuitdescbip[toggleswitch]{toggle switch}{Toggle switch}{}
- \circuitdescbip*{reed}{Reed switch}{}
+ \circuitdescbip[pushbutton]{push button}{Normally open push button}{normally open push button, nopb}(tip/0/0.2, mid/-90/0.2)
+ \circuitdescbip[ncpushbutton]{normally closed push button}{Normally closed push button}{ncpb}(tip/0/0.2, mid/-90/0.2)
+ \circuitdescbip[pushbuttonc]{normally open push button closed}{Normally open push button (in closed position)}{nopbc}(tip/0/0.2, mid/-90/0.2)
+ \circuitdescbip[ncpushbuttono]{normally closed push button open}{Normally closed push button (in open position)}{ncpbo}(tip/0/0.2, mid/-90/0.2)
+ \circuitdescbip[toggleswitch]{toggle switch}{Toggle switch}{}(out 1/0/0.2, out 2/0/0.2, in/135/0.1, mid/-90/0.2)
+ \circuitdescbip*{reed}{Reed switch}{}(left/135/0.1, right/45/0.1, mid/90/0.3)
\end{groupdesc}
while this is a node-style component:
\begin{groupdesc}
- \circuitdesc{spdt}{spdt}{}( in/180/0.2, out 1/0/0.2, out 2/0/0.2 )
+ \circuitdesc{spdt}{spdt}{}(in/180/0.2, out 1/0/0.2, out 2/0/0.2, mid/90/0.2)
\end{groupdesc}
\begin{LTXexample}[varwidth=true]
@@ -9610,6 +9707,7 @@ after loading \Circuitikz, and it will try to patch the default commands to keep
Before 1.5.0, \Circuitikz{} used black as the default color. Now it tries to follow the current color, as \TikZ{} does normally; but notice that there is a difference with the fill strategy:
+
\begin{LTXexample}[pos=t]
\color{red}
Red text
@@ -9639,6 +9737,8 @@ Basically, you should have no problem if:
Nevertheless, if you really need to do strange things with colors you can read on; you can do almost everything but there are several glitches to take into account.
+Moreover, in some cases, also the engine you are using (as \texttt{pdflatex}, \texttt{xelatex}, and so on) can impact corner cases (or even not so corner, like in \href{https://tex.stackexchange.com/q/709273/38080}{american-style voltage source signs}).
+
\subsection{Shape colors}
The color of the components is stored in the key \verb!\circuitikzbasekey/color!. Circui\TikZ\ tries to follow the color set in \TikZ, although sometimes it fails. The following circuit will fail to draw the circuit in red if the patching of the inner commands of \TikZ{} fails, like for example in \ConTeXt{}.
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 92299ca6496..a738c664eaa 100644
--- a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
+++ b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
@@ -16,8 +16,8 @@
\startmodule[circuitikz]
\usemodule[tikz]
-\def\pgfcircversion{1.6.7}
-\def\pgfcircversiondate{2024/02/09}
+\def\pgfcircversion{1.6.8}
+\def\pgfcircversiondate{2024/05/05}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
index 5be686bdffe..4978311dca6 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
@@ -282,6 +282,26 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfusepath{draw}
}
+%
+% generic slashed, suggested by Jana on TeX.stackexchange.com
+% https://tex.stackexchange.com/questions/711702/european-relay-with-circuitikz
+% inherit "generic" properties
+%
+\pgfcircdeclarebipolescaled{resistors}
+{}
+{\ctikzvalof{bipoles/generic/height}}
+{sgeneric}
+{\ctikzvalof{bipoles/generic/height}}
+{\ctikzvalof{bipoles/generic/width}}
+{
+ \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgf@circ@draworfill
+ % slash it
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+}
%% Generic empty tunable
\pgfcircdeclarebipolescaled{resistors}
{
@@ -805,6 +825,7 @@
\pgfcirc@activate@bipole@simple{l}{ageneric}
\pgfcirc@activate@bipole@simple{l}{tgeneric}
\pgfcirc@activate@bipole@simple{l}{xgeneric}
+\pgfcirc@activate@bipole@simple{l}{sgeneric}
\pgfcirc@activate@bipole@simple{l}{fullgeneric}
\pgfcirc@activate@bipole@simple{l}{tfullgeneric}
\pgfcirc@activate@bipole@simple{l}{short}
@@ -4809,12 +4830,22 @@
\pgf@circ@subset@color@dash{switch arrows}
\pgfcirc@set@arrows{switch}{}{latexslim}
}
+\def\pgf@circ@savedanchor@trad@midlever#1#2{% #1 -> name #2 -> relative height
+ \savedanchor\midlever{% this is the full height of the "handle" of switch
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@y=\ctikzvalof{bipoles/#1/height}\pgf@circ@scaled@Rlen
+ \pgf@x=0pt\pgf@y=0.5\pgf@y
+ }
+ \anchor{mid}{\midlever\pgf@y=#2\pgf@y}
+}
%%>>>
%% Shapes Node for bipoles switches and similar things%<<<
%% (Closing) SPST
\pgfcircdeclarebipolescaled{switches}
-{}
+{
+ \pgf@circ@savedanchor@trad@midlever{spst}{0.6}
+}
{\ctikzvalof{bipoles/spst/depth}}
{cspst}
{\ctikzvalof{bipoles/spst/height}}
@@ -4836,7 +4867,9 @@
%% Opening SPST
\pgfcircdeclarebipolescaled{switches}
-{}
+{
+ \pgf@circ@savedanchor@trad@midlever{spst}{0.6}
+}
{\ctikzvalof{bipoles/spst/depth}}
{ospst}
{\ctikzvalof{bipoles/spst/height}}
@@ -4858,7 +4891,9 @@
%% Normal open Switch
\pgfcircdeclarebipolescaled{switches}
-{}
+{
+ \pgf@circ@savedanchor@trad@midlever{nos}{0.5}
+}
{\ctikzvalof{bipoles/nos/depth}}
{nos}
{\ctikzvalof{bipoles/nos/height}}
@@ -4873,7 +4908,9 @@
%% Normal closed Switch
\pgfcircdeclarebipolescaled{switches}
-{}
+{
+ \pgf@circ@savedanchor@trad@midlever{ncs}{0.5}
+}
{\ctikzvalof{bipoles/ncs/depth}}
{ncs}
{\ctikzvalof{bipoles/ncs/height}}
@@ -4892,7 +4929,9 @@
% Opening normal closed Switch
\pgfcircdeclarebipolescaled{switches}
-{}
+{
+ \pgf@circ@savedanchor@trad@midlever{ncs}{0.5}
+}
{\ctikzvalof{bipoles/ncs/depth}}
{oncs}
{\ctikzvalof{bipoles/ncs/height}}
@@ -4920,7 +4959,9 @@
%% Closing normal closed Switch
\pgfcircdeclarebipolescaled{switches}
-{}
+{
+ \pgf@circ@savedanchor@trad@midlever{ncs}{0.5}
+}
{\ctikzvalof{bipoles/ncs/depth}}
{cncs}
{\ctikzvalof{bipoles/ncs/height}}
@@ -4948,7 +4989,9 @@
%% Opening normal open Switch
\pgfcircdeclarebipolescaled{switches}
-{}
+{
+ \pgf@circ@savedanchor@trad@midlever{ncs}{0.5}
+}
{\ctikzvalof{bipoles/ncs/depth}}
{onos}
{\ctikzvalof{bipoles/ncs/height}}
@@ -4976,7 +5019,9 @@
%% Closing normal open Switch
\pgfcircdeclarebipolescaled{switches}
-{}
+{
+ \pgf@circ@savedanchor@trad@midlever{ncs}{0.5}
+}
{\ctikzvalof{bipoles/ncs/depth}}
{cnos}
{\ctikzvalof{bipoles/ncs/height}}
@@ -5006,6 +5051,8 @@
\pgfcircdeclarebipolescaled{switches}
{
\anchor{tip}{\northeast\pgf@x=0pt\relax}
+ % we can use the generic here, the "bar" is related to bipoles/*/height
+ \pgf@circ@savedanchor@trad@midlever{pushbutton}{0.5}
}
{\ctikzvalof{bipoles/pushbutton/height 2}}
{pushbutton}
@@ -5029,6 +5076,11 @@
\pgfcircdeclarebipolescaled{switches}
{
\anchor{tip}{\northeast\pgf@x=0pt\relax}
+ \savedanchor{\nodeheight}{
+ \pgf@x=0pt\pgf@y=\ctikzvalof{nodes width}\pgf@circ@Rlen
+ }
+ \anchor{mid}{\nodeheight\pgf@y=-\pgf@y}
+ % \pgf@circ@savedanchor@trad@midlever{pushbutton}{0.5}
}
{\ctikzvalof{bipoles/pushbutton/height 2}}
{ncpushbutton}
@@ -5054,11 +5106,15 @@
%% https://github.com/circuitikz/circuitikz/issues/128#issuecomment-731771299
\pgfcircdeclarebipolescaled{switches}
{
+ \savedanchor{\nodeheight}{
+ \pgf@x=0pt\pgf@y=\ctikzvalof{nodes width}\pgf@circ@Rlen
+ }
\anchor{tip}{
- \pgf@circ@res@temp=\ctikzvalof{nodes width}\pgf@circ@Rlen
+ \nodeheight\pgf@circ@res@temp=\pgf@y
\northeast\divide\pgf@y by 2\advance\pgf@y by \pgf@circ@res@temp
\pgf@x=0pt\relax
}
+ \anchor{mid}{\nodeheight}
}
{\ctikzvalof{bipoles/pushbutton/height 2}}
{pushbuttonc}
@@ -5082,11 +5138,15 @@
%% Normally closed Push Button now open
\pgfcircdeclarebipolescaled{switches}
{
+ \savedanchor{\nodeheight}{
+ \pgf@x=0pt\pgf@y=\ctikzvalof{nodes width}\pgf@circ@Rlen
+ }
\anchor{tip}{
- \pgf@circ@res@temp=\ctikzvalof{nodes width}\pgf@circ@Rlen
+ \nodeheight\pgf@circ@res@temp=\pgf@y
\northeast\divide\pgf@y by 2\advance\pgf@y by \pgf@circ@res@temp
\pgf@x=0pt\relax
}
+ \anchor{mid}{\northeast\pgf@x=0pt\pgf@y=-0.5\pgf@y}
}
{\ctikzvalof{bipoles/pushbutton/height 2}}
{ncpushbuttono}
@@ -5110,7 +5170,9 @@
}
%%% reed switches
\pgfcircdeclarebipolescaled{switches}
-{}
+{
+ \pgf@circ@savedanchor@trad@midlever{nos}{0.5}
+}
{\ctikzvalof{bipoles/reed/depth}}
{reed}
{\ctikzvalof{bipoles/reed/height}}
@@ -5237,14 +5299,10 @@
}
\pgfcircdeclarebipole{
- \anchor{out 1}{
- \northeast
- \pgf@y=0cm
- }
- \anchor{out 2}{
- \northeast
- \pgf@y=.8\pgf@y
- }
+ \anchor{out 1}{\northeast\pgf@y=0pt\relax}
+ \anchor{out 2}{\northeast\pgf@y=.8\pgf@y}
+ \anchor{in}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x}
+ \anchor{mid}{\northeast\pgf@x=0.2\pgf@x\pgf@y=0.25\pgf@y}
}
{\ctikzvalof{tripoles/toggleswitch/height 2}}
{toggleswitch}
@@ -5304,82 +5362,30 @@
\pgf@x=-\ctikzvalof{tripoles/spdt/width}\pgf@circ@scaled@Rlen
\pgf@x=.5\pgf@x
}
- \anchor{left}{%
- \northwest
- \pgf@y=0pt
- }
- \anchor{in}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{out 1}{
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{out 2}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
- \anchor{center}{
- \pgf@y=0pt
- \pgf@x=0pt
- }
- \anchor{east}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{west}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{south}{
- \northwest
- \pgf@x=0pt
- \pgf@y=-\pgf@y
- }
- \anchor{north}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
- }
- \anchor{north east}{
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{north west}{
- \northwest
- }
- \anchor{south east}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
+ \pgfcirc@northwest@symmetric@geoanchors
+ \anchor{in}{\northwest\pgf@y=0pt}
+ \anchor{out 1}{\northwest\pgf@x=-\pgf@x}
+ % this is "by eye", it'll be wrong with non-standard ocirc
+ \anchor{mid}{\northwest\pgf@x=0pt\pgf@y=0.37\pgf@y}
+ \anchor{out 2}{\northwest\pgf@x=-\pgf@x \pgf@y=-\pgf@y}
+ \anchor{center}{\pgf@y=0pt\pgf@x=0pt}
\pgf@circ@draw@component{
\pgf@circ@setcolor
-
\northwest
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@down = -\pgf@y
\pgf@circ@res@right = -\pgf@x
\pgf@circ@res@left = \pgf@x
\pgf@circ@res@other = \ctikzvalof{tripoles/spdt/margin}\pgf@circ@res@left
-
-
+ %
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
-
+ %
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}}
-
\pgfusepath{draw}
-
\pgfscope
\pgftransformshift{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
\pgfnode{ocirc}{center}{}{spdt1}{\pgfusepath{stroke}}
@@ -5392,7 +5398,6 @@
\pgftransformshift{\pgfpoint{\pgf@circ@res@other}{0pt}}
\pgfnode{ocirc}{center}{}{spdt2}{\pgfusepath{stroke}}
\endpgfscope
-
\pgfscope
\pgfpathmoveto{\pgfpointshapeborder{spdt2}{\pgfpointorigin}}
\pgfpathlineto{
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
index 9c720019198..7457dabb46d 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
@@ -8547,11 +8547,34 @@
\fi
}
-%% The diode (tube), triode, tetrode and pentode only differ in the
-%% number of grids. So we construct a generic declare function in
-%% which we can put code for the grid anchors and grid drawing code
-%% \pgfcircdeclaretube{tube name}{grid anchors}{grid drawing code}
-\long\def\pgfcircdeclaretube#1#2#3{%
+\long\def\pgfcirctubedrawanodestd{% Standard anode code (one anode)
+ % 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}}
+}
+\long\def\pgfcirctubedrawcathodestd{% Standard cathode code (one cathode)
+ % 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
+}
+
+%% generic macro to create a tube. Most of them will use the standard macro for
+%% anode and cathode (see above)
+\long\def\pgfcircdeclaretubegeneric#1#2#3#4#5#6{% name, anchors, grid, anode, cathode variable anchors
\pgfdeclareshape{#1}{
\savedmacro{\ctikzclass}{\edef\ctikzclass{tubes}}
\saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
@@ -8693,33 +8716,24 @@
\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}}
-
+ #4
% 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
-
+ #5
% Draw the background
\pgfusepath{draw}
}
+ #6
}
}
+%% The diode (tube), triode, tetrode and pentode only differ in the
+%% number of grids. So we construct a generic declare function in
+%% which we can put code for the grid anchors and grid drawing code
+%% \pgfcircdeclaretube{tube name}{grid anchors}{grid drawing code}
+\long\def\pgfcircdeclaretube#1#2#3{% name, anchors, grid
+ \pgfcircdeclaretubegeneric{#1}{#2}{#3}{\pgfcirctubedrawanodestd}{\pgfcirctubedrawcathodestd}{}
+}
+
\pgfcircdeclaretube{diodetube}{}{} % shape diode already exists
\pgfcircdeclaretube{triode}
@@ -8951,7 +8965,143 @@
\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}}
-}% %>>>
+}%
+%
+% multi-anode tube, added by Romano for version 1.6.8, suggested by @bogger33 on GitHub
+% see https://github.com/circuitikz/circuitikz/issues/785
+%
+\ctikzset{tubes/anodes/.initial=3} % number of anodes. Ignored in most tubes.
+\newif\ifpgf@circuit@tubes@anodedot\pgf@circuit@tubes@anodedotfalse
+\pgfkeys{/tikz/anodedot/.add code={}{\pgf@circuit@tubes@anodedottrue}}
+\ctikzset{tubes/anodedot/.add code={}{\pgf@circuit@tubes@anodedottrue}}
+\newif\ifpgf@circuit@tubes@nogrid\pgf@circuit@tubes@nogridfalse
+\pgfkeys{/tikz/nogrid/.add code={}{\pgf@circuit@tubes@nogridtrue}}
+\ctikzset{tubes/nogrid/.add code={}{\pgf@circuit@tubes@nogridtrue}}
+\newif\ifpgf@circuit@tubes@nixieanode\pgf@circuit@tubes@nixieanodefalse
+\pgfkeys{/tikz/nixieanode/.add code={}{\pgf@circuit@tubes@nixieanodetrue}}
+\ctikzset{tubes/nixieanode/.add code={}{\pgf@circuit@tubes@nixieanodetrue}}
+\long\def\pgfcirctubedraw@multi@anode{% Separate to override in matubes
+ % Anodes (or plates)
+ % Use saved len/anchors to find the first drawn position.
+ \pgf@circ@res@temp=\anodelen\divide\pgf@circ@res@temp by 2 % half the anode length
+ \firstanodepos\pgf@circ@res@other=\pgf@x
+ \advance\pgf@circ@res@other by \pgf@circ@res@temp
+ \pgf@circ@count@a=0
+ \loop
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} % north
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}}
+ \ifpgf@circuit@tubes@anodedot
+ \pgfpathcircle{\pgfpoint{\pgf@circ@res@other}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up-0.5*\circlelen}}{\circlelen}
+ \else
+ % this is the horizontal line of the anode
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other-\pgf@circ@res@temp}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other+\pgf@circ@res@temp}{\ctikzvalof{tubes/anode distance}\pgf@circ@res@up}}
+ \fi
+ \advance\pgf@circ@res@other by 4\pgf@circ@res@temp
+ \advance\pgf@circ@count@a by 1
+ \ifnum\pgf@circ@count@a<\Nanodes\relax
+ \repeat
+}
+\long\def\pgfcirctubedraw@cathode@or@nixie{%
+ \ifpgf@circuit@tubes@nixieanode
+ \pgfpathmoveto{\pgfpoint{0pt}{-\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{-\ctikzvalof{tubes/cathode distance}\pgf@circ@res@up}}
+ \pgfpathmoveto{\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}}
+ \else
+ \pgfcirctubedrawcathodestd
+ \fi
+}
+\pgfcircdeclaretubegeneric{matube}
+{% anchors
+ \savedmacro{\Nanodes}{\edef\Nanodes{\ctikzvalof{tubes/anodes}}}
+ \savedanchor\firstanodepos{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@circ@res@up=\ctikzvalof{tubes/height}\pgf@circ@scaled@Rlen
+ \pgf@circ@res@right=\ctikzvalof{tubes/width}\pgf@circ@scaled@Rlen
+ \pgf@circ@res@right=\ctikzvalof{tubes/anode width}\pgf@circ@res@right
+ % x and y are one half
+ \pgf@y=\pgf@circ@res@up
+ \pgf@y=.5\pgf@y
+ \pgf@x=-\pgf@circ@res@right
+ \pgf@x=.5\pgf@x
+ }
+ \saveddimen\anodelen{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@circ@res@right=\ctikzvalof{tubes/width}\pgf@circ@scaled@Rlen % full width, left to right
+ % the length of one of the N anodes is the full width divided by 2*N+1
+ \pgfmathsetlength\pgf@x{\ctikzvalof{tubes/anode width}*\pgf@circ@res@right/(2*\Nanodes-1)}
+ }
+ \saveddimen\circlelen{%
+ \pgf@x=\ctikzvalof{nodes width}\pgf@circ@Rlen
+ }
+ \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
+ }
+ \anchor{nixie a}{%
+ \northwest\pgf@x=0pt\pgf@y=-\pgf@y
+ }
+}
+{% grid
+ \ifpgf@circuit@tubes@nogrid\else
+ % Grid protrusion
+ \pgf@xa=-\ctikzvalof{tubes/tube radius}\pgf@circ@res@right
+ \advance\pgf@xa by -\ctikzvalof{tubes/grid protrusion}\pgf@circ@res@right
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@right}{\ctikzvalof{tubes/grid shift}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@xa}{\ctikzvalof{tubes/grid shift}\pgf@circ@res@up}}
+ % 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}{\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
+ \fi
+}
+{\pgfcirctubedraw@multi@anode}% anodes
+{\pgfcirctubedraw@cathode@or@nixie}% cathode
+{% extra dynamics anchors
+ \pgfutil@g@addto@macro\pgf@sh@s@matube{%
+ % Start with the maximum pin number and go backwards.
+ \pgf@circ@count@a=\Nanodes\relax
+ \pgfmathloop%
+ \ifnum\pgf@circ@count@a>0
+ \expandafter\xdef\csname pgf@anchor@matube@anode\space\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@ma@anode@anchor{\the\pgf@circ@count@a}%
+ }
+ \expandafter\xdef\csname pgf@anchor@matube@nixie\space k\the\pgf@circ@count@a\endcsname{%
+ \noexpand\pgf@circ@ma@anode@anchor{\the\pgf@circ@count@a}%
+ }
+ \advance\pgf@circ@count@a by -1\relax%
+ \repeatpgfmathloop%
+ }%
+}
+\def\pgf@circ@ma@anode@anchor#1{
+ \firstanodepos
+ \pgf@circ@res@temp=\pgf@x
+ \pgfmathsetlength\pgf@x{\pgf@circ@res@temp + (0.5 + 2*(#1 -1))*\anodelen}
+}
+
+
+
+%>>>
\endinput
% vim: set fdm=marker fmr=%<<<,%>>>:
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
index fa00218f0f0..69ce1bbddd1 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
@@ -16,8 +16,8 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
-\def\pgfcircversion{1.6.7}
-\def\pgfcircversiondate{2024/02/09}
+\def\pgfcircversion{1.6.8}
+\def\pgfcircversiondate{2024/05/05}
\DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
\DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}