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.tex63
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdfbin13862 -> 13875 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdfbin2422724 -> 2451275 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex247
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex254
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex229
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex6
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex24
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
10 files changed, 687 insertions, 144 deletions
diff --git a/graphics/pgf/contrib/circuitikz/doc/changelog.tex b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
index d9594dc1fc..19a5cd01f3 100644
--- a/graphics/pgf/contrib/circuitikz/doc/changelog.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
@@ -5,6 +5,67 @@ full list of changes.
\begin{itemize}
\item
+ Version 1.7.0 (2024-08-03)
+
+ There are no big changes here, but the change to the resistor code
+ (maybe one of the most used by the package) well deserves a minor
+ version bump. A couple of new components, and several minor fixes.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ New component: new kind of current tap (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/807}{EEpchi
+ and Dr4UX on GitHub})
+ \item
+ New arrow tip \texttt{Jack\ Tap} to help drawing jack connectors
+ (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/806}{Anisio
+ Rogerio Braga})
+ \item
+ Change the drawing of the thermocouple (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/811}{Dr4UX on
+ GitHub})
+ \item
+ Change and enhancement to the drawing of the American resistors
+ (triggered by
+ \href{https://github.com/circuitikz/circuitikz/issues/814}{Dr4UX on
+ GitHub}), fixing a long-standing small asymmetry that nobody noticed
+ \item
+ Minor adjustment for joins in \texttt{viscoe} component
+ \item
+ Minor additions (\texttt{rectjoinfill}) and fixes in documentation
+ \end{itemize}
+\item
+ Version 1.6.9 (2024-05-25)
+
+ Several new components and a bug fix for a nasty long-standing bug
+ about switching diode types.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Added a Relais-Shape (contributed by
+ \href{https://github.com/circuitikz/circuitikz/pull/795}{Jakob
+ ``DraUX'' on GitHub}
+ \item
+ Added a center tap anchor for tube filament (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/792}{user
+ bogger33 on GitHub})
+ \item
+ Added neon lamps (two versions, suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/793}{user
+ bogger33 on GitHub})
+ \item
+ Added a configurable spark gap (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/800}{user
+ bogger33 on GitHub})
+ \item
+ Fix a long-standing problem when
+ \href{https://github.com/circuitikz/circuitikz/issues/794}{(locally)
+ switching diode type}
+ \end{itemize}
+\item
Version 1.6.8 (2024-05-05)
Several new components, more anchors, a bit of documentation
@@ -466,7 +527,7 @@ full list of changes.
Robustify some shapes: do not let arrows option pass to the inner
drawing (see
\href{https://tex.stackexchange.com/a/632084/38080}{here} and
- \href{https://matrix.to/\#/!NuxCISwYQJuyWwNsEI:matrix.org/$vQO6luq1F66LJ79dERmaqKI46qMBcjStqYCPi725uZE?via=matrix.org&via=2krueger.de&via=im.f3l.de}{here})
+ \href{https://matrix.to/\#/!NuxCISwYQJuyWwNsEI:matrix.org/$vQO6luq1F66LJ79dERmaqKI46qMBcjStqYCPi725uZE?via=matrix.org\&via=2krueger.de\&via=im.f3l.de}{here})
\item
Add warning about global draw options in the manual
\item
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
index d4f9bc36a2..032692e01f 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 9d1e52303d..023c265d6e 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 20a79f3d68..e0fa8032b1 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
@@ -2200,6 +2200,83 @@ For the \texttt{photoresistor} and the two ``flavors'' of the light-dependent re
\end{tikzpicture}
\end{LTXexample}
+\begingroup % protect changes to resistors
+\newcommand\showjoin[1]{%
+\begin{tikzpicture}[scale=4, transform shape]
+ \clip (0.2,-0.05) rectangle (0.6,0.3);
+ \draw[ultra thick] (0,0) to[R, resistors/thickness=#1] ++(2,0);
+\end{tikzpicture}%
+}
+\newcommand{\splat}{\begin{center}\ttfamily\scriptsize\begin{tabular}{cccc}
+ \showjoin{1}&\showjoin{2}&\showjoin{3}&\showjoin{4}\\
+ thickness=1 & thickness=2 & thickness=3 & thickness=4 \\
+ \end{tabular}\end{center}%
+}
+\newcommand{\rdivider}[1]{\begin{tikzpicture}
+ \ctikzset{resistors/thickness=#1}
+ \draw (0,0) node[ground]{} to[V] ++(0,2) to[R] ++(2,0)
+ to[R] ++(0,-2) to[short,-*] (0,0);
+\end{tikzpicture}\qquad}
+\newcommand{\divsplat}[1]{#1\par
+ \begin{center}
+ \rdivider{1}\rdivider{2}\rdivider{3}\rdivider{4}
+\end{center}}
+
+\paragraph{Details of American (``zig-zag'') resistors.\label{sec:zigzag-details}} American (zig-zag) resistors have a little joining problem\footnote{Noticed by \href{https://github.com/circuitikz/circuitikz/issues/811}{user Dr4UX on GitHub} and later \href{https://github.com/circuitikz/circuitikz/discussions/814}{discussed here}.} with the leading wires if the thickness is greater than two. In the following drawing you can see the problem when the thickness grows from 1 to 4.
+
+\splat
+
+Since \texttt{v1.7.0}, one possibility to correct the problem is to change the type of joining of the zig-zag line, using the key \texttt{resistors/zigzag join}, which is a command that by default is void. For example, the following effect is obtained by using
+
+\begin{lstlisting}[numbers=none]
+\ctikzset{resistors/zigzag hook/.code={\pgfsetroundcap}}
+\end{lstlisting}
+{\ctikzset{resistors/zigzag hook/.code={\pgfsetroundcap}}
+\splat}
+
+or you can even go full rounded
+
+\begin{lstlisting}[numbers=none]
+\ctikzset{resistors/zigzag hook/.code={\pgfsetroundcap\pgfsetroundjoin}}
+\end{lstlisting}
+{\ctikzset{resistors/zigzag hook/.code={\pgfsetroundcap\pgfsetroundjoin}}
+\splat}
+
+Another possibility is to add a little horizontal ``stub'' to the shape, with the key \texttt{resistors/zigzag stub} (default \texttt{0}), which will add a first part which is a continuation of the wire:
+\begin{lstlisting}[numbers=none]
+\ctikzset{resistors/zigzag stub=0.05}% this is relative to the resistor's length
+\end{lstlisting}
+{\ctikzset{resistors/zigzag stub=0.05}
+\splat}
+
+\dots or you can just combine all of them as you prefer. With the standard join/cap options, the look of the resistors for thickness from 1 to 4 is shown here:
+
+\ctikzset{american}
+\divsplat{Standard drawing of American resistors}
+\divsplat{With a 5\% stub: \ctikzset{resistors/zigzag stub=0.05}}
+\divsplat{With a 20\% stub: \ctikzset{resistors/zigzag stub=0.2}}
+
+
+\bigskip
+Finally, here is the detailed shape with thickness 2 (red=0, blue=0.05, green=0.2), magnified six times:
+
+\vspace*{2cm}% this vspace fences are needed because the transform canvas wreak havoc with the bbox
+\begin{tikzpicture}[transform canvas={scale=6}]
+ \ctikzset{resistors/zigzag stub=0}
+ \draw[red] (0,0.2) to [resistor, resistors/thickness=4] ++(2,0);
+ \ctikzset{resistors/zigzag stub=0.05}
+ \draw[blue] (0,0.1) to [resistor, resistors/thickness=4] ++(2,0);
+ \ctikzset{resistors/zigzag stub=0.2}
+ \draw[green] (0,0) to [resistor, resistors/thickness=4] ++(2,0);
+ % \draw [very thin](1,0.5) -- (1,-0.5);
+ % \draw [very thin](0,0) -- ++(2,0);
+ % \draw [very thin](0,0.1) -- ++(2,0);
+ % \draw [very thin](0,0.2) -- ++(2,0);
+\end{tikzpicture}
+\vspace*{2cm}
+
+\endgroup % changes to resistors stops here
+
\subsection{Capacitors and inductors: dynamical bipoles}
@@ -2852,9 +2929,9 @@ Notice that the size of the double-circle sources (and of the triple-circle one)
\end{LTXexample}
\paragraph{Waveform symbols.}
-Internal symbols of sinusoidal, triangular and square sources are drawn with the same line thickness as the component by default. You can modify this by setting the key \texttt{sources/symbols/thickness} for independent sources and the corresponding \texttt{csource/...} for dependent ones. The value used here is relative to the component (i.e. the circle) value.
+Internal symbols of sinusoidal, triangular and square sources are drawn with the same line thickness as the component by default. You can modify this by setting the key \texttt{sources/symbol/thickness} for independent sources and the corresponding \texttt{csource/...} for dependent ones. The value used here is relative to the component (i.e. the circle) value.
-Normally the symbol is oriented in the same direction as the line, and rotate rigidly with the component; you can change this orientation using the key \texttt{sources/symbols/rotate} or \texttt{csource/...}. The default value is \texttt{90} which correspond to the ``line'' direction (remember, path components are defined as horizontal ones).
+Normally the symbol is oriented in the same direction as the line, and rotate rigidly with the component; you can change this orientation using the key \texttt{sources/symbol/rotate} or \texttt{csource/...}. The default value is \texttt{90} which correspond to the ``line'' direction (remember, path components are defined as horizontal ones).
If instead of an angle value you use \texttt{auto}, the symbol will be rotated so that the waveform is always vertical, similar to what happens in instruments:
\begin{LTXexample}[varwidth=true]
@@ -3019,12 +3096,44 @@ Sometimes it is better to use a shape for instruments which is very different fr
\footnotetext{Suggested by \texttt{@nobrl} on GitHub}
\circuitdescbip{iloop}{Current loop (symbolic)}{}(left/135/0.2, right/45/0.2, center/-90/0.3, i/30/0.4)
\circuitdescbip{iloop2}{Current loop (real)}{}(left/135/0.2, right/-45/0.2, center/-90/0.3, i+/135/0.4, i-/45/0.4)
+ \circuitdescbip{currtap}{Current tap (probe)\footnotemark}{}(tap/-90/0.2)
+ \footnotetext{Suggested by \href{https://github.com/circuitikz/circuitikz/issues/807}{user EEpchi on GitHub}.}
\end{groupdesc}
\subsubsection{Instruments customizations}\label{sec:tweak-instruments}
You can change the scale of all the instruments (including the current loops) by setting the key \texttt{instruments/scale} to something different from the default \texttt{1.0}.
+\paragraph{Current probes.}
+You can change the inner dot in several way, by changing the following keys under the \verb!\ctikzset! key \texttt{bipoles/currtap}:
+\begin{center}
+ \begin{tabular}{>{\ttfamily}l>{\ttfamily}lp{0.7\linewidth}}
+ \toprule
+ parameter & default & description \\
+ \midrule
+ thickness & default & Set the thickness of the line (\texttt{default}: do not change the class thickness) \\
+ color & default & stroke color: \texttt{default} is the same as the component \\
+ dash & default & dash pattern: none means solid line, default means keep the global pattern\footnotemark \\
+ fill & default & fill the inner dot; \texttt{default} means use the wire color, \texttt{none} do not fill, other keys must be a valid color \\
+ dot size& 0.5 & relative size of the inner dot \\
+ \bottomrule
+ \end{tabular}
+ \footnotetext{Follows the syntax of the pattern sequence \texttt{\textbackslash pgfsetdash} --- see \TikZ{} manual for details; phase is always zero. Basically you pass pairs of dash-length -- blank-length dimensions, see the examples.}
+\end{center}
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+ \draw (0,2) to[currtap, bipoles/currtap/fill=none, *-]
+ ++(2,0) to[currtap, bipoles/currtap/.cd,
+ fill=yellow, color=red, thickness=3,
+ dash={{1.14pt}{2pt}}] ++(2,0);
+ \draw (0,0) to[currtap=I, *-, name=ct] ++(2,0)
+ to[currtap, -*, name=ct2,
+ bipoles/currtap/dot size=0.3] ++(2,0);
+ \draw (ct.tap) -- ++(0,-1) (ct2.tap) -- ++(0,-1);
+\end{circuitikz}
+\end{LTXexample}
+
\paragraph{Oscilloscope waveform.} You can change the waveform shown in the oscilloscope ``screen''\footnote{Suggested by \href{https://tex.stackexchange.com/q/595062/38080}{Mario Tafur on TeX.SX}}. To change it, you just set the key \texttt{bipoles/oscope/waveform} to one of the available shape. You have available the shapes in the following list (the default is \texttt{ramps}):
\begin{LTXexample}[pos=t, basicstyle=\small\ttfamily]
@@ -3266,6 +3375,8 @@ Here you'll find bipoles that are not easily grouped in the categories above.
\circuitdescbip*{fuse}{Fuse}{}
\circuitdescbip*{afuse}{Asymmetric fuse}{asymmetric fuse}
\circuitdescbip{wfuse}{``wiggly'' fuse}{wiggly fuse}()[left/110/0.2, right/70/0.2]
+ \circuitdescbip*{relais}{Relais\footnotemark}{}
+ \footnotetext{Contributed by \href{https://github.com/circuitikz/circuitikz/pull/795}{Jakob «DraUX»}}
\circuitdescbip{squid}{Squid}{}
\circuitdescbip{barrier}{Barrier}{}
\circuitdescbip{openbarrier}{Open barrier}{}
@@ -3287,6 +3398,13 @@ If otherwise \texttt{americangfsurgearrester} option is active (or the style \te
\begin{groupdesc}
\circuitdescbip*{lamp}{Lamp}{}
\circuitdescbip*{bulb}{Bulb}{}
+ \circuitdescbip*{neonlampcc}{Neon lamp\footnotemark\ (double cathode style)}{}
+ \footnotetext{The neon lamps have been added in \texttt{v1.6.9} thanks to a suggestion by \href{https://github.com/circuitikz/circuitikz/issues/793}{user bogger33 on GitHub}.}
+ \circuitdescbip*{neonlampac}{Neon lamp (anode and cathode style)}{}
+ \circuitdescbip*{sparkgap}{Spark gap\footnotemark (unenclosed)}{}
+ \footnotetext{The spark gap has been added in \texttt{v1.6.9} thanks to a suggestion by \href{https://github.com/circuitikz/circuitikz/issues/800}{user bogger33 on GitHub}.}
+ \circuitdescbip*[sparkgap]{sparkgap, sparkgap/circle}{Spark gap}{}
+ \circuitdescbip*[sparkgap]{sparkgap, sparkgap/dot, sparkgap/circle}{Spark gap (gas filled)}{}
\circuitdescbip*{loudspeaker}{loudspeaker}{}( north/90/0.4, ne/45/0.4, east/0/0.4, se/-45/0.4, south/-90/0.4, sw/-135/0.4, west/180/0.4, nw/135/0.4, left/135/0.2, right/45/0.2, center/-135/0.2)
\circuitdescbip*{mic}{mic}{}( north/90/0.4, east/0/0.4, south/-90/0.4, west/180/0.4, left/135/0.2, right/45/0.2, center/-135/0.2)
\circuitdescbip*{tlmic}{tail-less mic\footnotemark}{}( north/90/0.4, east/0/0.4, south/-90/0.4, west/180/0.4, left/135/0.2, right/45/0.2, center/-135/0.2)
@@ -3324,9 +3442,9 @@ You have two types of microphones; \texttt{mic} has protruding connection and \t
\subsubsection{Miscellaneous element customization}\label{sec:tweak-misc}
-You can change the scale of all the miscellaneous elements by setting the key \texttt{misc/scale} to something different from the default \texttt{1.0}.
+You can change the scale of all the miscellaneous elements by setting the key \texttt{misc/scale} to something different from the default \texttt{1.0}; relative thickness can be controlled with \texttt{misc/thickness}.
-\paragraph{Wiggly fuses} can have (or not have) poles; you can switch between the two forms by setting to \texttt{true} or \texttt{false} (default \texttt{true}) the key \texttt{bipoles/wfuse/dots}; if they have poles, you can choose any of the pole shapes with the key \texttt{bipoles/wfuse/shape}.
+\paragraph{Wiggly fuses.} Wiggly fuses can have (or not have) poles; you can switch between the two forms by setting to \texttt{true} or \texttt{false} (default \texttt{true}) the key \texttt{bipoles/wfuse/dots}; if they have poles, you can choose any of the pole shapes with the key \texttt{bipoles/wfuse/shape}.
The pole nodes are named \texttt{-left} and \texttt{-right} so that you can access their borders.
\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
@@ -3342,6 +3460,30 @@ The pole nodes are named \texttt{-left} and \texttt{-right} so that you can acce
\end{circuitikz}
\end{LTXexample}
+\paragraph{Neon lamps.} Neon lamp ``dot'' size is the same as the size of poles (\texttt{circ} and \texttt{ocirc}), and they can be changed locally:
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \draw (0,0) to[neonlampcc, nodes width=0.03] ++(2,0)
+ to[neonlampac, misc/thickness=3] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+
+\paragraph{Spark gap.} The \texttt{sparkgap} component is similar to the (American) surge arrester, but it's more configurable; it will render bare (unenclosed) by default, but you can add a (fillable) enclosure with the key \texttt{sparkgap/circle} and a dot with \texttt{sparkgap/dot} (they are boolean keys, false by default).
+Moreover, the arrows are configurable like other arrows in the package (see~\ref{sec:tunablearrows}) using the \texttt{sparkgap end arrow} key (default \texttt{Triangle[scale=2]}). The gap is tunable with \texttt{sparkgap/gap} (default \texttt{0.05}).
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \draw (0,2) to[sparkgap, l=gap\textsubscript{1}] ++(2,0)
+ to[sparkgap, sparkgap/circle,
+ sparkgap/dot, l=S2] ++(2,0);
+ \ctikzset{sparkgap end arrow={Kite[scale=1.5]}}
+ \draw (0,0) to[sparkgap, l=S3] ++(2,0)
+ to[sparkgap, l=S4, sparkgap/circle,
+ sparkgap/gap=0.15] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+As in neon lamps, the dot (if activated by the key \texttt{sparkgap/dot}) follows the size of poles and can be changed locally.
+
+
\subsection{Multiple wires (buses)}
These are simple drawings to indicate multiple wires.
@@ -3445,9 +3587,9 @@ While the horizontal line will be drawn with the current path values, you can ch
\end{circuitikz}
\end{LTXexample}
-\subsection{Arrows}\label{sec:arrows}
+\subsection{Arrows (fake and real)}\label{sec:arrows}
-These are pseudo-arrows used in lot of places in the packages (for transistors, flows, currents, and so on). The first three arrows are magnified by a factor~3 in the boxes below; for the \texttt{trarrow}, the anchor \texttt{tip} is exactly on the tip and \texttt{btip} is slightly receded.
+The main arrow shapes in \Circuitikz{} are really shapes, used as pseudo-arrows in lot of places in the packages (for transistors, flows, currents, and so on). The first three arrows are magnified by a factor~3 in the boxes below; for the \texttt{trarrow}, the anchor \texttt{tip} is exactly on the tip and \texttt{btip} is slightly receded.
\begin{groupdesc}
\circuitdesc[3]{currarrow}{Arrow for current and voltage}{}(center/0/0.2)
@@ -3507,6 +3649,30 @@ The arrows are the ones set with the keys \texttt{tunable start arrow} and \text
Notice also the need to force a transparency group if you want a semitransparent arrow.
+\subsubsection{Arrow tips}\label{sec:arrow-tips}
+
+In addition to the pseudo-arrows, \Circuitikz{} also adds a couple of ``real'' arrow tips.
+The package automatically loads the \texttt{arrows.meta} \TikZ{} library but \emph{not} the deprecated \texttt{arrows} library; in the first versions of the package it used quite a lot the \texttt{latex'} tip, which is not available anymore. To maintain the backward compatibility, the `latexslim` tip has been added, and used by default in several components. This is an old-style arrow tip, with no customization possible.
+
+The other tip is \texttt{Jack Tap}\footnote{Added after a suggestion from \href{https://github.com/circuitikz/circuitikz/issues/806}{Anisio Rogerio Braga} on GitHub}, which is mainly used to build jack connectors (see section~\ref{sec:jacks}). This is a new-style arrow tip, and accepts the parameter \texttt{length} (default \texttt{0.3 cm}), \texttt{width} (default \texttt{0.15 cm}), and the boolean \texttt{swap}.
+
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,.25) (0,0) edge[-latexslim] ++(1,0)
+ ++(0, -0.5) edge[-{Jack Tap[swap]}] ++(1,0)
+ ++(0, -0.5) edge[-Jack Tap] ++(1,0)
+ ++(0, -0.5) edge[-{Jack Tap[fill=cyan]}] ++(1,0)
+ ++(0, -0.5) edge[-{Jack Tap[width=.3cm,fill]}]++(1,0)
+ ++(0, -0.5) edge[-{Jack Tap[width=.3cm,line join=round,
+ line cap=round]}, thick] ++(1,0)
+ ++(0, -0.5) edge[^-^f] ++(1,0)
+ ++(0, -0.5) edge[vf-v] ++(1,0);
+\end{circuitikz}
+\end{LTXexample}
+You can also have a filled version, by adding the key \texttt{fill} (without arguments\footnote{This usage of the \texttt{fill} key in arrow tips will be added to \TikZ{} in version \texttt{3.1.11}, see \href{https://github.com/pgf-tikz/pgf/pull/1352}{this PR by Henri Menke}; \Circuitikz{} will add it to older versions.}) or \texttt{fill=color} if you want a color different from the stroke ones, and they accept the \texttt{line join} and \texttt{line cap} as most of the standard \TikZ{} arrows.
+As you can see, the normal and swapped \texttt{Jack Tap} tips have the shorthands \texttt{v} and \verb|^| (and \texttt{vf} and \verb|^f| for their filled counterparts). Notice that the tips are automatically reversed when they are at the \emph{start} of the path.
+
\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 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.
@@ -3520,6 +3686,12 @@ These are the so-called ``bipole nodes'' shapes, or poles (see section~\ref{sec:
\circuitdesc{osquarepole}{Open square-shape terminal}{}
\end{groupdesc}
+This is not a pole, but it's used to "fill" nasty corners (look closer, and see ~\ref{sec:line-joins}).
+
+\begin{groupdesc}
+ \circuitdesc{rectjoinfill}{Filling square with line width size}{}
+\end{groupdesc}
+
Since version 0.9.0, ``bipole nodes'' shapes have all the standard geographical anchors, so you can do things like these:
\begin{LTXexample}[varwidth=true]
@@ -3639,6 +3811,33 @@ You can use the \texttt{plug center} anchor to add the IEC ``multiplier'':
\end{circuitikz}
\end{LTXexample}
+\subsubsection{Jack connectors}\label{sec:jacks}
+
+There are \emph{lots} of different jack connectors symbols --- see the \href{https://github.com/circuitikz/circuitikz/issues/806}{discussion here} for examples. So instead of creating a monster component, it has been decided to add elements to simplify the drawing of such connectors. The first (and for now only) such element is the \texttt{Jack Tap} arrow tip (see section~\ref{sec:arrow-tips}) with its shorthands \texttt{v} and \verb|^|.
+
+For example, and audio jack can be drawn like this:
+
+\begin{LTXexample}[pos=t, varwidth=true]
+% drawing based on one by Anisio Rogerio Braga
+% https://github.com/circuitikz/circuitikz/issues/806
+\newcommand\dx{1.5}\newcommand\dy{1}
+\begin{circuitikz}
+ \draw[-v] (0,\dy/3*4) to[short, o-] ++(\dx,0);
+ \draw[-Triangle] (0,\dy) node[ocirc]{} -| ++(\dx/3,\dy/3);
+ \draw[-Triangle] (0,\dy/3*2) node[ocirc]{} -| ++(\dx/3,-\dy/3);
+ \draw[-^] (0,\dy/3) to[short, o-] ++(2*\dx/3,0);
+ \draw (0,0.0) to[short, o-] ++(1.75*\dx,0) rectangle ++(0.2,4*\dy/3);
+\end{circuitikz}\qquad\qquad
+%---% audio jack with an inserted plug
+\begin{circuitikz}
+ \draw[-v] (0,\dy/3*4) to[short, o-] ++(\dx,0.2);
+ \draw[-Triangle] (0,\dy) node[ocirc]{} -| ++(\dx/3,\dy/3);
+ \draw[-Triangle] (0,\dy/3*2) node[ocirc]{} -| ++(\dx/3,-\dy/3);
+ \draw[-^] (0,\dy/3) to[short, o-] ++(2*\dx/3,-0.2);
+ \draw (0,0.0) to[short, o-] ++(1.75*\dx,0) rectangle ++(0.2,4*\dy/3);
+\end{circuitikz}
+\end{LTXexample}
+
\subsection{Block diagram components}
\noindent Contributed by Stefan Erhardt.
@@ -4827,7 +5026,8 @@ Note that the \verb|diodetube| is used as component name to avoid clashes with t
Normally, the filament is not drawn. If you want a filament, put the \verb|filament| option in the node description:
\begin{groupdesc}
- \circuitdesc*{diodetube,filament}{Tube Diode}{}(anode/90/0.2, filament 1/-135/0.2, filament 2/-45/0.2 )
+ \circuitdesc*{diodetube,filament}{Tube Diode\footnotemark}{}(anode/90/0.2, filament 1/-90/0.4, filament 2/-45/0.2, filament center/0/0.5 )
+ \footnotetext{The \texttt{filament center} anchor has been added in \texttt{v1.6.9} thanks to a suggestion by \href{https://github.com/circuitikz/circuitikz/issues/792}{user bogger33 on GitHub}.}
\end{groupdesc}
Sometimes, you don't want the cathode to be drawn (but you do want the filament). Use the \verb|nocathode| option in the node description:
@@ -4869,18 +5069,27 @@ fully configurable, and the attributes are described below:
\verb|tubes/filament angle| & \verb|15| & angle from the centerpoint \\
\end{tabular}
-Conventionally, the model of the tube is indicated at the \verb|east| anchor:
+Conventionally, the model of the tube is indicated at the \verb|east| anchor, and you can access filament anchors if you need them:
-\begin{LTXexample}[varwidth]
-\ctikzset{tubes/width=1.4}
-\ctikzset{tubes/height=1}
-\begin{circuitikz}
-\draw (0,0) node[triode] (Tri) {};
-\draw (Tri.east) node[right] {12AX7};
-\end{circuitikz}
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\ctikzset{tubes/width=1.4, tubes/height=1}
+\begin{circuitikz}
+ \draw (0,2) node[triode, filament] (Tri) {};
+ \draw (Tri.east) node[right] {12AX7};
+ \ctikzset{tubes/filament angle=40,
+ tubes/filament distance=0.2}
+ \draw (0,0) node[triode, filament] (Pent) {};
+ \draw (Pent.east) node[right] {BOH};
+ \path (Tri.filament 1) node[red,ocirc]{};
+ \path (Pent.filament 1) node[red,ocirc]{};
+ \path (Tri.filament center) node[blue,ocirc]{};
+ \draw (Pent.filament center) -- ++(0,-1) node[tlground]{};
+ \end{circuitikz}
\end{LTXexample}
+
+
Example triode amplifier:
\begin{lstlisting}
@@ -6553,7 +6762,7 @@ with the parameter \texttt{number inputs} :
\end{circuitikz}
\end{LTXexample}
-You can suppress the drawing of the logic ports input leads by using the boolean key \texttt{logic ports draw input leads} (default \texttt{true}) or, locally, with the style \texttt{no inputs leads} (that can be reverted with \texttt{input leads}), like in the following example. The anchors do not change and you have to take responsibility to make the connection to the ``border''-anchors.
+You can suppress the drawing of the logic ports input leads by using the boolean key \texttt{logic ports draw input leads} (default \texttt{true}) or, locally, with the style \texttt{no input leads} (that can be reverted with \texttt{input leads}), like in the following example. The anchors do not change and you have to take responsibility to make the connection to the ``border''-anchors.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -7393,9 +7602,9 @@ External pins' length is controlled by the key \texttt{multipoles/external pins
like in chips. In addition, like in logic ports, you can suppress the
drawing of the leads by using the boolean key
\texttt{logic ports draw input leads} (default \texttt{true}) or, locally,
-with the style \texttt{no inputs leads} (that can be reverted with
+with the style \texttt{no input leads} (that can be reverted with
\texttt{input leads}).
-The main difference between setting \texttt{external pins width} to \texttt{0} or using \texttt{no inputs lead} is that in the first case the normal pin anchors and the border anchors will coincide, and in the second case they will not move and stay where they should have been if the leads were drawn.
+The main difference between setting \texttt{external pins width} to \texttt{0} or using \texttt{no input lead} is that in the first case the normal pin anchors and the border anchors will coincide, and in the second case they will not move and stay where they should have been if the leads were drawn.
You can draw only selected pins and leave out the rest by setting the keys
\texttt{multipoles/draw only \emph{side} pins} and the corresponding style
@@ -7797,7 +8006,7 @@ You can, if you want, avoid printing the numbers of the pin with \texttt{hide nu
\end{LTXexample}
-Also, you can suppress the drawing of the pins, by using the style \texttt{no inputs leads} (that can be reverted with \texttt{input leads}). The main difference between setting \texttt{external pins width} to \texttt{0} or using \texttt{no inputs lead} is that in the first case the normal pin anchors and the border anchors will coincide, and in the second case they will not move and stay where they should have been if the leads were drawn.
+Also, you can suppress the drawing of the pins, by using the style \texttt{no input leads} (that can be reverted with \texttt{input leads}). The main difference between setting \texttt{external pins width} to \texttt{0} or using \texttt{no input lead} is that in the first case the normal pin anchors and the border anchors will coincide, and in the second case they will not move and stay where they should have been if the leads were drawn.
For special use you can suppress the orientation mark with the key \texttt{no topmark} (default \texttt{topmark}).
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index 69ce1bbddd..4f5ce00a0f 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -16,8 +16,8 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
-\def\pgfcircversion{1.6.8}
-\def\pgfcircversiondate{2024/05/05}
+\def\pgfcircversion{1.7.0}
+\def\pgfcircversiondate{2024/08/03}
\DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
\DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
index 943745bf7a..cca735bf1e 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
@@ -266,6 +266,58 @@
%
%>>>
+%% check loaded TikZ/pgf version %<<<`
+%
+% parse the release date, thanks to Skillmon
+% https://github.com/pgf-tikz/pgf/issues/1348#issuecomment-2231681032
+% date can be yyyy-mm-dd or (older TikZ) yyyy/mm/dd
+\begingroup
+ \pgfutil@protected\def\parsedate#1%
+ {%
+ \afterassignment\parsedate@month
+ \pgf@circ@count@a=#1\relax
+ }
+ \pgfutil@protected\def\parsedate@month#1%
+ {%
+ \afterassignment\parsedate@day
+ \pgf@circ@count@b=%
+ }
+ \pgfutil@protected\def\parsedate@day#1%
+ {%
+ \afterassignment\parsedate@cleanup
+ \pgf@circ@count@c=%
+ }
+ \def\parsedate@cleanup#1\relax{}%
+ \parsedate{\pgfrevisiondate}%
+ \xdef\ctikz@@pgfyear{\the\pgf@circ@count@a}%
+ \xdef\ctikz@@pgfmonth{\the\pgf@circ@count@b}%
+ \xdef\ctikz@@pgfday{\the\pgf@circ@count@c}%
+\endgroup
+% The following code thanks to Skillmon:
+% https://tex.stackexchange.com/a/722570/38080
+% modified by romano to check the date
+\def\ctikz@@ifpgfafter@auxi#1#2%
+ {%
+ \ifnum#1
+ \ctikz@@ifpgfafter@auxii{#2}%
+ \fi
+ }
+\def\ctikz@@ifpgfafter@auxii#1\fi#2\ctikz@@ifpgfafter#3{\fi#1}
+\def\ctikz@@ifpgfafter#1-#2-#3#%
+ {%
+ \ctikz@@ifpgfafter@auxi{\ctikz@@pgfyear>#1}\pgfutil@firstoftwo
+ \ctikz@@ifpgfafter@auxi{\ctikz@@pgfyear<#1}\pgfutil@secondoftwo
+ \ctikz@@ifpgfafter@auxi{\ctikz@@pgfmonth>#2}\pgfutil@firstoftwo
+ \ctikz@@ifpgfafter@auxi{\ctikz@@pgfmonth<#2}\pgfutil@secondoftwo
+ \ctikz@@ifpgfafter@auxi{\ctikz@@pgfday<#3}\pgfutil@secondoftwo
+ \pgfutil@gobble\ctikz@@ifpgfafter\pgfutil@firstoftwo
+ }
+%
+% usage \ctikz@@ifpgfafter 2023-01-16{true}{false}
+% ^^^ no spaces here, braces needed.
+%
+%>>>
+
%% arrow tips macros and utilities %<<<1
% the default arrow is latexslim, which has been ported over old arrows library (deprecated)
@@ -298,9 +350,70 @@
\pgfpathclose
\pgfusepathqfill
}
-
\pgfarrowsdeclarereversed{latexslim reversed}{latexslim reversed}{latexslim}{latexslim}
-
+%% Jack Tap, see
+%% https://github.com/circuitikz/circuitikz/issues/806
+\pgfdeclarearrow{name=Jack Tap,
+ parameters = {%
+ \the\pgfarrowlength,%
+ \the\pgfarrowwidth,%
+ \ifpgfarrowswap s\fi%
+ \ifpgfarrowopen o\fi%
+ \ifpgfarrowroundjoin j\fi
+ \ifpgfarrowroundcap c\fi%
+ },
+ setup code = {
+ \pgfarrowssettipend{.5\pgfarrowlength}
+ \pgfarrowssetlineend{-.6\pgfarrowlength}
+ \pgfarrowssetvisualbackend{-.6\pgfarrowlength}
+ \pgfarrowssetbackend{-.6\pgfarrowlength}
+ % hull
+ \pgfarrowshullpoint{.5\pgfarrowlength}{0pt}
+ \pgfarrowshullpoint{0pt}{\pgfarrowwidth}
+ \pgfarrowshullpoint{-.6\pgfarrowlength}{0pt}
+ % Saves: Only the length:
+ \pgfarrowssavethe\pgfarrowlength
+ \pgfarrowssavethe\pgfarrowwidth
+ },
+ drawing code = {
+ \pgfsetdash{}{+0pt}
+ \pgfarrowlinewidth=\pgflinewidth
+ \ifpgfarrowroundjoin\pgfsetroundjoin\else\pgfsetmiterjoin\fi
+ \ifpgfarrowroundcap\pgfsetroundcap\else\pgfsetbuttcap\fi
+ \pgfpathmoveto{\pgfqpoint{-.6\pgfarrowlength}{0pt}}
+ \pgfpathlineto{\pgfqpoint{-.5\pgfarrowlength}{0pt}}
+ \pgfpathlineto{\pgfqpoint{0pt}{\pgfarrowwidth}}
+ \pgfpathlineto{\pgfqpoint{.5\pgfarrowlength}{0pt}}
+ \ifpgfarrowopen
+ \pgfusepathqstroke
+ \else
+ \pgfpathclose
+ \ifdim\pgfarrowlinewidth>0pt\pgfusepathqfillstroke\else\pgfusepathqfill\fi
+ \fi
+ },
+ defaults = {length = 0.3cm, width=0.15cm, open},
+ % cache=false, % breaks everything
+}
+% the new "fill without arg" will be in TikZ 3.1.11. Apply it here if we have an
+% older version
+\ctikz@@ifpgfafter 2023-01-16{\relax}{%
+ % thanks @muzimuzhi https://github.com/pgf-tikz/pgf/issues/1348#issuecomment-2229075269
+ % undo the fill/.value required key
+ \expandafter\let\csname pgfk@/pgf/arrow keys/fill/.@def\endcsname\@undefined
+ \pgfkeys{/pgf/arrow keys/fill/.code={%
+ \def\pgf@temp{#1}%
+ \ifx\pgf@temp\pgf@nonetext%
+ \pgfarrowsaddtooptions{\pgfarrowopentrue}%
+ \else\ifx\pgf@temp\pgfkeysnovalue@text%
+ \pgfarrowsaddtooptions{\pgfarrowopenfalse}%
+ \else
+ \pgfarrowsaddtooptions{\pgfarrowopenfalse\def\pgf@arrows@fill@color{#1}}%
+ \fi\fi
+ }}%
+}
+\tikzset{v/.tip={Jack Tap[swap]}, ^/.tip={Jack Tap},
+ vf/.tip={Jack Tap[swap,fill]}, ^f/.tip={Jack Tap[fill]}}
+%
% select the arrows using available defaults.
\def\pgfcirc@arrow@default{default}
% choose the arrows to use. Use #2 and #3 if the key is equal to "default"
@@ -466,7 +579,30 @@
\fi
\fi
}
-
+% similar o the above, use the fill parameter to set fill or draw
+% for a subset of the shape
+\def\pgf@circ@subset@fill@or@draw#1{%
+ % You *must* be sure that this is called inside a \pgfscope!
+ \edef\@@none{none}\edef\@@default{default}
+ \edef\@@tmp{\ctikzvalof{#1/fill}}
+ \ifx\@@tmp\@@none
+ \pgfusepath{draw}
+ \else
+ \ifx\@@tmp\@@default\else
+ \pgfsetfillcolor{\@@tmp}
+ \fi
+ \pgfusepath{draw, fill}
+ \fi
+}
+% ...and for the thickness
+\def\pgf@circ@subset@thickness#1{%
+ % You *must* be sure that this is called inside a \pgfscope!
+ \edef\@@default{default}
+ \edef\@@tmp{\ctikzvalof{#1/thickness}}
+ \ifx\@@tmp\@@default\else
+ \pgfsetlinewidth{\@@tmp\pgflinewidth}%
+ \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{%
@@ -557,6 +693,7 @@
% #7 - macros drawing the bipole
%
\long\def\pgfcircdeclarebipolescaled#1#2#3#4#5#6#7{
+ % \typeout{Declaring bipole:\space #4,}
\pgfdeclareshape{#4shape}{
\savedmacro{\ctikzclass}{\edef\ctikzclass{#1}}
\saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
@@ -602,97 +739,33 @@
\pgf@y=.5\pgf@y
}
\anchor{center}{\pgfpointorigin}
- \anchor{n}{
- \northeast
- \pgf@x=0cm
- }
- \anchor{north east}{
- \northeast
- }
- \anchor{north west}{
- \northeast
- \pgf@x=-\pgf@x
- }
- \anchor{ne}{
- \northeast
- }
- \anchor{nw}{
- \northeast
- \pgf@x=-\pgf@x
- }
- \anchor{e}{
- \northeast
- \pgf@y=0cm
- }
- \anchor{s}{
- \southwest
- \pgf@x=0cm
- }
- \anchor{south east}{
- \southwest
- \pgf@x=-\pgf@x
- }
- \anchor{south west}{
- \southwest
- }
- \anchor{se}{
- \southwest
- \pgf@x=-\pgf@x
- }
- \anchor{sw}{
- \southwest
- }
- \anchor{w}{
- \southwest
- \pgf@y=0cm
- }
- \anchor{north}{
- \northeast
- \pgf@x=0cm
- }
- \anchor{east}{
- \northeast
- \pgf@y=0cm
- }
- \anchor{south}{
- \southwest
- \pgf@x=0cm
- }
- \anchor{west}{
- \southwest
- \pgf@y=0cm
- }
- \anchor{right}{
- \northeast
- \pgf@y=0cm
- }
- \anchor{above}{
- \northeast
- \pgf@x=0cm
- }
- \anchor{left}{
- \southwest
- \pgf@y=0cm
- }
- \anchor{below}{
- \southwest
- \pgf@x=0cm
- }
- \anchor{a}{
- \northeast
- \pgf@y=0cm
- }
- \anchor{b}{
- \southwest
- \pgf@y=0cm
- }
+ \anchor{n}{\northeast\pgf@x=0cm }
+ \anchor{north east}{\northeast}
+ \anchor{north west}{\northeast\pgf@x=-\pgf@x}
+ \anchor{ne}{\northeast}
+ \anchor{nw}{\northeast\pgf@x=-\pgf@x}
+ \anchor{e}{\northeast\pgf@y=0cm }
+ \anchor{s}{\southwest\pgf@x=0cm }
+ \anchor{south east}{\southwest\pgf@x=-\pgf@x}
+ \anchor{south west}{\southwest}
+ \anchor{se}{\southwest\pgf@x=-\pgf@x}
+ \anchor{sw}{\southwest}
+ \anchor{w}{\southwest\pgf@y=0cm }
+ \anchor{north}{\northeast\pgf@x=0cm }
+ \anchor{east}{\northeast\pgf@y=0cm }
+ \anchor{south}{\southwest\pgf@x=0cm }
+ \anchor{west}{\southwest\pgf@y=0cm }
+ \anchor{right}{\northeast\pgf@y=0cm }
+ \anchor{above}{\northeast\pgf@x=0cm }
+ \anchor{left}{\southwest\pgf@y=0cm }
+ \anchor{below}{\southwest\pgf@x=0cm }
+ \anchor{a}{\northeast\pgf@y=0cm }
+ \anchor{b}{\southwest\pgf@y=0cm }
\savedanchor{\textanchor}{%
\pgf@y=\ht\pgfnodeparttextbox
\pgf@x=-.5\wd\pgfnodeparttextbox
}
- \anchor{text}{
- \textanchor
- }
+ \anchor{text}{ \textanchor }
\anchorborder{%
\ifpgf@circuit@bipole@inverted
\pgf@circ@res@left=-\pgf@x
@@ -711,7 +784,6 @@
#2%
\pgf@circ@draw@component{
\pgf@circ@setcolor
-
\northeast
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@zero = 0cm
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index 4978311dca..b30e741458 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -632,13 +632,21 @@
\pgfusepath{draw}
\endpgfscope
}%
-
%% Zig-zag resistors
+% see https://github.com/circuitikz/circuitikz/discussions/814
+\ctikzset{resistors/zigzag stub/.initial=0}
+\ctikzset{resistors/zigzag hook/.code={}}
\def\pgf@circ@zigzag#1{%
+ \pgf@circ@res@temp=\ctikzvalof{resistors/zigzag stub}\pgf@circ@res@step
+ \advance \pgf@circ@res@step by -2\pgf@circ@res@temp
\divide \pgf@circ@res@step by \numexpr4*\zigs\relax
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \ifdim\pgf@circ@res@temp>0pt
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@temp -\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \fi
\pgf@circ@res@other = \pgf@circ@res@left
+ \advance\pgf@circ@res@other by \pgf@circ@res@temp
\pgf@circ@count@a=\zigs\relax
% first half zig
\advance\pgf@circ@res@other by \pgf@circ@res@step
@@ -655,11 +663,14 @@
\advance\pgf@circ@res@other by 2\pgf@circ@res@step
\pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{#1\pgf@circ@res@down}}
\advance\pgf@circ@res@other by \pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \ifdim\pgf@circ@res@temp>0pt
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other+\pgf@circ@res@temp+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \fi
\pgfsetbeveljoin
+ \pgfkeys{/tikz/circuitikz/resistors/zigzag hook}
\pgfusepath{draw}
}
-
%% Resistor
\pgfcircdeclarebipolescaled{resistors}
{
@@ -672,7 +683,7 @@
{
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgftransformationadjustments
- \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}*\scaledRlen}
\pgf@circ@zigzag{1}
}
@@ -692,7 +703,7 @@
{
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgftransformationadjustments
- \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/vresistor/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/vresistor/width}*\scaledRlen}
\pgf@circ@zigzag{.5}
\pgfscope
@@ -731,7 +742,7 @@
{
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgftransformationadjustments
- \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/potentiometer/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/potentiometer/width}*\scaledRlen}
\pgf@circ@zigzag{1}
\pgfscope
@@ -761,7 +772,7 @@
{%
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgftransformationadjustments
- \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistivesens/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistivesens/width}*\scaledRlen}
\pgf@circ@zigzag{.5}
\pgfscope
@@ -810,7 +821,7 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right/\@@intscale+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
\pgftransformationadjustments
- \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/ldresistor/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/ldresistor/width}*\scaledRlen}
\pgf@circ@zigzag{\@@hscale}
}%
@@ -3696,9 +3707,9 @@
\pgf@circuit@fulldiodefalse
\ctikzset{diode/.is choice}
-\ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodefalse}%default
-\ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue }
-\ctikzset{diode/stroke/.code = \pgf@circuit@strokediodetrue}
+\ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodefalse}%default
+\ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue\pgf@circuit@strokediodefalse}
+\ctikzset{diode/stroke/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodetrue}
\tikzset{full diodes/.style = { \circuitikzbasekey/diode = full}}
\tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty}}
@@ -6031,6 +6042,13 @@
\ctikzset{bipoles/qpprobe/voltage/additional shift/.initial=.5}
\ctikzset{bipoles/iloop/width/.initial=.40}
\ctikzset{bipoles/iloop/height/.initial=.60}
+% currtap see https://github.com/circuitikz/circuitikz/issues/807
+\ctikzset{bipoles/currtap/height/.initial=0.4}
+\ctikzset{bipoles/currtap/dot size/.initial=0.5}
+\ctikzset{bipoles/currtap/fill/.initial=default}
+\ctikzset{bipoles/currtap/dash/.initial=none}
+\ctikzset{bipoles/currtap/color/.initial=default}
+\ctikzset{bipoles/currtap/thickness/.initial=default}
\ctikzset{bipoles/oscope/height/.initial=.60}
\ctikzset{bipoles/oscope/width/.initial=.60}
@@ -6607,6 +6625,28 @@
\pgfusepath{draw}
\endpgfscope
}
+%% currtap
+\pgfcircdeclarebipolescaled{instruments}
+{
+ \savedmacro{\@@dotsize}{\def\@@dotsize{\ctikzvalof{bipoles/currtap/dot size}}}
+ \anchor{tap}{\northeast\pgf@x=0pt\pgf@y=\@@dotsize\pgf@y\pgf@y=-\pgf@y}
+}
+{\ctikzvalof{bipoles/currtap/height}}
+{currtap}
+{\ctikzvalof{bipoles/currtap/height}}
+{\ctikzvalof{bipoles/currtap/height}}
+{
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@left}{0pt}}
+ \pgfpatharc{180}{0}{0.95\pgf@circ@res@right}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfusepath{draw}
+ \pgf@circ@subset@color@dash{bipoles/currtap}
+ \pgf@circ@subset@thickness{bipoles/currtap}
+ \pgfusepath{draw}
+ \pgfpathcircle{\pgfpoint{0pt}{0pt}}{\@@dotsize*\pgf@circ@res@up}
+ \pgf@circ@subset@fill@or@draw{bipoles/currtap}
+}
% %>>>
% Path definitions for Instruments%<<<
@@ -6619,8 +6659,8 @@
\pgfcirc@activate@bipole@simple{l}{rmeterwa}
\pgfcirc@activate@bipole@simple{l}{smeter}
\pgfcirc@activate@bipole@simple{l}{iloop}
-% \pgfcirc@activate@bipole@simple{l}{iloop2} that was wrong
\pgfcirc@activate@bipole{l}{ilooptwo}{iloop2}{iloop2}
+\pgfcirc@activate@bipole@simple{l}{currtap}
\pgfcirc@activate@bipole@simple{l}{qvprobe}
\pgfcirc@activate@bipole@simple{l}{qiprobe}
\pgfcirc@activate@bipole@simple{l}{qpprobe}
@@ -6774,16 +6814,22 @@
% spring into the damper
\pgfscope
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfscope
+ \pgftransformationadjustments
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{.95\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgfsetcornersarced{\pgfpoint{.25\pgf@circ@res@up}{.25\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{.75\pgf@circ@res@left}{.75\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{.5\pgf@circ@res@left}{-.75\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.75\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{-.75\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}{.75\pgf@circ@res@up}}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
\pgfusepath{stroke}
\endpgfscope
+ \endpgfscope
% damper box
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
@@ -6977,7 +7023,7 @@
\ctikzset{bipoles/tlmic/width/.initial=.5}% it MUST be mic width *5/8
\ctikzset{bipoles/mic/bar thickness/.initial=1}
-% arresters, fuses, lamps, etc
+% arresters, fuses, relais, lamps, etc
\ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
\ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
@@ -6994,6 +7040,7 @@
\ctikzset{bipoles/afuse/height/.initial=.20}
\ctikzset{bipoles/afuse/width/.initial=.50}
\ctikzset{bipoles/lamp/height/.initial=.60}
+\ctikzset{bipoles/lamp/width/.initial=.60}
\ctikzset{bipoles/wfuse/height/.initial=.20}
\ctikzset{bipoles/wfuse/width/.initial=.50}
\ctikzset{bipoles/wfuse/shape/.initial=ocirc}
@@ -7001,9 +7048,22 @@
\ctikzset{bipoles/wfuse/dots/.is choice}
\ctikzset{bipoles/wfuse/dots/.is if=pgf@circ@wfuse@dots}
%
-\ctikzset{bipoles/lamp/width/.initial=.60}
+\ctikzset{bipoles/relais/height/.initial=.8}
+\ctikzset{bipoles/relais/width/.initial=.3}
+%
\ctikzset{bipoles/bulb/height/.initial=.8}
\ctikzset{bipoles/bulb/width/.initial=.8}
+% suggested by @bogger33, see https://github.com/circuitikz/circuitikz/issues/793
+\ctikzset{bipoles/neonlampcc/height/.initial=.60}
+\ctikzset{bipoles/neonlampac/height/.initial=.60}
+\pgf@circ@declare@family@arrows{sparkgap}
+\newif\ifpgf@sparkgap@dot
+\newif\ifpgf@sparkgap@circle
+\ctikzset{sparkgap/circle/.is if=pgf@sparkgap@circle}
+\ctikzset{sparkgap/dot/.is if=pgf@sparkgap@dot}
+\ctikzset{sparkgap/gap/.initial=.05}
+\ctikzset{bipoles/sparkgap/height/.initial=.60}
+%
\ctikzset{bipoles/squid/height/.initial=.60}
\ctikzset{bipoles/squid/width/.initial=.60}
\ctikzset{bipoles/barrier/height/.initial=.60}
@@ -7157,18 +7217,18 @@
{\ctikzvalof{bipoles/thermocouple/height}}
{\ctikzvalof{bipoles/thermocouple/width}}
{
+ \pgfsetrectcap
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
- \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}}
- \pgfusepath{draw}
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
\pgfusepath{draw}
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfsetroundcap
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
}
%% fuse
\pgfcircdeclarebipolescaled{misc}
@@ -7233,6 +7293,25 @@
\pgfnode{\cshape}{center}{}{\thisshape-right}{\pgfusepath{draw}}
\fi
}
+
+%% Relais
+\pgfcircdeclarebipolescaled{misc}
+{}
+{\ctikzvalof{bipoles/relais/height}}
+{relais}
+{\ctikzvalof{bipoles/relais/height}}
+{\ctikzvalof{bipoles/relais/width}}
+{
+ \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgf@circ@draworfill
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+
%% SQUID added by Cor Molenaar 5 March 2010
\pgfcircdeclarebipolescaled{misc}
{}
@@ -7340,11 +7419,116 @@
\pgfsetbeveljoin
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
\pgfusepath{draw}
-}% %>>>
+}%
+% neon lamps, suggested by @bogger33 https://github.com/circuitikz/circuitikz/issues/793
+% implemented by Romano
+% double-cathode (capacitor) style
+\pgfcircdeclarebipolescaled{misc}
+{}
+{\ctikzvalof{bipoles/neonlampcc/height}}
+{neonlampcc}
+{\ctikzvalof{bipoles/neonlampcc/height}}
+{\ctikzvalof{bipoles/neonlampcc/height}}
+{
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgf@circ@draworfill
+ %% leads in
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \def\@@w{0.2}\def\@@h{0.6}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@left}{0pt}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@right}{0pt}}
+ %% "capacitor style" symbol
+ \pgfusepath{draw}
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\@@w\pgf@circ@res@right}{\@@h\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@right}{\@@h\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{\@@w\pgf@circ@res@left}{\@@h\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@left}{\@@h\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ %% dot
+ \pgftransformshift{\pgfpoint{\@@w\pgf@circ@res@left-3*\ctikzvalof{nodes width}\pgf@circ@Rlen}
+ {\@@h\pgf@circ@res@down + 2*\ctikzvalof{nodes width}\pgf@circ@Rlen}}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{draw,fill}}
+}
+% anode-cathode style
+\pgfcircdeclarebipolescaled{misc}
+{}
+{\ctikzvalof{bipoles/neonlampac/height}}
+{neonlampac}
+{\ctikzvalof{bipoles/neonlampac/height}}
+{\ctikzvalof{bipoles/neonlampac/height}}
+{
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgf@circ@draworfill
+ %% leads in
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \def\@@w{0.5}\def\@@h{0.5}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@left}{0pt}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@right}{0pt}}
+ \pgfusepath{draw}
+ %% one terminal is a straight plate
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\@@w\pgf@circ@res@left}{\@@h\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@left}{\@@h\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ %% the other is an "ocirc" shape
+ \pgftransformshift{\pgfpoint{\@@w\pgf@circ@res@right}{0pt}}
+ \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw,fill}}
+ %% dot
+ \pgftransformshift{\pgfpoint{-\@@w\pgf@circ@res@right}{\@@h\pgf@circ@res@down}}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{draw,fill}}
+}
+% spark gap, suggested by @bogger33 https://github.com/circuitikz/circuitikz/issues/800
+\pgfcircdeclarebipolescaled{misc}
+{
+ \savedmacro{\changeh}{\edef\changeh{\ifpgf@sparkgap@circle 1 \else 0.5 \fi}}
+ \pgfcirc@border@extend@updown{\changeh}{\changeh}
+}
+{\ctikzvalof{bipoles/sparkgap/height}}
+{sparkgap}
+{\ctikzvalof{bipoles/sparkgap/height}}
+{\ctikzvalof{bipoles/sparkgap/height}}{
+ % circle (if requested)
+ \pgfscope
+ \ifpgf@sparkgap@circle
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathcircle{\pgfpointorigin}{\pgf@circ@res@up}
+ \pgf@circ@draworfill
+ \fi
+ \endpgfscope
+ % arrows
+ \pgfscope
+ \pgfcirc@set@arrows{sparkgap}{}{Triangle[scale=2]}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{sparkgap/gap}\pgf@circ@res@right}{0pt}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{sparkgap/gap}\pgf@circ@res@left}{0pt}}
+ \pgfusepath{draw}
+ \endpgfscope{}
+ % dot (if requested)
+ \ifpgf@sparkgap@dot
+ \pgftransformshift{\pgfpoint
+ {\ctikzvalof{sparkgap/gap}\pgf@circ@res@left-1*\ctikzvalof{nodes width}\pgf@circ@Rlen}
+ {-4*\ctikzvalof{nodes width}\pgf@circ@Rlen}}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{draw,fill}}
+ \fi
+}
+
+%>>>
%% Path definitions for Miscellaneous%<<<
\pgfcirc@activate@bipole@simple{l}{lamp}
+\pgfcirc@activate@bipole@simple{l}{neonlampcc}
+\pgfcirc@activate@bipole@simple{l}{neonlampac}
+\pgfcirc@activate@bipole@simple{l}{sparkgap}
\pgfcirc@activate@bipole@simple{l}{bulb}
\pgfcirc@activate@bipole@simple{l}{squid}
\pgfcirc@activate@bipole@simple{l}{barrier}
@@ -7355,6 +7539,7 @@
\pgfcirc@style@to@style{asymmetric fuse}{afuse}
\pgfcirc@activate@bipole@simple{l}{wfuse}
\pgfcirc@activate@bipole{l}{wfuse}{wfuse}{wiggly fuse}
+\pgfcirc@activate@bipole@simple{l}{relais}
\def\pgf@circ@gfsurgearrester@path#1{\ifpgf@circuit@europeangfsurgearrester\pgf@circ@europeangfsurgearrester@path{#1}\else\pgf@circ@americangfsurgearrester@path{#1}\fi}
\pgfcirc@activate@bipole{l}{europeangfsurgearrester}{european gas filled surge arrester}{european gas filled surge arrester}
\pgfcirc@activate@bipole{l}{americangfsurgearrester}{american gas filled surge arrester}{american gas filled surge arrester}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
index e3665b8862..cb95f54ef3 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
@@ -231,13 +231,15 @@
\compattikzset{#2/.style={\comnpatname #1, #3={##1}}}%
}
% create a bipole
-\def\pgfcirc@activate@bipole#1#2#3#4{% path name, base node name, style name
+\def\pgfcirc@activate@bipole#1#2#3#4{% type of label, path name, base node name, style name
+ % \typeout{Activate bipole:\space #4,}
\expandafter\def\csname pgf@circ@#2@path\endcsname##1{\pgf@circ@bipole@path{#3}{##1}}%
\pgfcirc@path@to@style{#1}{#2}{#4}{}% no options here, let's see
}
\def\pgfcirc@activate@bipole@simple#1#2{\pgfcirc@activate@bipole{#1}{#2}{#2}{#2}}
% create a bipole with options
-\def\pgfcirc@activate@bipole@opt#1#2#3#4#5{% path name, base node name, style name
+\def\pgfcirc@activate@bipole@opt#1#2#3#4#5{% type of label, path name, base node name, style name, options
+ % \typeout{Activate bipole:\space #4,}
\expandafter\def\csname pgf@circ@#2@path\endcsname##1{\pgf@circ@bipole@path{#3}{##1}}%
\pgfcirc@path@to@style{#1}{#2}{#4}{#5}% no options here, let's see
}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
index 7457dabb46..d8d089dd92 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
@@ -4025,6 +4025,8 @@
\pgfmathsetmacro{\@@BDscale}{\ctikzvalof{tripoles/#1/bodydiode scale}* \ctikzvalof{\ctikzclass/scale}/\ctikzvalof{diodes/scale}}
\pgftransformscale{\@@BDscale}
\ifpgf@circuit@fulldiode
+ % I'm not sure why this is needed, but...
+ \pgf@circ@maybe@color{transistor bodydiode/color}
\pgfnode{fulldiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
\else
\pgfnode{emptydiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
@@ -8613,6 +8615,11 @@
\pgf@y=\pgf@circ@res@up\advance\pgf@y by -\pgf@circ@res@right
\fi
}
+ \savedmacro{\tubes@filament@angle}{\edef\tubes@filament@angle{\ctikzvalof{tubes/filament angle}}}
+ \savedmacro{\tubes@filament@distance}{\edef\tubes@filament@distance{\ctikzvalof{tubes/filament distance}}}
+ \savedmacro{\tubes@tube@radius}{\edef\tubes@tube@radius{\ctikzvalof{tubes/tube radius}}}
+ \savedmacro{\tubes@cathode@width}{\edef\tubes@cathode@width{\ctikzvalof{tubes/cathode width}}}
+ \savedmacro{\tubes@cathode@distance}{\edef\tubes@cathode@distance{\ctikzvalof{tubes/cathode distance}}}
\anchor{tube ne}{\tubene}
\anchor{tubesq ne}{\tubesquarene}
% tube shape anchors: geo
@@ -8647,30 +8654,37 @@
\anchor{cathode}{%
\northwest
\pgf@y=-\pgf@y
- \pgf@x=\ctikzvalof{tubes/cathode width}\pgf@x
+ \pgf@x=\tubes@cathode@width\pgf@x
}
\anchor{cathode 1}{%
\northwest
\pgf@y=-\pgf@y
- \pgf@x=\ctikzvalof{tubes/cathode width}\pgf@x
+ \pgf@x=\tubes@cathode@width\pgf@x
}
\anchor{cathode 2}{%
\northwest
\pgf@y=-\pgf@y
- \pgf@x=-\ctikzvalof{tubes/cathode width}\pgf@x
+ \pgf@x=-\tubes@cathode@width\pgf@x
}
\anchor{filament 1}{%
\northwest
- \pgfmathparse{(\ctikzvalof{tubes/tube radius}*sin(\ctikzvalof{tubes/filament angle})}
+ \pgfmathparse{(\tubes@tube@radius*sin(\tubes@filament@angle)}
\pgf@x=\pgfmathresult\pgf@x
\pgf@y=-\pgf@y
}
\anchor{filament 2}{%
\northwest
- \pgfmathparse{(\ctikzvalof{tubes/tube radius}*sin(\ctikzvalof{tubes/filament angle})}
+ \pgfmathparse{(\tubes@tube@radius*sin(\tubes@filament@angle)}
\pgf@x=-\pgfmathresult\pgf@x
\pgf@y=-\pgf@y
}
+ \anchor{filament center}{%
+ \northwest
+ \pgf@ya=0.5\pgf@y
+ \pgf@ya=-\tubes@cathode@distance\pgf@y
+ \advance\pgf@ya by -\tubes@filament@distance\pgf@y
+ \pgf@x=0pt\pgf@y=\pgf@ya
+ }
% Extra anchors
#2%
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index a738c664ea..f85b8ab58b 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -16,8 +16,8 @@
\startmodule[circuitikz]
\usemodule[tikz]
-\def\pgfcircversion{1.6.8}
-\def\pgfcircversiondate{2024/05/05}
+\def\pgfcircversion{1.7.0}
+\def\pgfcircversiondate{2024/08/03}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}