summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/circuitikz')
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/changelog.tex31
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdfbin17351 -> 17353 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdfbin1017865 -> 1046144 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex327
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex3
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex228
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex6
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex324
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex12
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
11 files changed, 736 insertions, 203 deletions
diff --git a/graphics/pgf/contrib/circuitikz/doc/changelog.tex b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
index 28f73e7cdb..5a0a5fe1cc 100644
--- a/graphics/pgf/contrib/circuitikz/doc/changelog.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
@@ -5,6 +5,34 @@ full list of changes.
\begin{itemize}
\item
+ Version 1.2.3 (2020-08-07)
+
+ Several fixes and small enhancement all over the map, changes in the
+ documentation to better explain the reasons and effect of the
+ path-building changes of 1.2.0 and 1.2.1.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ added a Mach-Zehnder-Modulator block symbol as node \texttt{mzm} by
+ user \texttt{@dl1chb}
+ \item
+ add an \texttt{open\ poles\ fill} option to simplify circuits where
+ the background is different from white
+ \item
+ restyled the FAQ and added the explanation of ``gaps with
+ \texttt{nodes}'' that happens again after 1.2.1
+ \item
+ Fixed size of ``not circle'' in flip-flops to match european style
+ \texttt{not\ circle} when used without the IEEE style
+ \item
+ Block anchors: add border anchors for round elements and deprecate
+ old 1, 2, 3, 4 anchors
+ \item
+ Fixed some bipole border size to avoid overlapping labels; document
+ it
+ \end{itemize}
+\item
Version 1.2.2 (2020-07-15)
Bug-fix release: coordinate name leakage. The node and coordinate
@@ -14,7 +42,8 @@ full list of changes.
Version 1.2.1 (2020-07-06)
Several changes, both internal and user-visible. These are quite
- risky, although they \emph{should} be backeard-compatible.
+ risky, although they \emph{should} be backward-compatible (if the
+ circuit code is correct).
From the user point of view:
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
index 3342c55b3a..413e57e5aa 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
index 9f5f858430..a94f709061 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
index 300ee04f20..af718172c9 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
@@ -276,7 +276,7 @@ Nevertheless, \href{https://tex.stackexchange.com/a/529159/38080}{Schrödinger'
The \texttt{use fpu reciprocal} key seems to have no side effects, but given that it is patching an internal interface of \TikZ{} it can break any time, so it is advisable to use it only if and when needed.
-\subsection{Incompabilities between version}
+\subsection{Incompabilities between version}\label{sec:incompatible-changes}
Here, we will provide a list of incompabilitys between different version of circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than including a lot of switches and compatibility layers.
You can check the used version at your local installation using the macro \verb!\pgfcircversion{}!.
\begin{itemize}
@@ -284,10 +284,12 @@ You can check the used version at your local installation using the macro \verb!
One of the changes is that the previous routine did the wrong thing if you used \texttt{(node) to[...]} (you should use an anchor or a coordinate, not a node there --- like \texttt{(node.anchor) to[...]}).
- The other one was that in the structure \texttt{... to[...] node[pos=\emph{something}] (coord)} the value of \texttt{pos} was completely wrong (even if you don't use \texttt{pos} explicitly, remeber it's \texttt{pos=0.5} by default).
+ The other one was that in the structure \texttt{... to[...] node[pos=\emph{something}] (coord)} the value of \texttt{pos} was completely wrong (even if you don't use \texttt{pos} explicitly, remember it's \texttt{pos=0.5} by default).
Additionally, the old code disrupted the \TikZ{} path-fill mechanism, so that you could get away with using the \texttt{fill} option on paths and having just the components to be filled, not the path. That was incorrect, although sometime it was handy.
+ See the FAQ at section~\ref{faqs:nodes} for more information.
+
\item After v1.2.0: voltage arrows, symbols and label positions are calculated with a rewritten routine. There should be little change, \emph{unless} you touched internal values\dots
\item After v1.1.3: during the 1.1.0 --- 1.1.2 version, the inverted Schmitt buffer in IEEE style ports was called \texttt{inv schmitt} (with an additional space). The correct name is \texttt{invschmitt port} (the same as the legacy american port).
\item After v1.1.2: the position of \texttt{american} voltages for the \texttt{open} bipoles (you can revert to old behavior, see section~\ref{sec:sub-voltage-position}).
@@ -1066,6 +1068,59 @@ Alternatively, that you can use the shape form, and then use the \texttt{left} a
\end{circuitikz}
\end{LTXexample}
+\subsubsection{Border anchors}\label{sec:bipoles-border-anchors}
+
+\begingroup
+\def\showbordersfornode#1{%
+\begin{circuitikz}[baseline, scale=0.8, transform shape]
+ \node[#1shape, name=bip] at(0,0) {};
+ \foreach \a in {0,30,...,359} \draw[red] (bip.\a) -- ++(\a:0.7) node[font=\tiny, fill=white, inner sep=0.5pt]{\a};
+ \node [font=\ttfamily\small, black, below] at (bip.-90) {\detokenize\expandafter{#1}};
+\end{circuitikz}
+}
+
+Bipoles have also installed generic border anchors --- that means, anchors that start at an angle. For complexity reason, these are for most of the components simply a generic enclosing rectangle. They interact in a non-trivial way with the \texttt{mirror} and \texttt{invert} keys, so it's best not to use them directly.
+
+\begin{quote}
+ \showbordersfornode{generic}
+ \showbordersfornode{resistor}
+ \showbordersfornode{fulldiode}
+ \showbordersfornode{vsource}
+ \showbordersfornode{capacitivesens}
+\end{quote}
+
+You can notice that the border anchors are a bit spaced out (this is useful because those anchors are used to position labels and annotations). You can override this if you need to reach exactly the border (whatever could that mean depends on the component) by using the key \texttt{bipoles/border margin}, which is a number that states how much the enclosing border is stretched out (default value is \texttt{1.1}). For example, setting
+\verb|\ctikzset{bipoles/border margin=1}| will make the border anchor coincide with the geographical shape:
+
+\begin{quote}
+ \ctikzset{bipoles/border margin=1}
+ \showbordersfornode{generic}
+ \showbordersfornode{resistor}
+ \showbordersfornode{fulldiode}
+ \showbordersfornode{vsource}
+ \showbordersfornode{capacitivesens}
+\end{quote}
+
+The above diagram has been obtained with the code:
+
+\begin{lstlisting}
+\def\showbordersfornode#1{%
+\begin{circuitikz}[baseline, scale=0.8, transform shape]
+ \node[#1shape, name=bip] at(0,0) {};
+ \foreach \a in {0,30,...,359} \draw[red] (bip.\a) -- ++(\a:0.7)
+ node[font=\tiny, fill=white, inner sep=0.5pt]{\a};
+ \node [font=\ttfamily\small, black, below] at (bip.-90)
+ {\detokenize\expandafter{#1}};
+\end{circuitikz}}
+\ctikzset{bipoles/border margin=1}
+\showbordersfornode{generic} \showbordersfornode{resistor}
+\showbordersfornode{fulldiode} \showbordersfornode{vsource}
+\showbordersfornode{capacitivesens}
+\end{lstlisting}
+
+
+\endgroup
+
\subsubsection{Customization}
\label{sec:components-size}
@@ -2423,7 +2478,7 @@ Moreover, you have the arrow tip \texttt{latexslim} which is an arrow similar to
\subsection{Terminal shapes}\label{sec:terminals}
-These are the so-called ``bipole nodes'' shapes, or poles (see section~\ref{sec:bipole-nodes}). These nodes are always filled; the ``open'' versions (starting with an \texttt{o}) are by default filled white, but you can override it with the \texttt{fill} parameter.
+These are the so-called ``bipole nodes'' shapes, or poles (see section~\ref{sec:bipole-nodes}). These nodes are always filled; the ``open'' versions (starting with an \texttt{o}) are by default filled with the color specified by the key \texttt{open nodes fill} (by default \texttt{white}), but you can override locally it with the \texttt{fill} parameter.
\begin{groupdesc}
\circuitdesc{circ}{Connected terminal}{}
@@ -2446,6 +2501,7 @@ Since version 0.9.0, ``bipole nodes'' shapes have all the standard geographical
The size of the poles is controlled by the key \texttt{nodes width} (default \texttt{0.04}, relative to the basic length).
Be sure to see section~\ref{sec:bipole-nodes} for more usage and configurability.
+
\subsubsection{BNC connector/terminal}
\begin{groupdesc}
@@ -2478,13 +2534,15 @@ It also has a \texttt{zero} anchor if you need to rotate it about its real cente
\noindent Contributed by Stefan Erhardt.
\begin{groupdesc}
- \circuitdesc*{mixer}{mixer}{}( 1/180/0.1,2/-90/0.1,3/0/0.1,4/90/0.1 )
+ \circuitdesc*{mixer}{mixer}{}( w/180/0.1,s/-90/0.1,e/0/0.1,n/90/0.1 )
\circuitdesc*{adder}{adder}{}( west/180/0.1,south/-90/0.1,east/0/0.1,north/90/0.1 )
- \circuitdesc*{oscillator}{oscillator}{}
- \circuitdesc*{circulator}{circulator}{}
+ \circuitdesc*{oscillator}{oscillator}{}( w/180/0.1,s/-90/0.1,e/0/0.1,n/90/0.1 )
+ \circuitdesc*{circulator}{circulator}{}( left/180/0.1,down/-90/0.1,right/0/0.1, up/90/0.1 )
\circuitdesc*{wilkinson}{wilkinson divider}{}( in/180/0.1, out2/45/0.1, out1/-45/0.1 )
\circuitdesc*{gridnode}{gridnode\footnotemark}{}(left/135/0.2, right/45/0.2, center/-100/0.4, up/90/0.2, down/-45/.2)
\footnotetext{added by \texttt{olfline}}
+ \circuitdesc*{mzm}{Mach Zehnder Modulator\footnotemark}{}( in/180/0.1, mod/90/0.1, out/0/0.1)
+ \footnotetext{added by \texttt{dl1chb}}
\end{groupdesc}
\begin{groupdesc}
@@ -2516,25 +2574,48 @@ It also has a \texttt{zero} anchor if you need to rotate it about its real cente
\end{groupdesc}
\begin{groupdesc}
- \circuitdesc*{fourport}{Generic fourport}{}
- \circuitdesc*{coupler}{Coupler}{}
+ \circuitdesc*{fourport}{Generic fourport}{}(port1/180/0.1, port2/0/0.1, port3/0/0.2, port4/180/0.1)
+ \circuitdesc*{coupler}{Coupler}{}(left down/180/0.1, right down/0/0.1, right up/0/0.2, left up/180/0.1)
\circuitdesc*{coupler2}{Coupler with rounded arrows}{}
\end{groupdesc}
\subsubsection{Blocks anchors}
-The ports of the mixer and adder can be addressed with numbers or \texttt{west}/\texttt{south}/\texttt{east}/\texttt{north}:
+The ports of the \texttt{mixer}, \texttt{adder}, \texttt{oscillator} and \texttt{circulator} can be addressed with \texttt{west}, \texttt{south}, \texttt{east}, \texttt{north}; the equivalent \texttt{left}, \texttt{down}, \texttt{right}, \texttt{up}; or the shorter \texttt{w, s, e, n} ones:
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
(0,0) node[mixer] (mix) {}
- (mix.1) node[left] {1}
- (mix.2) node[below] {2}
- (mix.3) node[right] {3}
- (mix.4) node[above] {4}
+ (mix.w) node[left] {w}
+ (mix.s) node[below] {s}
+ (mix.e) node[right] {e}
+ (mix.n) node[above] {n}
;\end{circuitikz}
\end{LTXexample}
+Moreover, the have proper border anchors since version \texttt{1.2.3}, so you can do things like this:
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) node[adder] (mix) {}
+ (-1,1) -- ++(0.5,0) -- (mix)
+ (-1,-1) -- ++(0.5,0) -- (mix) -- ++(1,0);
+ \draw [red, <-] (mix.45) -- ++(1,1);
+\end{circuitikz}
+\end{LTXexample}
+
+Those components have also \textbf{deprecated} anchors named \texttt{1, 2, 3, 4}; they are better not used because they can conflict with the border anchor. They still work for backward compatibility, but could be removed in a future release.
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz} \draw
+ (0,0) node[mixer] (mix) {}
+ (mix.1) node[left] {1} (mix.2) node[below] {2}
+ (mix.3) node[right] {3} (mix.4) node[above] {4};
+\draw [ultra thick, red, opacity=0.5]
+ (-1,-1)--(1,1)(-1,1)--(1,-1);
+\node [red, below] at (0,-1) {DON'T USE};
+\end{circuitikz}
+\end{LTXexample}
The Wilkinson divider has:
@@ -2553,24 +2634,43 @@ The Wilkinson divider has:
The couplers have:
-\begin{LTXexample}[varwidth=true]
-\begin{circuitikz} \draw
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz} \draw (0,1.5) %bounding box
(0,0) node[coupler] (c) {\SI{10}{dB}}
- (c.1) to[short,-o] ++(-0.5,0)
- (c.2) to[short,-o] ++(0.5,0)
- (c.3) to[short,-o] ++(0.5,0)
- (c.4) to[short,-o] ++(-0.5,0)
- (c.1) node[below left] {\texttt{1}}
- (c.2) node[below right] {\texttt{2}}
- (c.3) node[above right] {\texttt{3}}
- (c.4) node[above left] {\texttt{4}}
+ (c.left down) to[short,-o] ++(-0.5,0)
+ (c.right down) to[short,-o] ++(0.5,0)
+ (c.right up) to[short,-o] ++(0.5,0)
+ (c.left up) to[short,-o] ++(-0.5,0)
+ (c.left down) node[below left] {\texttt{left down}}
+ (c.right down) node[below right] {\texttt{right down}}
+ (c.right up) node[above right] {\texttt{right up}}
+ (c.left up) node[above left] {\texttt{left up}}
;
\end{circuitikz}
\end{LTXexample}
+Or you can use also \texttt{port1} to \texttt{port4} if you prefer:
+
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz} \draw
+\begin{circuitikz} \draw (0,1.5) %bounding box
(0,0) node[coupler2] (c) {\SI{3}{dB}}
+ (c.port1) to[short,-o] ++(-0.5,0)
+ (c.port2) to[short,-o] ++(0.5,0)
+ (c.port3) to[short,-o] ++(0.5,0)
+ (c.port4) to[short,-o] ++(-0.5,0)
+ (c.port1) node[below left] {\texttt{port1}}
+ (c.port2) node[below right] {\texttt{port2}}
+ (c.port3) node[above right] {\texttt{port3}}
+ (c.port4) node[above left] {\texttt{port4}}
+ ;
+\end{circuitikz}
+\end{LTXexample}
+
+Also they have the simpler \texttt{1, 2, 3, 4} anchors, and although they have no border anchors (for now), it is better not to use them.
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz} \draw(0,1.5) %bounding box
+ (0,0) node[coupler] (c) {\SI{10}{dB}}
(c.1) to[short,-o] ++(-0.5,0)
(c.2) to[short,-o] ++(0.5,0)
(c.3) to[short,-o] ++(0.5,0)
@@ -2583,7 +2683,6 @@ The couplers have:
\end{circuitikz}
\end{LTXexample}
-
\subsubsection{Blocks customization}
You can change the scale of all the block elements by setting the key \texttt{blocks/scale} to something different from the default \texttt{1.0}.
@@ -4893,6 +4992,36 @@ Normally the symbols on the flip-flop are un-rotated when you rotate the symbol,
\end{tikzpicture}
\end{LTXexample}
+You can also change the size of the wedge, with the key \texttt{multipoles/flipflop/clock wedge size} (default value \texttt{0.2}).
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+ \begin{circuitikz}[]
+ \draw (0,0) node[flipflop JK]{JK};
+ \ctikzset{multipoles/flipflop/clock wedge size=0.1}
+ \draw (2.3,0) node[flipflop JK]{JK};
+ \ctikzset{multipoles/flipflop/clock wedge size=0.4}
+ \draw (4.6,0) node[flipflop JK]{JK};
+\end{circuitikz}
+\end{LTXexample}
+
+Flip-flops ``not circles'' follows the current logic port setting (either if you choose \texttt{ieee ports}, or if you are using \texttt{european ports} with \texttt{european not symbol} set to \texttt{cirle} or \texttt{ieee circle}.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[]
+\ctikzset{logic ports=european,
+ tripoles/european not symbol=ieee circle}
+\draw (0,0) node[nand port](A){}
+ (A.out) to[short] ++(0.5,0)
+ node[flipflop JK, dot on notQ, anchor=pin 2]{JK};
+\ctikzset{logic ports=european,
+tripoles/european not symbol=circle}
+\draw (0,-3) node[nand port](A){}
+ (A.out) to[short] ++(0.5,0)
+ node[flipflop JK, dot on notQ, anchor=pin 2]{JK};
+\end{circuitikz}
+\end{LTXexample}
+
+
\subsection{Multiplexer and de-multiplexer}\label{sec:muxdemuxes}
The shape used for muxes and de-muxes is probably the most configurable shape of the package; it has been added by Romano in \texttt{v1.0.0}. The basic shape is a multiplexer with 8 input pin, one output pin, and three control pins ($2^3\to1$ multiplexer). The pins are not named as input or output pins (see below for a full description for anchors) for reasons that will be clear later.
@@ -6745,6 +6874,8 @@ A workaround is shown in port \texttt{3}:
;\end{circuitikz}
\end{LTXexample}
+\subsubsection{Background colors different from white}
+
Notice also that the connection point are always filled, although the color \emph{tries} to follow the color of the filling of the component (but look at section~\ref{sec:transparent-poles}). Moreover, if you want to pass fill transparency down to path-style components, you \emph{have} to put it into the options of the \verb|\draw| command.
\begin{LTXexample}[varwidth=true, pos=t]
@@ -6762,26 +6893,118 @@ Notice also that the connection point are always filled, although the color \emp
As you can see, the ``black'' components (as \texttt{D*}) follow the color of the line, not the fill.
-\section{FAQ}
+Note however that if you choose a colored background, for example with the \verb|\pagecolor{}| command or with other tricks, the nodes will be by default still filled with white.
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[european]
+ \fill[color=blue] (-1,-1) rectangle (4,1);
+ \draw[color=white] (0,0) to[R, o-o] ++(3,0);
+\end{circuitikz}
+\end{LTXexample}
+
+You have two solutions for this. You can redefine the \texttt{o-o} (and the similar commands \texttt{-o}, \texttt{o-}, \texttt{*-o} and so on) with a blue filled ``open'' pole:
+
+\begin{LTXexample}[varwidth=true]
+\tikzset{bcirc/.style={shape=ocirc, fill=blue}}
+\ctikzset{o-o/.style ={
+ \circuitikzbasekey/bipole/nodes/left=bcirc,
+ \circuitikzbasekey/bipole/nodes/right=bcirc}}
+\begin{circuitikz}[european]
+ \fill[color=blue] (-1,-1) rectangle (4,1);
+ \draw[color=white] (0,0) to[R, o-o] ++(3,0);
+\end{circuitikz}
+\end{LTXexample}
+
+Also, since \texttt{v1.2.3}, you can set the key \texttt{open poles fill} (default: \texttt{white} which works for \texttt{ocirc}, \texttt{odiamondpole} and \texttt{osquarepole}):
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[european]
+ \ctikzset{open poles fill=blue}
+ \fill[color=blue] (-1,-1) rectangle (4,1);
+ \draw[color=white] (0,0) to[R, o-o] ++(3,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\section{FAQ: Frequently asked questions}
+
+\def\faqQ{\par\medskip\noindent\textbf{Q: }}
+\def\faqA{\par\noindent\textbf{A: }}
+
+\subsection{Using named nodes in circuits}\label{faqs:nodes}
+
+\faqQ When I use a node to name a connection in the circuit, I have gaps in the wires! I am sure it used to work!
+
+\faqA This is explained in~\ref{sec:incompatible-changes}. The fast answer is that in a hurry, use the \texttt{1.1.2} fallback point with:
+
+\verb|\usepackage{circuitikz-1.1.2}|
+
+in your preamble.
+
+But really, your circuit definition is buggy, so the best thing to do is fix that; if you want to name a point in you circuit, you should use a \texttt{coordinate}, not a \texttt{node}.\footnote{Yes, I understand from where the confusion arise --- in circuit theory they are called nodes.} Here is a small tutorial on \emph{why} you should change your circuit.
-\noindent Q: When using \verb!\tikzexternalize! I get the following error:
+Nodes, in \TikZ, have normally a non-zero size even when they are empty; moreover, connections are supposed to join the border of nodes. Please study the following (pure \TikZ, not \Circuitikz)
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \path (1,1) node (A){}; % empty node at (1,1)
+ \draw (1,0) -- (A) -- (2,1); % surprise!
+\end{tikzpicture}
+\end{LTXexample}
+
+The gap is there because the node has a non-zero size (more in detail, its \texttt{inner sep} is by default different from zero. You can see it easily if you draw the node shape:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \path (1,1) node [draw=red](A){};
+ \draw (1,0) -- (A) -- (2,1);
+\end{tikzpicture}
+\end{LTXexample}
+
+The problem is that you was want to name a coordinate, you should use a \texttt{coordinate}, \textbf{not} a node!
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \path (1,1) coordinate (A); % give a name to (1,1)
+ \draw (1,0) -- (A) -- (2,1);% now it's ok!
+\end{tikzpicture}
+\end{LTXexample}
+
+Now, before version \texttt{1.2.1} (and since around \texttt{0.6}), \Circuitikz{} was detecting when a connection was between nodes and sort-of added a \texttt{node.center} movement to the path. That in turn generated the need of hacks to draw the correct joining of lines, because that kind of movement broke the continuity of the path, like in this example:
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+ \begin{tikzpicture}[line width=4pt]
+ \path (1,1) node (A){};
+ \draw (1,0) -- (A.center) (A) (A.center) -- (2,1);
+\end{tikzpicture}
+\end{LTXexample}
+
+You can see more example and more reasoning on GitHub; start from the
+\href{https://github.com/circuitikz/circuitikz/issues/417}{issue detecting the join problem}, then
+\href{https://github.com/circuitikz/circuitikz/pull/418}{look at the merged fix}; you can follow several issue and discussion from there, but for example there are circuits that can't be drawn with the ``hack'' in, \href{https://github.com/circuitikz/circuitikz/issues/76#issuecomment-652980687}{like this one}.
+
+So finally it was decided\footnote{well, Romano decided, so you can blame him. \emph{I do not think that workarounds to correct malformed circuits are really maintainable; just see the bunch of code removed by the patch! --- Romano.}} to remove the change, to simplify the code and to make the package more maintainable.
+
+\subsection{Errors when externalizing pictures}\label{faqs:externalize}
+
+\faqQ When using \verb!\tikzexternalize! I get the following error:
\begin{verbatim}
! Emergency stop.
\end{verbatim}
-\noindent A: The \TikZ\ manual states:
+\faqA The \TikZ\ manual states:
+
\begin{quotation}
-Furthermore, the library assumes that all \LaTeX\ pictures are ended
+\noindent Furthermore, the library assumes that all \LaTeX\ pictures are ended
with \\\verb!\end{tikzpicture}!.
\end{quotation}
Just substitute every occurrence of the environment \verb!circuitikz! with \verb!tikzpicture!. They are actually pretty much the same.
-\bigskip
+\subsection{Labels, voltages and currents woes}\label{faqs:labels}
-\noindent Q: How do I draw the voltage between two nodes?
+\faqQ How do I draw the voltage between two nodes?
-\noindent A: Between any two nodes there is an open circuit!
+\faqA Between any two nodes there is an open circuit!
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
node[ocirc] (A) at (0,0) {}
@@ -6792,24 +7015,22 @@ Just substitute every occurrence of the environment \verb!circuitikz! with \verb
\bigskip
-\noindent Q: I cannot write \verb!to[R = $R_1=12V$]! nor \verb!to[ospst = open, 3s]!: I get errors.
+\faqQ I cannot write \verb!to[R = $R_1=12V$]! nor \verb!to[ospst = open, 3s]!: I get errors.
-\noindent A: It is a limitation of the parser.
+\faqA It is a limitation of the parser, joined with a suboptimal processing by \Circuitikz{} of the passing of the argument of keys.
-Use \verb|\def{\eq}{=}| \verb!to[R = $R_1\eq 12V$]! and \verb!to[ospst = open{,} 3s]! instead; see caveat in section~\ref{sec:labels-and-annotations}.
+Use for example \verb|\mbox{}| or define \verb|\def{\eq}{=}| and use \verb!to[R = $R_1\eq 12V$]!, or try to protect commas and equal signs like \verb!to[ospst = open{,} 3s]! or \verb|ospst=\mbox{open, 3s}| instead; see caveat in section~\ref{sec:labels-and-annotations}.
-\bigskip
-
-\noindent Q: I tried to change the direction of the $y$ axis with \texttt{yscale=-1}, but the circuit is completely messed up.
+\subsection{Global scaling and rotating}\label{faqs:scale-and-rotate}
-\noindent A: Yes, it's a known bug (or misfeature, or limitation). See section~\ref{sec:bugs}. Don't do that.
+\faqQ I tried to change the direction of the $y$ axis with \texttt{yscale=-1}, but the circuit is completely messed up.
+\faqA Yes, it's a known bug (or misfeature, or limitation). See section~\ref{sec:bugs}. Don't do that.
-\bigskip
-\noindent Q: I tried to put a diode in a \texttt{pic}, but it's coming out badly rotated.
+\faqQ I tried to put a diode in a \texttt{pic}, but it's coming out badly rotated.
-\noindent A: Yes, it's a known bug (or misfeature, or limitation). See section~\ref{sec:bugs}. \Circuitikz{} is not compatible with \texttt{pic}s at this point.
+\faqA Yes, it's a known bug (or misfeature, or limitation, or a fact of life). See section~\ref{sec:bugs}. \Circuitikz{} is not compatible with \texttt{pic}s at this point.
\section{Defining new components}
@@ -7186,19 +7407,19 @@ Here a series of example, contributed by several people, is shown with their cod
(2,0) node[coupler] (c1) {}
(0,2) node[coupler,rotate=90] (c2) {}
(0,-2) node[coupler,rotate=90] (c3) {}
- (w1.out1) .. controls ++(0.8,0) and ++(0,0.8) .. (c3.3)
- (w1.out2) .. controls ++(0.8,0) and ++(0,-0.8) .. (c2.4)
- (c1.1) .. controls ++(-0.8,0) and ++(0,0.8) .. (c3.2)
- (c1.4) .. controls ++(-0.8,0) and ++(0,-0.8) .. (c2.1)
+ (w1.out1) .. controls ++(0.8,0) and ++(0,0.8) .. (c3.port3)
+ (w1.out2) .. controls ++(0.8,0) and ++(0,-0.8) .. (c2.port4)
+ (c1.port1) .. controls ++(-0.8,0) and ++(0,0.8) .. (c3.port2)
+ (c1.port4) .. controls ++(-0.8,0) and ++(0,-0.8) .. (c2.port1)
(w1.in) to[short,-o] ++(-1,0)
(w1.in) node[left=30] {LO}
- (c1.2) node[match,yscale=1] {}
- (c1.3) to[short,-o] ++(1,0)
- (c1.3) node[right=30] {RF}
- (c2.3) to[detector,-o] ++(0,1.5)
- (c2.2) to[detector,-o] ++(0,1.5)
- (c3.1) to[detector,-o] ++(0,-1.5)
- (c3.4) to[detector,-o] ++(0,-1.5)
+ (c1.port2) node[match,yscale=1] {}
+ (c1.port3) to[short,-o] ++(1,0)
+ (c1.port3) node[right=30] {RF}
+ (c2.port3) to[detector,-o] ++(0,1.5)
+ (c2.port2) to[detector,-o] ++(0,1.5)
+ (c3.port1) to[detector,-o] ++(0,-1.5)
+ (c3.port4) to[detector,-o] ++(0,-1.5)
;
\end{circuitikz}
\end{LTXexample}
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index d4d3078950..d3fa441ab7 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -12,8 +12,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{1.2.2}
-\def\pgfcircversiondate{2020/07/15}
+\def\pgfcircversion{1.2.3}
+\def\pgfcircversiondate{2020/08/07}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
index e3686e4d94..fe87271f5e 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
@@ -994,6 +994,9 @@
\ctikzset{tripoles/wilkinson/height/.initial=1.3}
\ctikzset{tripoles/wilkinson/width/.initial=1.3}
+
+\ctikzset{tripoles/mzm/height/.initial=1.3}
+\ctikzset{tripoles/mzm/width/.initial=1.3}
%%>>>
% Transistors %<<<1
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index 36ddd5d079..d9b8e7ca4d 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -205,6 +205,35 @@
}
}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% anchor adjustment macros
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Extend the border anchor position by the specified factors on the right-top (north east corner)
+% and the left-down (southwest border). Argument must be number (possibly decimal) without sign
+
+\def\pgfcirc@border@extend@full#1#2#3#4{% right, top, left, down
+ \anchorborder{%
+ \ifpgf@circuit@bipole@inverted
+ \pgf@circ@res@left=-\pgf@x
+ \pgf@circ@res@up=-\pgf@y
+ \else
+ \pgf@circ@res@left=\pgf@x
+ \pgf@circ@res@up=\pgf@y
+ \fi
+ \ifdim\pgf@circ@res@up>0cm
+ \northeastborder
+ \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{#1\pgf@x}{#2\pgf@y}}
+ \else
+ \southwestborder
+ \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-#3\pgf@x}{-#4\pgf@y}}
+ \fi
+ }
+}
+
+% Just up and down (very common)
+\def\pgfcirc@border@extend@updown#1#2{\pgfcirc@border@extend@full{1}{#1}{1}{#2}}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Standard bipole shapes declarations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -440,13 +469,14 @@
%% Thermistor
\pgfcircdeclarebipolescaled{resistors}
-{{% anchor for labelling the type of dependency
+{% anchor for labelling the type of dependency
\anchor{label}{%
\southwest
\pgf@x=0.4\pgf@x
\pgf@y=1.2\pgf@y
}%
-}}
+ \pgfcirc@border@extend@updown{1}{1.2}
+}
{\ctikzvalof{bipoles/thermistor/height}}
{thermistor}
{\ctikzvalof{bipoles/thermistor/height}}
@@ -713,6 +743,7 @@
\pgfcircdeclarebipolescaled{capacitors}
{
\anchor{label}{\southwest\pgf@x=2.6\pgf@x\pgf@y=1.2\pgf@y}%
+ \pgfcirc@border@extend@full{2.6}{1}{4.4}{1.2}
}
{\ctikzvalof{bipoles/capacitor/height}}
{capacitivesens}
@@ -943,6 +974,7 @@
}
}
\anchor{midtap}{\midtap}
+ \pgfcirc@border@extend@full{1}{2}{1.6}{2.6}
}
{\ctikzvalof{bipoles/cuteinductor/lower coil height}}
{scuteinductor}
@@ -1132,6 +1164,7 @@
}
}
\anchor{midtap}{\midtap}
+ \pgfcirc@border@extend@full{1}{2}{1.6}{2.6}
}
{\ctikzvalof{bipoles/americaninductor/height 2}}
{samericaninductor}
@@ -1227,6 +1260,7 @@
{% anchor for labelling the type of dependency
\anchor{label}{\southwest\pgf@x=0.4\pgf@x\pgf@y=2\pgf@y}%
\anchor{midtap}{\northeast\pgf@x=0pt\relax}
+ \pgfcirc@border@extend@full{1}{2}{1}{2}
}
{\ctikzvalof{bipoles/fullgeneric/height}}
{sfullgeneric}
@@ -1665,7 +1699,7 @@
\pgftransformscale{-.015\pgf@circ@res@left*#1}
\def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
\pgftransformrotate{-\pgfcircmathresult}
-
+
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpointorigin}
@@ -1682,16 +1716,16 @@
\pgftransformscale{-.015\pgf@circ@res@left*#1}
\def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
\pgftransformrotate{-\pgfcircmathresult}
-
+
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpointpolar{90}{.5\pgf@circ@res@up}}
\pgfpathlineto{\pgfpointpolar{60}{\pgf@circ@res@up}}
-
+
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpointpolar{210}{.5\pgf@circ@res@up}}
\pgfpathlineto{\pgfpointpolar{0}{\pgf@circ@res@down}}
-
+
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpointpolar{330}{.5\pgf@circ@res@up}}
\pgfpathlineto{\pgfpointpolar{-60}{\pgf@circ@res@up}}
@@ -1707,7 +1741,7 @@
{\ctikzvalof{bipoles/oosourcetrans/height}}
{\ctikzvalof{bipoles/oosourcetrans/width}}
{
-
+
\pgfpointorigin
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@circ@res@left}{0}}
@@ -1719,43 +1753,43 @@
\pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@circ@res@left}{0}}
{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left}
\pgfusepath{draw}
-
-
+
+
% % % % draw inner symbols
-
+
%%primary winding
\ifpgf@circ@prim@delta
\pgfscope
\pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left}
\pgf@circ@delta{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
\endpgfscope
-
+
\else\ifpgf@circ@prim@wye
\pgfscope
\pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left}
\pgf@circ@wye{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
\endpgfscope
-
+
\else\ifpgf@circ@prim@zig
\pgfscope
\pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left}
\pgf@circ@zig{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
\endpgfscope
\fi\fi\fi
-
+
%%secondary winding
\ifpgf@circ@sec@delta
\pgfscope
\pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right}
\pgf@circ@delta{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
\endpgfscope
-
+
\else\ifpgf@circ@sec@wye
\pgfscope
\pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right}
\pgf@circ@wye{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}}
\endpgfscope
-
+
\else\ifpgf@circ@sec@zig
\pgfscope
\pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right}
@@ -1767,7 +1801,7 @@
% % % % ooosource for three phase transformer
\pgfcircdeclarebipolescaled{sources}
-{
+{
\anchor{right}{
\northeast
\pgf@y=0pt
@@ -1814,7 +1848,7 @@
\anchor{centertert}{
\centertert
}
-
+
% add some anchors in case the are needed :)
\anchor{prim1}{
\pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen
@@ -1863,13 +1897,13 @@
{\ctikzvalof{bipoles/ooosource/height}}
{
% \pgf@circ@res@other = \ctikzvalof{bipoles/ooosource/vectorgroup} \pgf@circ@scaled@Rlen
-
+
% % filling
% left
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@left}{0}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left}
- \pgf@circ@maybefill
-
+ \pgf@circ@maybefill
+
% up
\pgfscope
\pgfpointorigin
@@ -1887,14 +1921,14 @@
% left
\pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@left}{0}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left}
\pgfusepath{draw}
-
+
% up
\pgfscope
\pgfpointorigin
\pgfpathcircle{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@right}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}
\pgfusepath{draw}
\endpgfscope
-
+
% % % draw inner symbols
% % primary winding
@@ -1903,20 +1937,20 @@
\pgftransformxshift{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left}
\pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
-
+
\else\ifpgf@circ@prim@wye
\pgfscope
\pgftransformxshift{.6\pgf@circ@res@left}
\pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
-
+
\else\ifpgf@circ@prim@zig
\pgfscope
\pgftransformxshift{.6\pgf@circ@res@left}
\pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\fi\fi\fi
-
+
% % secondary winding
\ifpgf@circ@sec@delta
\pgfscope
@@ -1924,33 +1958,33 @@
\pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
\pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
-
+
\else\ifpgf@circ@sec@wye
\pgfscope
\pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
\pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
-
+
\else\ifpgf@circ@sec@zig
\pgfscope
\pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
\pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\fi\fi\fi
-
+
% % tertiary winding
\ifpgf@circ@tert@delta
\pgfscope
\pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
\pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
-
+
\else\ifpgf@circ@tert@wye
\pgfscope
\pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
\pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
-
+
\else\ifpgf@circ@tert@zig
\pgfscope
\pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
@@ -2437,22 +2471,7 @@
%% Black alternative zigzag Zener diode
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
- \anchorborder{%
- \ifpgf@circuit@bipole@inverted
- \pgf@circ@res@left=-\pgf@x
- \pgf@circ@res@up=-\pgf@y
- \else
- \pgf@circ@res@left=\pgf@x
- \pgf@circ@res@up=\pgf@y
- \fi
- \ifdim\pgf@circ@res@up>0cm
- \northeastborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.3\pgf@y}}
- \else
- \southwestborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-1.3\pgf@y}}
- \fi
- }
+ \pgfcirc@border@extend@updown{1.3}{1.3}
}
{\ctikzvalof{bipoles/diode/height}}
{fullzzdiode}
@@ -2580,22 +2599,7 @@
%% Black light emitting diode
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
- \anchorborder{%
- \ifpgf@circuit@bipole@inverted
- \pgf@circ@res@left=-\pgf@x
- \pgf@circ@res@up=-\pgf@y
- \else
- \pgf@circ@res@left=\pgf@x
- \pgf@circ@res@up=\pgf@y
- \fi
- \ifdim\pgf@circ@res@up>0cm
- \northeastborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}}
- \else
- \southwestborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}}
- \fi
- }
+ \pgfcirc@border@extend@updown{1.8}{1}
}
{\ctikzvalof{bipoles/diode/height}}
{fulllediode}
@@ -2622,22 +2626,7 @@
%% Black photodiode
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
- \anchorborder{%
- \ifpgf@circuit@bipole@inverted
- \pgf@circ@res@left=-\pgf@x
- \pgf@circ@res@up=-\pgf@y
- \else
- \pgf@circ@res@left=\pgf@x
- \pgf@circ@res@up=\pgf@y
- \fi
- \ifdim\pgf@circ@res@up>0cm
- \northeastborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}}
- \else
- \southwestborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}}
- \fi
- }
+ \pgfcirc@border@extend@updown{1.8}{1}
}
{\ctikzvalof{bipoles/diode/height}}
{fullpdiode}
@@ -2745,22 +2734,7 @@
%% Empty alternative zigzag Zener diode
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
- \anchorborder{%
- \ifpgf@circuit@bipole@inverted
- \pgf@circ@res@left=-\pgf@x
- \pgf@circ@res@up=-\pgf@y
- \else
- \pgf@circ@res@left=\pgf@x
- \pgf@circ@res@up=\pgf@y
- \fi
- \ifdim\pgf@circ@res@up>0cm
- \northeastborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.3\pgf@y}}
- \else
- \southwestborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-1.3\pgf@y}}
- \fi
- }
+ \pgfcirc@border@extend@updown{1.3}{1.3}
}
{\ctikzvalof{bipoles/diode/height}}
{emptyzzdiode}
@@ -2826,22 +2800,7 @@
%% Empty light emitting diode
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
- \anchorborder{%
- \ifpgf@circuit@bipole@inverted
- \pgf@circ@res@left=-\pgf@x
- \pgf@circ@res@up=-\pgf@y
- \else
- \pgf@circ@res@left=\pgf@x
- \pgf@circ@res@up=\pgf@y
- \fi
- \ifdim\pgf@circ@res@up>0cm
- \northeastborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}}
- \else
- \southwestborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}}
- \fi
- }
+ \pgfcirc@border@extend@updown{1.8}{1}
}
{\ctikzvalof{bipoles/diode/height}}
{emptylediode}
@@ -2863,22 +2822,7 @@
%% Empty photodiode
\pgfcircdeclarebipolescaled{diodes}
{% fix the anchor border
- \anchorborder{%
- \ifpgf@circuit@bipole@inverted
- \pgf@circ@res@left=-\pgf@x
- \pgf@circ@res@up=-\pgf@y
- \else
- \pgf@circ@res@left=\pgf@x
- \pgf@circ@res@up=\pgf@y
- \fi
- \ifdim\pgf@circ@res@up>0cm
- \northeastborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@x}{1.8\pgf@y}}
- \else
- \southwestborder
- \pgfpointborderrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{-\pgf@x}{-\pgf@y}}
- \fi
- }
+ \pgfcirc@border@extend@updown{1.8}{1}
}
{\ctikzvalof{bipoles/diode/height}}
{emptypdiode}
@@ -3974,7 +3918,9 @@
%% Varistor
\pgfcircdeclarebipolescaled{resistors}
-{}
+{
+ \pgfcirc@border@extend@updown{1}{1.4}
+}
{\ctikzvalof{bipoles/varistor/height}}
{varistor}
{\ctikzvalof{bipoles/varistor/height}}
@@ -5232,7 +5178,7 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
-
+
% draw sin wave
\pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.5\pgf@circ@res@step}}
\pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
@@ -5240,7 +5186,7 @@
\pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
\pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
\pgfusepath{draw}
-
+
% draw equal sign
\pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}}
@@ -5312,7 +5258,7 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
-
+
% draw sin wave
\pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.5\pgf@circ@res@step}}
\pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
@@ -5320,7 +5266,7 @@
\pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
\pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
\pgfusepath{draw}
-
+
% draw equal sign
\pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}}
@@ -5404,7 +5350,7 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
-
+
% draw sin waves
\pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.65\pgf@circ@res@step}}
\pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
@@ -5424,10 +5370,10 @@
\pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
\pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
\pgfusepath{draw}
-
-
-
-
+
+
+
+
% draw equal sign
\pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}}
@@ -5510,7 +5456,7 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
-
+
% draw sin waves
\pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.65\pgf@circ@res@step}}
\pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
@@ -5530,10 +5476,10 @@
\pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}}
\pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}}
\pgfusepath{draw}
-
-
-
-
+
+
+
+
% draw equal sign
\pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
index ed5399d441..ad7b791397 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
@@ -1232,7 +1232,11 @@
\ifpgf@circuit@ieeelogicport
\def\@@notcirc{notcirc}
\else
- \def\@@notcirc{ocirc}
+ \ifpgf@circ@european@port@circle@ieee
+ \def\@@notcirc{notcirc}
+ \else
+ \def\@@notcirc{ocirc}
+ \fi
\fi
\pgfsetlinewidth{\ctikzvalof{multipoles/external pins thickness}\pgflinewidth}
\pgf@circ@count@a=\numpins\relax
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
index 692b6ec40c..d889f4ab0a 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
@@ -369,6 +369,11 @@
\northwest
\pgf@y=0pt
}
+ \anchor{right}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
\anchor{1}{
\northwest
\pgf@y=0pt
@@ -437,6 +442,33 @@
\northwest
\pgf@x=0pt
}
+ \anchor{e}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{w}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{s}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{n}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{down}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{up}{
+ \northwest
+ \pgf@x=0pt
+ }
\anchor{south west}{
\northwest
\pgf@y=-\pgf@y
@@ -453,6 +485,12 @@
\pgf@x=-\pgf@x
\pgf@y=-\pgf@y
}
+ \anchorborder{
+ \pgf@circ@res@left=\pgf@x
+ \pgf@circ@res@up=\pgf@y
+ \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
+ }{\pgfpoint{\ctikzvalof{tripoles/mixer/width}*\scaledRlen/2}{\ctikzvalof{tripoles/mixer/width}*\scaledRlen/2}}
+ }
\backgroundpath{
\pgfsetcolor{\ctikzvalof{color}}
\pgf@circ@scaled@Rlen=\scaledRlen
@@ -517,6 +555,11 @@
\northwest
\pgf@y=0pt
}
+ \anchor{right}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
\anchor{1}{
\northwest
\pgf@y=0pt
@@ -585,6 +628,33 @@
\northwest
\pgf@x=0pt
}
+ \anchor{e}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{w}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{s}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{n}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{down}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{up}{
+ \northwest
+ \pgf@x=0pt
+ }
\anchor{south west}{
\northwest
\pgf@y=-\pgf@y
@@ -601,6 +671,12 @@
\pgf@x=-\pgf@x
\pgf@y=-\pgf@y
}
+ \anchorborder{
+ \pgf@circ@res@left=\pgf@x
+ \pgf@circ@res@up=\pgf@y
+ \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
+ }{\pgfpoint{\ctikzvalof{tripoles/adder/width}*\scaledRlen/2}{\ctikzvalof{tripoles/adder/width}*\scaledRlen/2}}
+ }
\backgroundpath{
\pgfsetcolor{\ctikzvalof{color}}
\pgf@circ@scaled@Rlen=\scaledRlen
@@ -679,6 +755,51 @@
\northwest
\pgf@y=0pt
}
+ \anchor{up}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{down}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchor{n}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{s}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchor{e}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=0pt
+ }
+ \anchor{w}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{up}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{down}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchor{right}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=0pt
+ }
+ \anchor{left}{
+ \northwest
+ \pgf@y=0pt
+ }
\anchor{south west}{ \northwest \pgf@y=-\pgf@y}
\anchor{north east}{ \northwest \pgf@x=0pt\relax}
\anchor{north west}{ \northwest }
@@ -688,6 +809,13 @@
\advance \pgf@x by -.5\wd\pgfnodeparttextbox
\advance \pgf@y by -1.5\ht\pgfnodeparttextbox
}
+ \anchorborder{
+ \pgf@circ@res@left=\pgf@x
+ \pgf@circ@res@up=\pgf@y
+ \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
+ }{\pgfpoint{\ctikzvalof{tripoles/oscillator/width}*\scaledRlen/2}{\ctikzvalof{tripoles/oscillator/width}*\scaledRlen/2}}
+ \pgfmathsetlength{\pgf@x}{\pgf@x-\ctikzvalof{tripoles/oscillator/width}*\scaledRlen/2}
+ }
\backgroundpath{
\pgfsetcolor{\ctikzvalof{color}}
\pgf@circ@scaled@Rlen=\scaledRlen
@@ -755,6 +883,11 @@
\northwest
\pgf@y=0pt
}
+ \anchor{right}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
\anchor{1}{
\northwest
\pgf@y=0pt
@@ -787,6 +920,33 @@
\northwest
\pgf@x=0pt
}
+ \anchor{e}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{w}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{s}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{n}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{down}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{up}{
+ \northwest
+ \pgf@x=0pt
+ }
\anchor{south west}{
\northwest
\pgf@y=-\pgf@y
@@ -803,6 +963,12 @@
\pgf@x=-\pgf@x
\pgf@y=-\pgf@y
}
+ \anchorborder{
+ \pgf@circ@res@left=\pgf@x
+ \pgf@circ@res@up=\pgf@y
+ \pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
+ }{\pgfpoint{\ctikzvalof{tripoles/circulator/width}*\scaledRlen/2}{\ctikzvalof{tripoles/circulator/width}*\scaledRlen/2}}
+ }
\backgroundpath{
\pgfsetcolor{\ctikzvalof{color}}
\pgf@circ@scaled@Rlen=\scaledRlen
@@ -1175,6 +1341,24 @@
\northwest
\pgf@y=0.5\pgf@y
}
+ \anchor{left down}{
+ \northwest
+ \pgf@y=-0.5\pgf@y
+ }
+ \anchor{right down}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=-0.5\pgf@y
+ }
+ \anchor{right up}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=0.5\pgf@y
+ }
+ \anchor{left up}{
+ \northwest
+ \pgf@y=0.5\pgf@y
+ }
\anchor{1}{
\northwest
\pgf@y=-0.5\pgf@y
@@ -1282,3 +1466,143 @@
\endpgfscope
}
+% mach zehnder modulator
+\pgfdeclareshape{mzm}{
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{blocks}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ \savedanchor\northwest{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@y=\ctikzvalof{tripoles/mzm/height}\pgf@circ@scaled@Rlen
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgf@circ@scaled@Rlen
+ \pgf@x=.5\pgf@x
+ \pgf@x=-\ctikzvalof{tripoles/mzm/width}\pgf@x
+ }
+ \anchor{center}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=0pt
+ }
+ \anchor{north}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{south}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{west}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{east}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{south west}{
+ \northwest
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ }
+ \anchor{north west}{
+ \northwest
+ }
+ \anchor{south east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchor{in}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{mod}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{out}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=0pt
+ }
+ \anchor{text}{
+ \northwest
+ \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
+ \pgf@x=-.5\wd\pgfnodeparttextbox
+ }
+ \backgroundpath{
+ \pgfsetcolor{\ctikzvalof{color}}
+ \pgf@circ@scaled@Rlen=\scaledRlen
+
+ \northwest
+ \pgf@circ@res@up = \pgf@y
+ \pgf@circ@res@down = -\pgf@y
+ \pgf@circ@res@right = -\pgf@x
+ \pgf@circ@res@left = \pgf@x
+
+ \pgfstartlinewidth=\pgflinewidth
+
+ % draw outer box
+ \pgf@circ@twoportbox
+
+ % draw inner stuff
+ % rotate inner symbol
+ \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+ \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+ \pgftransformrotate{270}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
+ \pgftransformrotate{180}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+ \pgftransformrotate{90}
+ \fi\fi
+
+ % draw inner symbol
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@down}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.25\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.25\pgf@circ@res@down}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@zero}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@zero}{0.35\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.25\pgf@circ@res@right}{0.1\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ }
+}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex
index 966128140e..45497d7e61 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex
@@ -45,6 +45,12 @@
\ctikzset{poles/full fill opacity=#1}%
}}
+%
+% Provision for changing default background
+%
+
+\ctikzset{open poles fill/.initial={white}}
+
%% Full terminal
\pgfdeclareshape{circ}{
@@ -123,7 +129,7 @@
\pgfsetcolor{\ctikzvalof{color}}
\ifx\tikz@fillcolor\pgfutil@empty
% set the default fill color to white
- \pgfsetfillcolor{white}
+ \pgfsetfillcolor{\ctikzvalof{open poles fill}}
% ...but override it if the class is defined!
% note that this element has no class, but will inherit it when used
% into another component
@@ -240,7 +246,7 @@
\pgfsetcolor{\ctikzvalof{color}}
\ifx\tikz@fillcolor\pgfutil@empty
% set the default fill color to white
- \pgfsetfillcolor{white}
+ \pgfsetfillcolor{\ctikzvalof{open poles fill}}
% ...but override it if the class is defined!
% note that this element has no class, but will inherit it when used
% into another component
@@ -337,7 +343,7 @@
\pgfsetcolor{\ctikzvalof{color}}
\ifx\tikz@fillcolor\pgfutil@empty
% set the default fill color to white
- \pgfsetfillcolor{white}
+ \pgfsetfillcolor{\ctikzvalof{open poles fill}}
% ...but override it if the class is defined!
% note that this element has no class, but will inherit it when used
% into another component
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index 62fdaedb83..473dc34f43 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -10,8 +10,8 @@
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
-\def\pgfcircversion{1.2.2}
-\def\pgfcircversiondate{2020/07/15}
+\def\pgfcircversion{1.2.3}
+\def\pgfcircversiondate{2020/08/07}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]