summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-14 21:10:56 +0000
committerKarl Berry <karl@freefriends.org>2021-07-14 21:10:56 +0000
commitf44797c65183b9645ea96096a4f8ab92b5c64298 (patch)
tree0c31d1f1438dd7dc153af4385d68fdff4fa5d799 /Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
parent4afc0e03308d532d963e3fad3bbf4be9500276e7 (diff)
circuitikz (14jul21)
git-svn-id: svn://tug.org/texlive/trunk@59929 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex')
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex19
1 files changed, 19 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
index 2759f80c9c8..8d9a4ad46ae 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
@@ -372,4 +372,23 @@
\fi}
\fi
+%%
+%% generic tunable arrow for components that have no "variable" thing
+%%
+\def\ctikztunablearrow{\pgfutil@ifnextchar[{\ctikztunablearrow@full}{\ctikztunablearrow@simple}}%
+\def\ctikztunablearrow@simple{\ctikztunablearrow@full[]}%
+\def\ctikztunablearrow@full[#1]#2#3#4#5{%
+ % add tunable arrow to a component
+ % relative thickness, relative length, rotation from axis, name of the component
+ \begin{scope}
+ \draw
+ \pgfextra{\pgfcirc@set@arrows{tunable}{}{latexslim}
+ \pgfsetlinewidth{#2\pgflinewidth}} [#1]
+ let \p1=($(#5.north east)-(#5.south west)$), \p2=($(#5.east)-(#5.west)$),
+ \n1 = {veclen(\x1,\y1)},
+ \n2 = {atan2(\y2,\x2)} in
+ % node[above]{\n1, \n2}
+ (#5.center) ++({\n2+(#4)}:{-0.5*(\n1)*(#3)}) -- ++({\n2+(#4)}:{(\n1)*(#3)});
+ \end{scope}%
+}
\endinput