From 3cbe503dbda14b8212adf6cad6bfb8fd7882f427 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 23 Jan 2020 21:55:34 +0000
Subject: circuitikz (23jan20)

git-svn-id: svn://tug.org/texlive/trunk@53515 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex')

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}
-- 
cgit v1.2.3

