From 3231314ec3d2c2b3a225ad8511383f1a77287180 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 18 May 2020 20:40:09 +0000 Subject: circuitikz (18may20) git-svn-id: svn://tug.org/texlive/trunk@55203 c570f23f-e606-0410-a88d-b1316a301751 --- .../third/circuitikz/circuitikz-context.pdf | Bin 17750 -> 17750 bytes .../texmf-dist/doc/generic/circuitikz/CHANGELOG.md | 7 + .../texmf-dist/doc/latex/circuitikz/changelog.tex | 18 + .../doc/latex/circuitikz/circuitikzmanual.pdf | Bin 956271 -> 978781 bytes .../doc/latex/circuitikz/circuitikzmanual.tex | 183 +++++- .../tex/context/third/circuitikz/t-circuitikz.tex | 4 +- .../tex/generic/circuitikz/pgfcirc.defines.tex | 113 +++- .../tex/generic/circuitikz/pgfcircbipoles.tex | 709 +++++++++++++++++++++ .../tex/generic/circuitikz/pgfcircmultipoles.tex | 1 + .../tex/generic/circuitikz/pgfcircpath.tex | 17 + .../tex/generic/circuitikz/pgfcircquadpoles.tex | 136 ++++ .../tex/generic/circuitikz/pgfcirctripoles.tex | 8 +- .../tex/generic/circuitikz/pgfcircvoltage.tex | 108 +++- .../texmf-dist/tex/latex/circuitikz/circuitikz.sty | 4 +- 14 files changed, 1242 insertions(+), 66 deletions(-) diff --git a/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf b/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf index 5b6ec02842b..c551b09b497 100644 Binary files a/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf and b/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf differ diff --git a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md index eb20c746f25..969f9946515 100644 --- a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md +++ b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md @@ -1,6 +1,13 @@ The major changes among the different circuitikz versions are listed here. See for a full list of changes. +* Version 1.1.2 (2020-05-17) + + - Blocks and component for three-phase networks (3-lines wire, AC/DC and DC/AC converters blocks and grid node block) added by user `@olfline` on GitHub + - added transformer sources with optional vector groups for three-phase networks by `@olfline` on Github + - added subsections to the examples + - fixed position of american voltages on open circuits (suggested by user `@rhandley` on GitHub) + * Version 1.1.1 (2020-04-24) One-line bugfix release for the IEEE ports "not" circle thickness diff --git a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex index 3296640b07b..5a06b7c0cce 100644 --- a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex +++ b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex @@ -4,6 +4,24 @@ here. See \url{https://github.com/circuitikz/circuitikz/commits} for a full list of changes. \begin{itemize} +\item + Version 1.1.2 (2020-05-17) + + \begin{itemize} + \tightlist + \item + Blocks and component for three-phase networks (3-lines wire, AC/DC + and DC/AC converters blocks and grid node block) added by user + \texttt{@olfline} on GitHub + \item + added transformer sources with optional vector groups for + three-phase networks by \texttt{@olfline} on Github + \item + added subsections to the examples + \item + fixed position of american voltages on open circuits (suggested by + user \texttt{@rhandley} on GitHub) + \end{itemize} \item Version 1.1.1 (2020-04-24) diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf index cba2665751d..62be3797649 100644 Binary files a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf and b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf differ diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex index f5fd98ad7a1..fdf6d43878e 100644 --- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex +++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex @@ -280,6 +280,7 @@ They \texttt{use fpu reciprocal} key seems to have no side effects, but given th Here, we will provide a list of incompabilitys between different version of circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than including a lot of switches and compatibility layers. You can check the used version at your local installation using the macro \verb!\pgfcircversion{}!. \begin{itemize} + \item After v1.1.2: the position of \texttt{american} voltages for the \texttt{open} bipoles (you can revert to old behavior, see section~\ref{sec:sub-voltage-position}). \item After v0.9.7: the position of the text of transistor nodes has changed; see section~\ref{sec:transistors-labels}. \item After v0.9.4: added the concept of styling of circuits. It should be backward compatible, but it's a big change, so be ready to use the \texttt{0.9.3} snapshot (see below for details). \item After v0.9.0: the parameters \texttt{tripoles/american or port/aaa}, \texttt{...bbb}, \texttt{...ccc} and \texttt{...ddd} are no longer used and are silently ignored; the same stands for \texttt{nor}, \texttt{xor}, and \texttt{xnor} ports. @@ -287,7 +288,7 @@ You can check the used version at your local installation using the macro \verb! \item Since v0.8.2: voltage and current label directions (\texttt{v<=} / \texttt{i<=}) do NOT change the orientation of the drawn source shape anymore. Use the \texttt{invert} option to rotate the shape of the source. Furthermore, from this version on, the current label (\texttt{i=}) at current sources can be used independent of the regular label (\texttt{l=}). \item Since v0.7?: The label behaviour at mirrored bipoles has changes, this fixes the voltage drawing, but perhaps you have to adjust your label positions. \item Since v0.5.1: The parts pfet, pigfete, pigfetebulk and pigfetd are now mirrored by default. Please adjust your yscale-option to correct this. - \item Since v0.5: New voltage counting direction, here exists an option to use the old behaviour + \item Since v0.5: New voltage counting direction, there exists an option to use the old behaviour. \end{itemize} If you have older projects that show compatibility problems, you have two options: @@ -1726,8 +1727,20 @@ Notice that if you choose the dashed style, the noise sources are fillable: \circuitdescbip*{pvsource}{Photovoltaic-voltage source}{} \circuitdescbip*[oosource]{ioosource}{Double Zero style current source}{} \circuitdescbip*[oosource]{voosource}{Double Zero style voltage source}{} + \circuitdescbip*[oosourcetrans]{oosourcetrans}{transformer source}{} + \circuitdescbip*[ooosource]{ooosource}{transformer with three windings}{}(left/175/0.2, right/5/0.5, prim1/130/.2, prim2/-130/.2, sec1/45/.2, sec2/60/.2, sec3/90/.2, tert1/0/.2, tert2/-45/.2, tert3/-90/.2) \end{groupdesc} +The transformershapes vector group options can be specified for the primary (prim$=$), the secondary (sec$=$) and tertiary (tert$=$) three-phase vector groups: \textbf{delta}, \textbf{wye} and \textbf{zig}. + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz} + \draw (0,0) to[oosourcetrans,prim=zig,sec=delta,o-] ++(2,0) + to[oosourcetrans, prim=delta, sec=wye,-o] ++(0,-2) + to[ooosource, prim=wye,sec=zig,tert=delta] (0,0); +\end{circuitikz} +\end{LTXexample} + \subsubsection{DC sources} \begin{groupdesc} \circuitdescbip*{dcvsource}{DC voltage source}{} @@ -2049,12 +2062,15 @@ This are simple drawings to indicate multiple wires. \begin{groupdesc} \circuitdescbip{multiwire}{Single line multiple wires}{multiwire} \circuitdescbip{bmultiwire}{Double line multiple wires}{bmultiwire} +\circuitdescbip{tmultiwire}{Triple line multiple wires\footnotemark}{tmultiwire} +\footnotetext{added by \texttt{olfline}} \end{groupdesc} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[multiwire=4] ++(1,0); \draw (0,-2) to[bmultiwire=6] ++(1,0); + \draw (0,-4) to[tmultiwire=3] ++(1,0); \end{circuitikz} \end{LTXexample} @@ -2209,6 +2225,8 @@ It also has a \texttt{zero} anchor if you need to rotate it about its real cente \circuitdesc*{oscillator}{oscillator}{} \circuitdesc*{circulator}{circulator}{} \circuitdesc*{wilkinson}{wilkinson divider}{}( in/180/0.1, out2/45/0.1, out1/-45/0.1 ) + \circuitdesc*{gridnode}{gridnode\footnotemark}{}(left/135/0.2, right/45/0.2, center/-100/0.4, up/90/0.2, down/-45/.2) + \footnotetext{added by \texttt{olfline}} \end{groupdesc} \begin{groupdesc} @@ -2232,6 +2250,11 @@ It also has a \texttt{zero} anchor if you need to rotate it about its real cente \circuitdescbip*{phaseshifter}{phase shifter}{} \circuitdescbip*{vphaseshifter}{var.\ phase shifter}{} \circuitdescbip*{detector}{detector}{} + \circuitdescbip*{sacdc}{sacdc}{} + \circuitdescbip*{sdcac}{sdcac}{} + \circuitdescbip*{tacdc}{tacdc}{} + \circuitdescbip*{tdcac}{tdcac\footnotemark}{}(left/170/0.5, right/5/0.5, center/-90/0.3, ac1/45/0.1, ac2/-5/.3, ac3/-45/.1, dc1/135/.3, dc2/185/.3) + \footnotetext{the 4 converter blocks added by \texttt{olfline}} \end{groupdesc} \begin{groupdesc} @@ -3437,7 +3460,7 @@ If you want different symbols for input and output you can use a null symbol and \end{LTXexample} The amplifier label (given as the text of the node) is normally more or less centered in the shape (in the case of the triangular shape, it is shifted a bit to the left to \emph{seem} visually centered); since version \texttt{1.1.0} you can move it at the left side plus a fixed offset setting the key \texttt{component text} or the style with the same name to \texttt{left}; by default the key is \texttt{center}. -You can change the offset with the key \texttt{left text distance} (default \texttt{0.3em}; you must use a length here). +You can change the offset with the key \texttt{left text distance} (default \texttt{0.3em}; you must use a length here). These parameters are shared with IEEE-style logic ports. \begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily] \begin{circuitikz}[] @@ -4218,7 +4241,7 @@ You can use the additional elements (the \texttt{notcirc} and the \texttt{schmit \end{circuitikz} \end{LTXexample} -Notice the key \texttt{component text=left} that moves the label near to the left border of the component. There is also a \verb|\ctikzset{component text=left}| if you prefer to have it as a default for all the IEEE ports.\footnote{There is a plan to extend this to other components, too.} +Notice the key \texttt{component text=left} that moves the label near to the left border of the component. There is also a \verb|\ctikzset{component text=left}| if you prefer to have it as a default for all the IEEE ports.\footnote{You can use the same key with amplifiers, too.} \paragraph{Stacking and aligning IEEE standard gates.} The standard gates are designed so that they stacks up nicely when positioned using the external leads as anchors. Notice that the ports \textbf{do} have different sizes, but the leads lengths are designed to counter the differences. @@ -4352,7 +4375,8 @@ Most of the anchors can be seen in the following diagram: } \end{circuitikz} -The inputs anchor are \texttt{in \emph{number}} (on the tip of the lead) and \texttt{bin \emph{number}} (\textbf{b}order \textbf{in}puts) on the component's border (useful if you draw the ports with \texttt{no inut leads}. Additionally, you have \texttt{ibin \emph{number}} (\textbf{i}nner \textbf{b}order \textbf{in}puts) for the \emph{x}-type ports. The anchor named \texttt{left} is where a central border input would be. +The inputs anchor are \texttt{in \emph{number}} (on the tip of the lead) and \texttt{bin \emph{number}} (\textbf{b}order \textbf{in}puts) on the component's border (useful if you draw the ports with \texttt{no inut leads}). +Additionally, you have \texttt{ibin \emph{number}} (\textbf{i}nner \textbf{b}order \textbf{in}puts) for the \emph{x}-type ports. The anchor named \texttt{left} is where a central border input would be. In one-input ports (\texttt{not port}, the buffer, and Schmitt-type ports) you can use plain \texttt{in} or \texttt{in 1} indifferently. @@ -5373,9 +5397,9 @@ As an alternative for the current arrows, you can also use the following flows. \end{LTXexample} \subsection{Voltages} -See introduction note at Currents (chapter \ref{curr-and-volt}, page \pageref{curr-and-volt})! +See introduction note at Currents and Voltages (chapter \ref{curr-and-volt}, page \pageref{curr-and-volt}) for the direction of the voltage and currents. -\subsubsection{European style} The default, with arrows. Use option \texttt{europeanvoltage} or style \verb![european voltages]!. +\subsubsection{European style} The default, with arrows. Use option \texttt{europeanvoltage} or style \verb![european voltages]!, or setting (even locally) \texttt{voltage=european}. \begin{LTXexample}[varwidth=true] \begin{circuitikz}[european voltages] @@ -5443,11 +5467,77 @@ See introduction note at Currents (chapter \ref{curr-and-volt}, page \pageref{cu \end{circuitikz} \end{LTXexample} +\subsubsection{Straight European style} Using straight arrows. Use option \texttt{straightvoltages} or style \verb![straight voltages]!, or setting (even locally) \texttt{voltage=straight}. Notice that this is an only lightly tested option, so use with care. + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[R, v^>=$v_1$] (2,0); +\end{circuitikz} +\end{LTXexample} + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[R, v^<=$v_1$] (2,0); +\end{circuitikz} +\end{LTXexample} + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[R, v_>=$v_1$] (2,0); +\end{circuitikz} +\end{LTXexample} + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[R, v_<=$v_1$] (2,0); +\end{circuitikz} +\end{LTXexample} + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[V=10V, i_=$i_1$] (2,0); +\end{circuitikz} +\end{LTXexample} +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[V<=10V, i_=$i_1$] (2,0); +\end{circuitikz} +\end{LTXexample} + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[I=1A, v_=$u_1$] (2,0); +\end{circuitikz} +\end{LTXexample} + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[I<=1A, v_=$u_1$] (2,0); +\end{circuitikz} +\end{LTXexample} + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[I=$~$,l=1A, v_=$u_1$] (2,0); +\end{circuitikz} +\end{LTXexample} + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[I,l=1A, v_=$u_1$] (2,0); +\end{circuitikz} +\end{LTXexample} + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[straight voltages] + \draw (0,0) to[battery,l_=1V, v=$u_1$, i=$i_1$] (2,0); +\end{circuitikz} +\end{LTXexample} \subsubsection{American style} -Use option \texttt{americanvoltage} or set \verb![american voltages]!. +Use option \texttt{americanvoltage} or set \verb![american voltages]! or use the option \texttt{voltage=american}. \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american voltages] @@ -5485,7 +5575,7 @@ Use option \texttt{americanvoltage} or set \verb![american voltages]!. \end{circuitikz} \end{LTXexample} -\subsubsection{Voltage position} It is possible to move away the arrows and the plus or minus signs with the key \texttt{voltages shift} (default value is \texttt{0}, which gives the standard position): +\subsubsection{Voltage position}\label{sec:sub-voltage-position} It is possible to move away the arrows and the plus or minus signs with the key \texttt{voltages shift} (default value is \texttt{0}, which gives the standard position): \begin{LTXexample}[varwidth=true] \begin{circuitikz}[] @@ -5503,6 +5593,15 @@ Use option \texttt{americanvoltage} or set \verb![american voltages]!. \end{circuitikz} \end{LTXexample} +You can fine-tune the position of the \texttt{+} and \texttt{-} symbols and the label in independent way using \texttt{voltage/shift} (default \texttt{0.0} for the former and \texttt{voltage/american label distance} (the distance of the label form the lines of the symbols, default \texttt{1.1}) for the latter. + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[american voltages] + \ctikzset{voltage/american label distance=0.2, voltage/shift=2} + \draw (0,0) to[R, v=$v_1$, i=$i_1$] (2,0); +\end{circuitikz} +\end{LTXexample} + Notes that \texttt{american voltage} also affects batteries. \begin{LTXexample}[varwidth=true] @@ -5517,9 +5616,23 @@ Notes that \texttt{american voltage} also affects batteries. \end{circuitikz} \end{LTXexample} +When using \texttt{american} or \texttt{straight} voltage style, the \texttt{open} component is treated differently, and the voltage is placed in the middle of the open space\footnote{Since \texttt{v1.1.2}, thank to an \href{https://github.com/circuitikz/circuitikz/issues/374}{issue opened by user \texttt{rhandley} on GitHub}.}: + +\begin{LTXexample}[varwidth=true] +\begin{circuitikz}[american voltages] + \draw (0,1.5) -- ++(0.5,0) + to[open, v=$v_o$, o-o] ++(2,0) -- ++(0.5,0); + \draw (0,0) -- ++(0.5,0) + to[open, v=$v_o$, voltage=straight, *-*] ++(2,0) + -- ++(0.5,0); +\end{circuitikz} +\end{LTXexample} + +If you want or need to maintain the old behavior for \texttt{open} voltage, you can set the key \texttt{american open voltage} to \texttt{legacy} (the default is the new behavior, which correspond to the value \texttt{center}). + \subsubsection{American voltages customization} -Since 0.9.0, you can change the font\footnote{There where a bug before, noticed by the user \texttt{dzereb} on \href{https://tex.stackexchange.com/questions/487683/odd-minus-style-when-drawing-american-voltage}{tex.stackexchange.com} which made the symbols using different fonts in a basically random way. In the same page, user \texttt{campa} found the problem. Thanks!} used by the \texttt{american voltages} style, by setting to something different from nothing the key \texttt{voltage/american font} (default: nothing, using the current font) style: +Since 0.9.0, you can change the font\footnote{There was a bug before, noticed by the user \texttt{dzereb} on \href{https://tex.stackexchange.com/questions/487683/odd-minus-style-when-drawing-american-voltage}{tex.stackexchange.com} which made the symbols using different fonts in a basically random way. In the same page, user \texttt{campa} found the problem. Thanks!} used by the \texttt{american voltages} style, by setting to something different from nothing the key \texttt{voltage/american font} (default: nothing, using the current font) style: \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american] @@ -6511,6 +6624,10 @@ The best way of contributing is forking the project, adding your component in th \section{Examples} +Here a series of example, contributed by several people, is shown with their code. + +\subsection{A red diode} + \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1.4]\draw (0,0) to[C, l=10<\micro\farad>] (0,2) -- (0,3) @@ -6523,6 +6640,9 @@ The best way of contributing is forking the project, adding your component in th ;\end{circuitikz} \end{LTXexample} +\newpage +\subsection{Using the (experimental) \texttt{siunitx} syntax} + \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1.2]\draw (0,0) node[ground] {} @@ -6535,9 +6655,11 @@ The best way of contributing is forking the project, adding your component in th (0,2) -- (0,3) to[L, l=2<\milli\henry>] (5,3) -- (5,2) {[anchor=south east] (0,2) node {1} (2,2) node {2} (4,2) node {3}} -;\end{circuitikz} +; +\end{circuitikz} \end{LTXexample} + \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1.2]\draw (0,0) node[anchor=east] {B} @@ -6551,6 +6673,9 @@ The best way of contributing is forking the project, adding your component in th ;\end{circuitikz} \end{LTXexample} +\newpage +\subsection{Photodiodes} + \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1]\draw (0,0) node[transformer] (T) {} @@ -6559,6 +6684,7 @@ The best way of contributing is forking the project, adding your component in th ;\end{circuitikz} \end{LTXexample} +\subsection{A Sallen-Key cell} \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1]\draw @@ -6572,6 +6698,9 @@ The best way of contributing is forking the project, adding your component in th ;\end{circuitikz} \end{LTXexample} +\newpage +\subsection{Mixing circuits and graphs} + \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1.2, american]\draw (0,2) to[I=1<\milli\ampere>] (2,2) @@ -6597,6 +6726,9 @@ The best way of contributing is forking the project, adding your component in th \end{circuitikz} \end{LTXexample} +\newpage +\subsection{RF circuit} + \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1] \ctikzset{bipoles/detector/width=.35} @@ -6627,6 +6759,8 @@ The best way of contributing is forking the project, adding your component in th \end{circuitikz} \end{LTXexample} +\subsection{A styled low noise input stage} + \ctikzloadstyle{romano} \scalebox{0.707}{% \begin{circuitikz}[american, romano circuit style] @@ -6729,10 +6863,12 @@ The best way of contributing is forking the project, adding your component in th } % scalebox \end{lstlisting} -\begin{tabular}{l}\label{ex:compatibility} +\subsection{An example with the \texttt{compatibility} option} +\label{ex:compatibility} + \IfFileExists{compatibility.pdf} {\fbox{\includegraphics{compatibility.pdf}}} -\\ + \begin{lstlisting} \documentclass{standalone} @@ -6751,8 +6887,27 @@ The best way of contributing is forking the project, adding your component in th to[*D](3,2); \end{tikzpicture} \end{document} - \end{lstlisting} -\end{tabular} +\end{lstlisting} + +\newpage +\subsection{3-phases block schematic} + +\begin{LTXexample}[varwidth=true,pos=t] +\begin{circuitikz}[smallR/.style={european resistor, resistors/scale=0.5}] + \draw (0,0) node[tacdcshape, anchor=ac2](acdc){} to[smallR] ++(-2,0) -- node[circ](point){} ++(-.5,0); + \draw (acdc.ac1) to[nos, invert, mirror, name=switch,color=red] ++(-2,0) -- (point); + \draw (acdc.ac3) to[smallR] ++(-2,0) + -- (point) + to[oosourcetrans,prim=wye,sec=delta,l=transformer] ++(-1.5,0) + to[tmultiwire] ++(-.5,0) + node[gridnode, anchor=right]{}; + \node[above=.3cm,color=red] at (switch) {fault}; + \draw (acdc.dc1) to[smallR,l=HVDC line] ++(2,0) node[tdcacshape, anchor=dc1](dcac){}; + \draw (acdc.dc2) -- (dcac.dc2); + \draw (dcac.right) to[ooosource,prim=delta,sec=delta,tert=wye,invert] ++(1.5,0) + to[tmultiwire] ++(.5,0) node[gridnode,anchor=left]{}; +\end{circuitikz} +\end{LTXexample} % % changelog.tex will be updated by makefile from CHANGELOG.md \section{Changelog and Release Notes} diff --git a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex index 8c3671d21ef..104d3be9103 100644 --- a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex +++ b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex @@ -10,8 +10,8 @@ % % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. -\def\pgfcircversion{1.1.1} -\def\pgfcircversiondate{2020/04/24} +\def\pgfcircversion{1.1.2} +\def\pgfcircversiondate{2020/05/17} \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion} \usemodule[tikz] diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex index 49f73062195..a9499dd06aa 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex @@ -633,6 +633,46 @@ \ctikzset{bipoles/battery2/height/.initial=.6} \ctikzset{bipoles/battery2/width/.initial=.3} +% % % ootransformer +\ctikzset{bipoles/oosourcetrans/height/.initial=.6} +\ctikzset{bipoles/oosourcetrans/width/.initial=.6} +\ctikzset{bipoles/oosourcetrans/circlesize/.initial=.6}%circlesize+circleoffset should be =1 +\ctikzset{bipoles/oosourcetrans/circleoffset/.initial=.4}%circlesize+circleoffset should be =1 +\ctikzset{bipoles/oosourcetrans/vectorgroupscale/.initial=1} + +% % % oootransformer +\ctikzset{bipoles/ooosource/height/.initial=.6} +\ctikzset{bipoles/ooosource/circlesize/.initial=.55}%circlesize+circleoffset should be =1 +\ctikzset{bipoles/ooosource/circleoffset/.initial=.45}%circlesize+circleoffset should be =1 +\ctikzset{bipoles/ooosource/vectorgroupscale/.initial=1} + +% % % primary windings +\newif\ifpgf@circ@prim@delta +\newif\ifpgf@circ@prim@wye +\newif\ifpgf@circ@prim@zig +\pgfkeys{tikz/prim/.is choice} +\pgfkeys{tikz/prim/delta/.add code={}{\pgf@circ@prim@deltatrue}} +\pgfkeys{tikz/prim/wye/.add code={}{\pgf@circ@prim@wyetrue}} +\pgfkeys{tikz/prim/zig/.add code={}{\pgf@circ@prim@zigtrue}} + +% % % secondary windings +\newif\ifpgf@circ@sec@delta +\newif\ifpgf@circ@sec@wye +\newif\ifpgf@circ@sec@zig +\pgfkeys{tikz/sec/.is choice} +\pgfkeys{tikz/sec/delta/.add code={}{\pgf@circ@sec@deltatrue}} +\pgfkeys{tikz/sec/wye/.add code={}{\pgf@circ@sec@wyetrue}} +\pgfkeys{tikz/sec/zig/.add code={}{\pgf@circ@sec@zigtrue}} + +% % % tertiary windings (ooosource) +\newif\ifpgf@circ@tert@delta +\newif\ifpgf@circ@tert@wye +\newif\ifpgf@circ@tert@zig +\pgfkeys{tikz/tert/.is choice} +\pgfkeys{tikz/tert/delta/.add code={}{\pgf@circ@tert@deltatrue}} +\pgfkeys{tikz/tert/wye/.add code={}{\pgf@circ@tert@wyetrue}} +\pgfkeys{tikz/tert/zig/.add code={}{\pgf@circ@tert@zigtrue}} + % diodes \ctikzset{bipoles/diode/height/.initial=.50} @@ -1814,16 +1854,41 @@ \newif\ifpgf@circ@siunitx \newif\ifpgf@circ@siunitx@res +% +% voltage and current options +% + +\newif\ifpgf@circuit@europeancurrent +\newif\ifpgf@circuit@europeanvoltage +\newif\ifpgf@circuit@bipole@voltage@straight + +\ctikzset{voltage/.is choice} +% +% straight is expected to be a subset of european, so disable it in american style +% +\ctikzset{voltage/american/.code = {\pgf@circuit@europeanvoltagefalse\pgf@circuit@bipole@voltage@straightfalse}} +\ctikzset{voltage/european/.code = {\pgf@circuit@europeanvoltagetrue\pgf@circuit@bipole@voltage@straightfalse}} +\ctikzset{voltage/straight/.code = {\pgf@circuit@europeanvoltagetrue\pgf@circuit@bipole@voltage@straighttrue}} +\ctikzset{voltage/curved/.code = {\pgf@circuit@europeanvoltagetrue\pgf@circuit@bipole@voltage@straighttrue}} + +\ctikzset{current/.is choice} +\ctikzset{current/american/.code = \pgf@circuit@europeancurrentfalse} +\ctikzset{current/european/.code = \pgf@circuit@europeancurrenttrue} + +% this is left for backward compatibility... \ctikzset{straight/.is choice} -\ctikzset{straightvoltage value/.initial=true} \ctikzset{straight/true/.code = {\pgf@circuit@bipole@voltage@straighttrue}} \ctikzset{straight/false/.code = {\pgf@circuit@bipole@voltage@straightfalse}} -\ctikzset{straightvoltage/.style = {/tikz/circuitikz/straight=true}} -\newif\ifpgf@circuit@bipole@voltage@straight \ctikzset{bipole/straight/.is if=pgf@circuit@bipole@voltage@straight} +% never used, removed (RG 2020-05-17) +% \ctikzset{straightvoltage value/.initial=true} +% \ctikzset{straightvoltage/.style = {/tikz/circuitikz/straight=true}} +% +% voltage is used also to set parameters, apart for the /.is choice +% above. I hope it is ok --- would be a mess otherwise +% -\ctikzset{voltage/.is family} \ctikzset{voltage/distance from node/.initial=.5} %\pgf@circ@Rlen units \ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1 \ctikzset{voltage/bump a/.initial=1.2} @@ -1838,7 +1903,7 @@ \ctikzset{voltage/american plus/.initial={$+$}} \ctikzset{voltage/american minus/.initial={$-$}} -% special cases +% special cases for voltage positions \ctikzset{bipoles/generic/voltage/distance from node/.initial=.4} \ctikzset{bipoles/generic/voltage/bump b/.initial=2} \ctikzset{bipoles/generic/voltage/european label distance/.initial=1.8} @@ -1870,15 +1935,28 @@ \ctikzset{bipoles/thermistorntc/voltage/bump b/.initial=1.6} %\ctikzset{bipoles/thermistorptc/voltage/distance from node/.initial=.2} \ctikzset{bipoles/thermistorptc/voltage/bump b/.initial=1.6} +% +% american open voltage adjusting +% +\newif\ifpgf@adjust@open@voltage\pgf@adjust@open@voltagetrue +\ctikzset{american open voltage/.is choice} +\ctikzset{american open voltage/center/.code={\pgf@adjust@open@voltagetrue}} +\ctikzset{american open voltage/legacy/.code={\pgf@adjust@open@voltagefalse}} -\ctikzset{current/.is family} +% +% currents +% \ctikzset{current/distance/.initial = .5} +% +% voltage and current styles +% \tikzset{american currents/.style = {\circuitikzbasekey/current = american}} \tikzset{european currents/.style = {\circuitikzbasekey/current = european}} \tikzset{american voltages/.style = {\circuitikzbasekey/voltage = american}} \tikzset{european voltages/.style = {\circuitikzbasekey/voltage = european}} +\tikzset{straight voltages/.style = {\circuitikzbasekey/voltage = straight}} \tikzset{american resistors/.style = {\circuitikzbasekey/resistor = american}} \tikzset{european resistors/.style = {\circuitikzbasekey/resistor = european}} @@ -1894,21 +1972,15 @@ \tikzset{cute inductors/.style = {\circuitikzbasekey/inductor = cute}} \tikzset{american ports/.style = {\circuitikzbasekey/logic ports = american}} \tikzset{european ports/.style = {\circuitikzbasekey/logic ports = european}} + +% +% general styles +% + \tikzset{european/.style = {european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester set}} \tikzset{american/.style = {american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester set}} \tikzset{cute/.style = {european currents, european voltages, american resistors, cute inductors, american ports}} -% I should try to make the tree clearer (this voltage conflicts with the options above) - -\newif\ifpgf@circuit@europeanvoltage -\ctikzset{voltage/.is choice} -\ctikzset{voltage/american/.code = {\pgf@circuit@europeanvoltagefalse}} -\ctikzset{voltage/european/.code = {\pgf@circuit@europeanvoltagetrue}} - -\newif\ifpgf@circuit@europeancurrent -\ctikzset{current/.is choice} -\ctikzset{current/american/.code = \pgf@circuit@europeancurrentfalse} -\ctikzset{current/european/.code = \pgf@circuit@europeancurrenttrue} % noise sources \ctikzset{bipoles/noise sources/fillcolor/.initial=gray!50} @@ -2022,4 +2094,11 @@ \pgfkeys{/tikz/fullcathode/.add code={}{\pgf@circuit@tubes@fullcathodetrue}} \ctikzset{tubes/fullcathode/.add code={}{\pgf@circuit@tubes@fullcathodetrue}} +% powerelectronic blocks +\ctikzset{bipoles/sacdc/width/.initial=.7} +\ctikzset{bipoles/sdcac/width/.initial=.7} +\ctikzset{bipoles/tacdc/width/.initial=.7} +\ctikzset{bipoles/tdcac/width/.initial=.7} +\ctikzset{quadpoles/gridnode/width/.initial=.7} %not sure if quadpole? + \endinput diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex index dd62d7e9d8d..1e9ada97753 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex @@ -265,6 +265,28 @@ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} \pgfusepath{draw} } + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/multiwire/height}} +{tmultiwire} +{\ctikzvalof{bipoles/multiwire/height}} +{\ctikzvalof{bipoles/multiwire/width}} +{ + \pgf@circ@res@other=\ctikzvalof{bipoles/multiwire/spacing}\pgf@circ@Rlen + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+2\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{2\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfusepath{draw} +} + +% +% %% Generic bipole - used as resistor by some (bleah) \pgfcircdeclarebipolescaled{resistors} {} @@ -1598,6 +1620,323 @@ \pgfusepath{draw} } +% % % winding symbols +% triangle +\def\pgf@circ@delta#1{ + \pgfscope + \pgftransformscale{-.01\pgf@circ@res@left*#1} + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \pgftransformrotate{-\pgfcircmathresult} + + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0}{.866\pgf@circ@res@up}} + \pgfpathclose + \pgfusepath{stroke} + \endpgfscope +} + +% star +\def\pgf@circ@wye#1{ + \pgfscope + \pgftransformscale{-.015\pgf@circ@res@left*#1} + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \pgftransformrotate{-\pgfcircmathresult} + + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpointorigin} + \pgfpathlineto{\pgfpointpolar{-30}{\pgf@circ@res@down}} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpointpolar{-150}{\pgf@circ@res@down}} + \pgfusepath{stroke} + \endpgfscope +} + +% zigzag +\def\pgf@circ@zig#1{ + \pgfscope + \pgftransformscale{-.015\pgf@circ@res@left*#1} + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \pgftransformrotate{-\pgfcircmathresult} + + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpointpolar{90}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointpolar{60}{\pgf@circ@res@up}} + + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpointpolar{210}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointpolar{0}{\pgf@circ@res@down}} + + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpointpolar{330}{.5\pgf@circ@res@up}} + \pgfpathlineto{\pgfpointpolar{-60}{\pgf@circ@res@up}} + \pgfusepath{stroke} + \endpgfscope +} + +% % % % round three-phase transformer +\pgfcircdeclarebipolescaled{sources} +{} +{\ctikzvalof{bipoles/oosourcetrans/height}} +{oosourcetrans} +{\ctikzvalof{bipoles/oosourcetrans/height}} +{\ctikzvalof{bipoles/oosourcetrans/width}} +{ + + \pgfpointorigin + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@circ@res@left}{0}} + {\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left} + \pgf@circ@maybefill + \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@circ@res@right}{0}} + {\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right} + \pgf@circ@draworfill + \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@circ@res@left}{0}} + {\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left} + \pgfusepath{draw} + + +% % % % draw inner symbols + + %%primary winding + \ifpgf@circ@prim@delta + \pgfscope + \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left} + \pgf@circ@delta{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} + \endpgfscope + + \else\ifpgf@circ@prim@wye + \pgfscope + \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left} + \pgf@circ@wye{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} + \endpgfscope + + \else\ifpgf@circ@prim@zig + \pgfscope + \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@left} + \pgf@circ@zig{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} + \endpgfscope + \fi\fi\fi + + %%secondary winding + \ifpgf@circ@sec@delta + \pgfscope + \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right} + \pgf@circ@delta{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} + \endpgfscope + + \else\ifpgf@circ@sec@wye + \pgfscope + \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right} + \pgf@circ@wye{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} + \endpgfscope + + \else\ifpgf@circ@sec@zig + \pgfscope + \pgftransformxshift{\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@circ@res@right} + \pgf@circ@zig{\ctikzvalof{bipoles/oosourcetrans/vectorgroupscale}} + \endpgfscope + \fi\fi\fi +} + + +% % % % ooosource for three phase transformer +\pgfcircdeclarebipolescaled{sources} +{ + \anchor{right}{ + \northeast + \pgf@y=0pt + \pgfmathparse{ + \ctikzvalof{bipoles/ooosource/circleoffset}* sin(30) + + %%the sqrt must be > 0, the circles have to intersect + sqrt( + pow(\ctikzvalof{bipoles/ooosource/circlesize},2) - + pow(\ctikzvalof{bipoles/ooosource/circleoffset}*cos(30),2) + ) + } + \pgf@x=\pgfmathresult\pgf@x + } + \anchor{east}{ + \northeast + \pgf@y=0pt + } + \savedanchor{\centerprim}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@scaled@Rlen + \pgf@y=0pt + \pgf@x=.5\pgf@circ@scaled@Rlen + } + \anchor{centerprim}{ + \centerprim + } + \savedanchor{\centersec}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@scaled@Rlen + \pgfpointpolar{60}{.5\pgf@circ@scaled@Rlen} + \pgf@y=-\pgf@y + \pgf@x=-\pgf@x + } + \anchor{centersec}{ + \centersec + } + \savedanchor{\centertert}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=-\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@scaled@Rlen + \pgfpointpolar{60}{.5\pgf@circ@scaled@Rlen} + \pgf@y=\pgf@y + \pgf@x=-\pgf@x + } + \anchor{centertert}{ + \centertert + } + + % add some anchors in case the are needed :) + \anchor{prim1}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen + \pgfpointadd{\centerprim}{\pgfpointpolar{135}{.5\pgf@circ@scaled@Rlen}} + } + \anchor{prim2}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen + \pgfpointadd{\centerprim}{\pgfpointpolar{-135}{.5\pgf@circ@scaled@Rlen}} + } + \anchor{sec1}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen + \pgfpointadd{\centersec}{\pgfpointpolar{0}{.5\pgf@circ@scaled@Rlen}} + } + \anchor{sec2}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen + \pgfpointadd{\centersec}{\pgfpointpolar{45}{.5\pgf@circ@scaled@Rlen}} + } + \anchor{sec3}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen + \pgfpointadd{\centersec}{\pgfpointpolar{90}{.5\pgf@circ@scaled@Rlen}} + } + \anchor{tert1}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen + \pgfpointadd{\centertert}{\pgfpointpolar{0}{.5\pgf@circ@scaled@Rlen}} + } + \anchor{tert2}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen + \pgfpointadd{\centertert}{\pgfpointpolar{-45}{.5\pgf@circ@scaled@Rlen}} + } + \anchor{tert3}{ + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/height}\pgf@circ@Rlen + \pgf@circ@scaled@Rlen=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@scaled@Rlen + \pgfpointadd{\centertert}{\pgfpointpolar{-90}{.5\pgf@circ@scaled@Rlen}} + } +} +{\ctikzvalof{bipoles/ooosource/height}} +{ooosource} +{\ctikzvalof{bipoles/ooosource/height}} +{\ctikzvalof{bipoles/ooosource/height}} +{ +% \pgf@circ@res@other = \ctikzvalof{bipoles/ooosource/vectorgroup} \pgf@circ@scaled@Rlen + +% % filling +% left + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@left}{0}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left} + \pgf@circ@maybefill + + % up + \pgfscope + \pgfpointorigin + \pgfpathcircle{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@right}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right} + \pgf@circ@maybefill + \endpgfscope +% down + \pgfscope + \pgfpointorigin + \pgfpathcircle{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@right}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right} + \pgf@circ@draworfill + \endpgfscope + +% drawing + % left + \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@left}{0}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left} + \pgfusepath{draw} + + % up + \pgfscope + \pgfpointorigin + \pgfpathcircle{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circleoffset}\pgf@circ@res@right}}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right} + \pgfusepath{draw} + \endpgfscope + +% % % draw inner symbols + +% % primary winding + \ifpgf@circ@prim@delta + \pgfscope + \pgftransformxshift{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left} + \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} + \endpgfscope + + \else\ifpgf@circ@prim@wye + \pgfscope + \pgftransformxshift{.6\pgf@circ@res@left} + \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} + \endpgfscope + + \else\ifpgf@circ@prim@zig + \pgfscope + \pgftransformxshift{.6\pgf@circ@res@left} + \pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} + \endpgfscope + \fi\fi\fi + +% % secondary winding + \ifpgf@circ@sec@delta + \pgfscope + \pgfpointorigin + \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} + \endpgfscope + + \else\ifpgf@circ@sec@wye + \pgfscope + \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} + \endpgfscope + + \else\ifpgf@circ@sec@zig + \pgfscope + \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} + \endpgfscope + \fi\fi\fi + +% % tertiary winding + \ifpgf@circ@tert@delta + \pgfscope + \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} + \endpgfscope + + \else\ifpgf@circ@tert@wye + \pgfscope + \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} + \endpgfscope + + \else\ifpgf@circ@tert@zig + \pgfscope + \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}} + \pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}} + \endpgfscope + \fi\fi\fi +} + %% Independent current source - American \pgfcircdeclarebipolescaled{sources} {} @@ -4711,6 +5050,376 @@ } +%% single phase ac/dc converter +\pgfcircdeclarebipolescaled{blocks} +{ + \anchor{dc1}{ + \northeast + \pgf@y=.4\pgf@y + } + \anchor{dc2}{ + \northeast + \pgf@y=-.4\pgf@y + } +} +{\ctikzvalof{bipoles/sacdc/width}} +{sacdc} +{\ctikzvalof{bipoles/sacdc/width}} +{\ctikzvalof{bipoles/sacdc/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/sacdc/width}\pgf@circ@scaled@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + % draw sin wave + \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfusepath{draw} + + % draw equal sign + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.625\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.625\pgf@circ@res@step}} + \pgfusepath{draw} +} + + + +%% single phase dc/ac converter +\pgfcircdeclarebipolescaled{blocks} +{ + \anchor{dc1}{ + \northeast + \pgf@y=.4\pgf@y + \pgf@x=-\pgf@x + } + \anchor{dc2}{ + \northeast + \pgf@y=-.4\pgf@y + \pgf@x=-\pgf@x + } +} +{\ctikzvalof{bipoles/sdcac/width}} +{sdcac} +{\ctikzvalof{bipoles/sdcac/width}} +{\ctikzvalof{bipoles/sdcac/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/sdcac/width}\pgf@circ@scaled@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + % draw sin wave + \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfusepath{draw} + + % draw equal sign + \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.625\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.625\pgf@circ@res@step}} + \pgfusepath{draw} +} + + +%% threephase ac/dc converter +\pgfcircdeclarebipolescaled{blocks} +{ + \anchor{dc1}{ + \northeast + \pgf@y=.4\pgf@y + } + \anchor{dc2}{ + \northeast + \pgf@y=-.4\pgf@y + } + \anchor{ac1}{ + \northeast + \pgf@y=.6\pgf@y + \pgf@x=-\pgf@x + } + \anchor{ac2}{ + \northeast + \pgf@y=0\pgf@y + \pgf@x=-\pgf@x + } + \anchor{ac3}{ + \northeast + \pgf@y=-.6\pgf@y + \pgf@x=-\pgf@x + } +} +{\ctikzvalof{bipoles/tacdc/width}} +{tacdc} +{\ctikzvalof{bipoles/tacdc/width}} +{\ctikzvalof{bipoles/tacdc/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/tacdc/width}\pgf@circ@scaled@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + % draw sin waves + \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.65\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-.76\pgf@circ@res@step}{.35\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfusepath{draw} + + + + + % draw equal sign + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.375\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.375\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-.625\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.625\pgf@circ@res@step}} + \pgfusepath{draw} +} + + +%% threephase dc/ac converter +\pgfcircdeclarebipolescaled{blocks} +{ + \anchor{dc1}{ + \northeast + \pgf@y=.4\pgf@y + \pgf@x=-\pgf@x + } + \anchor{dc2}{ + \northeast + \pgf@y=-.4\pgf@y + \pgf@x=-\pgf@x + } + \anchor{ac1}{ + \northeast + \pgf@y=.6\pgf@y + } + \anchor{ac2}{ + \northeast + \pgf@y=0\pgf@y + } + \anchor{ac3}{ + \northeast + \pgf@y=-.6\pgf@y + } +} +{\ctikzvalof{bipoles/tdcac/width}} +{tdcac} +{\ctikzvalof{bipoles/tdcac/width}} +{\ctikzvalof{bipoles/tdcac/width}} +{ + \pgf@circ@res@step = \ctikzvalof{bipoles/tdcac/width}\pgf@circ@scaled@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + % rotate inner symbol + \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} + \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135 + \pgftransformrotate{270} + \fi\fi + \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible + \pgftransformrotate{180} + \fi\fi + \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315 + \pgftransformrotate{90} + \fi\fi + + % draw inner symbol + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfusepath{draw} + + % draw sin waves + \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.65\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.5\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{.14\pgf@circ@res@step}{-.35\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathsine{\pgfpoint{.17\pgf@circ@res@step}{-.17\pgf@circ@res@step}} + \pgfpathcosine{\pgfpoint{.17\pgf@circ@res@step}{.17\pgf@circ@res@step}} + \pgfusepath{draw} + + + + + % draw equal sign + \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.375\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.375\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{-.2\pgf@circ@res@step}{.625\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{0.625\pgf@circ@res@step}} + \pgfusepath{draw} +} + + %%%%%%%%%%%%%%%%%%%%%%% %% MECHANICAL SYMBOLS %%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex index 88e92fcab7e..a023e058d39 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex @@ -2149,6 +2149,7 @@ } % create input anchors \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@ieeestd #1 port\endcsname{% + \pgf@circ@count@a=\inputs \pgfmathloop% \ifnum\pgfmathcounter>\pgf@circ@count@a% \else% diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex index 24585e20ea7..6f5c89c9a4e 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex @@ -290,6 +290,8 @@ \def\pgf@circ@vsourcesin@path#1{\pgf@circ@bipole@path{vsourcesin}{#1}} \def\pgf@circ@isource@path#1{\pgf@circ@bipole@path{isource}{#1}} \def\pgf@circ@oosource@path#1{\pgf@circ@bipole@path{oosource}{#1}} +\def\pgf@circ@oosourcetrans@path#1{\pgf@circ@bipole@path{oosourcetrans}{#1}} +\def\pgf@circ@ooosource@path#1{\pgf@circ@bipole@path{ooosource}{#1}} \def\pgf@circ@dcisource@path#1{\pgf@circ@bipole@path{dcisource}{#1}} \def\pgf@circ@isourcesin@path#1{\pgf@circ@bipole@path{isourcesin}{#1}} \def\pgf@circ@vsourcesquare@path#1{\pgf@circ@bipole@path{vsourcesquare}{#1}} @@ -360,6 +362,11 @@ \def\pgf@circ@phaseshifter@path#1{\pgf@circ@bipole@path{phaseshifter}{#1}} \def\pgf@circ@vphaseshifter@path#1{\pgf@circ@bipole@path{vphaseshifter}{#1}} \def\pgf@circ@detector@path#1{\pgf@circ@bipole@path{detector}{#1}} +% +\def\pgf@circ@sacdc@path#1{\pgf@circ@bipole@path{sacdc}{#1}} +\def\pgf@circ@sdcac@path#1{\pgf@circ@bipole@path{sdcac}{#1}} +\def\pgf@circ@tacdc@path#1{\pgf@circ@bipole@path{tacdc}{#1}} +\def\pgf@circ@tdcac@path#1{\pgf@circ@bipole@path{tdcac}{#1}} %%Mechanical \def\pgf@circ@spring@path#1{\pgf@circ@bipole@path{spring}{#1}} @@ -484,6 +491,11 @@ \compattikzset{phaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@phaseshifter@path}} \compattikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vphaseshifter@path}} \compattikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@detector@path}} +% +\compattikzset{sacdc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@sacdc@path, l=#1}} +\compattikzset{sdcac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@sdcac@path, l=#1}} +\compattikzset{tacdc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tacdc@path, l=#1}} +\compattikzset{tdcac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tdcac@path, l=#1}} % % % % % % % % Begin of Diodes @@ -661,6 +673,8 @@ \compattikzset{ioosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is current=true,/tikz/to path=\pgf@circ@oosource@path, i=#1}} \compattikzset{voosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf@circ@oosource@path, v=#1}} +\compattikzset{oosourcetrans/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf@circ@oosourcetrans@path, v=#1}} +\compattikzset{ooosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf@circ@ooosource@path, v=#1}} \compattikzset{vsource/.style = {\comnpatname voltage source = #1}} \compattikzset{isource/.style = {\comnpatname current source = #1}} @@ -823,6 +837,9 @@ \def\pgf@circ@multiwire@path#1{\pgf@circ@bipole@path{multiwire}{#1}} \compattikzset{multiwire/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@multiwire@path, l=#1}} +\def\pgf@circ@tmultiwire@path#1{\pgf@circ@bipole@path{tmultiwire}{#1}} +\compattikzset{tmultiwire/.style = {\circuitikzbasekey, +/tikz/to path=\pgf@circ@tmultiwire@path, l=#1}} % reed switches \def\pgf@circ@reed@path#1{\pgf@circ@bipole@path{reed}{#1}} diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex index 68ecb33d4a6..692b6ec40cd 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex @@ -839,8 +839,144 @@ \endpgfscope } +} + +%% gridnode +\pgfdeclareshape{gridnode} +{ + \savedmacro{\ctikzclass}{\edef\ctikzclass{blocks}} + \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}} + \savedanchor\northwest{ + \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen} + \pgf@y=\ctikzvalof{quadpoles/gridnode/width}\pgf@circ@scaled@Rlen + \pgf@y=.5\pgf@y + \pgf@x=-\ctikzvalof{quadpoles/gridnode/width}\pgf@circ@scaled@Rlen + \pgf@x=.5\pgf@x + } + \anchor{center}{ + \pgfpointorigin + } + + \anchor{north}{ + \northwest + \pgf@x=0pt + } + \anchor{up}{ + \northwest + \pgf@x=0pt + } + \anchor{south}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{down}{ + \northwest + \pgf@x=0pt + \pgf@y=-\pgf@y + } + \anchor{east}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{right}{ + \northwest + \pgf@y=0pt + \pgf@x=-\pgf@x + } + \anchor{west}{ + \northwest + \pgf@y=0pt + } + \anchor{left}{ + \northwest + \pgf@y=0pt } + \anchor{south west}{ + \northwest + \pgf@y=-\pgf@y + } + \anchor{north east}{ + \northwest + \pgf@x=-\pgf@x + \relax + } + \anchor{north west}{ + \northwest + } + \anchor{south east}{ + \northwest + \pgf@x=-\pgf@x + \pgf@y=-\pgf@y + } + \anchor{text}{ + \pgf@x=-2\pgf@x + \advance \pgf@x by -.5\wd\pgfnodeparttextbox + \advance \pgf@y by -1.5\ht\pgfnodeparttextbox + } + \backgroundpath{ + \pgfsetcolor{\ctikzvalof{color}} + \pgf@circ@scaled@Rlen=\scaledRlen + \pgf@circ@res@step=\ctikzvalof{quadpoles/gridnode/width}\pgf@circ@scaled@Rlen + + \northwest + \pgf@circ@res@up = \pgf@y + \pgf@circ@res@down = -\pgf@y + \pgf@circ@res@right = -\pgf@x + \pgf@circ@res@left = \pgf@x + + \pgf@circ@res@step = \ctikzvalof{quadpoles/gridnode/width}\pgf@circ@scaled@Rlen + \divide \pgf@circ@res@step by 2 + + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}} + \pgf@circ@res@other = \pgf@circ@res@left + \advance\pgf@circ@res@other by \pgf@circ@res@step + + \ifpgf@circuit@dashed + \pgfsetdash{{0.1cm}{0.1cm}}{0cm} + \fi + + % draw outer box + \pgf@circ@twoportbox + + + \ifpgf@circuit@inputarrow + { + \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth + \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}} + } + \fi + + \pgfsetdash{}{0pt} % always draw solid line for inner symbol + \pgfsetarrows{-} %never draw arrows + \pgfsetlinewidth{0.05mm} + + % draw grid + \foreach \line in {-1,-.5,...,1} + { + \pgfpathmoveto{\pgfpoint{\line\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\line\pgf@circ@res@up}} + + \pgfpathmoveto{\pgfpoint{\line\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\line\pgf@circ@res@down}} + } + + %prevent from draw the inner cross twice + \foreach \line in {-.5,0,...,.5} + { + \pgfpathmoveto{\pgfpoint{\line\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\line\pgf@circ@res@up}} + + \pgfpathmoveto{\pgfpoint{\line\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\line\pgf@circ@res@down}} + } + \pgfusepath{draw} + } +} + % Wilkinson divider \pgfdeclareshape{wilkinson}{ diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex index 6eecb72c991..739373f2eb5 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex @@ -1267,13 +1267,14 @@ % https://github.com/circuitikz/circuitikz/issues/385 % \newif\ifpgf@circ@european@port@circle\pgf@circ@european@port@circlefalse +\newif\ifpgf@circ@european@port@circle@ieee\pgf@circ@european@port@circle@ieeefalse \ctikzset{tripoles/european not shape/.initial=ocirc} \ctikzset{tripoles/european not symbol/.is choice} \ctikzset{tripoles/european not symbol/triangle/.code={\pgf@circ@european@port@circlefalse}} \ctikzset{tripoles/european not symbol/circle/.code={% -\pgf@circ@european@port@circletrue\ctikzset{tripoles/european not shape=ocirc}}} +\pgf@circ@european@port@circletrue\pgf@circ@european@port@circle@ieeefalse\ctikzset{tripoles/european not shape=ocirc}}} \ctikzset{tripoles/european not symbol/ieee circle/.code={% -\pgf@circ@european@port@circletrue\ctikzset{tripoles/european not shape=notcirc}}} +\pgf@circ@european@port@circletrue\pgf@circ@european@port@circle@ieeetrue\ctikzset{tripoles/european not shape=notcirc}}} \long\def\pgfcircdeclareeurologicport#1#2#3#4{ \pgfdeclareshape{european #1 port} @@ -1375,6 +1376,7 @@ \backgroundpath{ \pgfsetcolor{\ctikzvalof{color}} + \pgfstartlinewidth=\pgflinewidth \pgfscope \pgf@circ@setlinewidth{tripoles}{\pgflinewidth} \pgfpathrectanglecorners @@ -1415,6 +1417,8 @@ \pgfscope \pgf@circ@setlinewidth{tripoles}{\pgflinewidth} \pgftransformxshift{\ctikzvalof{tripoles/european #1 port/reserved}\pgf@circ@res@right} + % reset linewidth for IEEE ports, otherwise they will multiply... + \ifpgf@circ@european@port@circle@ieee\pgfsetlinewidth{\pgfstartlinewidth}\fi \pgfnode{\ctikzvalof{tripoles/european not shape}}{west}{}{NOT}{\pgfusepath{stroke}} \endpgfscope \else diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex index 0a87b5e6edf..4ba528296d1 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex @@ -226,8 +226,8 @@ node [ocirc, fill=blue] at (anchorendnode) {} node [ocirc, fill=green] at (pgfcirc@Vto) {} node [ocirc, fill=yellow] at (pgfcirc@Vfrom) {} - node [odiamondpole, fill=green] at (pgfcirc@Vto@flat) {} - node [odiamondpole, fill=yellow] at (pgfcirc@Vfrom@flat) {} + node [odiamondpole, fill=green!50!black] at (pgfcirc@Vto@flat) {} + node [odiamondpole, fill=orange] at (pgfcirc@Vfrom@flat) {} \fi coordinate (pgfcirc@Vto) at ($(pgfcirc@Vto@flat) ! \absvshift!90 : (anchorendnode)$) coordinate (pgfcirc@Vfrom) at ($(pgfcirc@Vfrom@flat) ! \absvshift!-90 : (anchorstartnode)$) @@ -271,7 +271,7 @@ \else (pgfcirc@Vfrom) --(pgfcirc@Vto) node[currarrow, sloped, allow upside down, pos=1,anchor=tip] {} \fi - \else + \else \ifpgf@circuit@bipole@voltage@backward (pgfcirc@Vto) .. controls (pgfcirc@Vcont2) and (pgfcirc@Vcont1) .. node[currarrow, sloped, allow upside down, pos=1, anchor=tip] {} @@ -282,30 +282,58 @@ (pgfcirc@Vto) \fi \fi - \else - \ifpgf@circuit@bipole@voltage@backward - \ifpgf@circ@oldvoltagedirection - (pgfcirc@Vfrom) node[inner sep=0, node font=\pgf@circ@avfont, - anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avplus} - (pgfcirc@Vto) node[inner sep=0, node font=\pgf@circ@avfont, - anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avminus} - \else - (pgfcirc@Vfrom) node[inner sep=0, node font=\pgf@circ@avfont, - anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avminus} - (pgfcirc@Vto) node[inner sep=0, node font=\pgf@circ@avfont, - anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avplus} + \else % american + \ifx\@@kind\@@open % open circuit; put + and - directly on it + \ifpgf@circuit@bipole@voltage@backward + \ifpgf@circ@oldvoltagedirection + (pgfcirc@Vfrom@flat) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=center]{\pgf@circ@avplus} + (pgfcirc@Vto@flat) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=center]{\pgf@circ@avminus} + \else + (pgfcirc@Vfrom@flat) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=center]{\pgf@circ@avminus} + (pgfcirc@Vto@flat) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=center]{\pgf@circ@avplus} + \fi + \else + \ifpgf@circ@oldvoltagedirection + (pgfcirc@Vfrom@flat) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=center]{\pgf@circ@avminus} + (pgfcirc@Vto@flat) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=center]{\pgf@circ@avplus} + \else + (pgfcirc@Vfrom@flat) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=center]{\pgf@circ@avplus} + (pgfcirc@Vto@flat) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=center]{\pgf@circ@avminus} + \fi \fi - \else - \ifpgf@circ@oldvoltagedirection - (pgfcirc@Vfrom) node[inner sep=0, node font=\pgf@circ@avfont, - anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avminus} - (pgfcirc@Vto) node[inner sep=0, node font=\pgf@circ@avfont, - anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avplus} - \else - (pgfcirc@Vfrom) node[inner sep=0, node font=\pgf@circ@avfont, - anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avplus} - (pgfcirc@Vto) node[inner sep=0, node font=\pgf@circ@avfont, - anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avminus} + \else % not open circuit + \ifpgf@circuit@bipole@voltage@backward + \ifpgf@circ@oldvoltagedirection + (pgfcirc@Vfrom) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avplus} + (pgfcirc@Vto) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avminus} + \else + (pgfcirc@Vfrom) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avminus} + (pgfcirc@Vto) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avplus} + \fi + \else + \ifpgf@circ@oldvoltagedirection + (pgfcirc@Vfrom) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avminus} + (pgfcirc@Vto) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avplus} + \else + (pgfcirc@Vfrom) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avplus} + (pgfcirc@Vto) node[inner sep=0, node font=\pgf@circ@avfont, + anchor=\pgf@circ@bipole@voltage@label@anchor]{\pgf@circ@avminus} + \fi \fi \fi \fi @@ -362,6 +390,8 @@ } %% Output routine +%% this is the entry point +%% \def\pgf@circ@drawvoltage{% node name \pgfextra{ %WARNING: indentation is probably wrong \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil} @@ -465,6 +495,10 @@ % outside the (+) -- (-) line \pgfmathsetlength{\alshift}{(\ctikzvalof{voltage/american label distance}-0.6)*\partheight} \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners! + % set the macro for detecting open + \edef\@@kind{\ctikzvalof{bipole/kind}}\edef\@@open{open} + \ifpgf@adjust@open@voltage\else\edef\@@open{this-will-nEver-match}\fi + % \typeout{KIND\space\@@kind} }%end pgfextra \ifpgf@circuit@bipole@isvoltage @@ -473,6 +507,8 @@ \pgf@circ@drawvoltagegeneric \fi + % \pgfextra{\typeout{LABEL\space KIND:\@@kind\space OPEN:\@@open}} + \ifpgf@circuit@bipole@voltage@straight coordinate (Vlab) at ($(pgfcirc@Vto)!0.5!(pgfcirc@Vfrom) $) node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt, @@ -489,9 +525,23 @@ coordinate (Vlab) at ($(Vlab) ! \alshift ! \pgf@circ@bipole@voltage@label@where :(pgfcirc@Vto)$) \fi \fi - node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt, - \circuitikzbasekey/bipole voltage style](\ctikzvalof{bipole/name}voltage) - at (Vlab) {\pgf@circ@finallabels{voltage/label}} + + \ifpgf@circuit@europeanvoltage + node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt, + \circuitikzbasekey/bipole voltage style](\ctikzvalof{bipole/name}voltage) + at (Vlab) {\pgf@circ@finallabels{voltage/label}} + \else % american voltages + \ifx\@@kind\@@open + coordinate (Vlab) at ($(pgfcirc@Vfrom@flat)!0.5!(pgfcirc@Vto@flat)$) + node [anchor=center, inner sep=2pt, + \circuitikzbasekey/bipole voltage style](\ctikzvalof{bipole/name}voltage) + at (Vlab) {\pgf@circ@finallabels{voltage/label}} + \else + node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt, + \circuitikzbasekey/bipole voltage style](\ctikzvalof{bipole/name}voltage) + at (Vlab) {\pgf@circ@finallabels{voltage/label}} + \fi + \fi \fi }%end drawvoltages \endinput diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty index c7066279165..8863c23ce0b 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty +++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty @@ -12,8 +12,8 @@ \NeedsTeXFormat{LaTeX2e} -\def\pgfcircversion{1.1.1} -\def\pgfcircversiondate{2020/04/24} +\def\pgfcircversion{1.1.2} +\def\pgfcircversiondate{2020/05/17} \ProvidesPackage{circuitikz}% [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion] -- cgit v1.2.3