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.tex13
1 files changed, 12 insertions, 1 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
index a5075f08f6..46ec314f57 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
@@ -105,8 +105,17 @@
\pgfkeys{/tikz/fill/.add code={}{%
\edef\ctikz@fillcolor{#1}}}
%
+% This is to try to track the "implicit" color specification of Tikz,
+% like \draw[red,...] ...; which are not exactly the same than saying
+% \draw[color=red,...] ...;
+% This is too dangerous to issue by default (it was in 1.5.0 and it
+% was an error), so we will just define a command and tell it in the
+% manual.
+% It needs \usepackage{regexpatch} (which is not compatible with
+% xpatch, unfortunately)
% I do not know how to do the xpatchcmd in ConTeXt...
%
+\def\ctikzPatchImplicitColor{%
\ifpgfutil@format@is@latex
\pgfkeysgetvalue{/tikz/.unknown/.@cmd}{\my@temp}
\xpatchcmd*\my@temp % use starred-form to replace all (two places actually)
@@ -119,8 +128,10 @@
\pgfkeyslet{/tikz/.unknown/.@cmd}{\my@temp}
\else
\pgfutil@packagewarning{circuitikz}{%
- Not on LaTeX: patch failed, use only explicit color=...(see manual)}
+ Not on LaTeX: patch failed, ^^J%
+ use only explicit color=...(see manual).}
\fi
+}
%
\def\pgf@circ@setcolor{%
\ifpgf@circ@setcolor