summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-05-14 19:37:07 +0000
committerKarl Berry <karl@freefriends.org>2023-05-14 19:37:07 +0000
commitd29d8c63c8b63c6dab84c18dffc4af2cf7515472 (patch)
tree1fd9bb9b3ec5aecdae09fe99f0dfab968f0f085e /Master/texmf-dist/tex
parentb3ac7044a6952ef6cb88a98d5c87342d9274d584 (diff)
circuitikz (14may23)
git-svn-id: svn://tug.org/texlive/trunk@67111 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex16
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex32
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex43
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex6
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex42
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex58
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty4
7 files changed, 131 insertions, 70 deletions
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 e0307a32faa..e5975cfb537 100644
--- a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
+++ b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
@@ -9,14 +9,18 @@
% 2. under the GNU Public License.
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
+%
+% This module file is normally overriden by the provided m-circuitikz.tex
+% in the newer ConTeXt distributions.
+%
+\startmodule[circuitikz]
+\usemodule[tikz]
-\def\pgfcircversion{1.6.1}
-\def\pgfcircversiondate{2023/02/11}
+\def\pgfcircversion{1.6.2}
+\def\pgfcircversiondate{2023/05/13}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
-\usemodule[tikz]
-\startmodule[circuitikz]
\usetikzlibrary[calc]
\usetikzlibrary[arrows.meta, bending]
\usetikzlibrary[fpu] % may be needed for use fpu reciprocal (v1.0.1)
@@ -94,6 +98,10 @@
[european=>\ctikzset{ logic ports=european},
american=>\ctikzset{ logic ports=american}]
+% This tiny siunitx emulation layer (REALLY tiny) is practically never
+% enabled because recent ConTeXt releases override this file with
+% m-circuitikz.tex and in that file it has been removed.
+
\processaction
[\currentmoduleparameter{siunitx}]
[true=>\def\SI#1#2{#1\,#2}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
index f3a7b7f42e6..ec9f2a8a710 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
@@ -448,6 +448,24 @@
\fi
}
+% set the color and dash pattern for a subset of the shape, following keys #1/color
+% and #1/dash. The keys must exist, and check for none or default for both
+\def\pgf@circ@subset@color@dash#1{%
+ % You *must* be sure that this is called inside a \pgfscope!
+ \edef\@@none{none}\edef\@@default{default}
+ \edef\@@tmp{\ctikzvalof{#1/color}}
+ \ifx\@@tmp\@@default\else
+ \pgfsetcolor{\@@tmp}
+ \fi
+ \edef\@@tmp{\ctikzvalof{#1/dash}}
+ \ifx\@@tmp\@@default\else
+ \ifx\@@tmp\@@none
+ \pgfsetdash{}{0pt}% solid line, override dash
+ \else
+ \expandafter\pgfsetdash\expandafter{\@@tmp}{0cm}
+ \fi
+ \fi
+}
%%>>>
@@ -944,19 +962,7 @@
\def\pgf@circ@set@optoarrow@style{%
% You *must* be sure that this is called inside a \pgfscope!
\pgfsetlinewidth{\ctikzvalof{opto arrows/relative thickness}\pgflinewidth}
- \edef\@@none{none}\edef\@@default{default}
- \edef\@@tmp{\ctikzvalof{opto arrows/color}}
- \ifx\@@tmp\@@default\else
- \pgfsetcolor{\@@tmp}
- \fi
- \edef\@@tmp{\ctikzvalof{opto arrows/dash}}
- \ifx\@@tmp\@@default\else
- \ifx\@@tmp\@@none
- \pgfsetdash{}{0pt}% solid line, override dash
- \else
- \expandafter\pgfsetdash\expandafter{\@@tmp}{0cm}
- \fi
- \fi
+ \pgf@circ@subset@color@dash{opto arrows}
\pgfcirc@set@arrows{opto}{}{latexslim}
}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex
index 31aa4eb0736..f48aaac10e4 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex
@@ -1594,6 +1594,49 @@
\repeatpgfmathloop%
}%
}
+
+% clock wedge shape, for using in other shapes like muxdemuxes
+\pgfdeclareshape{clockwedge}{
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{flipflops}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ \savedanchor{\northeast}{
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{multipoles/flipflop/clock wedge size}*\ctikzvalof{multipoles/flipflop/pin spacing}*\pgf@circ@scaled@Rlen}
+ \pgf@y=\pgf@circ@res@step
+ \pgf@x=\pgf@circ@res@step
+ }
+ \anchor{center}{\pgfpointorigin}
+ \anchor{north west}{\northeast\pgf@x=0pt }
+ \anchor{north east}{\northeast}
+ \anchor{south east}{\northeast\pgf@y=-\pgf@y}
+ \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=0pt }
+ \anchor{north}{\northeast\pgf@x=0.5\pgf@x }
+ \anchor{east}{\northeast\pgf@y=0pt }
+ \anchor{south}{\northeast\pgf@x=0.5\pgf@x\pgf@y=-\pgf@y}
+ \anchor{west}{\pgfpointorigin}
+ \anchor{nw}{\northeast\pgf@x=0pt }
+ \anchor{ne}{\northeast}
+ \anchor{se}{\northeast\pgf@y=-\pgf@y}
+ \anchor{sw}{\northeast\pgf@y=-\pgf@y\pgf@x=0pt }
+ \anchor{n}{\northeast\pgf@x=0.5\pgf@x }
+ \anchor{e}{\northeast\pgf@y=0pt }
+ \anchor{s}{\northeast\pgf@x=0.5\pgf@x\pgf@y=-\pgf@y}
+ \anchor{w}{\pgfpointorigin}
+ \anchor{left}{\pgfpointorigin}
+ \anchor{right}{\northeast\pgf@y=0pt }
+ \anchor{text}{\northeast\advance \pgf@x by 2pt
+ \pgf@y=\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax}% to adjust text
+ \pgf@circ@draw@component{%
+ \northeast
+ \pgf@circ@res@up=\pgf@y
+ \pgf@circ@res@right=\pgf@x
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@up}}
+ \pgfusepath{stroke}
+ }
+}
+
% %>>>
%% Node shapes for mux-demuxes%<<<
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
index 127c2975df5..32a85cb0c9f 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
@@ -27,6 +27,9 @@
\ctikzset{quadpoles/transformer core/height/.initial=1.5}
\ctikzset{quadpoles/transformer core/core height/.initial=.5}
\ctikzset{quadpoles/transformer core/core width/.initial=.05}
+\ctikzset{transformer core/relative thickness/.initial=1}
+\ctikzset{transformer core/color/.initial=default}
+\ctikzset{transformer core/dash/.initial=default}
\ctikzset{quadpoles/gyrator/inner/.initial=0.4}
\ctikzset{quadpoles/gyrator/width/.initial=1.5}
\ctikzset{quadpoles/gyrator/height/.initial=1.5}
@@ -291,7 +294,8 @@
\pgf@circ@drawtransformerbasicbody
% use the chocke line thickness
- \pgfsetlinewidth{\ctikzvalof{bipoles/cutechoke/cthick}\pgflinewidth}
+ \pgfsetlinewidth{\ctikzvalof{bipoles/cutechoke/cthick}*\ctikzvalof{transformer core/relative thickness}*\pgflinewidth}
+ \pgf@circ@subset@color@dash{transformer core}
% Find the distance from center for the lines representing the core
% the 2.5 is for backward compatibility --- the distance was calculated as a fraction
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
index 07f3ac987bb..6c0229c3d68 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
@@ -582,6 +582,10 @@
%% crossings%<<<
% full nodes for wire crossing
+% styling for the vertical wire (default: do none)
+\ctikzset{crossing vertical/relative thickness/.initial=1}
+\ctikzset{crossing vertical/color/.initial=default}
+\ctikzset{crossing vertical/dash/.initial=default}
\pgfdeclareshape{jump crossing}
{
@@ -591,18 +595,7 @@
\pgf@x=-\pgf@y
}
\anchor{center}{ \pgf@y=0pt \pgf@x=0pt }
- \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x }
- \anchor{e}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x }
- \anchor{west}{ \northwest \pgf@y=0pt }
- \anchor{w}{ \northwest \pgf@y=0pt }
- \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y }
- \anchor{s}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y }
- \anchor{north}{ \northwest \pgf@x=0pt }
- \anchor{n}{ \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
\pgf@circ@draw@component{
\northwest
\pgf@circ@res@up = \pgf@y
@@ -615,13 +608,17 @@
\pgfpatharc{0}{-180}{0.4*\pgf@circ@res@left}
\pgfsetbeveljoin
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfusepath{draw}
% vertical, broken path
+ % styling of vertical line
+ \pgfsetlinewidth{\ctikzvalof{crossing vertical/relative thickness}\pgflinewidth}
+ \pgf@circ@subset@color@dash{crossing vertical}
+ %
\pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{0.5\pgf@circ@res@up}}
\pgfpathmoveto{\pgfpoint{0pt}{0.3\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
\pgfusepath{draw}
-
}
}
\pgfdeclareshape{plain crossing}
@@ -632,18 +629,7 @@
\pgf@x=-\pgf@y
}
\anchor{center}{ \pgf@y=0pt \pgf@x=0pt }
- \anchor{east}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x }
- \anchor{e}{ \northwest \pgf@y=0pt \pgf@x=-\pgf@x }
- \anchor{west}{ \northwest \pgf@y=0pt }
- \anchor{w}{ \northwest \pgf@y=0pt }
- \anchor{south}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y }
- \anchor{s}{ \northwest \pgf@x=0pt \pgf@y=-\pgf@y }
- \anchor{north}{ \northwest \pgf@x=0pt }
- \anchor{n}{ \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
\pgf@circ@draw@component{
\northwest
\pgf@circ@res@up = \pgf@y
@@ -653,13 +639,17 @@
% horizontal jumper
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfusepath{draw}
% vertical, broken path
+ % styling of vertical line
+ \pgfsetlinewidth{\ctikzvalof{crossing vertical/relative thickness}\pgflinewidth}
+ \pgf@circ@subset@color@dash{crossing vertical}
+ %
\pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{0.1\pgf@circ@res@up}}
\pgfpathmoveto{\pgfpoint{0pt}{0.1\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
\pgfusepath{draw}
-
}
}
% %>>>
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
index d3bd3dd76cc..39a01b5d90b 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
@@ -3359,7 +3359,7 @@
\ctikzset{transistor circle/.is family}
\ctikzset{transistor circle/relative thickness/.initial=1}
\ctikzset{transistor circle/color/.initial=default}
-\ctikzset{transistor circle/dash/.initial=none}
+\ctikzset{transistor circle/dash/.initial=default}
\ctikzset{transistor circle/scale circle radius/.initial=1}
\ctikzset{transistor circle/default base in/.initial=0.9}
\ctikzset{transistor circle/njfet base in/.initial=1.05}
@@ -3380,7 +3380,37 @@
\ctikzset{transistor bodydiode/relative thickness/.initial=1}
\ctikzset{transistor bodydiode/color/.initial=default}
\ctikzset{transistor bodydiode/dash/.initial=default}
-
+% this is unfortunate, but needed for backward compatibility
+\ctikzset{transistor bodydiode/scale/.code={%
+ \ctikzset{tripoles/nmos/bodydiode scale=#1}%
+ \ctikzset{tripoles/pmos/bodydiode scale=#1}%
+ \ctikzset{tripoles/nmosd/bodydiode scale=#1}%
+ \ctikzset{tripoles/pmosd/bodydiode scale=#1}%
+ \ctikzset{tripoles/hemt/bodydiode scale=#1}%
+ \ctikzset{tripoles/nfet/bodydiode scale=#1}%
+ \ctikzset{tripoles/pfet/bodydiode scale=#1}%
+ \ctikzset{tripoles/nfetd/bodydiode scale=#1}%
+ \ctikzset{tripoles/pfetd/bodydiode scale=#1}%
+ \ctikzset{tripoles/nigfete/bodydiode scale=#1}%
+ \ctikzset{tripoles/nigfetd/bodydiode scale=#1}%
+ \ctikzset{tripoles/nigfetebulk/bodydiode scale=#1}%
+ \ctikzset{tripoles/pigfete/bodydiode scale=#1}%
+ \ctikzset{tripoles/pigfetd/bodydiode scale=#1}%
+ \ctikzset{tripoles/pigfetebulk/bodydiode scale=#1}%
+ \ctikzset{tripoles/npn/bodydiode scale=#1}%
+ \ctikzset{tripoles/pnp/bodydiode scale=#1}%
+ \ctikzset{tripoles/pigbt/bodydiode scale=#1}%
+ \ctikzset{tripoles/nigbt/bodydiode scale=#1}%
+ \ctikzset{tripoles/Lpigbt/bodydiode scale=#1}%
+ \ctikzset{tripoles/Lnigbt/bodydiode scale=#1}%
+ \ctikzset{tripoles/njfet/bodydiode scale=#1}%
+ \ctikzset{tripoles/pjfet/bodydiode scale=#1}%
+ \ctikzset{tripoles/nujt/bodydiode scale=#1}%
+ \ctikzset{tripoles/pujt/bodydiode scale=#1}%
+ \ctikzset{tripoles/isfet/bodydiode scale=#1}%
+ \ctikzset{tripoles/pgfet/bodydiode scale=#1}%
+ \ctikzset{tripoles/ngfet/bodydiode scale=#1}%
+}}
%%>>>
@@ -3441,15 +3471,7 @@
\pgfscope
\pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
\pgfsetlinewidth{\ctikzvalof{transistor circle/relative thickness}\pgflinewidth}
- \edef\@@none{none}\edef\@@default{default}
- \edef\@@tmp{\ctikzvalof{transistor circle/color}}
- \ifx\@@tmp\@@default\else
- \pgfsetcolor{\@@tmp}
- \fi
- \edef\@@tmp{\ctikzvalof{transistor circle/dash}}
- \ifx\@@tmp\@@none\else
- \expandafter\pgfsetdash\expandafter{\@@tmp}{0cm}
- \fi
+ \pgf@circ@subset@color@dash{transistor circle}
% radius of the circle
% \pgfmathsetlength{\pgf@circ@res@temp}{((#2+\extrabodydiodelen)-(#1)+(#3)*(#3)/((#2+\extrabodydiodelen)-(#1)))/2}
% \pgfpathcircle{\pgfpoint{#1+\pgf@circ@res@temp}{0pt}}{\pgf@circ@res@temp}
@@ -3940,19 +3962,7 @@
\ifpgf@circuit@fet@bodydiode
\pgfscope
\pgfsetlinewidth{\ctikzvalof{transistor bodydiode/relative thickness}\pgflinewidth}
- \edef\@@none{none}\edef\@@default{default}
- \edef\@@tmp{\ctikzvalof{transistor bodydiode/color}}
- \ifx\@@tmp\@@default\else
- \pgfsetcolor{\@@tmp}
- \fi
- \edef\@@tmp{\ctikzvalof{transistor bodydiode/dash}}
- \ifx\@@tmp\@@default\else
- \ifx\@@tmp\@@none
- \pgfsetdash{}{0pt}% solid line, override dash
- \else
- \expandafter\pgfsetdash\expandafter{\@@tmp}{0cm}
- \fi
- \fi
+ \pgf@circ@subset@color@dash{transistor bodydiode}
\drawbodydiode{#1}
\endpgfscope
\fi
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
index b9261717f5e..6eeeb67642a 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.1}
-\def\pgfcircversiondate{2023/02/11}
+\def\pgfcircversion{1.6.2}
+\def\pgfcircversiondate{2023/05/13}
\DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
\DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}