diff options
author | Karl Berry <karl@freefriends.org> | 2020-06-21 20:42:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-06-21 20:42:13 +0000 |
commit | 46664e932a29dc32f69fac4c6773c5c3da0ece8e (patch) | |
tree | 2ca599bdb2f25c8d3163d62d00cbe1b6a44e3e91 /Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex | |
parent | 3777b671f537fa94efd5ee9710f921aa79a8fca5 (diff) |
circuitikz (21jun20)
git-svn-id: svn://tug.org/texlive/trunk@55620 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex | 152 |
1 files changed, 138 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex index 1e9ada97753..36ddd5d0790 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex @@ -170,16 +170,16 @@ \anchorborder{% \ifpgf@circuit@bipole@inverted \pgf@circ@res@left=-\pgf@x - \pgf@circ@res@right=-\pgf@y + \pgf@circ@res@up=-\pgf@y \else \pgf@circ@res@left=\pgf@x - \pgf@circ@res@right=\pgf@y + \pgf@circ@res@up=\pgf@y \fi - \ifdim\pgf@circ@res@right>0cm - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\northeastborder} + \ifdim\pgf@circ@res@up>0cm + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\northeastborder} \else \southwestborder - \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@right}}{\pgfpoint{-\pgf@x}{-\pgf@y}} + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}} \fi } @@ -218,12 +218,34 @@ %%% NOTICE that the short is really NOT drawn; we trust the fact that its %%% natural length is zero. \pgfcircdeclarebipole -{} +{% fix the anchor border to add a bit of space for voltage and labels + % it uses the dummy width and height + \anchorborder{% + \ifpgf@circuit@bipole@inverted + \pgf@circ@res@left=-\pgf@x + \pgf@circ@res@up=-\pgf@y + \else + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \fi + \ifdim\pgf@circ@res@up>0cm + \pgf@x=\ctikzvalof{bipoles/short/width}\pgf@circ@Rlen + \pgf@y=\ctikzvalof{bipoles/short/height}\pgf@circ@Rlen + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + {\pgfpoint{\pgf@x}{\pgf@y}} + \else + \pgf@x=-\ctikzvalof{bipoles/short/width}\pgf@circ@Rlen + \pgf@y=-\ctikzvalof{bipoles/short/height}\pgf@circ@Rlen + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} + {\pgfpoint{-\pgf@x}{-\pgf@y}} + \fi + } +} {0} {short} {0} {0} -{ } +{} %% Open circuit \pgfcircdeclarebipole @@ -232,7 +254,7 @@ {open} {\ctikzvalof{bipoles/open/height}} {\ctikzvalof{bipoles/open/width}} -{ } +{} % multiwire(s) \pgfcircdeclarebipole @@ -2414,7 +2436,24 @@ %% Black alternative zigzag Zener diode \pgfcircdeclarebipolescaled{diodes} -{} +{% fix the anchor border + \anchorborder{% + \ifpgf@circuit@bipole@inverted + \pgf@circ@res@left=-\pgf@x + \pgf@circ@res@up=-\pgf@y + \else + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \fi + \ifdim\pgf@circ@res@up>0cm + \northeastborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.3\pgf@y}} + \else + \southwestborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-1.3\pgf@y}} + \fi + } +} {\ctikzvalof{bipoles/diode/height}} {fullzzdiode} {\ctikzvalof{bipoles/diode/height}} @@ -2540,7 +2579,24 @@ } %% Black light emitting diode \pgfcircdeclarebipolescaled{diodes} -{} +{% fix the anchor border + \anchorborder{% + \ifpgf@circuit@bipole@inverted + \pgf@circ@res@left=-\pgf@x + \pgf@circ@res@up=-\pgf@y + \else + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \fi + \ifdim\pgf@circ@res@up>0cm + \northeastborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}} + \else + \southwestborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}} + \fi + } +} {\ctikzvalof{bipoles/diode/height}} {fulllediode} {\ctikzvalof{bipoles/diode/height}} @@ -2565,7 +2621,24 @@ %% Black photodiode \pgfcircdeclarebipolescaled{diodes} -{} +{% fix the anchor border + \anchorborder{% + \ifpgf@circuit@bipole@inverted + \pgf@circ@res@left=-\pgf@x + \pgf@circ@res@up=-\pgf@y + \else + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \fi + \ifdim\pgf@circ@res@up>0cm + \northeastborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}} + \else + \southwestborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}} + \fi + } +} {\ctikzvalof{bipoles/diode/height}} {fullpdiode} {\ctikzvalof{bipoles/diode/height}} @@ -2671,7 +2744,24 @@ %% Empty alternative zigzag Zener diode \pgfcircdeclarebipolescaled{diodes} -{} +{% fix the anchor border + \anchorborder{% + \ifpgf@circuit@bipole@inverted + \pgf@circ@res@left=-\pgf@x + \pgf@circ@res@up=-\pgf@y + \else + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \fi + \ifdim\pgf@circ@res@up>0cm + \northeastborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.3\pgf@y}} + \else + \southwestborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-1.3\pgf@y}} + \fi + } +} {\ctikzvalof{bipoles/diode/height}} {emptyzzdiode} {\ctikzvalof{bipoles/diode/height}} @@ -2735,7 +2825,24 @@ %% Empty light emitting diode \pgfcircdeclarebipolescaled{diodes} -{} +{% fix the anchor border + \anchorborder{% + \ifpgf@circuit@bipole@inverted + \pgf@circ@res@left=-\pgf@x + \pgf@circ@res@up=-\pgf@y + \else + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \fi + \ifdim\pgf@circ@res@up>0cm + \northeastborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}} + \else + \southwestborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}} + \fi + } +} {\ctikzvalof{bipoles/diode/height}} {emptylediode} {\ctikzvalof{bipoles/diode/height}} @@ -2755,7 +2862,24 @@ %% Empty photodiode \pgfcircdeclarebipolescaled{diodes} -{} +{% fix the anchor border + \anchorborder{% + \ifpgf@circuit@bipole@inverted + \pgf@circ@res@left=-\pgf@x + \pgf@circ@res@up=-\pgf@y + \else + \pgf@circ@res@left=\pgf@x + \pgf@circ@res@up=\pgf@y + \fi + \ifdim\pgf@circ@res@up>0cm + \northeastborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}} + \else + \southwestborder + \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}} + \fi + } +} {\ctikzvalof{bipoles/diode/height}} {emptypdiode} {\ctikzvalof{bipoles/diode/height}} |