summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex17
1 files changed, 16 insertions, 1 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
index ec9f2a8a71..35038c59f0 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
@@ -467,6 +467,18 @@
\fi
}
+% set the text color (via \color) if the color is not default or none
+% needed in some strange case (like bodydiode' dots)
+\def\pgf@circ@maybe@color#1{%
+ \edef\@@none{none}\edef\@@default{default}%
+ \edef\@@tmp{\ctikzvalof{#1}}%
+ \ifx\@@tmp\@@default\else
+ \ifx\@@tmp\@@none\else
+ \color{\@@tmp}%
+ \fi
+ \fi
+}
+
%%>>>
%% font changes compatible with plain/LaTeX/ConTeXt%<<<1
@@ -1125,7 +1137,10 @@
% shaping the +/- sign, see pgfcircvoltage.tex
\ctikzset{voltage/american font/.initial={}}
\ctikzset{voltage/american plus/.initial={$+$}}
-\ctikzset{voltage/american minus/.initial={$-$}}
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+\ctikzset{voltage/american minus/.initial={$\vphantom{+}-$}}
% here we start the voltage adjustments for special components.
% default values:
%