From e14ce2a2aedfdc10d3e64b5b632a0b5aef10a618 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 14 May 2023 03:00:45 +0000 Subject: CTAN sync 202305140300 --- graphics/pgf/contrib/circuitikz/tex/circuitikz.sty | 4 +- .../pgf/contrib/circuitikz/tex/pgfcirc.defines.tex | 32 +++++++----- .../contrib/circuitikz/tex/pgfcircmultipoles.tex | 43 ++++++++++++++++ .../contrib/circuitikz/tex/pgfcircquadpoles.tex | 6 ++- .../pgf/contrib/circuitikz/tex/pgfcircshapes.tex | 42 ++++++---------- .../pgf/contrib/circuitikz/tex/pgfcirctripoles.tex | 58 +++++++++++++--------- .../pgf/contrib/circuitikz/tex/t-circuitikz.tex | 16 ++++-- 7 files changed, 131 insertions(+), 70 deletions(-) (limited to 'graphics/pgf/contrib/circuitikz/tex') diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty index b9261717f5..6eeeb67642 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.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} diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex index f3a7b7f42e..ec9f2a8a71 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex +++ b/graphics/pgf/contrib/circuitikz/tex/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/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex index 31aa4eb073..f48aaac10e 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/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/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex index 127c2975df..32a85cb0c9 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/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/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex index 07f3ac987b..6c0229c3d6 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex +++ b/graphics/pgf/contrib/circuitikz/tex/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/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex index d3bd3dd76c..39a01b5d90 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/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/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex index e0307a32fa..e5975cfb53 100644 --- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex +++ b/graphics/pgf/contrib/circuitikz/tex/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} -- cgit v1.2.3