summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-09 20:50:14 +0000
committerKarl Berry <karl@freefriends.org>2021-05-09 20:50:14 +0000
commitead9156f7ddf735b7f81064f55f0a920e76e79c6 (patch)
treef3b3eb51f304cbd4071f2dd1b3647ed34289eddf /Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
parent26f04f139d8bbc76c3eba01309f25d6bfc7c8ff2 (diff)
circuitikz (9may21)
git-svn-id: svn://tug.org/texlive/trunk@59147 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.tex68
1 files changed, 47 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
index 89539ee6e9b..21fc6e8883e 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
@@ -322,51 +322,77 @@
% syntax is l2_ = line1 and line2 (same for l2^)
%
\ctikzset{%
- l2 valign/.store in=\ltwo@valign, l2 valign=c,
- l2 halign/.store in=\ltwo@halign, l2 halign=l,
+ l2 valign/.store in=\pgfcirc@ltwo@valign, l2 valign=c,
+ l2 halign/.store in=\pgfcirc@ltwo@halign, l2 halign=l,
}
\ctikzset{l2base/.code n args={2}{
\pgfkeys{/tikz/circuitikz/bipole/label/name=%
\bgroup
\setlength{\tabcolsep}{2pt}%
- \def\ltwo@tabu{\tabular[\ltwo@valign]}%
- \expandafter\ltwo@tabu\expandafter{\ltwo@halign}%
+ \def\pgfcirc@ltwo@tabu{\tabular[\pgfcirc@ltwo@valign]}%
+ \expandafter\pgfcirc@ltwo@tabu\expandafter{\pgfcirc@ltwo@halign}%
#1\\ #2%
\endtabular
\egroup
}%
- \ctikzsetvalof{bipole/label/unit}{}
- \ifpgf@circ@siunitx
- \pgf@circ@handleSI{#2}
- \ifpgf@circ@siunitx@res
- \edef\pgf@temp{\pgf@circ@handleSI@val}
- \pgfkeyslet{/tikz/circuitikz/bipole/label/name}{\pgf@temp}
- \edef\pgf@temp{\pgf@circ@handleSI@unit}
- \pgfkeyslet{/tikz/circuitikz/bipole/label/unit}{\pgf@temp}
- \else
- \fi
- \else
- \fi
}}
-\ctikzset{l2/.style args={#1 and #2}{
+\ctikzset{l2/.style args={#1and#2}{
l2base={#1}{#2},
\circuitikzbasekey/bipole/label/position=90 }
}
-\ctikzset{l2 above/.style args={#1 and #2}{
+\ctikzset{l2 above/.style args={#1and#2}{
l2base={#1}{#2},
\circuitikzbasekey/bipole/label/position=90 }
}
-\ctikzset{l2^/.style args={#1 and #2}{
+\ctikzset{l2^/.style args={#1and#2}{
l2base={#1}{#2},
\circuitikzbasekey/bipole/label/position=90 }
}
-\ctikzset{l2 below/.style args={#1 and #2}{
+\ctikzset{l2 below/.style args={#1and#2}{
l2base={#1}{#2},
\circuitikzbasekey/bipole/label/position=-90 }
}
-\ctikzset{l2_/.style args={#1 and #2}{
+\ctikzset{l2_/.style args={#1and#2}{
l2base={#1}{#2},
\circuitikzbasekey/bipole/label/position=-90 }
}
+%
+% the same for annotations
+%
+\ctikzset{%
+ a2 valign/.store in=\pgfcirc@atwo@valign, a2 valign=c,
+ a2 halign/.store in=\pgfcirc@atwo@halign, a2 halign=r,
+}
+\ctikzset{a2base/.code n args={2}{
+ \pgfkeys{/tikz/circuitikz/bipole/annotation/name=%
+ \bgroup
+ \setlength{\tabcolsep}{2pt}%
+ \def\pgfcirc@atwo@tabu{\tabular[\pgfcirc@atwo@valign]}%
+ \expandafter\pgfcirc@atwo@tabu\expandafter{\pgfcirc@atwo@halign}%
+ #1\\ #2%
+ \endtabular
+ \egroup
+ }%
+}}
+\ctikzset{a2/.style args={#1and#2}{
+ a2base={#1}{#2},
+ \circuitikzbasekey/bipole/annotation/position=-90 }
+}
+\ctikzset{a2 above/.style args={#1and#2}{
+ a2base={#1}{#2},
+ \circuitikzbasekey/bipole/annotation/position=-90 }
+}
+\ctikzset{a2^/.style args={#1and#2}{
+ a2base={#1}{#2},
+ \circuitikzbasekey/bipole/annotation/position=-90 }
+}
+\ctikzset{a2 below/.style args={#1and#2}{
+ a2base={#1}{#2},
+ \circuitikzbasekey/bipole/annotation/position=90 }
+}
+\ctikzset{a2_/.style args={#1and#2}{
+ a2base={#1}{#2},
+ \circuitikzbasekey/bipole/annotation/position=90 }
+}
\endinput