texlive[52354] Master/texmf-dist: circuitikz (13oct19)
commits+karl at tug.org
commits+karl at tug.org
Sun Oct 13 00:06:26 CEST 2019
Revision: 52354
http://tug.org/svn/texlive?view=revision&revision=52354
Author: karl
Date: 2019-10-13 00:06:25 +0200 (Sun, 13 Oct 2019)
Log Message:
-----------
circuitikz (13oct19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
trunk/Master/texmf-dist/doc/generic/circuitikz/README.md
trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
Modified: trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md 2019-10-12 22:06:25 UTC (rev 52354)
@@ -1,6 +1,20 @@
<!--- CircuiTikz - Changelog --->
The major changes among the different circuitikz versions are listed here. See <https://github.com/circuitikz/circuitikz/commits> for a full list of changes.
+* Version 0.9.5 (2019-10-12)
+
+ This release basically add features to better control labels, voltages and similar text "ornaments" on bipoles, plus some other minor things.
+
+ On the bug fixes side, a big incompatibility with ConTeXt has been fixed, thanks to help from `@TheTeXnician` and `@hmenke` on `github.com`.
+
+ - Added a "midtap" anchor for coils and exposed the inner coils shapes in the transformers
+ - Added a "curved capacitor" with polarity coherent with "ecapacitor"
+ - Added the possibility to apply style and access the nodes of bipole's text ornaments (labels, annotations, voltages, currents and flows)
+ - Added the possibility to move the wiper in resistive potentiometers
+ - Added a command to load and set a style in one go
+ - Fixed internal font changing commands for compatibility with ConTeXt
+ - Fixed hardcoded black color in "elko" and "elmech"
+
* Version 0.9.4 (2019-08-30)
This release introduces two changes: a big one, which is the styling of the components (please look at the manual for details) and a change to how voltage labels and arrows are positioned. This one should be backward compatible *unless* you used `voltage shift` introduced in 0.9.0, which was broken when using the global `scale` parameter.
Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/README.md
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -5,6 +5,38 @@
\begin{itemize}
\item
+ Version 0.9.5 (2019-10-12)
+
+ This release basically add features to better control labels, voltages
+ and similar text ``ornaments'' on bipoles, plus some other minor
+ things.
+
+ On the bug fixes side, a big incompatibility with ConTeXt has been
+ fixed, thanks to help from \texttt{@TheTeXnician} and \texttt{@hmenke}
+ on \texttt{github.com}.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Added a ``midtap'' anchor for coils and exposed the inner coils
+ shapes in the transformers
+ \item
+ Added a ``curved capacitor'' with polarity coherent with
+ ``ecapacitor''
+ \item
+ Added the possibility to apply style and access the nodes of
+ bipole's text ornaments (labels, annotations, voltages, currents and
+ flows)
+ \item
+ Added the possibility to move the wiper in resistive potentiometers
+ \item
+ Added a command to load and set a style in one go
+ \item
+ Fixed internal font changing commands for compatibility with ConTeXt
+ \item
+ Fixed hardcoded black color in ``elko'' and ``elmech''
+ \end{itemize}
+\item
Version 0.9.4 (2019-08-30)
This release introduces two changes: a big one, which is the styling
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -1041,10 +1041,10 @@
\subsubsection{Style files}
-When using styles, it is possible to use \emph{style files} (see section~\ref{sec:writingstylefiles}), that then you can load with the command \verb|\ctikzloadstyle|. For example, in the distribution you have a number of style files: \texttt{legacy}, \texttt{romano}, \texttt{example}.When you load a style name \texttt{\emph{name}}, you will have available a style called \texttt{\emph{name} circuit style} that you can apply to your circuits.
+When using styles, it is possible to use \emph{style files} (see section~\ref{sec:writingstylefiles}), that then you can load with the command \verb|\ctikzloadstyle|. For example, in the distribution you have a number of style files: \texttt{legacy}, \texttt{romano}, \texttt{example}. When you load a style name \texttt{\emph{name}}, you will have available a style called \texttt{\emph{name} circuit style} that you can apply to your circuits.
The last style loaded is not enacted --- you have to explicitly do it if you want the style used by default, by putting for example in the preamble:
-\begin{lstlisting}
+\begin{lstlisting}[numbers=none]
\ctikzloadstyle{romano}
\tikzset{romano circuit style}
\end{lstlisting}
@@ -1051,7 +1051,7 @@
Please notice that the style is at \TikZ{} level, not \Circuitikz --- that let's you use it in the top option of the circuit, like:
-\begin{lstlisting}
+\begin{lstlisting}[numbers=none]
\begin{circuitikz}[legacy circuit style,
..., ]
...
@@ -1058,7 +1058,12 @@
\end{circuitikz}
\end{lstlisting}
+If you just want to use one style, you can load and activate it in one command with
+\begin{lstlisting}[numbers=none]
+ \ctikzsetstyle{romano}
+\end{lstlisting}
+
The \texttt{example} style file will simply make the amplifiers filled with light blue:
\begin{LTXexample}[varwidth=true]
@@ -1240,6 +1245,24 @@
\circuitdescbip*[thermistorntc]{thRn}{NTC thermistor}{thermistor ntc}
\end{groupdesc}
+
+\subsubsection{Potentiometers: wiper position}
+
+Since version \texttt{0.9.5}, you can control the position of the wiper in potentiometers using the key \texttt{wiper pos}, which is a number in the range $[0,1]$. The default middle position is \texttt{wiper pos=0.5}.
+
+
+\begin{LTXexample}[varwidth, basicstyle=\small\ttfamily]
+\begin{circuitikz}[american]
+ \ctikzset{resistors/width=1.5, resistors/zigs=9}
+ \draw (0,0) to[pR, name=A] ++(0,-4);
+ \draw (1.5,0) to[pR, wiper pos=0.3, name=B] ++(0,-4);
+ \ctikzset{european resistors}
+ \draw (3,0) to[pR, wiper pos=0.8, name=C] ++(0,-4);
+ \foreach \i in {A, B, C}
+ \node[right] at (\i.wiper) {\i};
+\end{circuitikz}
+\end{LTXexample}
+
\subsubsection{Generic sensors anchors}\label{sec:sensors-anchors}
Generic sensors have an extra anchor named \texttt{label} to help position the type of dependence, if needed:
@@ -1282,7 +1305,7 @@
\begin{groupdesc}
\circuitdescbip{capacitor}{Capacitor}{C}
- \circuitdescbip[pcapacitor]{polar capacitor}{Polar capacitor}{pC}
+ \circuitdescbip[ccapacitor]{curved capacitor}{Curved (polarized) capacitor}{cC}
\circuitdescbip*{ecapacitor}{Electrolytic capacitor}{eC,elko}
\circuitdescbip[vcapacitor]{variable capacitor}{Variable capacitor}{vC}
\circuitdescbip[capacitivesens]{capacitive sensor}{Capacitive sensor}{sC}(label/0/0.3)
@@ -1289,6 +1312,12 @@
\circuitdescbip*{piezoelectric}{Piezoelectric Element}{PZ}
\end{groupdesc}
+There is also the (deprecated\footnote{Thanks to \href{https://tex.stackexchange.com/questions/509594/polar-capacitor-orientation-in-circuitikz-seems-wrong}{Anshul Singhv for noticing}.} --- its polarity is not coherent with the rest of the components) \texttt{polar capacitor}:
+
+\begin{groupdesc}
+ \circuitdescbip[pcapacitor]{polar capacitor}{Polar capacitor}{pC}
+\end{groupdesc}
+
\subsubsection{Capacitive sensors anchors}
For capacitive sensors, see section~\ref{sec:sensors-anchors}.
@@ -1302,7 +1331,7 @@
If the \texttt{cuteinductors} option is active (default behaviour), or the style \texttt{[cute inductors]} is used, the inductors are displayed as follows:
\begin{groupdesc}
\ctikzset{inductor=cute}
- \circuitdescbip[cuteinductor]{L}{Inductor}{cute inductor}
+ \circuitdescbip[cuteinductor]{L}{Inductor}{cute inductor}(midtap/90/0.1)
\circuitdescbip[cutechoke]{cute choke}{Choke}{}
\circuitdescbip[vcuteinductor]{vL}{Variable inductor}{variable cute inductor}
\circuitdescbip[scuteinductor]{sL}{Inductive sensor}{cute inductive sensor}( label/0/0.3 )
@@ -1311,7 +1340,7 @@
If the \texttt{americaninductors} option is active (or the style \texttt{[american inductors]} is used), the inductors are displayed as follows:
\begin{groupdesc}
\ctikzset{inductor=american}
- \circuitdescbip[americaninductor]{L}{Inductor}{american inductor}
+ \circuitdescbip[americaninductor]{L}{Inductor}{american inductor}(midtap/90/0.3)
\circuitdescbip[vamericaninductor]{vL}{Variable inductor}{variable american inductor}
\circuitdescbip[samericaninductor]{sL}{Inductive sensor}{american inductive sensor}( label/0/0.3 )
\end{groupdesc}
@@ -1319,16 +1348,13 @@
Finally, if the \texttt{europeaninductors} option is active (or the style \texttt{[european inductors]} is used), the inductors are displayed as follows:
\begin{groupdesc}
\ctikzset{inductor=european}
- \circuitdescbip[fullgeneric]{L}{Inductor}{european inductor}
+ \circuitdescbip[fullgeneric]{L}{Inductor}{european inductor}(midtap/90/0.1)
\circuitdescbip[tfullgeneric]{vL}{Variable inductor}{variable european inductor}
\circuitdescbip[sfullgeneric]{sL}{Inductive sensor}{european inductive sensor}( label/0/0.3 )
\ctikzset{inductor=cute} % back to default
\end{groupdesc}
-\subsubsection{Inductive sensors anchors}
-For inductive sensors, see section~\ref{sec:sensors-anchors}.
-
\subsubsection{Inductors customizations}\label{sec:tweak-l}
You can change the scale of the inductors by setting the key \texttt{inductors/scale} to something different from the default \texttt{1.0}.
@@ -1363,6 +1389,26 @@
\end{circuitikz}
\end{LTXexample}
+\subsubsection{Inductors anchors}
+
+For inductive sensors, see section~\ref{sec:sensors-anchors}.
+
+Inductors have an additional anchor, called \texttt{midtap}, that connects to the center of the coil ``wire''. Notice that this anchor could be on one side or the other of the component, depending on the number of loops of the element; if you need a fixed position, you can use the geographical anchors.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}[
+ loops/.style={circuitikz/inductors/coils=#1}]
+\ctikzset{cute inductors}
+\draw (0,2) to[L, loops=5, name=A] ++(2,0)
+to[L, loops=6, name=B] ++(2,0);
+\ctikzset{american inductors}
+\draw (0,0) to[L, loops=5, name=C] ++(2,0)
+to[L, loops=6, name=D] ++(2,0);
+\foreach \i in {A, B, C, D}
+ \node[circle, fill=red, inner sep=1pt] at (\i.midtap){};
+\end{circuitikz}
+\end{LTXexample}
+
\subsection{Diodes and such}
There are three basic styles for diodes: \texttt{empty} (fillable in color), \texttt{full} (completely filled with the draw color) and \texttt{stroke} (empty, but with a line across them).
@@ -1901,7 +1947,6 @@
\begin{groupdesc}
\circuitdesc{currarrow}{Arrows (current and voltage)}{}(center/0/0.2)
\circuitdesc{inputarrow}{Arrow to draw at its tip, useful for block diagrams.}{}(center/0/0.2)
- \circuitdesc*{bnc}{BNC connector}{}(left/135/0.6, right/45/0.6, center/-90/0.6, hot/0/0.6, zero/-135/0.6)
\end{groupdesc}
\subsubsection{Arrows size}\label{sec:currarrow-size}
@@ -2703,6 +2748,40 @@
;\end{circuitikz}
\end{LTXexample}
+Moreover, you can access the two internal coils (inductances); if your transformer node is called \texttt{T}, they are named \texttt{T-L1} and \texttt{T-L2}. Notice that the two inductors are rotated (by -90 degrees the first, +90 degrees the second) so you have to be careful with the anchors. Also, the \texttt{midtap} anchor of the inductors can be on the external or internal side depending on the numbers of coils. Finally, the anchors \texttt{L1.a} and \texttt{L1.b} are marking the start and end of the coils.
+
+\begin{quote}
+\begin{circuitikz}[american inductors,
+ ]
+ \def\coordx(#1)[#2:#3]#4{node[circle, #4, draw, inner sep=1pt,pin={[#4, overlay, inner sep=0.5pt, font=\scriptsize, pin distance=#2cm, pin edge={#4, overlay,}]#3:#1}](){}}
+ \draw (-2,0) (0, 0) node[transformer](T){};
+ \foreach \a/\d/\t in {L1.midtap/0.2/180, L1.south west/0.2/180, L1.south east/0.2/180,
+ L2.south/0.2/0, L2.south west/0.2/0, L2.south east/0.2/0}
+ \path (T-\a) \coordx(T-\a)[\d:\t]{red};
+ \ctikzset{cute inductors}
+ \draw (4, 0) node[transformer](T){};
+ \foreach \a/\d/\t in {L1.a/0.2/-120, L1.b/0.2/120,
+ L2.midtap/0.5/0, L2.south west/0.2/0, L2.south east/0.2/0}
+ \path (T-\a) \coordx(T-\a)[\d:\t]{blue};
+ \node[font=\small\ttfamily,above] at (T.north) {inductors/coils=5};
+ \draw (8, 0) node[transformer, circuitikz/inductors/coils=6](T){};
+ \foreach \a/\d/\t in {L2.a/0.2/120, L2.b/0.2/-120,
+ L2.midtap/0.2/0, L2.south west/0.2/0, L2.south east/0.2/0}
+ \path (T-\a) \coordx(T-\a)[\d:\t]{red};
+ \node[font=\small\ttfamily,above] at (T.north) {inductors/coils=6};
+\end{circuitikz}
+\end{quote}
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+\draw (0,0) node[ground](GND){} to [sV] ++(0,2) -- ++(1,0)
+ node[transformer, circuitikz/inductors/coils=6,
+ anchor=A1](T){};
+\draw (T.A2) to[short, -*] (T.A2-|GND);
+\draw (T-L2.midtap) to[short, *-o] (T.B1 |- T-L2.midtap);
+\node [ocirc] at (T.B1){}; \node [ocirc] at (T.B2){};
+\end{circuitikz}
+\end{LTXexample}
\subsubsection{Double dipoles customization}
Transformers are in the \texttt{inductors} class (also the gyrator\dots), so they scale with the key \texttt{inductors/scale}.
@@ -3662,6 +3741,7 @@
\end{LTXexample}
+
\section{Labels and similar annotations}
\begin{LTXexample}[varwidth=true]
@@ -4222,8 +4302,10 @@
\draw (0,-2) to[R,v_<=$V_S$] ++(2,0);
\end{circuitikz}
\end{LTXexample}
-\subsubsection{Global properties of voltages and currents}
+
+\subsection{Global properties of voltages and currents}
+
\begin{LTXexample}[varwidth=true]
\tikz \draw (0,0) to[R, v=1<\volt>] (2,0); \par
\ctikzset{voltage/distance from node=.1}
@@ -4249,320 +4331,383 @@
Note the \texttt{.initial}; you have to create such key the first time you use it.
+\subsection{Changing the style of labels and text ornaments}
-\subsection{Nodes (also called poles)}\label{sec:bipole-nodes}
+Since version \texttt{0.9.5}, it is possible to change the style of bipole text ornaments (labels, annotations, voltages etc) by using the appropriate styles or keys.
+The basic style applied to the text are defined in the \texttt{/tikz/circuitikz} key directory and applied to every node that contains the text; you can also change them locally by using the \texttt{tikz} direct keys in local scopes.
-You can add nodes to the bipoles, positioned at the coordinates surrounding the component. The general style to use is \texttt{bipole nodes=\{start\}\{stop\}}, where \texttt{start} and \texttt{stop} are the nodes --- to be chosen between \texttt{none}, \texttt{circ}, \texttt{ocirc}, \texttt{squarepole}, \texttt{osquarepole}, \texttt{diamondpole}, \texttt{odiamondpole} and \texttt{rectfill}\footnote{You can use other shapes too, but at your own risk\dots Moreover, notice that \texttt{none} is not really a node, just a special word used to say ``do not put any node here''.} (see section~\ref{sec:terminals}).
+For example, you can make all annotations small by using:
+\begin{lstlisting}[numbers=none]
+\ctikzset{bipole annotation style/.style={font=\small}}
+\end{lstlisting}
-\begin{LTXexample}[varwidth=true,
- basicstyle=\small\ttfamily
- ]
-\begin{circuitikz}
- \ctikzset{bipoles/length=.5cm, nodes width=0.1}%small components, big nodes
- \foreach \a/\p [evaluate=\a as \b using (\a+180)] in
- {-90/none, -60/circ, -30/ocirc, 0/diamondpole, 30/odiamondpole, 60/squarepole, 90/osquarepole}
- \draw (0,0) to[R, bipole nodes={none}{\p}] ++(\a:1.5) node[font=\tiny, anchor=\b]{\p};
+And the change (override) the setting in one specific bipole using:
+
+\begin{lstlisting}[numbers=none]
+...to[bipole annotation style={color=red}, R, a={Red note}]...
+\end{lstlisting}
+
+where the annotation will be in normal font (it has been reset!) and red, or append to the style:
+
+\begin{lstlisting}[numbers=none]
+...to[bipole annotation append style={color=red}, R, a={Red small note}]...
+\end{lstlisting}
+
+\textbf{Caveat:} you have to put the style changing key at the start of the \texttt{to} arguments to have any effect\footnote{No, I do not know why. Hints and fixes are welcome.}.
+
+The available styles and commands are \texttt{bipole label style}, \texttt{bipole annotation style}, \texttt{bipole voltage style}, \texttt{bipole current style}, and \texttt{bipole flow style}. The following example shows a bit of everything.
+
+
+\begin{LTXexample}[pos=t, basicstyle=\small\ttfamily ]
+\begin{circuitikz}[american]
+ \ctikzset{bipole annotation style/.style={font=\tiny}}
+ \ctikzset{bipole current style/.style={font=\small\sffamily}}
+ \draw (0,0) to [bipole annotation append style={fill=yellow}, R=L1, a=A1] ++(3,0)
+ to [bipole label style={fill=cyan}, R, l2_=L2 and 2L, a^=A2] ++(3,0);
+ \draw (7,0) to [bipole voltage style={color=blue},
+ bipole flow style={fill=green, outer sep=5pt},
+ R=R1, v=V1, i=I1, f>^=F1] ++(3,0)
+ to [bipole current append style={color=red}, R, v<=V2, i^=I2, f>^=F2] ++(3,0);
\end{circuitikz}
\end{LTXexample}
-These bipole nodes are added after the path is drawn, as every node in Ti\emph{k}Z --- this is the reason why they are always filled (with the main color the normal nodes, with white the open ones), in order to ``hide'' the wire below. You can override the fill color if you want; but notice that if you draw things in two different paths, you will have ``strange'' results; notice that in the second line of resistors the second wire is starting from the center of the white \texttt{ocirc} of the previous path.
+\subsection{Labels in special components}
-\begin{LTXexample}[varwidth=true,
- pos=t, basicstyle=\small\ttfamily
- ]
+For some components label, current and voltage behave as one would expect:
+
+\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, *-o] ++(2,0) to[R, -d] ++(2,0)
- to[R, bipole nodes={diamondpole}{odiamondpole, fill=red}] ++(2,0);
- \draw (0,-1) to[R, *-o] ++(2,0) ;
- \draw (2,-1) to[R, -d] ++(2,0) to[R, bipole nodes={none}{squarepole}] ++(2,0);
+ \draw (0,0) to[I=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
-You can define shortcuts for the \texttt{bipole nodes} you use most; for example if you want a shortcut for a bipole with open square node in red in the right side you can:
-
-\begin{LTXexample}[varwidth=true,
- basicstyle=\small\ttfamily
- ]
+\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \ctikzset{-s/.style = {bipole nodes={none}{osquarepole, fill=red}}}
- \draw (0,0) to[R, -s] ++(2,0);
+ \draw (0,0) to[I, i=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
-There are several predefined shorthand as the above; in the following pages you can see all of them.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, o-o] (2,0);
+ \draw (0,0) to[cI=$k\cdot a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
+
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, -o] (2,0);
+ \draw (0,0) to[sI=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, o-] (2,0);
+ \draw (0,0) to[csI=$k\cdot a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
+The following results from using the option \texttt{americancurrent} or using the style \texttt{[american currents]}.
+
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}
- \draw (0,0) to[R, *-*] (2,0);
+\begin{circuitikz}[american currents]
+ \draw (0,0) to[I=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}
- \draw (0,0) to[R, -*] (2,0);
+\begin{circuitikz}[american currents]
+ \draw (0,0) to[I, i=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
+
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}
- \draw (0,0) to[R, *-] (2,0);
+\begin{circuitikz}[american currents]
+ \draw (0,0) to[cI=$k\cdot a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
+
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}
- \draw (0,0) to[R, d-d] (2,0);
+\begin{circuitikz}[american currents]
+ \draw (0,0) to[sI=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}
- \draw (0,0) to[R, -d] (2,0);
+\begin{circuitikz}[american currents]
+ \draw (0,0) to[csI=$k\cdot a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
+The same holds for voltage sources:
+
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, d-] (2,0);
+ \draw (0,0) to[V=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, o-*] (2,0);
+ \draw (0,0) to[V, v=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
+
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, *-o] (2,0);
+ \draw (0,0) to[cV=$k\cdot a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
+
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, o-d] (2,0);
+ \draw (0,0) to[sV=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, d-o] (2,0);
+ \draw (0,0) to[csV=$k\cdot a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
+The following results from using the option \texttt{americanvoltage} or the style \texttt{[american voltages]}.
+
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}
- \draw (0,0) to[R, *-d] (2,0);
+\begin{circuitikz}[american voltages]
+ \draw (0,0) to[V=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}
- \draw (0,0) to[R, d-*] (2,0);
+\begin{circuitikz}[american voltages]
+ \draw (0,0) to[V, v=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
-\subsection{Special components}
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[american voltages]
+ \draw (0,0) to[cV=$k v_e$] (2,0);
+\end{circuitikz}
+\end{LTXexample}
-For some components label, current and voltage behave as one would expect:
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}
- \draw (0,0) to[I=$a_1$] (2,0);
+\begin{circuitikz}[american voltages]
+ \draw (0,0) to[sV=$a_1$] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}
- \draw (0,0) to[I, i=$a_1$] (2,0);
+\begin{circuitikz}[american voltages]
+ \draw (0,0) to[csV=$k v_e$] (2,0);
\end{circuitikz}
\end{LTXexample}
+\subsection{Integration with {\ttfamily siunitx}}
+If the option {\ttfamily siunitx} is active (and \emph{not} in \ConTeXt), then the following are equivalent:
+
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[cI=$k\cdot a_1$] (2,0);
+ \draw (0,0) to[R, l=1<\kilo\ohm>] (2,0);
\end{circuitikz}
\end{LTXexample}
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, l=$\SI{1}{\kilo\ohm}$] (2,0);
+\end{circuitikz}
+\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[sI=$a_1$] (2,0);
+ \draw (0,0) to[R, i=1<\milli\ampere>] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[csI=$k\cdot a_1$] (2,0);
+ \draw (0,0) to[R, i=$\SI{1}{\milli\ampere}$] (2,0);
\end{circuitikz}
\end{LTXexample}
-The following results from using the option \texttt{americancurrent} or using the style \texttt{[american currents]}.
-
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[american currents]
- \draw (0,0) to[I=$a_1$] (2,0);
+\begin{circuitikz}
+ \draw (0,0) to[R, v=1<\volt>] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[american currents]
- \draw (0,0) to[I, i=$a_1$] (2,0);
+\begin{circuitikz}
+ \draw (0,0) to[R, v=$\SI{1}{\volt}$] (2,0);
\end{circuitikz}
\end{LTXexample}
+\subsection{Accessing labels text nodes}
-\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[american currents]
- \draw (0,0) to[cI=$k\cdot a_1$] (2,0);
+Since 0.9.5, you can access all the labels nodes\footnote{The access to \texttt{label}s and \texttt{annotation}s was present before, but not documented.} using special node names. So, if you use \texttt{name} to give a name to the bipole node, you can access also the following nodes: \texttt{namelabel} (notice: no space nor any other symbol between \texttt{name} and \texttt{label}!), \texttt{nameannotation}, \texttt{namevoltage}, \texttt{namecurrent} and \texttt{nameflow}.
+
+\begin{LTXexample}[varwidth=true,
+ pos=t, basicstyle=\small\ttfamily
+ ]
+\newcommand{\marknode}[2][45]{%
+ \node[circle, draw, red, inner sep=1pt,
+ pin={[red, font=\tiny]#1:#2}] at (#2.center) {};
+}
+\begin{circuitikz}[ american]
+ \draw (0,0) to [R=L1, a=A1, name=L1] ++(3,0)
+ to [R, l2_=L2 and 2L, a^=A2, name=L2] ++(3,0);
+ \marknode{L1} \marknode{L1label} \marknode[0]{L1annotation}
+ \marknode{L2} \marknode[0]{L2label} \marknode{L2annotation}
+ \draw[blue] (L2label.south west) rectangle (L2label.north east);
+ \draw (6.1,0) to [R=R1, v=V1, i=I1, f>^=F1, name=R1] ++(3,0)
+ to [R, v<=V2, i^=I2, f>^=F2, name=R2] ++(3,0);
+ \marknode[0]{R1voltage} \marknode[0]{R2voltage} \marknode[90]{R1current}
+ \marknode[90]{R2current} \marknode{R1flow} \marknode{R2flow}
\end{circuitikz}
\end{LTXexample}
-\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[american currents]
- \draw (0,0) to[sI=$a_1$] (2,0);
+\section{Using bipoles in circuits}
+
+\subsection{Nodes (also called poles)}\label{sec:bipole-nodes}
+
+You can add nodes to the bipoles, positioned at the coordinates surrounding the component. The general style to use is \texttt{bipole nodes=\{start\}\{stop\}}, where \texttt{start} and \texttt{stop} are the nodes --- to be chosen between \texttt{none}, \texttt{circ}, \texttt{ocirc}, \texttt{squarepole}, \texttt{osquarepole}, \texttt{diamondpole}, \texttt{odiamondpole} and \texttt{rectfill}\footnote{You can use other shapes too, but at your own risk\dots Moreover, notice that \texttt{none} is not really a node, just a special word used to say ``do not put any node here''.} (see section~\ref{sec:terminals}).
+
+
+\begin{LTXexample}[varwidth=true,
+ basicstyle=\small\ttfamily
+ ]
+\begin{circuitikz}
+ \ctikzset{bipoles/length=.5cm, nodes width=0.1}%small components, big nodes
+ \foreach \a/\p [evaluate=\a as \b using (\a+180)] in
+ {-90/none, -60/circ, -30/ocirc, 0/diamondpole, 30/odiamondpole, 60/squarepole, 90/osquarepole}
+ \draw (0,0) to[R, bipole nodes={none}{\p}] ++(\a:1.5) node[font=\tiny, anchor=\b]{\p};
\end{circuitikz}
\end{LTXexample}
-\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[american currents]
- \draw (0,0) to[csI=$k\cdot a_1$] (2,0);
+These bipole nodes are added after the path is drawn, as every node in Ti\emph{k}Z --- this is the reason why they are always filled (with the main color the normal nodes, with white the open ones), in order to ``hide'' the wire below. You can override the fill color if you want; but notice that if you draw things in two different paths, you will have ``strange'' results; notice that in the second line of resistors the second wire is starting from the center of the white \texttt{ocirc} of the previous path.
+
+\begin{LTXexample}[varwidth=true,
+ pos=t, basicstyle=\small\ttfamily
+ ]
+\begin{circuitikz}
+ \draw (0,0) to[R, *-o] ++(2,0) to[R, -d] ++(2,0)
+ to[R, bipole nodes={diamondpole}{odiamondpole, fill=red}] ++(2,0);
+ \draw (0,-1) to[R, *-o] ++(2,0) ;
+ \draw (2,-1) to[R, -d] ++(2,0) to[R, bipole nodes={none}{squarepole}] ++(2,0);
\end{circuitikz}
\end{LTXexample}
-The same holds for voltage sources:
+You can define shortcuts for the \texttt{bipole nodes} you use most; for example if you want a shortcut for a bipole with open square node in red in the right side you can:
-\begin{LTXexample}[varwidth=true]
+\begin{LTXexample}[varwidth=true,
+ basicstyle=\small\ttfamily
+ ]
\begin{circuitikz}
- \draw (0,0) to[V=$a_1$] (2,0);
+ \ctikzset{-s/.style = {bipole nodes={none}{osquarepole, fill=red}}}
+ \draw (0,0) to[R, -s] ++(2,0);
\end{circuitikz}
\end{LTXexample}
+There are several predefined shorthand as the above; in the following pages you can see all of them.
+
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[V, v=$a_1$] (2,0);
+ \draw (0,0) to[R, o-o] (2,0);
\end{circuitikz}
\end{LTXexample}
-
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[cV=$k\cdot a_1$] (2,0);
+ \draw (0,0) to[R, -o] (2,0);
\end{circuitikz}
\end{LTXexample}
-
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[sV=$a_1$] (2,0);
+ \draw (0,0) to[R, o-] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[csV=$k\cdot a_1$] (2,0);
+ \draw (0,0) to[R, *-*] (2,0);
\end{circuitikz}
\end{LTXexample}
-The following results from using the option \texttt{americanvoltage} or the style \texttt{[american voltages]}.
-
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[american voltages]
- \draw (0,0) to[V=$a_1$] (2,0);
+\begin{circuitikz}
+ \draw (0,0) to[R, -*] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[american voltages]
- \draw (0,0) to[V, v=$a_1$] (2,0);
+\begin{circuitikz}
+ \draw (0,0) to[R, *-] (2,0);
\end{circuitikz}
\end{LTXexample}
-
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[american voltages]
- \draw (0,0) to[cV=$k v_e$] (2,0);
+\begin{circuitikz}
+ \draw (0,0) to[R, d-d] (2,0);
\end{circuitikz}
\end{LTXexample}
-
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[american voltages]
- \draw (0,0) to[sV=$a_1$] (2,0);
+\begin{circuitikz}
+ \draw (0,0) to[R, -d] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[american voltages]
- \draw (0,0) to[csV=$k v_e$] (2,0);
+\begin{circuitikz}
+ \draw (0,0) to[R, d-] (2,0);
\end{circuitikz}
\end{LTXexample}
-\subsection{Integration with {\ttfamily siunitx}}
-
-If the option {\ttfamily siunitx} is active (and \emph{not} in \ConTeXt), then the following are equivalent:
-
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, l=1<\kilo\ohm>] (2,0);
+ \draw (0,0) to[R, o-*] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, l=$\SI{1}{\kilo\ohm}$] (2,0);
+ \draw (0,0) to[R, *-o] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, i=1<\milli\ampere>] (2,0);
+ \draw (0,0) to[R, o-d] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, i=$\SI{1}{\milli\ampere}$] (2,0);
+ \draw (0,0) to[R, d-o] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, v=1<\volt>] (2,0);
+ \draw (0,0) to[R, *-d] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, v=$\SI{1}{\volt}$] (2,0);
+ \draw (0,0) to[R, d-*] (2,0);
\end{circuitikz}
\end{LTXexample}
-
-
-
\subsection{Mirroring and Inverting}
Bipole paths can also mirrored and inverted (or reverted) to change the drawing direction.
Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -1,5 +1,5 @@
-\def\pgfcircversion{0.9.4}
-\def\pgfcircversiondate{2019/08/30}
+\def\pgfcircversion{0.9.5}
+\def\pgfcircversiondate{2019/10/12}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]
@@ -17,9 +17,6 @@
\catcode`\|=12
\catcode`\!=12
-\let\tiny=\tfxx
-\let\small=\tfx
-
\input pgfcirc.defines.tex
\input pgfcircutils.tex
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -138,6 +138,36 @@
% use \pgf at circ@setlinewidth{none}{\pgflinewidth} if there is no legacy case
\ctikzset{none/thickness/.initial=1.0} % do not touch
+%% font changes compatible with plain/LaTeX/ConTeXt
+%% thanks to Henri Menke https://github.com/circuitikz/circuitikz/issues/285#issuecomment-537224605
+
+\ifpgfutil at format@is at latex
+ \long\def\pgf at circ@font at tiny{\tiny}
+ \long\def\pgf at circ@font at small{\small}
+ \long\def\pgf at circ@font at bold{\textbf}
+ \long\def\pgf at circ@font at boldmath{\boldmath}
+ \long\def\pgf at circ@font at sixbm{\fontsize{6}{7}\selectfont\boldmath}
+ \long\def\pgf at circ@font at tenbm{\fontsize{10}{12}\selectfont\boldmath}
+ \long\def\pgf at circ@font at twelve{\fontsize{12}{14}\selectfont}
+\else\ifpgfutil at format@is at plain
+ \long\def\pgf at circ@font at tiny{\fiverm}
+ \long\def\pgf at circ@font at small{\sevenrm}
+ \long\def\pgf at circ@font at bold#1{{\bf#1}}
+ \long\def\pgf at circ@font at boldmath{\bf} % to be tested
+ \long\def\pgf at circ@font at sixbm{\sevenrm\bf} %
+ \long\def\pgf at circ@font at tenbm{\tenrm\bf} %
+ \long\def\pgf at circ@font at twelve{\twelverm} %
+\else\ifpgfutil at format@is at context
+ \long\def\pgf at circ@font at tiny{\tfxx}
+ \long\def\pgf at circ@font at small{\tfx}
+ \long\def\pgf at circ@font at bold{\bold}
+ \long\def\pgf at circ@font at boldmath{\bold} % to be tested
+ \long\def\pgf at circ@font at sixbm{\tfx\bold} %
+ \long\def\pgf at circ@font at tenbm{\normal\bold}%
+ \long\def\pgf at circ@font at twelve{\tfa} %
+\fi\fi\fi
+
+
% voltage options
\newif\ifpgf at circ@siunitx
@@ -210,6 +240,12 @@
\fi
}
+% load and enact a style
+\def\ctikzsetstyle#1{%
+ \ctikzloadstyle{#1}%
+ \tikzset{#1 circuit style}%
+}
+
% global style parameters
\ctikzset{default/scale/.initial=1.0} % do not touch
\ctikzset{default/fill/.initial=none} % do not touch
@@ -371,6 +407,10 @@
\ctikzset{bipoles/ageneric/width=#1}%
\ctikzset{bipoles/tgeneric/width=#1}%
}}
+\ctikzset{wiper pos/.code={%
+ \ctikzset{bipoles/potentiometer/wiper pos=#1}%
+ \ctikzset{bipoles/generic potentiometer/wiper pos=#1}%
+}}
% zigzag resistor
\ctikzset{bipoles/resistor/height/.initial=.3}
\ctikzset{bipoles/resistor/width/.initial=.8}
@@ -377,6 +417,7 @@
\ctikzset{bipoles/potentiometer/height/.initial=.8}
\ctikzset{bipoles/potentiometer/height 2/.initial=.3}
\ctikzset{bipoles/potentiometer/width/.initial=.8}
+\ctikzset{bipoles/potentiometer/wiper pos/.initial=.5}
\ctikzset{bipoles/vresistor/height/.initial=.6}
\ctikzset{bipoles/vresistor/width/.initial=.8}
\ctikzset{bipoles/resistivesens/height/.initial=.6}
@@ -404,6 +445,7 @@
\ctikzset{bipoles/generic potentiometer/height/.initial=.80}
\ctikzset{bipoles/generic potentiometer/height 2/.initial=.30}
\ctikzset{bipoles/generic potentiometer/width/.initial=.80}
+\ctikzset{bipoles/generic potentiometer/wiper pos/.initial=.5}
\ctikzset{bipoles/ageneric/height/.initial=.30}
\ctikzset{bipoles/tgeneric/height/.initial=.70}
\ctikzset{bipoles/tgeneric/width/.initial=.80}
@@ -414,10 +456,14 @@
\ctikzset{bipoles/capacitor/width/.initial=.2}
\ctikzset{bipoles/ecapacitor/height/.initial=.5}
\ctikzset{bipoles/ecapacitor/width/.initial=.2}
-\ctikzset{bipoles/ecapacitor/font/.initial= \fontsize{6}{0}\selectfont\boldmath}
+\ctikzset{bipoles/ecapacitor/font/.initial=\pgf at circ@font at sixbm}
+%%% pcapacitor is deprecated
\ctikzset{bipoles/pcapacitor/height/.initial=.6}
\ctikzset{bipoles/pcapacitor/width/.initial=.2}
\ctikzset{bipoles/pcapacitor/bend width/.initial=1.1}
+\ctikzset{bipoles/ccapacitor/height/.initial=.6}
+\ctikzset{bipoles/ccapacitor/width/.initial=.12}
+\ctikzset{bipoles/ccapacitor/bend width/.initial=1.1}
\ctikzset{bipoles/vcapacitor/height/.initial=.6}
\ctikzset{bipoles/vcapacitor/width/.initial=.5}
\ctikzset{bipoles/vcapacitor/capacitor width/.initial=.4}
@@ -1192,7 +1238,7 @@
\ctikzset{tripoles/op amp/height/.initial=1.4} % Total height
\ctikzset{tripoles/op amp/input height/.initial=.5} % Input port vertical separation
\ctikzset{tripoles/op amp/up pos/.initial=.45} % Top and bottom anchor position
-\ctikzset{tripoles/op amp/font/.initial= \fontsize{10}{12}\selectfont\boldmath} % Absolute font size needed!
+\ctikzset{tripoles/op amp/font/.initial=\pgf at circ@font at tenbm} % Absolute font size needed!
% Fully differential operational amplifier
\ctikzset{tripoles/fd op amp/width/.initial=1.7} % Total width
@@ -1201,7 +1247,7 @@
\ctikzset{tripoles/fd op amp/input height/.initial=.5} % Input port vertical separation
\ctikzset{tripoles/fd op amp/output height/.initial=.5} % Output port vertical separation
\ctikzset{tripoles/fd op amp/up pos/.initial=.45} % Top and bottom anchor position
-\ctikzset{tripoles/fd op amp/font/.initial= \fontsize{10}{12}\selectfont\boldmath} % Absolute font size needed!
+\ctikzset{tripoles/fd op amp/font/.initial=\pgf at circ@font at tenbm} % Absolute font size needed!
\ctikzset{tripoles/en amp/width/.initial=1.7}
\ctikzset{tripoles/en amp/port width/.initial=.7}
@@ -1208,8 +1254,8 @@
\ctikzset{tripoles/en amp/height/.initial=1.6}
\ctikzset{tripoles/en amp/input height/.initial=.3}
\ctikzset{tripoles/en amp/up pos/.initial=.45}
-\ctikzset{tripoles/en amp/font/.initial= \fontsize{10}{12}\selectfont} % Absolute font size needed!
-\ctikzset{tripoles/en amp/font2/.initial= \fontsize{12}{14}\selectfont} % Absolute font size needed!
+\ctikzset{tripoles/en amp/font/.initial=\pgf at circ@font at tenbm} % Absolute font size needed!
+\ctikzset{tripoles/en amp/font2/.initial=\pgf at circ@font at twelve} % Absolute font size needed!
\ctikzset{tripoles/en amp/text/.initial={$\mathstrut{\triangleright}\,{\infty}$}}
\tikzset{
en amp text/.code = {%
@@ -1227,7 +1273,7 @@
\ctikzset{tripoles/gm amp/height 2/.initial=0.5} % Right side of the trapezoid
\ctikzset{tripoles/gm amp/input height/.initial=.5} % Input port vertical separation
\ctikzset{tripoles/gm amp/up pos/.initial=.45} % Top and bottom anchor position
-\ctikzset{tripoles/gm amp/font/.initial= \fontsize{10}{12}\selectfont\boldmath} % Absolute font size needed!
+\ctikzset{tripoles/gm amp/font/.initial=\pgf at circ@font at tenbm} % Absolute font size needed!
% Instrumentation amplifier
\ctikzset{tripoles/inst amp/width/.initial=1.7} % Total width
@@ -1237,7 +1283,7 @@
\ctikzset{tripoles/inst amp/input height/.initial=.5} % Input ports vertical separation
\ctikzset{tripoles/inst amp/up pos/.initial=.4} % Top and bottom anchor position
\ctikzset{tripoles/inst amp/refv pos/.initial=.7} % Top and bottom voltage reference position
-\ctikzset{tripoles/inst amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath} % Absolute font size needed!
+\ctikzset{tripoles/inst amp/font/.initial=\pgf at circ@font at tenbm} % Absolute font size needed!
% Instrumentation amplifier with differential output
\ctikzset{tripoles/fd inst amp/width/.initial=1.7} % Total width
@@ -1248,7 +1294,7 @@
\ctikzset{tripoles/fd inst amp/output height/.initial=.5} % Output ports vertical separation
\ctikzset{tripoles/fd inst amp/up pos/.initial=.4} % Top and bottom anchor position
\ctikzset{tripoles/fd inst amp/refv pos/.initial=.7} % Top and bottom voltage reference position
-\ctikzset{tripoles/fd inst amp/font/.initial= \fontsize{10}{0}\selectfont\boldmath} % Absolute font size needed!
+\ctikzset{tripoles/fd inst amp/font/.initial=\pgf at circ@font at tenbm} % Absolute font size needed!
% Instrumentation amplifier with gain resistor terminals
\ctikzset{tripoles/inst amp ra/width/.initial=2.4} % Total width
@@ -1259,7 +1305,7 @@
\ctikzset{tripoles/inst amp ra/up pos/.initial=.4} % Top and bottom anchor position
\ctikzset{tripoles/inst amp ra/refv pos/.initial=.7} % Top and bottom voltage reference position
\ctikzset{tripoles/inst amp ra/ra pos/.initial=.6} % Gain resistor terminals vertical separation
-\ctikzset{tripoles/inst amp ra/font/.initial= \fontsize{10}{0}\selectfont\boldmath} % Absolute font size needed!
+\ctikzset{tripoles/inst amp ra/font/.initial=\pgf at circ@font at tenbm} % Absolute font size needed!
% Plain amplifier
\ctikzset{tripoles/plain amp/width/.initial=1.7} % Total width
@@ -1350,7 +1396,7 @@
% multipoles
%
\ctikzset{multipoles/thickness/.initial=2}
-\ctikzset{multipoles/font/.initial=\tiny}
+\ctikzset{multipoles/font/.initial=\pgf at circ@font at tiny}
% DIP (dual in line package) chips
\ctikzset{multipoles/dipchip/width/.initial=1.2}
\ctikzset{multipoles/dipchip/num pins/.initial=8}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -386,7 +386,7 @@
\pgfusepath{draw}
\pgfsetlinewidth{\pgfstartlinewidth}
- \pgftext[top,x=.85\pgf at circ@res at left,y=.75\pgf at circ@res at down]{\tiny$\vartheta$}
+ \pgftext[top,x=.85\pgf at circ@res at left,y=.75\pgf at circ@res at down]{\pgf at circ@font at tiny$\vartheta$}
\pgfsetarrowsend{latexslim}
\pgfpathmoveto{\pgfpoint{.62\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{.62\pgf at circ@res at left}{.7\pgf at circ@res at down}}
@@ -416,7 +416,7 @@
\pgfusepath{draw}
\pgfsetlinewidth{\pgfstartlinewidth}
- \pgftext[top,x=.85\pgf at circ@res at left,y=.75\pgf at circ@res at down]{\tiny$\vartheta$}
+ \pgftext[top,x=.85\pgf at circ@res at left,y=.75\pgf at circ@res at down]{\pgf at circ@font at tiny$\vartheta$}
\pgfsetarrowsend{latexslim}
\pgfpathmoveto{\pgfpoint{.62\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{.62\pgf at circ@res at left}{.7\pgf at circ@res at down}}
@@ -427,11 +427,17 @@
}
%% Generic tunable
-\pgfcircdeclarebipolescaled{resistors}{
- \anchor{wiper}{
- \northeast
- \pgfpoint{0pt}{\pgf at y}
- }
+\pgfcircdeclarebipolescaled{resistors}
+{
+ \savedanchor{\wiper}{
+ \pgf at circ@scaled at Rlen=\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen
+ \pgf at ya=\ctikzvalof{bipoles/generic potentiometer/height}\pgf at circ@scaled at Rlen
+ \pgf at y=.5\pgf at ya
+ \pgf at xa=\ctikzvalof{bipoles/generic potentiometer/width}\pgf at circ@scaled at Rlen
+ \pgfmathsetlength{\pgf at x}{(\ctikzvalof{bipoles/generic potentiometer/wiper pos}-0.5)*\pgf at xa}
+ }
+ \anchor{wiper}{\wiper}
+ \anchor{W}{\wiper}
}
{\ctikzvalof{bipoles/generic potentiometer/height 2}}
{genericpotentiometer}
@@ -450,8 +456,9 @@
\pgfscope
%\pgfsetlinewidth{\pgfstartlinewidth}
\pgfsetarrowsend{latexslim}
- \pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+ \pgfextractx{\pgf at circ@res at other}{\wiper}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
\pgfusepath{draw}
\endpgfscope
}
@@ -526,12 +533,20 @@
%% Potentiometer
\pgfcircdeclarebipolescaled{resistors}
{
- \anchor{wiper}{\northeast\pgfpoint{0pt}{\pgf at y}}
- \anchor{W}{\northeast\pgfpoint{0pt}{\pgf at y}}
+ \savedanchor{\wiper}{
+ \pgf at circ@scaled at Rlen=\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen
+ \pgf at ya=\ctikzvalof{bipoles/potentiometer/height}\pgf at circ@scaled at Rlen
+ \pgf at y=.5\pgf at ya
+ \pgf at xa=\ctikzvalof{bipoles/potentiometer/width}\pgf at circ@scaled at Rlen
+ \pgfmathsetlength{\pgf at x}{(\ctikzvalof{bipoles/potentiometer/wiper pos}-0.5)*\pgf at xa}
+ }
+ \anchor{wiper}{\wiper}
+ \anchor{W}{\wiper}
\savedmacro{\zigs}{\edef\zigs{\ctikzvalof{resistors/zigs}}}
}
{\ctikzvalof{bipoles/potentiometer/height 2}}
-{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}
+{potentiometer}
+{\ctikzvalof{bipoles/potentiometer/height}}
{\ctikzvalof{bipoles/potentiometer/width}}
{
\pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
@@ -542,8 +557,9 @@
\pgfscope
%\pgfsetlinewidth{\pgfstartlinewidth}
\pgfsetarrowsend{latexslim}
- \pgfpathmoveto{\pgfpoint{0pt}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{0pt}{-\pgf at circ@res at down}}
+ \pgfextractx{\pgf at circ@res at other}{\wiper}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{-\pgf at circ@res at down}}
\pgfusepath{draw}
\endpgfscope
}
@@ -619,7 +635,7 @@
\endpgfscope
}
-%% Polar Capacitor
+%% Polar Capacitor (DEPRECATED)
\pgfcircdeclarebipolescaled{capacitors}
{}
{\ctikzvalof{bipoles/pcapacitor/height}}
@@ -640,9 +656,38 @@
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
\pgfusepath{draw}
+}
+
+%% Curved capacitor
+% see https://tex.stackexchange.com/questions/509594/polar-capacitor-orientation-in-circuitikz-seems-wrong
+% for a rationale
+%
+\pgfcircdeclarebipolescaled{capacitors}
+{}
+{\ctikzvalof{bipoles/ccapacitor/height}}
+{ccapacitor}
+{\ctikzvalof{bipoles/ccapacitor/height}}
+{\ctikzvalof{bipoles/ccapacitor/width}}
+{
+ \pgf at circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right+ \ctikzvalof{bipoles/ccapacitor/bend width}\pgf at circ@res at right}{\pgf at circ@res at up}}
+ \pgftransformrotate{-90}
+ \pgfpathsine{\pgfpoint{\pgf at circ@res at up}{-\ctikzvalof{bipoles/ccapacitor/bend width}\pgf at circ@res at right}}
+ \pgfpathcosine{\pgfpoint{\pgf at circ@res at up}{\ctikzvalof{bipoles/ccapacitor/bend width}\pgf at circ@res at right}}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfusepath{draw}
}
+
+
+
%% Electrolytic Capacitor
\pgfcircdeclarebipolescaled{capacitors}
{}
@@ -666,9 +711,9 @@
\pgfpathlineto{\pgfpoint{.4\pgf at circ@res at right}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- \pgfsetfillcolor{black}
+ \pgfsetfillcolor{\ctikzvalof{color}}
\pgfusepath{draw,fill}
- \pgfsetfillcolor{black}
+ \pgfsetfillcolor{\ctikzvalof{color}}
% % plus pole annotation
\pgftext[right,at=\pgfpoint{1.2\pgf at circ@res at left}{.6\pgf at circ@res at up}]
{\ctikzvalof{bipoles/ecapacitor/font} $+$}
@@ -746,7 +791,18 @@
%% cute inductor
\pgfcircdeclarebipolescaled{inductors}
-{}
+{
+ \savedanchor{\midtap}{%
+ \pgf at x=0pt\relax
+ \pgfmathsetlength{\pgf at y}{%
+ (mod(\ctikzvalof{bipoles/cuteinductor/coils},2) ?%
+ \ctikzvalof{bipoles/cuteinductor/height} :% even
+ -\ctikzvalof{bipoles/cuteinductor/lower coil height}) %odd
+ *\pgf at circ@scaled at Rlen/2
+ }
+ }
+ \anchor{midtap}{\midtap}
+}
{\ctikzvalof{bipoles/cuteinductor/lower coil height}}
{cuteinductor}
{\ctikzvalof{bipoles/cuteinductor/height}}
@@ -778,6 +834,16 @@
\pgfcircdeclarebipolescaled{inductors}
{% anchor for labelling the type of dependency
\anchor{label}{\southwest\pgf at x=0.8\pgf at x\pgf at y=2.6\pgf at y}%
+ \savedanchor{\midtap}{%
+ \pgf at x=0pt\relax
+ \pgfmathsetlength{\pgf at y}{%
+ (mod(\ctikzvalof{bipoles/cuteinductor/coils},2) ?%
+ \ctikzvalof{bipoles/cuteinductor/height} :% even
+ -\ctikzvalof{bipoles/cuteinductor/lower coil height}) %odd
+ *\pgf at circ@scaled at Rlen/2
+ }
+ }
+ \anchor{midtap}{\midtap}
}
{\ctikzvalof{bipoles/cuteinductor/lower coil height}}
{scuteinductor}
@@ -814,7 +880,18 @@
%% cute choke
\pgfcircdeclarebipolescaled{inductors}
-{}
+{
+ \savedanchor{\midtap}{%
+ \pgf at x=0pt\relax
+ \pgfmathsetlength{\pgf at y}{%
+ (mod(\ctikzvalof{bipoles/cuteinductor/coils},2) ?%
+ \ctikzvalof{bipoles/cuteinductor/height} :% even
+ -\ctikzvalof{bipoles/cuteinductor/lower coil height}) %odd
+ *\pgf at circ@scaled at Rlen/2
+ }
+ }
+ \anchor{midtap}{\midtap}
+}
{\ctikzvalof{bipoles/cutechoke/lower coil height}}
{cutechoke}
{\ctikzvalof{bipoles/cutechoke/height}}
@@ -858,7 +935,18 @@
%% variable cute inductor
\pgfcircdeclarebipolescaled{inductors}
-{}
+{
+ \savedanchor{\midtap}{%
+ \pgf at x=0pt\relax
+ \pgfmathsetlength{\pgf at y}{%
+ (mod(\ctikzvalof{bipoles/cuteinductor/coils},2) ?%
+ \ctikzvalof{bipoles/cuteinductor/height} :% even
+ -\ctikzvalof{bipoles/cuteinductor/lower coil height}) %odd
+ *\pgf at circ@scaled at Rlen/2
+ }
+ }
+ \anchor{midtap}{\midtap}
+}
{\ctikzvalof{bipoles/vcuteinductor/lower coil height}}
{vcuteinductor}
{\ctikzvalof{bipoles/vcuteinductor/height}}
@@ -895,7 +983,18 @@
%% american inductor
\pgfcircdeclarebipolescaled{inductors}
-{}
+{
+ \savedanchor{\midtap}{%
+ \pgf at x=0pt\relax
+ \pgfmathsetlength{\pgf at y}{%
+ (mod(\ctikzvalof{bipoles/americaninductor/coils},2) ?%
+ 2*\ctikzvalof{bipoles/americaninductor/coil height} :% even
+ 0) %odd
+ *\pgf at circ@scaled at Rlen/2
+ }
+ }
+ \anchor{midtap}{\midtap}
+}
{\ctikzvalof{bipoles/americaninductor/height 2}}
{americaninductor}
{\ctikzvalof{bipoles/americaninductor/height}}
@@ -924,6 +1023,16 @@
\pgfcircdeclarebipolescaled{inductors}
{% anchor for labelling the type of dependency
\anchor{label}{\southwest\pgf at x=0.8\pgf at x\pgf at y=2.6\pgf at y}%
+ \savedanchor{\midtap}{%
+ \pgf at x=0pt\relax
+ \pgfmathsetlength{\pgf at y}{%
+ (mod(\ctikzvalof{bipoles/americaninductor/coils},2) ?%
+ 2*\ctikzvalof{bipoles/americaninductor/coil height} :% even
+ 0) %odd
+ *\pgf at circ@scaled at Rlen/2
+ }
+ }
+ \anchor{midtap}{\midtap}
}
{\ctikzvalof{bipoles/americaninductor/height 2}}
{samericaninductor}
@@ -956,7 +1065,18 @@
%% variable american inductor
\pgfcircdeclarebipolescaled{inductors}
-{}
+{
+ \savedanchor{\midtap}{%
+ \pgf at x=0pt\relax
+ \pgfmathsetlength{\pgf at y}{%
+ (mod(\ctikzvalof{bipoles/vamericaninductor/coils},2) ?%
+ 2*\ctikzvalof{bipoles/vamericaninductor/coil height} :% even
+ 0) %odd
+ *\pgf at circ@scaled at Rlen/2
+ }
+ }
+ \anchor{midtap}{\midtap}
+}
{\ctikzvalof{bipoles/vamericaninductor/height 2}}
{vamericaninductor}
{\ctikzvalof{bipoles/vamericaninductor/height}}
@@ -989,7 +1109,9 @@
%% Generic bipole, filled - used as inductor by some
\pgfcircdeclarebipolescaled{inductors}
-{}
+{
+ \anchor{midtap}{\northeast\pgf at x=0pt\relax}
+}
{\ctikzvalof{bipoles/fullgeneric/height}}
{fullgeneric}
{\ctikzvalof{bipoles/fullgeneric/height}}
@@ -1005,6 +1127,7 @@
\pgfcircdeclarebipolescaled{inductors}
{% anchor for labelling the type of dependency
\anchor{label}{\southwest\pgf at x=0.4\pgf at x\pgf at y=2\pgf at y}%
+ \anchor{midtap}{\northeast\pgf at x=0pt\relax}
}
{\ctikzvalof{bipoles/fullgeneric/height}}
{sfullgeneric}
@@ -1025,7 +1148,9 @@
%% Generic full tunable
\pgfcircdeclarebipolescaled{inductors}
-{}
+{
+ \anchor{midtap}{\northeast\pgf at x=0pt\relax}
+}
{\ctikzvalof{bipoles/tfullgeneric/height}}
{tfullgeneric}
{\ctikzvalof{bipoles/tfullgeneric/height}}
@@ -2815,7 +2940,7 @@
{\ctikzvalof{bipoles/ammeter/width}}
{
\drawmeteringcircle
- \pgfnode{circle}{center}{\textbf{A}}{}{}
+ \pgfnode{circle}{center}{\pgf at circ@font at bold{A}}{}{}
}
%OHMMETER
\pgfcircdeclarebipolescaled{instruments}
@@ -2837,7 +2962,7 @@
{\ctikzvalof{bipoles/voltmeter/width}}
{
\drawmeteringcircle
- \pgfnode{circle}{center}{\textbf{V}}{}{}
+ \pgfnode{circle}{center}{\pgf at circ@font at bold{V}}{}{}
}
@@ -3276,7 +3401,7 @@
\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfusepath{draw}
- \pgftext[top,x=.65\pgf at circ@res at left,y=1.2\pgf at circ@res at down]{{\tiny\textsf{U}}}
+ \pgftext[top,x=.65\pgf at circ@res at left,y=1.2\pgf at circ@res at down]{{\pgf at circ@font at tiny\textsf{U}}}
}
%%%%%%%%%%%%%%
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -10,6 +10,15 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Current handling
+%% styles
+\ctikzset{bipole current style/.style={}}
+\tikzset{bipole current style/.code={
+ \ctikzset{bipole current style/.style={#1}}
+}}
+\tikzset{bipole current append style/.code={
+ \ctikzset{bipole current style/.append style={#1}}
+}}
+
%% Options
\ctikzset{i^>/.style = {
i = #1,
@@ -192,7 +201,9 @@
}
\fi
coordinate[currarrow,pos=\ctikzvalof{current/distance},rotate=\pgf at circ@ffffff](Iarrow)
- (Iarrow.\pgf at circ@bipole at current@label at where) node[anchor=\pgf at circ@dir]{\pgf at circ@finallabels{current/label}}
+ (Iarrow.\pgf at circ@bipole at current@label at where)
+ node[anchor=\pgf at circ@dir, \circuitikzbasekey/bipole current style]
+ (\ctikzvalof{bipole/name}current){\pgf at circ@finallabels{current/label}}
}
\endinput
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -10,6 +10,15 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% flow handling
+%% styles
+\ctikzset{bipole flow style/.style={}}
+\tikzset{bipole flow style/.code={
+ \ctikzset{bipole flow style/.style={#1}}
+}}
+\tikzset{bipole flow append style/.code={
+ \ctikzset{bipole flow style/.append style={#1}}
+}}
+
%% Options
\ctikzset{f^>/.style = {
f = #1,
@@ -187,7 +196,8 @@
\fi
}
coordinate[flowarrow,pos=\ctikzvalof{flow/distance},rotate=\pgf at circ@ffffff,yshift=\flow at offset](Farrowpos)
- (Farrowpos.\pgf at circ@bipole at flow@label at where) node[anchor=\pgf at circ@dir]{ \pgf at circ@finallabels{flow/label}}
+ (Farrowpos.\pgf at circ@bipole at flow@label at where) node[anchor=\pgf at circ@dir, \circuitikzbasekey/bipole flow style]
+ (\ctikzvalof{bipole/name}flow){\pgf at circ@finallabels{flow/label}}
}
\endinput
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -10,6 +10,23 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bipole label positioning
+%% bipole labels and annotation extra style
+
+\ctikzset{bipole label style/.style={}}
+\tikzset{bipole label style/.code={
+ \ctikzset{bipole label style/.style={#1}}
+}}
+\tikzset{bipole label append style/.code={
+ \ctikzset{bipole label style/.append style={#1}}
+}}
+\ctikzset{bipole annotation style/.style={}}
+\tikzset{bipole annotation style/.code={
+ \ctikzset{bipole annotation style/.style={#1}}
+}}
+\tikzset{bipole annotation append style/.code={
+ \ctikzset{bipole annotation style/.append style={#1}}
+}}
+
%% Options
\ctikzset{label/.style = { l=#1 } }
\ctikzset{l/.code = {
@@ -188,7 +205,8 @@
}
% reset cm is not working correctly here
(labelcoor)++(\pgf at circ@labposangle:\the\pgf at circ@res at temp) coordinate(labelcoor)
- node[anchor=mid, rotate=\pgfcirclabrot](\ctikzvalof{bipole/name}#1){\pgf at circ@finallabels{#1}}
+ node[anchor=mid, rotate=\pgfcirclabrot, \circuitikzbasekey/bipole #1 style]
+ (\ctikzvalof{bipole/name}#1){\pgf at circ@finallabels{#1}}
}
\def\pgf at circ@drawreglabels#1{
@@ -257,7 +275,7 @@
\fi
\fi\fi
(labelcoor) node[anchor=\pgf at circ@labanctext,
- inner sep=0.5\pgf at circ@res at temp, outer sep=0pt,
+ inner sep=0.5\pgf at circ@res at temp, outer sep=0pt, \circuitikzbasekey/bipole #1 style,
](\ctikzvalof{bipole/name}#1){\strut\pgf at circ@finallabels{#1}%
}
}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -200,7 +200,9 @@
\def\pgf at circ@capacitor at path#1{\pgf at circ@bipole at path{capacitor}{#1}}
\def\pgf at circ@capacitivesens at path#1{\pgf at circ@bipole at path{capacitivesens}{#1}}
\def\pgf at circ@ecapacitor at path#1{\pgf at circ@bipole at path{ecapacitor}{#1}}
+%% polar capacitor is deprectaed, use curved capacitor instead
\def\pgf at circ@polarcapacitor at path#1{\pgf at circ@bipole at path{polarcapacitor}{#1}}
+\def\pgf at circ@ccapacitor at path#1{\pgf at circ@bipole at path{ccapacitor}{#1}}
\def\pgf at circ@vcapacitor at path#1{\pgf at circ@bipole at path{vcapacitor}{#1}}
\def\pgf at circ@piezoelectric at path#1{\pgf at circ@bipole at path{piezoelectric}{#1}}
\def\pgf at circ@battery at path#1{\pgf at circ@bipole at path{battery}{#1}}
@@ -379,7 +381,9 @@
\compattikzset{capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@capacitor at path, l=#1}}
\compattikzset{elko/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ecapacitor at path, l=#1}}
\compattikzset{ecapacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ecapacitor at path, l=#1}}
+% polar capacitor is deprecated, use curved capacitor instead
\compattikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@polarcapacitor at path, l=#1}}
+\compattikzset{curved capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@ccapacitor at path, l=#1}}
\compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@vcapacitor at path, l=#1}}
\compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@piezoelectric at path, l=#1}}
\compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf at circ@battery at path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
@@ -664,7 +668,9 @@
\compattikzset{pR/.style= {\comnpatname potentiometer = #1}}
\compattikzset{C/.style = {\comnpatname capacitor = #1}}
\compattikzset{eC/.style = {\comnpatname ecapacitor = #1}}
+%% pC is deprecated, use cC instead
\compattikzset{pC/.style = {\comnpatname polar capacitor = #1}}
+\compattikzset{cC/.style = {\comnpatname curved capacitor = #1}}
\compattikzset{vC/.style = {\comnpatname variable capacitor = #1}}
\compattikzset{PZ/.style = {\comnpatname piezoelectric = #1}}
\compattikzset{L/.style = {\comnpatname inductor = #1}}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -15,6 +15,8 @@
{
\savedmacro{\ctikzclass}{\edef\ctikzclass{inductors}}
\saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf at x}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}}
+ % shapename
+ \savedmacro{\thisshape}{\def\thisshape{\tikz at fig@name}}
\anchor{center}{
\northwest
\pgf at x=0pt
@@ -195,13 +197,13 @@
\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
\def\pgf at temp{european}%
\ifx\pgf at temp\pgf at circ@temp%
- \pgfnode{fullgenericshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+ \pgfnode{fullgenericshape}{center}{}{\thisshape-L1}{\pgfusepath{stroke}}
\else%
\def\pgf at temp{cute}
\ifx\pgf at temp\pgf at circ@temp%
- \pgfnode{cuteinductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+ \pgfnode{cuteinductorshape}{center}{}{\thisshape-L1}{\pgfusepath{stroke}}
\else%
- \pgfnode{americaninductorshape}{center}{}{pgf at inductor1}{\pgfusepath{stroke}}
+ \pgfnode{americaninductorshape}{center}{}{\thisshape-L1}{\pgfusepath{stroke}}
\fi%
\fi%
@@ -223,13 +225,13 @@
\edef\pgf at circ@temp{\ctikzvalof{inductor}}%
\def\pgf at temp{european}%
\ifx\pgf at temp\pgf at circ@temp%
- \pgfnode{fullgenericshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+ \pgfnode{fullgenericshape}{center}{}{\thisshape-L2}{\pgfusepath{stroke}}
\else%
\def\pgf at temp{cute}
\ifx\pgf at temp\pgf at circ@temp%
- \pgfnode{cuteinductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+ \pgfnode{cuteinductorshape}{center}{}{\thisshape-L2}{\pgfusepath{stroke}}
\else%
- \pgfnode{americaninductorshape}{center}{}{pgf at inductor2}{\pgfusepath{stroke}}
+ \pgfnode{americaninductorshape}{center}{}{\thisshape-L2}{\pgfusepath{stroke}}
\fi%
\fi%
@@ -237,17 +239,17 @@
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpointanchor{pgf at inductor1}{b}}
+ \pgfpathlineto{\pgfpointanchor{\thisshape-L1}{b}}
- \pgfpathmoveto{\pgfpointanchor{pgf at inductor1}{a}}
+ \pgfpathmoveto{\pgfpointanchor{\thisshape-L1}{a}}
\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpointanchor{pgf at inductor2}{a}}
+ \pgfpathlineto{\pgfpointanchor{\thisshape-L2}{a}}
- \pgfpathmoveto{\pgfpointanchor{pgf at inductor2}{b}}
+ \pgfpathmoveto{\pgfpointanchor{\thisshape-L2}{b}}
\pgfpathlineto{\pgfpoint{\stretto\pgf at circ@res at right}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -4066,7 +4066,7 @@
\pgfseteorule
\pgfusepath{clip}
\pgfpathrectangle{\pgfpoint{-.25\pgf at circ@res at step}{-.5\pgf at circ@res at up}}{\pgfpoint{.5\pgf at circ@res at step}{\pgf at circ@res at up}}
- \pgfsetfillcolor{black}
+ \pgfsetfillcolor{\ctikzvalof{color}}
\pgfusepath{fill, draw}
\endpgfscope
\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf at circ@res at step}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex 2019-10-12 22:06:25 UTC (rev 52354)
@@ -10,6 +10,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Voltage management
+%% styles
+\ctikzset{bipole voltage style/.style={}}
+\tikzset{bipole voltage style/.code={
+ \ctikzset{bipole voltage style/.style={#1}}
+}}
+\tikzset{bipole voltage append style/.code={
+ \ctikzset{bipole voltage style/.append style={#1}}
+}}
\ctikzset{v^>/.style = {
v = #1,
@@ -94,8 +102,6 @@
\def\pgf at circ@avfont{\ctikzvalof{voltage/american font}}
%
% plus and minus symbols (default is $+$ and $-$, see pgfcirc.defines.tex)
-% notice that the double braces are needed to be able
-% to use \boldmath in the font (although it is semi-deprecated...)
%
\def\pgf at circ@avplus{\ctikzvalof{voltage/american plus}}
\def\pgf at circ@avminus{\ctikzvalof{voltage/american minus}}
@@ -457,8 +463,9 @@
\ifpgf at circuit@bipole at voltage@straight
coordinate (Vlab) at ($(pgfcirc at Vto)!0.5!(pgfcirc at Vfrom) $)
- node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=2pt]
- at (Vlab) { \pgf at circ@finallabels{voltage/label} }
+ node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=2pt,
+ \circuitikzbasekey/bipole voltage style](\ctikzvalof{bipole/name}voltage)
+ at (Vlab) {\pgf at circ@finallabels{voltage/label}}
\else
\ifpgf at circuit@europeanvoltage
coordinate (Vlab) at ($(pgfcirc at Vcont1)!0.5!(pgfcirc at Vcont2)$)
@@ -470,7 +477,9 @@
coordinate (Vlab) at ($(Vlab) ! \alshift ! \pgf at circ@bipole at voltage@label at where :(pgfcirc at Vto)$)
\fi
\fi
- node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=2pt] at (Vlab) { \pgf at circ@finallabels{voltage/label} }
+ node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=2pt,
+ \circuitikzbasekey/bipole voltage style](\ctikzvalof{bipole/name}voltage)
+ at (Vlab) {\pgf at circ@finallabels{voltage/label}}
\fi
}%end drawvoltages
\endinput
Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2019-10-12 22:06:08 UTC (rev 52353)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2019-10-12 22:06:25 UTC (rev 52354)
@@ -9,8 +9,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{0.9.4}
-\def\pgfcircversiondate{2019/08/30}
+\def\pgfcircversion{0.9.5}
+\def\pgfcircversiondate{2019/10/12}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
More information about the tex-live-commits
mailing list