summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-05 23:20:06 +0000
committerKarl Berry <karl@freefriends.org>2017-06-05 23:20:06 +0000
commitb5a93c0fae61203d8391db893157a51f9234e550 (patch)
treebc20e263af8341cee6c75b59399316da42107721 /Master/texmf-dist
parentcfada733d6cd9f6fc41842c30c0047105c70ae63 (diff)
circuitikz (28may17)
git-svn-id: svn://tug.org/texlive/trunk@44488 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdfbin12647 -> 12729 bytes
-rw-r--r--Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md11
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/changelog.tex31
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdfbin283257 -> 289048 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex47
-rw-r--r--Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex5
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex40
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex91
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex2
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex193
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex123
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex27
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex32
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex44
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex191
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex137
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty13
17 files changed, 668 insertions, 319 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 419d0bcf4d7..a75281218d7 100644
--- a/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
+++ b/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
index fc68852703a..5e82d6dad28 100644
--- a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
+++ b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
@@ -1,6 +1,17 @@
<!--- 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.8.3 (2017-05-28)
+ - Removed unwanted lines at to-paths if the starting point is a node without a explicit anchor.
+ - Fixed scaling option, now all parts are scaled by bipoles/length
+ - Surge arrester appears no more if a to path is used without []-options
+ - Fixed current placement now possible with paths at an angle of around 280°
+ - Fixed voltage placement now possible with paths at an angle of around 280°
+ - Fixed label and annotation placement (at some angles position not changable)
+ - Adjustable default distance for straight-voltages: 'bipoles/voltage/straight label distance'
+ - Added Symbol for bandstop filter
+ - New annotation type to show flows using f=... like currents, can be used for thermal, power or current flows
+
* Version 0.8.2 (2017-05-01)
- Fixes pgfkeys error using alternatively specified mixed colors(see pgfplots manual section "4.7.5 Colors")
- Added new switches "ncs" and "nos"
diff --git a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
index 3d4abe682a1..2273d50bbd5 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
@@ -6,6 +6,37 @@ full list of changes.
\begin{itemize}
\tightlist
\item
+ Version 0.8.3 (2017-05-28)
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Removed unwanted lines at to-paths if the starting point is a node
+ without a explicit anchor.
+ \item
+ Fixed scaling option, now all parts are scaled by bipoles/length
+ \item
+ Surge arrester appears no more if a to path is used without
+ {[}{]}-options
+ \item
+ Fixed current placement now possible with paths at an angle of
+ around 280°
+ \item
+ Fixed voltage placement now possible with paths at an angle of
+ around 280°
+ \item
+ Fixed label and annotation placement (at some angles position not
+ changable)
+ \item
+ Adjustable default distance for straight-voltages:
+ `bipoles/voltage/straight label distance'
+ \item
+ Added Symbol for bandstop filter
+ \item
+ New annotation type to show flows using f=\ldots{} like currents,
+ can be used for thermal, power or current flows
+ \end{itemize}
+\item
Version 0.8.2 (2017-05-01)
\begin{itemize}
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
index fc660280f5f..af84864d70b 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
index 5f71c56ddd3..35c383523ae 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
@@ -512,6 +512,7 @@ Similarly, if (default behaviour) \texttt{europeanvoltages} option is active (or
\circuititembip{twoport}{generic two port\footnote{To specify text to be put in the component: \texttt{twoport[t=text]}): \tikz \draw[scale=.5, transform shape] (0,0) to[twoport,>,t=text] (2,0); }}{}
\circuititembip{vco}{vco}{}
\circuititembip{bandpass}{bandpass}{}
+ \circuititembip{bandstop}{bandstop}{}
\circuititembip{highpass}{highpass}{}
\circuititembip{lowpass}{lowpass}{}
\circuititembip{adc}{A/D converter}{}
@@ -998,6 +999,52 @@ Also
\end{circuitikz}
\end{LTXexample}
+\subsection{Flows}\label{flows}
+As an alternative for the current arrows, you can also use the following flows. They can also be used to indicate thermal or power flows. The syntax is pretty the same as for currents.
+
+\textit{This is a new beta feature since version 0.8.3, therefore, please provide bugreports or hints to optimize this feature regarding placement and appearance! This means, that the appearance may change in the future!}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, f=$i_1$] (3,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, f<=$i_1$] (3,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, f_=$i_1$] (3,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, f_>=$i_1$] (3,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, f<^=$i_1$] (3,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, f<_=$i_1$] (3,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, f>_=$i_1$] (3,0);
+\end{circuitikz}
+\end{LTXexample}
\subsection{Voltages}
See introduction note at Currents (chapter \ref{currents}, page \pageref{currents})!
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 8eb4a73befd..2281f120d24 100644
--- a/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
+++ b/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
@@ -1,5 +1,5 @@
-\def\pgfcircversion{0.8.2}
-\def\pgfcircversiondate{2017/05/01}
+\def\pgfcircversion{0.8.3}
+\def\pgfcircversiondate{2017/05/28}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]
@@ -29,6 +29,7 @@
\input pgfcirclabel.tex
\input pgfcircvoltage.tex
\input pgfcirccurrent.tex
+\input pgfcircflow.tex
% defaults
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
index 6668b6451a4..3d7d61c7bc6 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
@@ -59,10 +59,10 @@
\ctikzset{bipoles/.is family}
\ctikzset{bipoles/border margin/.initial=1.1}
\ctikzset{bipoles/thickness/.initial=2}
-\ctikzset{bipoles/length/.initial=1.4cm}
\ctikzset{nodes width/.initial=.04}
\newdimen\pgf@circ@Rlen
-\ctikzset{bipoles/length/.code={\pgf@circ@Rlen = #1}}
+\ctikzset{bipoles/length/.code={\pgf@circ@Rlen = #1}}
+\pgf@circ@Rlen = 1.4cm
\ctikzset{monopoles/.is family}
\ctikzset{monopoles/ground/width/.initial=.25}
@@ -267,6 +267,7 @@
\ctikzset{bipoles/twoport/text/.initial=}
\ctikzset{bipoles/vco/width/.initial=.7}
\ctikzset{bipoles/bandpass/width/.initial=.7}
+\ctikzset{bipoles/bandstop/width/.initial=.7}
\ctikzset{bipoles/highpass/width/.initial=.7}
\ctikzset{bipoles/lowpass/width/.initial=.7}
\ctikzset{bipoles/adc/width/.initial=.7}
@@ -792,10 +793,28 @@
\ctikzset{bipole/current/y position/.is choice}
\ctikzset{bipole/current/y position/above/.code={\pgf@circuit@bipole@current@belowfalse}}
\ctikzset{bipole/current/y position/below/.code={\pgf@circuit@bipole@current@belowtrue}}
-
\ctikzset{bipole/current/label/unit/.initial=}
\ctikzset{bipole/current/label/name/.initial=}
+\ctikzset{bipole/flow/.is family}
+\newif\ifpgf@circuit@bipole@flow@backward
+\ctikzset{bipole/flow/direction/.is choice}
+\ctikzset{bipole/flow/direction/forward/.code={\pgf@circuit@bipole@flow@backwardfalse}}
+\ctikzset{bipole/flow/direction/backward/.code={\pgf@circuit@bipole@flow@backwardtrue}}
+\newif\ifpgf@circuit@bipole@flow@before
+\ctikzset{bipole/flow/x position/.is choice}
+\ctikzset{bipole/flow/x position/after/.code={\pgf@circuit@bipole@flow@beforefalse}}
+\ctikzset{bipole/flow/x position/before/.code={\pgf@circuit@bipole@flow@beforetrue}}
+\newif\ifpgf@circuit@bipole@flow@below
+\ctikzset{bipole/flow/y position/.is choice}
+\ctikzset{bipole/flow/y position/above/.code={\pgf@circuit@bipole@flow@belowfalse}}
+\ctikzset{bipole/flow/y position/below/.code={\pgf@circuit@bipole@flow@belowtrue}}
+\ctikzset{bipole/flow/label/unit/.initial=}
+\ctikzset{bipole/flow/label/name/.initial=}
+\ctikzset{flow/distance/.initial = .5}
+\ctikzset{flow/offset/.initial = .2}%distance between flow-arrow and conductor
+
+
\ctikzset{bipole/label/.is family}
\ctikzset{bipole/label/position/.initial=90}
\ctikzset{bipole/label/unit/.initial=}
@@ -905,6 +924,7 @@
\ctikzset{current/.is family}
\ctikzset{current/distance/.initial = .5}
+
\tikzset{american currents/.style = { \circuitikzbasekey/current = american } }
\tikzset{european currents/.style = { \circuitikzbasekey/current = european } }
\tikzset{american voltages/.style = { \circuitikzbasekey/voltage = american } }
@@ -913,19 +933,19 @@
\tikzset{european resistors/.style = { \circuitikzbasekey/resistor = european } }
\newif\ifpgf@circuit@europeangfsurgearrester
-\ctikzset{gas filled surge arrester/.is choice}
-\ctikzset{gas filled surge arrester/european/.code= {\pgf@circuit@europeangfsurgearrestertrue } }
-\ctikzset{gas filled surge arrester/american/.code= {\pgf@circuit@europeangfsurgearresterfalse } }
+\ctikzset{gas filled surge arrester choice/.is choice}
+\ctikzset{gas filled surge arrester choice/european/.code= {\pgf@circuit@europeangfsurgearrestertrue } }
+\ctikzset{gas filled surge arrester choice/american/.code= {\pgf@circuit@europeangfsurgearresterfalse } }
-\tikzset{american gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = american } }
-\tikzset{european gas filled surge arrester/.style = { \circuitikzbasekey/gas filled surge arrester = european } }
+\tikzset{american gas filled surge arrester set/.style = { \circuitikzbasekey/gas filled surge arrester choice=american } }
+\tikzset{european gas filled surge arrester set/.style = { \circuitikzbasekey/gas filled surge arrester choice=european } }
\tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
\tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
\tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
\tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
\tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
-\tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester } }
-\tikzset{american/.style = { american currents, american voltages, american resistors, american inductors, american ports, american gas filled surge arrester } }
+\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 voltaege conflicts with the options above)
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
index 1e159c64f60..2850c146763 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
@@ -1843,11 +1843,9 @@
{
\anchor{center}{\pgfpointorigin}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/buffer/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{south}{
@@ -1910,11 +1908,9 @@
{
\anchor{center}{\pgfpointorigin}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{south}{
@@ -1925,12 +1921,10 @@
\pgf@y=0pt
}
\savedanchor\inOne{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/input height}\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{-}{
@@ -1941,11 +1935,9 @@
\pgf@y=-\pgf@y
}
\savedanchor\up{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/plain amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@right = -\pgf@x
@@ -2181,6 +2173,73 @@
\pgfusepath{draw}
}
+%% bandstop filter
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/bandstop/width}}{bandstop}{\ctikzvalof{bipoles/bandstop/width}}{\ctikzvalof{bipoles/bandstop/width}}{
+ \pgf@circ@res@step = \ctikzvalof{bipoles/bandstop/width}\pgf@circ@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
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+
+ \ifpgf@circuit@inputarrow
+ {
+ \advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/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 > 224 \ifnum \pgfcircmathresult < 315
+ \pgftransformrotate{90}
+ \fi\fi
+
+ % draw inner symbol
+ \pgfsetdash{}{0pt}% always draw solid line for inner symbol
+ \pgfsetarrows{-}%never draw arrows
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{-0.15\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.15\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfusepath{draw}
+}
+
%% highpass filter
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/highpass/width}}{highpass}{\ctikzvalof{bipoles/highpass/width}}{\ctikzvalof{bipoles/highpass/width}}{
\pgf@circ@res@step = \ctikzvalof{bipoles/highpass/width}\pgf@circ@Rlen
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
index 1971f32a160..34497df885c 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
@@ -153,7 +153,7 @@
\def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west}
\fi
\fi\fi
- \ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
+ \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356
\ifpgf@circuit@bipole@current@below
\def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west}
\fi
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex
new file mode 100644
index 00000000000..217e482757a
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircflow.tex
@@ -0,0 +1,193 @@
+% Copyright 2007-2009 by Massimo Redaelli
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/LICENSE for more details.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% flow handling
+
+%% Options
+\ctikzset{f^>/.style = {
+ f = #1,
+ \circuitikzbasekey/bipole/flow/direction = forward,
+ \circuitikzbasekey/bipole/flow/x position = after,
+ \circuitikzbasekey/bipole/curflowrent/y position = above
+ }
+}
+
+\ctikzset{f_>/.style = {
+ f = #1,
+ \circuitikzbasekey/bipole/flow/direction = forward,
+ \circuitikzbasekey/bipole/flow/x position = after,
+ \circuitikzbasekey/bipole/flow/y position = below
+ }
+}
+
+\ctikzset{f>^/.style = {
+ f = #1,
+ \circuitikzbasekey/bipole/flow/direction = forward,
+ \circuitikzbasekey/bipole/flow/x position = before,
+ \circuitikzbasekey/bipole/flow/y position = above
+ }
+}
+
+\ctikzset{f>_/.style = {
+ f = #1,
+ \circuitikzbasekey/bipole/flow/direction = forward,
+ \circuitikzbasekey/bipole/flow/x position = before,
+ \circuitikzbasekey/bipole/flow/y position = below
+ }
+}
+
+\ctikzset{f^</.style = {
+ f = #1,
+ \circuitikzbasekey/bipole/flow/direction = backward,
+ \circuitikzbasekey/bipole/flow/x position = after,
+ \circuitikzbasekey/bipole/flow/y position = above
+ }
+}
+
+\ctikzset{f_</.style = {
+ f = #1,
+ \circuitikzbasekey/bipole/flow/direction = backward,
+ \circuitikzbasekey/bipole/flow/x position = after,
+ \circuitikzbasekey/bipole/flow/y position = below
+ }
+}
+
+\ctikzset{f<^/.style = {
+ f = #1,
+ \circuitikzbasekey/bipole/flow/direction = backward,
+ \circuitikzbasekey/bipole/flow/x position = before,
+ \circuitikzbasekey/bipole/flow/y position = above
+ }
+}
+
+\ctikzset{f<_/.style = {
+ f = #1,
+ \circuitikzbasekey/bipole/flow/direction = backward,
+ \circuitikzbasekey/bipole/flow/x position = before,
+ \circuitikzbasekey/bipole/flow/y position = below
+ }
+}
+
+\ctikzset{f</.style = { f = #1, \circuitikzbasekey/bipole/flow/direction = backward} }
+\ctikzset{f_/.style = { f = #1, \circuitikzbasekey/bipole/flow/y position = below } }
+\ctikzset{f>/.style = { f = #1, \circuitikzbasekey/bipole/flow/direction = forward } }
+\ctikzset{f^/.style = { f = #1, \circuitikzbasekey/bipole/flow/y position = above } }
+
+\ctikzset{f/.code = {
+ \pgfkeys{\circuitikzbasekey/bipole/flow/direction = forward,
+ \circuitikzbasekey/bipole/flow/x position = after,
+ \circuitikzbasekey/bipole/flow/y position = above }
+ \pgfkeys{/tikz/circuitikz/bipole/flow/label/name=#1}
+ \ctikzsetvalof{bipole/flow/label/unit}{}
+ \ifpgf@circ@siunitx
+ \pgf@circ@handleSI{#1}
+ \ifpgf@circ@siunitx@res
+ \edef\pgf@temp{\pgf@circ@handleSI@val}
+ \pgfkeyslet{/tikz/circuitikz/bipole/flow/label/name}{\pgf@temp}
+ \edef\pgf@temp{\pgf@circ@handleSI@unit}
+ \pgfkeyslet{/tikz/circuitikz/bipole/flow/label/unit}{\pgf@temp}
+ \else
+ \fi
+ \else
+ \fi
+}
+}
+
+%% Output routine
+\def\pgf@circ@drawflow{
+ \pgfextra{
+ \edef\pgf@circ@ffffff{\pgf@circ@direction}
+ \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@ffffff\pgf@nil}
+
+ \ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
+ \ifpgf@circuit@bipole@flow@below
+ \def\pgf@circ@dir{north west} \else \def\pgf@circ@dir{south east}
+ \fi
+ \fi\fi
+ \ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
+ \ifpgf@circuit@bipole@flow@below
+ \def\pgf@circ@dir{west} \else \def\pgf@circ@dir{east}
+ \fi
+ \fi\fi
+ \ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
+ \ifpgf@circuit@bipole@flow@below
+ \def\pgf@circ@dir{south west}\else \def\pgf@circ@dir{north east}
+ \fi
+ \fi\fi
+ \ifnum\pgfcircmathresult >175 \ifnum\pgfcircmathresult <185
+ \ifpgf@circuit@bipole@flow@below
+ \def\pgf@circ@dir{south}\else\def\pgf@circ@dir{north}
+ \fi
+ \fi\fi
+ \ifnum\pgfcircmathresult >184 \ifnum\pgfcircmathresult <266
+ \ifpgf@circuit@bipole@flow@below
+ \def\pgf@circ@dir{south east}\else\def\pgf@circ@dir{north west}
+ \fi
+ \fi\fi
+ \ifnum\pgfcircmathresult >265 \ifnum\pgfcircmathresult <275
+ \ifpgf@circuit@bipole@flow@below
+ \def\pgf@circ@dir{east}\else \def\pgf@circ@dir{west}
+ \fi
+ \fi\fi
+ \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356
+ \ifpgf@circuit@bipole@flow@below
+ \def\pgf@circ@dir{north east}\else\def\pgf@circ@dir{south west}
+ \fi
+ \fi\fi
+ \ifnum\pgfcircmathresult <5
+ \ifpgf@circuit@bipole@flow@below
+ \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
+ \fi
+ \fi
+ \ifnum\pgfcircmathresult >355
+ \ifpgf@circuit@bipole@flow@below
+ \def\pgf@circ@dir{north}\else\def\pgf@circ@dir{south}
+ \fi
+ \fi
+
+ \ifpgf@circuit@bipole@flow@below
+ \def\pgf@circ@bipole@flow@label@where{-90}
+ \else
+ \def\pgf@circ@bipole@flow@label@where{+90}
+ \fi
+ }
+
+ \pgfextra{\def\pgf@temp{short}\edef\pgf@circ@temp{\ctikzvalof{bipole/kind}}}
+ \ifx\pgf@circ@temp\pgf@temp%draw flow at a short at middle of the line
+ (\tikztostart)--(\tikztotarget)
+ \else% normal bipole or source
+ \ifpgf@circuit@bipole@flow@before
+ (\tikztostart)--(anchorstartnode)
+ \else
+ (anchorendnode)--(\tikztotarget)
+ \fi
+ \fi
+ \pgfextra{
+ \ifpgf@circuit@bipole@flow@backward
+ \ifpgf@circuit@bipole@flow@below
+ \def\flow@offset{\ctikzvalof{flow/offset}\pgf@circ@Rlen}
+ \else
+ \def\flow@offset{-\ctikzvalof{flow/offset}\pgf@circ@Rlen}
+ \fi
+ \pgfmathsubtract{\pgf@circ@ffffff}{180}
+ \edef\pgf@circ@ffffff{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+ \else
+ \ifpgf@circuit@bipole@flow@below
+ \def\flow@offset{-\ctikzvalof{flow/offset}\pgf@circ@Rlen}
+ \else
+ \def\flow@offset{\ctikzvalof{flow/offset}\pgf@circ@Rlen}
+ \fi
+ \fi
+ }
+ coordinate[flowarrow,pos=\ctikzvalof{flow/distance},rotate=\pgf@circ@ffffff,yshift=\flow@offset](Farrowpos)
+ (Farrowpos.\pgf@circ@bipole@flow@label@where) node[anchor=\pgf@circ@dir]{ \pgf@circ@finallabels{flow/label}}
+}
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
index a298b6a3a0e..29943d5d569 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
@@ -87,6 +87,28 @@
\def\pgf@circ@drawlabels#1{
+ \pgfextra{
+ \pgfmathsubtract{\pgf@circ@direction}{90}
+ \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+
+ \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/position}}
+ \ifnum \pgf@circ@temp < 0
+ \pgfmathadd{\pgf@circ@labanc}{180}
+ \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+ \fi
+ \ifpgf@circuit@bipole@inverted
+ \pgfmathadd{\pgf@circ@temp}{180} %If shape is inverted, use opposite anchor
+ \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+ \fi
+
+ \ifnum \ctikzvalof{mirror value} = -1
+ \pgfmathadd{\pgf@circ@temp}{180} %If shape is mirrored, use opposite anchor
+ \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+ \fi
+ }
+ %Firstly, place a coodinate directly at the edge of the shape
+ (\ctikzvalof{bipole/name}.\pgf@circ@temp) coordinate (labelcoor)
+ %now decide, which labels should be drawn
\pgfextra{
\edef\pgf@temp{\ctikzvalof{label/align}}
\def\pgf@circ@temp{straight}
@@ -97,7 +119,7 @@
\pgfextra{\def\pgf@circ@temp{rotate}}
\ifx\pgf@temp\pgf@circ@temp %rotate
\pgf@circ@drawrotlabels{#1}
- \else % smart
+ \else% smart
\pgf@circ@drawsmartlabels{#1}
\fi
\fi
@@ -123,61 +145,70 @@
\def\pgf@circ@drawrotlabels#1{
\pgfextra{
- \def\pgf@circ@temp{\ctikzvalof{bipole/#1/position}}
- \edef\pgfcirclabrot{\pgf@circ@direction} % first or fourth quadrant
- \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
- \ifnum \pgfcircmathresult > 90 \ifnum \pgfcircmathresult < 270 % second or third quadrant
+ \ifnum \ctikzvalof{bipole/#1/position}>0
+ %we need some more space for placement below, due to mid-anchor
+ \def\pgf@circ@labposdistance{1.5ex}
+ \else
+ \def\pgf@circ@labposdistance{2ex}
+ \fi
+ %Calculate rotation of the label from direction and strip decimals
+ \edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+ % rotate the label at second or third quadrant:
+ \ifnum \pgfcirclabrot > 90 \ifnum \pgfcirclabrot < 270
\pgfmathsubtract{\pgf@circ@direction}{180}
\edef\pgfcirclabrot{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
- \pgfmathadd{\pgf@circ@temp}{180} %%%
- \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} %%%
+ %invert the space relationships due to rotatet strings
+ \ifnum \ctikzvalof{bipole/#1/position}>0
+ \def\pgf@circ@labposdistance{2ex}
+ \else
+ \def\pgf@circ@labposdistance{1.5ex}
+ \fi
\fi\fi
-
- \pgfmathadd{\pgf@circ@direction}{90}
- \edef\pgf@circ@labpos{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
- }
- \ifnum \ctikzvalof{mirror value} = -1
- (\ctikzvalof{bipole/name}.south)++(\pgf@circ@labpos:1.5ex) coordinate (labelcoor)
- \else
- (\ctikzvalof{bipole/name}.north)++(\pgf@circ@labpos:1.5ex) coordinate (labelcoor)
- \fi
- (labelcoor) node [rotate=\pgfcirclabrot,anchor=mid] {\pgf@circ@finallabels{#1}}
+ \pgfmathparse{\ctikzvalof{bipole/#1/position}>0?\pgf@circ@direction+90:\pgf@circ@direction-90}
+ \edef\pgf@circ@labposangle{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+ }
+ (labelcoor)++(\pgf@circ@labposangle:\pgf@circ@labposdistance) coordinate(labelcoor)
+ node[anchor=mid,rotate=\pgfcirclabrot](\ctikzvalof{bipole/name}#1){\pgf@circ@finallabels{#1}}
}
\def\pgf@circ@drawreglabels#1{
+
+ %Now calculate all shape positions
+ %Use mid-anchor at x-axis and base-anchor at y-axis, respectively.
+ %All points between will be addressed by angled-anchors:
\pgfextra{
- \pgfmathsubtract{\pgf@circ@direction}{90}
- \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
-
- \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/position}}
- \ifnum \pgf@circ@temp < 0
- \pgfmathadd{\pgf@circ@labanc}{180}
- \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
- \fi
- \ifpgf@circuit@bipole@inverted
- \pgfmathadd{\pgf@circ@temp}{180}
- \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
- \fi
-
- \ifnum \ctikzvalof{mirror value} = -1
- \pgfmathadd{\pgf@circ@temp}{180}
- \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
- \fi
- \pgfmathadd{\pgf@circ@direction}{90}
- \edef\pgf@circ@labpos{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+ \pgfmathadd{\pgf@circ@labanc}{90}
+ \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+ \pgfmathparse{mod(\pgf@circ@temp,180)>135?mod(\pgf@circ@temp,180)-180:mod(\pgf@circ@temp,180)}
+ \edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
}
-
- \ifnum \pgf@circ@labanc = -90
- \ifnum \ctikzvalof{mirror value} = -1
- (\ctikzvalof{bipole/name}.south)++(\pgf@circ@labpos:1.5ex) coordinate (labelcoor)
+ %Values between -5 and 5 are at pos /neg x-axis, values around 90 are at both y-axis
+ \ifnum \pgfcircmathresult > 84 \ifnum \pgfcircmathresult< 96
+ \pgfextra{\edef\pgf@circ@labpos{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}}
+ \ifnum \pgf@circ@labpos > 180
+ \ifnum \ctikzvalof{bipole/#1/position} > 0
+ \pgfextra{\def\pgf@circ@labanc{mid west}}
+ \else
+ \pgfextra{\def\pgf@circ@labanc{mid east}}
+ \fi
\else
- (\ctikzvalof{bipole/name}.north)++(\pgf@circ@labpos:1.5ex) coordinate (labelcoor)
+ \ifnum \ctikzvalof{bipole/#1/position} > 0
+ \pgfextra{\def\pgf@circ@labanc{mid east}}
+ \else
+ \pgfextra{\def\pgf@circ@labanc{mid west}}
+ \fi
\fi
- (labelcoor) node [anchor=mid] {\pgf@circ@finallabels{#1}}
-
- \else
- (\ctikzvalof{bipole/name}.\pgf@circ@temp) node [anchor=\pgf@circ@labanc]{\pgf@circ@finallabels{#1}}
- \fi
+ \fi\fi
+ \ifnum \pgfcircmathresult <6
+ \ifnum \ctikzvalof{bipole/#1/position} < 0
+ %we need some more space for placement below, due to mid-anchor
+ (labelcoor)++(-\pgf@circ@labanc:2ex) coordinate(labelcoor)
+ \else
+ (labelcoor)++(-\pgf@circ@labanc:1.5ex) coordinate(labelcoor)
+ \fi
+ \pgfextra{\def\pgf@circ@labanc{mid}}
+ \fi
+ (labelcoor) node[anchor=\pgf@circ@labanc](\ctikzvalof{bipole/name}#1){\pgf@circ@finallabels{#1}}
}
\def\pgf@circ@finallabels#1{%
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
index 8fe1397467d..44fa367b4ce 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
@@ -1,5 +1,4 @@
-\pgf@circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
\def\pgf@circ@direction{0.0}
% Names
@@ -44,26 +43,43 @@
}
}
+%% Helper function for path-function to ensure using anchors between nodes
+\def\set@explicit@center@anchor#1{
+ \pgfutil@ifundefined{pgf@sh@ns@#1}
+ {
+ %This coordinate is no node(but a relative position or a coordinate), no further handling needed
+ }{
+ \pgfutil@in@.{#1}
+ \ifpgfutil@in@
+ % Anchor is used, do nothing!
+ \else%
+ \let\tikz@moveto@waiting=\relax
+ \pgfpathmoveto{\tikz@last@position}%force movement, because tikz@moveto@waiting
+ \edef#1{#1.center}%ensure using center anchor
+ \fi
+ }
+}
+
%% Generic bipole path
\def\pgf@circ@bipole@path#1#2{
\pgfextra{
+ \set@explicit@center@anchor{\tikztostart}
+ \set@explicit@center@anchor{\tikztotarget}
+ \pgfsyssoftpath@getcurrentpath{\myp@th}%% save current path to extend after calculation of correct start/end coordinates
\ctikzset{bipole/kind = #1}
-
\edef\pgf@temp{\ctikzvalof{bipole/name}}
\def\pgf@circ@temp{}
\ifx\pgf@temp\pgf@circ@temp % if it has not a name
\pgfmathrandominteger{\pgf@circ@rand}{1000}{9999}
\ctikzset{bipole/name = #2\pgf@circ@rand} % create it
\fi
- \pgfsyssoftpath@getcurrentpath{\myp@th}%% save current path to extend after calculation of correct start/end coordinates
}
(\tikztostart) coordinate (\ctikzvalof{bipole/name}start)%necessary to get correct coordinates in the case of relativ start/end or constructions like ((node1)-|(node2))
(\tikztotarget) coordinate (\ctikzvalof{bipole/name}end)
\pgfextra{
- \let\tikz@moveto@waiting=\relax%necessary, if \tikztatarget is a node
\pgfmathanglebetweenpoints{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
{\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
\edef\pgf@circ@direction{\pgfmathresult}%Calculate direction(angle) of path
@@ -115,6 +131,7 @@
\pgf@circ@ifkeyempty{bipole/annotation/name}\else\pgf@circ@drawlabels{annotation}\fi
\pgf@circ@ifkeyempty{bipole/voltage/label/name}\else\pgf@circ@drawvoltage\fi
\pgf@circ@ifkeyempty{bipole/current/label/name}\else\pgf@circ@drawcurrent\fi
+ \pgf@circ@ifkeyempty{bipole/flow/label/name}\else\pgf@circ@drawflow\fi
\pgfextra{\def\pgf@temp{open}\def\pgf@circ@temp{#1}}
\ifx\pgf@temp\pgf@circ@temp % if it is an open
(\ctikzvalof{bipole/name}end)%Move to end of path
@@ -242,6 +259,7 @@
\def\pgf@circ@twoport@path#1{\pgf@circ@bipole@path{twoport}{#1}}
\def\pgf@circ@vco@path#1{\pgf@circ@bipole@path{vco}{#1}}
\def\pgf@circ@bandpass@path#1{\pgf@circ@bipole@path{bandpass}{#1}}
+\def\pgf@circ@bandstop@path#1{\pgf@circ@bipole@path{bandstop}{#1}}
\def\pgf@circ@highpass@path#1{\pgf@circ@bipole@path{highpass}{#1}}
\def\pgf@circ@lowpass@path#1{\pgf@circ@bipole@path{lowpass}{#1}}
\def\pgf@circ@adc@path#1{\pgf@circ@bipole@path{adc}{#1}}
@@ -356,6 +374,7 @@
\compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoport@path}}
\compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vco@path}}
\compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandpass@path}}
+\compattikzset{bandstop/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandstop@path}}
\compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@highpass@path}}
\compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lowpass@path}}
\compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@adc@path}}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
index c70b851ff9f..e1951a6319c 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
@@ -18,11 +18,9 @@
\pgf@x=0pt
}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=.5\pgf@x
+ \pgf@x=.5\pgf@circ@Rlen
\pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
}
\anchor{A2}{
@@ -89,8 +87,6 @@
\pgf@circ@res@right = -\pgf@x
\pgf@circ@res@left = \pgf@x
- %\pgf@circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-
#2
}
@@ -217,11 +213,9 @@
{
\anchor{center}{\pgfpointorigin}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{south}{
@@ -235,12 +229,10 @@
\pgf@y=0pt
}
\savedanchor\inOne{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{-}{
@@ -251,11 +243,9 @@
\pgf@y=-\pgf@y
}
\savedanchor\up{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@right = -\pgf@x
@@ -440,11 +430,9 @@
\pgf@y=0pt
}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=.5\pgf@x
+ \pgf@x=.5\pgf@circ@Rlen
\pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
}
\anchor{north}{
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
index 07a8ce6be06..e0985bc65b6 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
@@ -54,12 +54,12 @@
\pgf@circ@res@left=\pgf@x
\pgf@circ@res@up=\pgf@y
\pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
-}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}
+}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}}
}
\behindforegroundpath{
\pgfscope
- \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+ \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
\pgfusepath{draw,fill}
\endpgfscope
@@ -77,13 +77,13 @@
\pgf@circ@res@left=\pgf@x
\pgf@circ@res@up=\pgf@y
\pgfpointborderellipse{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}
-}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}}
+}{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}}
}
\behindforegroundpath{
\pgfscope
- \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+ \pgfpathcircle{\pgfpointorigin}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
\pgfsetfillcolor{white}
\pgfusepath{draw,fill}
@@ -104,7 +104,7 @@
}
\behindforegroundpath{
\pgfscope
- \pgfmathsetlength{\pgf@circ@res@temp}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+ \pgfmathsetlength{\pgf@circ@res@temp}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
\pgftransformrotate{45}
\pgfpathrectanglecorners
{\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@temp}{\pgf@circ@res@up+\pgf@circ@res@temp}}
@@ -145,14 +145,14 @@
}
\anchor{tip}{
\pgfpointorigin
- \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@circ@res@step = \pgf@circ@Rlen
\divide \pgf@circ@res@step by 16
\pgf@x =\pgf@circ@res@step
}
\behindforegroundpath{
\pgfscope
- \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@circ@res@step = \pgf@circ@Rlen
\divide \pgf@circ@res@step by 16
\pgfpathmoveto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
@@ -168,7 +168,33 @@
}
-%% Current arrow
+%% Flow arrow
+
+\pgfdeclareshape{flowarrow}{
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{tip}{
+ \pgfpointorigin
+ \pgf@circ@res@step = \pgf@circ@Rlen
+ \divide \pgf@circ@res@step by 16
+ \pgf@x =\pgf@circ@res@step
+ }
+ \behindforegroundpath{
+ \pgfscope
+ \pgf@circ@res@step = \pgf@circ@Rlen
+ \divide \pgf@circ@res@step by 4
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+ \pgfusepath{draw}
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@step}{0pt}}
+ \pgfnode{currarrow}{tip}{}{}{\pgfusepath{fill}}
+ \endpgfscope
+ }
+}
+
+%% Input arrow
\pgfdeclareshape{inputarrow}{
\savedanchor{\tip}{
@@ -183,7 +209,7 @@
\behindforegroundpath{
\pgfscope
- \pgf@circ@res@step = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@circ@res@step = \pgf@circ@Rlen
\divide \pgf@circ@res@step by 16
\pgfpathmoveto{\pgfpoint{-1.7\pgf@circ@res@step}{0pt}}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
index 5acebc07c82..c010dc5acd7 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
@@ -15,11 +15,9 @@
\pgfdeclareshape{spdt}
{
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{left}{%
@@ -142,23 +140,19 @@
\pgfdeclareshape{american #1 port}
{
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\savedanchor\left{%
\pgf@y=0pt
}
\savedanchor\inOne{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/input height}\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american #1 port/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{in 1}{
@@ -562,11 +556,9 @@
{
\anchor{center}{\pgfpointorigin}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\savedanchor\left{%
@@ -662,11 +654,9 @@
{
\anchor{center}{\pgfpointorigin}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\savedanchor\left{%
@@ -774,11 +764,9 @@
{
\anchor{center}{\pgfpointorigin}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\savedanchor\left{%
@@ -889,23 +877,19 @@
\pgfdeclareshape{european #1 port}
{
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\savedanchor\left{%
\pgf@y=0pt
}
\savedanchor\inOne{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/input height}\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/european #1 port/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{in}{
@@ -1034,20 +1018,18 @@
\pgfpointorigin
}
\savedanchor\northeast{% upper right
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
\pgf@x=0pt
}
\savedanchor\left{%center left
\pgf@y=0pt
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@circ@Rlen
}
\anchor{text}{
\northeast
\pgf@y=.7\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x= \pgf@circ@Rlen
\pgf@x=0.1\pgf@x
}
\anchor{pathstart}{ % south
@@ -1523,8 +1505,8 @@
\pgfusepath{draw}
\fi
\pgfpathcircle{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
- {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgf@circ@Rlen}
\ifpgf@circuit@pmos@emptycircle
\pgfsetfillcolor{white}
\fi
@@ -2260,11 +2242,9 @@
{
\anchor{center}{\pgfpointorigin}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{south}{
@@ -2284,12 +2264,10 @@
\pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x
}
\savedanchor\inOne{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{-}{
@@ -2300,11 +2278,9 @@
\pgf@y=-\pgf@y
}
\savedanchor\up{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@right = -\pgf@x
@@ -2393,11 +2369,9 @@
{
\anchor{center}{\pgfpointorigin}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{south}{
@@ -2418,12 +2392,10 @@
\pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/port width}\pgf@x
}
\savedanchor\inOne{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/input height}\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/en amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{-}{
@@ -2503,11 +2475,9 @@
{
\anchor{center}{\pgfpointorigin}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{south}{
@@ -2525,12 +2495,10 @@
\pgf@x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf@x
}
\savedanchor\inOne{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
}
\anchor{-}{
@@ -2541,11 +2509,9 @@
\pgf@y=-\pgf@y
}
\savedanchor\up{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@right = -\pgf@x
@@ -2709,18 +2675,14 @@
{
\savedanchor\northwest{
\ifpgf@circuit@boxed
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
\else
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
\fi
}
@@ -2857,18 +2819,14 @@
{
\savedanchor\northwest{
\ifpgf@circuit@boxed
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
\else
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
\fi
}
@@ -3007,17 +2965,13 @@
{
\savedanchor\northwest{
\ifpgf@circuit@boxed
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
\else
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@circ@Rlen
\fi
}
\anchor{center}{
@@ -3091,18 +3045,14 @@
{
\savedanchor\northwest{
\ifpgf@circuit@boxed
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
\else
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
\fi
}
@@ -3207,10 +3157,9 @@
\pgf@y=0pt
}
\savedanchor\northwest{%
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x= \pgf@circ@Rlen
\pgf@x=.5\pgf@x
\pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/wilkinson/width}\pgf@x
}
@@ -3329,21 +3278,10 @@
\pgfdeclareshape{elmech}
{
\savedanchor\northwest{
- %\ifpgf@circuit@boxed
- % \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- % \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
- % \pgf@y=.5\pgf@y
- % \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- % \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
- % \pgf@x=.5\pgf@x
- %\else
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/height}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/height}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
- %\fi
}
\anchor{center}{
\pgfpointorigin
@@ -3432,21 +3370,10 @@
\pgfdeclareshape{magnetron}
{
\savedanchor\northwest{
- %\ifpgf@circuit@boxed
- % \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- % \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
- % \pgf@y=.5\pgf@y
- % \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- % \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
- % \pgf@x=.5\pgf@x
- %\else
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@circ@Rlen
\pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@x
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@circ@Rlen
\pgf@x=.5\pgf@x
- %\fi
}
\anchor{center}{
\pgfpointorigin
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
index de8305354f2..143f697ce04 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
@@ -36,9 +36,13 @@
v = #1,
\circuitikzbasekey/bipole/voltage/direction = backward,
\circuitikzbasekey/bipole/voltage/position = below
- }
+ }
}
+\ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} }
+\ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = above} }
+\ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} }
+\ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} }
% Default position varies whether the component is a voltage source
% or not
@@ -68,7 +72,7 @@
\ctikzsetvalof{bipole/voltage/label/unit}{}
\ifpgf@circ@siunitx
\pgf@circ@handleSI{#1}
- \ifpgf@circ@siunitx@res
+ \ifpgf@circ@siunitx@res
\edef\pgf@temp{\pgf@circ@handleSI@val}
\pgfkeyslet{/tikz/circuitikz/bipole/voltage/label/name}{\pgf@temp}
\edef\pgf@temp{\pgf@circ@handleSI@unit}
@@ -77,26 +81,33 @@
\fi
\else
\fi
- }
+ }
}
-\ctikzset{v_/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = below} }
-\ctikzset{v^/.style = {v = #1, \circuitikzbasekey/bipole/voltage/position = above} }
-\ctikzset{v>/.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = forward} }
-\ctikzset{v</.style = {v = #1, \circuitikzbasekey/bipole/voltage/direction = backward} }
+
%% Output routine for generic bipoles
\def\pgf@circ@drawvoltagegeneric{
- \pgfextra{\edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/straight label distance}
+ \pgfextra{
+ \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/straight label distance}
\pgfkeysifdefined{\pgf@temp}
- { \edef\partwidth{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/straight label distance}}
- \def\tmpdistfromline{\partwidth\pgf@circ@Rlen}}
{
- \edef\partwidth{0.5*\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/height}}
- \def\tmpdistfromline{(\partwidth\pgf@circ@Rlen+0.2\pgf@circ@Rlen)}
- }
+ \edef\partheight{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/straight label distance}}
+ \edef\tmpdistfromline{(\partheight\pgf@circ@Rlen)}
+ }
+ {
+ \pgfkeysifdefined{/tikz/circuitikz/bipoles/voltage/straight label distance}
+ {
+ \edef\partheight{\ctikzvalof{bipoles/voltage/straight label distance}}
+ \edef\tmpdistfromline{(\partheight\pgf@circ@Rlen)}
+ }
+ {%calculate default value from part height
+ \edef\partheight{0.5*\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/height}}
+ \edef\tmpdistfromline{(\partheight\pgf@circ@Rlen+0.2\pgf@circ@Rlen)}
+ }
+ }
\ifnum \ctikzvalof{mirror value}=-1
\ifpgf@circuit@bipole@inverted
\ifpgf@circuit@bipole@voltage@straight
@@ -126,13 +137,11 @@
\fi
\fi
\fi
-
\ifpgf@circuit@bipole@voltage@below
\def\pgf@circ@voltage@angle{90}
\else
- \def\pgf@circ@voltage@angle{-90}
- \fi
-
+ \def\pgf@circ@voltage@angle{-90}
+ \fi
\edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}
\pgfkeysifdefined{\pgf@temp}
{ \edef\distacefromnode{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/distance from node}} }
@@ -142,19 +151,16 @@
{ \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} }
{ \edef\bumpb{\ctikzvalof{voltage/bump b}} }
}
-
- % %\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}/16 is equal to the length of the currarrow
- coordinate (pgfcirc@midtmp) at ($(\tikztostart) ! \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}/16 ! (anchorstartnode)$) %absolute move, minimum space is length of arrowhead
+ % %\pgf@circ@Rlen/16 is equal to the length of the currarrow
+ coordinate (pgfcirc@midtmp) at ($(\tikztostart) ! \pgf@circ@Rlen/16 ! (anchorstartnode)$) %absolute move, minimum space is length of arrowhead
coordinate (pgfcirc@midtmp) at ($(pgfcirc@midtmp) ! \distacefromnode ! (anchorstartnode)$)
-
- coordinate (pgfcirc@Vfrom) at ($(pgfcirc@midtmp) ! -\distfromline ! \pgf@circ@voltage@angle:(anchorstartnode)$)
- coordinate (pgfcirc@midtmp) at ($(\tikztotarget) ! \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}/16 ! (anchorendnode)$)%absolute move, minimum space is length of arrowhead
+ coordinate (pgfcirc@Vfrom) at ($(pgfcirc@midtmp) ! -\distfromline ! \pgf@circ@voltage@angle:(anchorstartnode)$)
+ coordinate (pgfcirc@midtmp) at ($(\tikztotarget) ! \pgf@circ@Rlen/16 ! (anchorendnode)$)%absolute move, minimum space is length of arrowhead
coordinate (pgfcirc@midtmp) at ($(pgfcirc@midtmp) ! \distacefromnode ! (anchorendnode)$)
coordinate (pgfcirc@Vto) at ($(pgfcirc@midtmp) ! \distfromline ! \pgf@circ@voltage@angle : (anchorendnode)$)
-
\ifpgf@circuit@bipole@voltage@below
coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
coordinate (pgfcirc@Vcont2) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-70)$)
@@ -166,45 +172,43 @@
\ifpgf@circuit@europeanvoltage
\ifpgf@circuit@bipole@voltage@straight
\ifpgf@circuit@bipole@voltage@backward
- (pgfcirc@Vto) --(pgfcirc@Vfrom) node[currarrow, sloped, allow upside down, pos=1,anchor=tip] {}
+ (pgfcirc@Vto) --(pgfcirc@Vfrom) node[currarrow, sloped, allow upside down, pos=1,anchor=tip] {}
\else
- (pgfcirc@Vfrom) --(pgfcirc@Vto) node[currarrow, sloped, allow upside down, pos=1,anchor=tip] {}
-
- \fi
+ (pgfcirc@Vfrom) --(pgfcirc@Vto) node[currarrow, sloped, allow upside down, pos=1,anchor=tip] {}
+ \fi
\else
\ifpgf@circuit@bipole@voltage@backward
- (pgfcirc@Vto) .. controls (pgfcirc@Vcont2) and (pgfcirc@Vcont1) ..
- node[currarrow, sloped, allow upside down, pos=1] {}
- (pgfcirc@Vfrom)
+ (pgfcirc@Vto) .. controls (pgfcirc@Vcont2) and (pgfcirc@Vcont1) ..
+ node[currarrow, sloped, allow upside down, pos=1] {}
+ (pgfcirc@Vfrom)
\else
(pgfcirc@Vfrom) .. controls (pgfcirc@Vcont1) and (pgfcirc@Vcont2) ..
node[currarrow, sloped, allow upside down, pos=1] {}
- (pgfcirc@Vto)
- \fi
+ (pgfcirc@Vto)
+ \fi
\fi
\else
\ifpgf@circuit@bipole@voltage@backward
\ifpgf@circ@oldvoltagedirection
- (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
+ (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
(pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
\else
- (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
+ (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
(pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
\fi
\else
\ifpgf@circ@oldvoltagedirection
- (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
+ (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$-$}
(pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$+$}
\else
- (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
+ (pgfcirc@Vfrom) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{\scriptsize$+$}
(pgfcirc@Vto) node[inner sep=0, anchor=\pgf@circ@bipole@voltage@label@anchor]{$-$}
\fi
- \fi
+ \fi
\fi
}
%% Output routine for voltage sources
-
\def\pgf@circ@drawvoltagegenerator{
\ifpgf@circuit@bipole@voltage@below
coordinate (pgfcirc@Vfrom) at ($(\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.-120)$)
@@ -213,17 +217,14 @@
coordinate (pgfcirc@Vfrom) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.120)$)
coordinate (pgfcirc@Vto) at ($ (\ctikzvalof{bipole/name}.center) ! \ctikzvalof{voltage/bump a} ! (\ctikzvalof{bipole/name}.60)$)
\fi
-
\ifpgf@circuit@europeanvoltage
\ifpgf@circuit@bipole@voltage@backward
(pgfcirc@Vto) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vfrom)
\else
(pgfcirc@Vfrom) -- node[currarrow, sloped, allow upside down, pos=1] {} (pgfcirc@Vto)
\fi
-
- \else % american voltage
-
- \ifpgf@circuit@bipole@voltageoutsideofsymbol
+ \else% american voltage
+ \ifpgf@circuit@bipole@voltageoutsideofsymbol
% if it is a battery, must put + and -
\ifpgf@circuit@bipole@voltage@backward
(pgfcirc@Vfrom) node {$-$} (pgfcirc@Vto) node {$+$}
@@ -231,26 +232,24 @@
(pgfcirc@Vfrom) node {$+$} (pgfcirc@Vto) node {$-$}
\fi
\fi
-
\fi
}
%% Output routine
-
-\def\pgf@circ@drawvoltage{ % node name
+\def\pgf@circ@drawvoltage{% node name
+%\pgf@circ@direction
\pgfextra{
\edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
-
\ifnum\pgfcircmathresult >4 \ifnum\pgfcircmathresult <86
\ifpgf@circuit@bipole@voltage@below
- \def\pgf@circ@bipole@voltage@label@anchor{north west}
+ \def\pgf@circ@bipole@voltage@label@anchor{north west}
\else \def\pgf@circ@bipole@voltage@label@anchor{south east}
\fi
\fi\fi
\ifnum\pgfcircmathresult >85 \ifnum\pgfcircmathresult <95
\ifpgf@circuit@bipole@voltage@below
- \def\pgf@circ@bipole@voltage@label@anchor{west}
- \else \def\pgf@circ@bipole@voltage@label@anchor{east}
+ \def\pgf@circ@bipole@voltage@label@anchor{west}
+ \else \def\pgf@circ@bipole@voltage@label@anchor{east}
\fi
\fi\fi
\ifnum\pgfcircmathresult >94 \ifnum\pgfcircmathresult <176
@@ -277,7 +276,7 @@
\else \def\pgf@circ@bipole@voltage@label@anchor{west}
\fi
\fi\fi
- \ifnum\pgfcircmathresult >284 \ifnum\pgfcircmathresult <356
+ \ifnum\pgfcircmathresult >274 \ifnum\pgfcircmathresult <356
\ifpgf@circuit@bipole@voltage@below
\def\pgf@circ@bipole@voltage@label@anchor{north east}
\else\def\pgf@circ@bipole@voltage@label@anchor{south west}
@@ -286,7 +285,7 @@
\ifnum\pgfcircmathresult >-1 \ifnum\pgfcircmathresult <5
\ifpgf@circuit@bipole@voltage@below
\def\pgf@circ@bipole@voltage@label@anchor{north}
- \else\def\pgf@circ@bipole@voltage@label@anchor{south}
+ \else\def\pgf@circ@bipole@voltage@label@anchor{south}
\fi
\fi\fi
\ifnum\pgfcircmathresult >355 \ifnum\pgfcircmathresult <361
@@ -295,7 +294,7 @@
\else\def\pgf@circ@bipole@voltage@label@anchor{south}
\fi
\fi\fi
-
+
\ifnum \ctikzvalof{mirror value}=-1
\ifpgf@circuit@bipole@voltage@below
\pgf@circuit@bipole@voltage@belowfalse
@@ -303,7 +302,7 @@
\pgf@circuit@bipole@voltage@belowtrue
\fi
\fi
-
+
\ifpgf@circuit@bipole@inverted
\ifpgf@circuit@bipole@voltage@below
\pgf@circuit@bipole@voltage@belowfalse
@@ -311,33 +310,32 @@
\pgf@circuit@bipole@voltage@belowtrue
\fi
\fi
-
+
\ifpgf@circuit@bipole@voltage@below
\def\pgf@circ@bipole@voltage@label@where{-90}
\else
\def\pgf@circ@bipole@voltage@label@where{90}
\fi
-
-
- \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label
- distance}
+
+
+ \edef\pgf@temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}
\pgfkeysifdefined{\pgf@temp}
{ \edef\eudist{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}} }
{ \edef\eudist{\ctikzvalof{voltage/european label distance}} }
-
+
\pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
- } %end pgfextra
+ }%end pgfextra
\ifpgf@circuit@bipole@isvoltage
- \pgf@circ@drawvoltagegenerator
+ \pgf@circ@drawvoltagegenerator
\else
- \pgf@circ@drawvoltagegeneric
+ \pgf@circ@drawvoltagegeneric
\fi
-
+
% (\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where) %Zeile sinnlos!?
\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]
+ node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt]
at (Vlab) { \pgf@circ@finallabels{voltage/label} }
\else
coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
@@ -347,10 +345,7 @@
\ctikzvalof{voltage/american label distance}
\fi !
(\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)$)
- node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt]
- at (Vlab) { \pgf@circ@finallabels{voltage/label} }
-
+ node [anchor=\pgf@circ@bipole@voltage@label@anchor, inner sep=2pt] at (Vlab) { \pgf@circ@finallabels{voltage/label} }
\fi
- }%end drawvoltages
-
+}%end drawvoltages
\endinput
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
index d15d6bf81d9..d12a46f279f 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
@@ -10,8 +10,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{0.8.2}
-\def\pgfcircversiondate{2017/05/01}
+\def\pgfcircversion{0.8.3}
+\def\pgfcircversiondate{2017/05/28}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
@@ -80,11 +80,11 @@
\DeclareOption{european}{
\ctikzset{voltage=european} \ctikzset{current=european} \ctikzset{inductor=european}
- \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester = european}
+ \ctikzset{resistor=european} \ctikzset{logic ports=european} \ctikzset{gas filled surge arrester choice = european}
}
\DeclareOption{american}{
- \ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester = american}
+ \ctikzset{voltage=american} \ctikzset{current=american} \ctikzset{resistor=american} \ctikzset{inductor=american} \ctikzset{gas filled surge arrester choice = american}
\ctikzset{logic ports = american}
}
@@ -141,11 +141,11 @@
}
\DeclareOption{americangfsurgearrester}{
- \ctikzset{gas filled surge arrester = american}
+ \ctikzset{gas filled surge arrester choice = american}
}
\DeclareOption{europeangfsurgearrester}{
- \ctikzset{gas filled surge arrester = european}
+ \ctikzset{gas filled surge arrester choice = european}
}
\DeclareOption{siunitx}{
@@ -311,6 +311,7 @@
\input pgfcirclabel.tex
\input pgfcircvoltage.tex
\input pgfcirccurrent.tex
+\input pgfcircflow.tex
\ExecuteOptions{nofetbodydiode,nofetsolderdot,nooldvoltagedirection,europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility}