summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-05-06 03:01:22 +0000
committerNorbert Preining <norbert@preining.info>2024-05-06 03:01:22 +0000
commit6d64372d4e3df2497c111b083e674329a25d4db8 (patch)
tree27d5b02157d6a432b66176c1463fee6c9f79b27b /graphics/pgf/contrib/circuitikz/tex
parent9bfd517c46ef64bbc06810ab64b9921a4f02c632 (diff)
CTAN sync 202405060301
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex167
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex202
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
4 files changed, 266 insertions, 111 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index fa00218f0f..69ce1bbddd 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/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}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index 5be686bdff..4978311dca 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/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/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
index 9c72001919..7457dabb46 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/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/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index 92299ca649..a738c664ea 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/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}