summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex68
1 files changed, 47 insertions, 21 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
index 89539ee6e9..21fc6e8883 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/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