diff options
author | Norbert Preining <norbert@preining.info> | 2023-06-24 03:01:43 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-06-24 03:01:43 +0000 |
commit | 36c52277a7e7e1b9f3de0286cfd1f5931a60d802 (patch) | |
tree | c1b84888133e9c7ea9039cca1f67b822629b6076 /graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex | |
parent | ddaf122566480fe48b9786c172e647ca0ea4c6d5 (diff) |
CTAN sync 202306240301
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex')
-rw-r--r-- | graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex | 64 |
1 files changed, 50 insertions, 14 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex index be54c93e34..1acb5a8d65 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex @@ -2113,7 +2113,10 @@ %% To change the internal symbols of the voltage source american style \ctikzset{bipoles/vsourceam/inner plus/.initial={$+$}} -\ctikzset{bipoles/vsourceam/inner minus/.initial={$-$}} +% In the mayority of fonts, the size of - is smaller than +, so we have +% unaligned signs when positioned independently. +% See https://github.com/circuitikz/circuitikz/issues/721 +\ctikzset{bipoles/vsourceam/inner minus/.initial={$\vphantom{+}-$}} %% Independent voltage source - American style \pgfcircdeclarebipolescaled{sources} {} @@ -2398,15 +2401,18 @@ % triangle \def\pgf@circ@delta#1{ \pgfscope - \pgftransformscale{-.01*\ctikzvalof{\ctikzclass/symbol/delta scale}*\pgf@circ@res@left*#1} + \pgftransformscale{-.015*\ctikzvalof{\ctikzclass/symbol/delta scale}*\pgf@circ@res@left*#1} \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} \pgftransformrotate{-\pgfcircmathresult} \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} \pgf@circ@set@relative@thickness{symbol/thickness} - \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} - \pgfpathlineto{\pgfpoint{0}{.866\pgf@circ@res@up}} + % \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + % \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + % \pgfpathlineto{\pgfpoint{0}{.866\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpointpolar{90}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointpolar{-30}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointpolar{-150}{\pgf@circ@res@up}} \pgfpathclose \pgfusepath{stroke} \endpgfscope @@ -2467,6 +2473,16 @@ \pgf@y=0pt\relax \pgf@x=\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@x } + \anchor{symbolprim}{ + \northeast + \pgf@y=0pt\relax + \pgf@x=-\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@x + } + \anchor{symbolsec}{ + \northeast + \pgf@y=0pt\relax + \pgf@x=\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@x + } } {\ctikzvalof{bipoles/oosourcetrans/height}} {oosourcetrans} @@ -2580,7 +2596,6 @@ \anchor{centertert}{ \centertert } - % add some anchors in case the are needed :) \anchor{prim1}{ \pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen @@ -2630,6 +2645,24 @@ \pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@other \pgfpointadd{\centertert}{\pgfpointpolar{-90}{.5\pgf@circ@res@other}} } + % symbol "center" anchors + \anchor{symbolprim}{ + \northeast + \pgf@y=0pt + \pgf@x=-0.6\pgf@x + } + \anchor{symbolsec}{ + \northeast + \pgf@ya=\pgf@y + \pgf@xa=\pgf@x + \pgfpointpolar{60}{0.6\pgf@ya} + } + \anchor{symboltert}{ + \northeast + \pgf@ya=\pgf@y + \pgf@xa=\pgf@x + \pgfpointpolar{-60}{0.6\pgf@ya} + } } {\ctikzvalof{bipoles/ooosource/height}} {ooosource} @@ -2674,7 +2707,7 @@ % % primary winding \ifpgf@circ@prim@delta \pgfscope - \pgftransformxshift{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left} + \pgftransformxshift{.6\pgf@circ@res@left} \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope @@ -2695,19 +2728,19 @@ \ifpgf@circ@sec@delta \pgfscope \pgfpointorigin - \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgftransformshift{\pgfpointpolar{60}{0.6\pgf@circ@res@right}} \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope \else\ifpgf@circ@sec@wye \pgfscope - \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgftransformshift{\pgfpointpolar{60}{0.6\pgf@circ@res@right}} \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope \else\ifpgf@circ@sec@zig \pgfscope - \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgftransformshift{\pgfpointpolar{60}{0.6\pgf@circ@res@right}} \pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope \fi\fi\fi @@ -2715,19 +2748,19 @@ % % tertiary winding \ifpgf@circ@tert@delta \pgfscope - \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgftransformshift{\pgfpointpolar{-60}{0.6\pgf@circ@res@right}} \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope \else\ifpgf@circ@tert@wye \pgfscope - \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgftransformshift{\pgfpointpolar{-60}{0.6\pgf@circ@res@right}} \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope \else\ifpgf@circ@tert@zig \pgfscope - \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgftransformshift{\pgfpointpolar{-60}{0.6\pgf@circ@res@right}} \pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} \endpgfscope \fi\fi\fi @@ -2824,7 +2857,10 @@ %% To change the internal symbols of the controlled voltage source american style \ctikzset{bipoles/cvsourceam/inner plus/.initial={$+$}} -\ctikzset{bipoles/cvsourceam/inner minus/.initial={$-$}} +% In the mayority of fonts, the size of - is smaller than +, so we have +% unaligned signs when positioned independently. +% See https://github.com/circuitikz/circuitikz/issues/721 +\ctikzset{bipoles/cvsourceam/inner minus/.initial={$\vphantom{+}-$}} %% Controlled voltage source - American \pgfcircdeclarebipolescaled{csources} {} |