diff options
author | Norbert Preining <preining@logic.at> | 2021-04-05 22:35:56 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2021-04-05 22:35:56 +0000 |
commit | 88be3061db22405869f48992f1213b4ea7d3e613 (patch) | |
tree | 397f08a57073d04c891be956cb58109d3d9f1ed3 /Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex | |
parent | 18e239ac567c87e530280dfa6f07dfaf0e3d6a59 (diff) |
circuitikz (6apr21)
git-svn-id: svn://tug.org/texlive/trunk@58757 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex index 465f704ded7..8e2b4372c68 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex @@ -30,6 +30,11 @@ \ctikzset{bipole annotation style/.append style={#1}} }} +\ctikzset{label distance/.initial={0pt}} +\ctikzset{annotation distance/.initial={0pt}} +\tikzset{label distance/.code={\ctikzset{label distance={#1}}}} +\tikzset{annotation distance/.code={\ctikzset{annotation distance={#1}}}} + %% Options \ctikzset{label/.style = { l={#1} } } \ctikzset{l/.code = { @@ -182,13 +187,13 @@ % scale the distances in function of zoom, so that they are not % dependent on it but on font size. Thanks to @marmot % https://tex.stackexchange.com/a/476018/38080 - % the coeffcient is adjusted so that the distance is more or less + % the coefficient is adjusted so that the distance is more or less % the same for rotated labels and straight ones (although it will % depend on the font, so it's not exact). \pgfgettransformentries{\tmpa}{\tmpb}{\tmpc}{\tmpd}{\tmp}{\tmp}% \pgfmathsetmacro{\myscale}{sqrt(abs(\tmpa*\tmpd-\tmpb*\tmpc))}% abs should not be needed % \typeout{ROT\tmpa\space\tmpb\space\tmpc\space\tmpd\space\myscale} - \pgfmathsetlength\pgf@circ@res@temp{1.5*\pgf@circ@ls/\myscale} + \pgfmathsetlength\pgf@circ@res@temp{1.5*\pgf@circ@ls/\myscale+\ctikzvalof{#1 distance}/\myscale} \ifnum \ctikzvalof{bipole/#1/position}>0 %we need some more space for placement below, due to mid-anchor \else % we do not have <= in \ifnum... @@ -227,7 +232,7 @@ \pgfgettransformentries{\tmpa}{\tmpb}{\tmpc}{\tmpd}{\tmp}{\tmp}% \pgfmathsetmacro{\myscale}{sqrt(abs(\tmpa*\tmpd-\tmpb*\tmpc))}% abs should not be needed % \typeout{ROT\tmpa\space\tmpb\space\tmpc\space\tmpd\space\myscale} - \pgfmathsetlength\pgf@circ@res@temp{\pgf@circ@ls/\myscale} + \pgfmathsetlength\pgf@circ@res@temp{\pgf@circ@ls/\myscale+\ctikzvalof{#1 distance}/\myscale} \pgfmathadd{\pgf@circ@labanc}{90} \pgfmathround{\pgfmathresult} \def\pgf@circ@labanctext{\pgf@circ@labanc} |