summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-01-23 21:55:34 +0000
committerKarl Berry <karl@freefriends.org>2020-01-23 21:55:34 +0000
commit3cbe503dbda14b8212adf6cad6bfb8fd7882f427 (patch)
tree8ccfafbbf4144b832ab2a077ffaee017d053509d /Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
parentf74db910cfdba799460326738cc42e0ee57c3366 (diff)
circuitikz (23jan20)
git-svn-id: svn://tug.org/texlive/trunk@53515 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.tex8
1 files changed, 6 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
index 51ecc8574b8..0542e905efe 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
@@ -182,7 +182,9 @@
% the coeffcient 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{\tmp}{\tmp}{\tmp}{\myscale}{\tmp}{\tmp}
+ \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}
\ifnum \ctikzvalof{bipole/#1/position}>0
%we need some more space for placement below, due to mid-anchor
@@ -216,7 +218,9 @@
\pgfextra{
% scale ex-distance to make it independent on scale
% thanks @marmot see https://tex.stackexchange.com/a/476018/38080
- \pgfgettransformentries{\tmp}{\tmp}{\tmp}{\myscale}{\tmp}{\tmp}
+ \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}
\pgfmathadd{\pgf@circ@labanc}{90}
\pgfmathround{\pgfmathresult}