From b27d5ecc7cba92635475b78660b083793d93a3e7 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 1 Nov 2021 03:02:12 +0000 Subject: CTAN sync 202111010302 --- graphics/pgf/contrib/circuitikz/tex/circuitikz.sty | 4 +- .../pgf/contrib/circuitikz/tex/pgfcirc.defines.tex | 2 + .../pgf/contrib/circuitikz/tex/pgfcircbipoles.tex | 74 ++++++++++++++++++++++ .../pgf/contrib/circuitikz/tex/pgfcirccurrent.tex | 4 ++ .../pgf/contrib/circuitikz/tex/pgfcircflow.tex | 4 ++ .../pgf/contrib/circuitikz/tex/pgfcirctripoles.tex | 30 +++++---- .../pgf/contrib/circuitikz/tex/pgfcircvoltage.tex | 17 +++-- .../pgf/contrib/circuitikz/tex/t-circuitikz.tex | 4 +- 8 files changed, 118 insertions(+), 21 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 9349fc801d..15540ac36f 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.4.3} -\def\pgfcircversiondate{2021/09/06} +\def\pgfcircversion{1.4.4} +\def\pgfcircversiondate{2021/10/31} \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 d32e7d2e2e..51af9705f5 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex @@ -535,6 +535,8 @@ \ctikzset{bipole/name/.initial=} \newif\ifpgf@circuit@bipole@isvoltage \ctikzset{bipole/is voltage/.is if=pgf@circuit@bipole@isvoltage} +\newif\ifpgf@circuit@bipole@override@source@vif +\ctikzset{bipole/override source vif/.is if=pgf@circuit@bipole@override@source@vif} \newif\ifpgf@circuit@bipole@voltageoutsideofsymbol \ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf@circuit@bipole@voltageoutsideofsymbol} \newif\ifpgf@circuit@bipole@strokedsymbol diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex index d2c2dcbb84..447c2104fb 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex @@ -3416,6 +3416,19 @@ \pgfusepath{draw} \fi } +% +% --and laser diode arrows - contributed by Andre Alves +% +\def\pgf@circ@draw@laserarrows{% + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfsetarrowsend{latexslim} + \pgfpathmoveto{\pgfpoint{-0.4\pgf@circ@res@right}{1.1\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{-0.4\pgf@circ@res@right}{2.1\pgf@circ@res@up}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.2\pgf@circ@res@right}{1.1\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0.2\pgf@circ@res@right}{2.1\pgf@circ@res@up}} + \pgfusepath{draw} +} %% Black light emitting diode \pgfcircdeclarebipolescaled{diodes} {% fix the anchor border @@ -3443,6 +3456,35 @@ \pgf@circ@draw@ledarrows } +%% Black laser diode - contributed by Andre Alves +\pgfcircdeclarebipolescaled{diodes} +{% fix the anchor border + \pgfcirc@border@extend@updown{1.8}{1} +} +{\ctikzvalof{bipoles/diode/height}} +{fulllaserdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \pgfscope + \pgftransformxshift{\pgf@circ@res@left} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}} + \pgfusepath{draw,fill} + \endpgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} + + \pgf@circ@draw@laserarrows +} + %% Black photodiode \pgfcircdeclarebipolescaled{diodes} {% fix the anchor border @@ -3639,6 +3681,30 @@ \pgf@circ@draw@ledarrows } +%% Empty laser diode - contributed by Andre Alves +\pgfcircdeclarebipolescaled{diodes} +{% fix the anchor border + \pgfcirc@border@extend@updown{1.8}{1} +} +{\ctikzvalof{bipoles/diode/height}} +{emptylaserdiode} +{\ctikzvalof{bipoles/diode/height}} +{\ctikzvalof{bipoles/diode/width}} +{ + + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \pgfscope + \pgf@circ@basicdiodeshape + \endpgfscope + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@left}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfusepath{draw} + + \pgf@circ@draw@laserarrows +} + %% Empty photodiode \pgfcircdeclarebipolescaled{diodes} {% fix the anchor border @@ -4056,6 +4122,8 @@ \pgfcirc@style@to@style{#1 tunnel diode}{tD#2} \pgfcirc@activate@bipole{l}{#1lediode}{#1lediode}{#1 led} \pgfcirc@style@to@style{#1 led}{leD#2} + \pgfcirc@activate@bipole{l}{#1laserdiode}{#1laserdiode}{#1 laser diode} + \pgfcirc@style@to@style{#1 laser diode}{lasD#2} \pgfcirc@activate@bipole{l}{#1pdiode}{#1pdiode}{#1 photodiode} \pgfcirc@style@to@style{#1 photodiode}{pD#2} \pgfcirc@activate@bipole{l}{#1varcap}{#1varcap}{#1 varcap} @@ -4090,6 +4158,8 @@ \pgfcirc@style@to@style{#1 tunnel diode}{tD#2} \pgfcirc@node@to@style{l}{emptylediode}{#1 led}{\circuitikzbasekey/bipole/is strokedsymbol=true} \pgfcirc@style@to@style{#1 led}{leD#2} + \pgfcirc@node@to@style{l}{emptylaserdiode}{#1 laser diode}{\circuitikzbasekey/bipole/is strokedsymbol=true} + \pgfcirc@style@to@style{#1 laser diode}{lasD#2} \pgfcirc@node@to@style{l}{emptypdiode}{#1 photodiode}{\circuitikzbasekey/bipole/is strokedsymbol=true} \pgfcirc@style@to@style{#1 photodiode}{pD#2} \pgfcirc@node@to@style{l}{emptyvarcap}{#1 varcap}{\circuitikzbasekey/bipole/is strokedsymbol=true} @@ -4126,6 +4196,10 @@ \pgfcirc@style@to@style{led}{leD} \pgfcirc@style@to@style{\pgfcircdiodestylemacro photodiode}{photodiode} \pgfcirc@style@to@style{photodiode}{pD} + +\pgfcirc@style@to@style{\pgfcircdiodestylemacro laser diode}{laser diode} +\pgfcirc@style@to@style{laser diode}{lasD} + \pgfcirc@style@to@style{\pgfcircdiodestylemacro varcap}{varcap} \pgfcirc@style@to@style{varcap}{VC} \pgfcirc@style@to@style{\pgfcircdiodestylemacro bidirectionaldiode}{bidirectionaldiode} diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex index e5c5c760a8..77b02d5319 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex @@ -93,6 +93,10 @@ \ctikzset{i/.code = { \pgfcirc@has@itrue + \ifpgf@circuit@bipole@override@source@vif + \pgf@circuit@bipole@isvoltagefalse + \pgf@circuit@bipole@iscurrentfalse + \fi \pgfkeys{\circuitikzbasekey/bipole/current/direction = forward, \circuitikzbasekey/bipole/current/x position = after, \circuitikzbasekey/bipole/current/y position = above } diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex index d59325850d..3d03925b52 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex @@ -99,6 +99,10 @@ \ctikzset{f/.code = { \pgfcirc@has@ftrue + \ifpgf@circuit@bipole@override@source@vif + \pgf@circuit@bipole@isvoltagefalse + \pgf@circuit@bipole@iscurrentfalse + \fi \pgfkeys{\circuitikzbasekey/bipole/flow/direction = forward, \circuitikzbasekey/bipole/flow/x position = after, \circuitikzbasekey/bipole/flow/y position = above } diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex index 2dd2eee9a9..6f07d6042f 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex @@ -4403,6 +4403,10 @@ \northeast \pgf@y=-\ctikzvalof{tripoles/#1/gate height}\pgf@y } + \anchor{nobase}{ + \left + \pgf@x=\ctikzvalof{tripoles/#1/gate width}\pgf@x + } } { % add the circle if requested (before everything else, so we can fill it) @@ -4485,18 +4489,20 @@ \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}} \endpgfscope %draw gate - \ifpgf@circuit@trans@ntype - \pgfpathmoveto{\pgfpoint - {\ctikzvalof{tripoles/#1/gate width}\pgf@circ@res@left} - {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@down}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}% - {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@down}} - \else - \pgfpathmoveto{\pgfpoint - {\ctikzvalof{tripoles/#1/gate width}\pgf@circ@res@left} - {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@up}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}% - {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@up}} + \ifpgf@circuit@bpt@drawgate + \ifpgf@circuit@trans@ntype + \pgfpathmoveto{\pgfpoint + {\ctikzvalof{tripoles/#1/gate width}\pgf@circ@res@left} + {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}% + {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@down}} + \else + \pgfpathmoveto{\pgfpoint + {\ctikzvalof{tripoles/#1/gate width}\pgf@circ@res@left} + {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}% + {\ctikzvalof{tripoles/#1/conn height}\pgf@circ@res@up}} + \fi \fi \pgfusepath{draw} } diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex index 855331038d..75543f42a5 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex @@ -63,6 +63,10 @@ % or not \ctikzset{v/.code = { \pgfcirc@has@vtrue + \ifpgf@circuit@bipole@override@source@vif + \pgf@circuit@bipole@isvoltagefalse + \pgf@circuit@bipole@iscurrentfalse + \fi \ifpgf@circuit@bipole@isvoltage \pgfkeys{\circuitikzbasekey/bipole/voltage/position=above, \circuitikzbasekey/bipole/voltage/direction=forward} @@ -533,7 +537,9 @@ % take into account scaling \setscaledRlenforclass - + % set the macro for detecting open + \edef\@@kind{\ctikzvalof{bipole/kind}}\edef\@@open{open} + % start voltage label adjustment \ifpgf@circuit@europeanvoltage \ifpgf@circuit@bipole@voltage@straight % check for straight @@ -543,6 +549,8 @@ % \typeout{ST:ADJUSTED\space for\space \ctikzvalof{bipole/kind} \space at \space \stdist} }{\edef\labeldist{\ctikzvalof{voltage/straight label distance}}} \ifpgf@circ@debugv\edef\whichtypeshift{STR}\fi + % do not labelshift for legacy straight open; 1.4 makes the shift null + \ifx\@@kind\@@open\ifpgf@adjust@open@voltage\else\edef\labeldist{1.4}\fi\fi \else % check for european \edef\pgf@temp{/tikz/circuitikz/bipoles/\ctikzvalof{bipole/kind}/voltage/european label distance} @@ -572,7 +580,6 @@ {\pgfmathsetmacro{\partheightf}{0.5*\ctikzvalof{bipoles/\ctikzvalof{bipole/kind}/height}} \edef\partheight{\partheightf\pgf@circ@scaled@Rlen}} {\edef\partheight{(.5\pgf@circ@scaled@Rlen)}} %fallback to fixed value - \ifpgf@circuit@bipole@isvoltage \pgfmathsetlength{\pgfcirc@labelshift}{(\labeldist-1.2)*\partheight} \else @@ -580,8 +587,7 @@ \fi % the value for the european was by default 1.4 \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners! - % set the macro for detecting open - \edef\@@kind{\ctikzvalof{bipole/kind}}\edef\@@open{open} + % stop the detection of open if I do not want special treatment \ifpgf@adjust@open@voltage\else\edef\@@open{this-will-nEver-match}\fi % \typeout{KIND\space\@@kind} }%end pgfextra @@ -608,7 +614,8 @@ \else \ifx\@@kind\@@open % override pgfcirc@Vlab - coordinate (\pgfcirc@a@prefix-Vlab) at ($(pgfcirc@Vfrom@flat)!0.5!(pgfcirc@Vto@flat)$)\fi + coordinate (\pgfcirc@a@prefix-Vlab) at ($(pgfcirc@Vfrom@flat)!0.5!(pgfcirc@Vto@flat)$) + \fi \fi \ifpgf@circ@debugv diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex index e7187f4ab0..2e57a795e0 100644 --- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex +++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex @@ -10,8 +10,8 @@ % % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. -\def\pgfcircversion{1.4.3} -\def\pgfcircversiondate{2021/09/06} +\def\pgfcircversion{1.4.4} +\def\pgfcircversiondate{2021/10/31} \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion} \usemodule[tikz] -- cgit v1.2.3