summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-09-08 21:57:45 +0000
committerKarl Berry <karl@freefriends.org>2016-09-08 21:57:45 +0000
commit067cb21a3a797493d44fed615554c1e1e1b1ed1a (patch)
tree0ba609f19517cdb8728fe0b5380a84e92054de4f /Master
parentb7747c8d4d4d68a76509ac479f1967471d9a58a5 (diff)
circuitikz (8sep16)
git-svn-id: svn://tug.org/texlive/trunk@42017 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdfbin12180 -> 12314 bytes
-rw-r--r--Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md11
-rw-r--r--Master/texmf-dist/doc/generic/circuitikz/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/changelog.tex27
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdfbin261924 -> 272705 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex53
-rw-r--r--Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex4
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex22
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex136
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex12
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex112
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex89
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex3
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex2
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex314
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex10
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex114
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty16
18 files changed, 694 insertions, 233 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 0742037452f..179cccdcbfd 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 b5e521839ff..bbed4c5b9e9 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.7 (2016-09-08)
+ - Added second annotation label, showing, e.g., the value of an component
+ - Added new symbol: magnetron
+ - Fixed name conflict of diamond shape with tikz.shapes package
+ - Fixed varcap symbol at small scalings
+ - New packet-option "straightvoltages, to draw straight(no curved) voltage arrows
+ - New option "invert" to revert the node direction at paths
+ - Fixed american voltage label at special sources and battery
+ - Fixed/rotated battery symbol(longer lines by default positive voltage)
+ - New symbol Schmitttrigger
+
* Version 0.6 (2016-06-06)
- Added Mechanical Symbols (damper,mass,spring)
- Added new connection style diamond, use (d-d)
diff --git a/Master/texmf-dist/doc/generic/circuitikz/README.md b/Master/texmf-dist/doc/generic/circuitikz/README.md
index f7c87d44ba1..f0d61a8c9c0 100644
--- a/Master/texmf-dist/doc/generic/circuitikz/README.md
+++ b/Master/texmf-dist/doc/generic/circuitikz/README.md
@@ -1,7 +1,7 @@
circuitikz
==========
-This is CircuiTikz, version 0.6 (2016-06-05).
+This is CircuiTikz, version 0.7 (2016-09-08).
This package provides a set of macros for naturally typesetting electrical and (somewhat less naturally, perhaps) electronical networks.
diff --git a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
index c8d89491bed..9be77ba6782 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
@@ -6,6 +6,33 @@ full list of changes.
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
+ Version 0.7 (2016-09-08)
+
+ \begin{itemize}
+ \itemsep1pt\parskip0pt\parsep0pt
+ \item
+ Added second annotation label, showing, e.g., the value of an
+ component
+ \item
+ Added new symbol: magnetron
+ \item
+ Fixed name conflict of diamond shape with tikz.shapes package
+ \item
+ Fixed varcap symbol at small scalings
+ \item
+ New packet-option ``straightvoltages, to draw straight(no curved)
+ voltage arrows
+ \item
+ New option ``invert'' to revert the node direction at paths
+ \item
+ Fixed american voltage label at special sources and battery
+ \item
+ Fixed/rotated battery symbol(longer lines by default positive
+ voltage)
+ \item
+ New symbol Schmitttrigger
+ \end{itemize}
+\item
Version 0.6 (2016-06-06)
\begin{itemize}
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
index 2654b941356..54caadf2efc 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 676900927aa..f49f9600445 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
@@ -146,6 +146,7 @@ The easiest way to contact the authors is via the official Github repository: \u
\section{Incompabilities between version}
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.
\begin{itemize}
+\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
\end{itemize}
@@ -185,6 +186,7 @@ Feel free to load the package with your own cultural options:
\noindent Here is the list of all the options:
\begin{itemize}
\item \texttt{europeanvoltages}: uses arrows to define voltages, and uses european-style voltage sources;
+ \item \texttt{straightvoltages}: uses arrows to define voltages, and and uses straight voltage arrows;
\item \texttt{americanvoltages}: uses $-$ and $+$ to define voltages, and uses american-style voltage sources;
\item \texttt{europeancurrents}: uses european-style current sources;
\item \texttt{americancurrents}: uses american-style current sources;
@@ -634,6 +636,23 @@ Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} t
\circuititem{isfet}{\scshape isfet}{}
\end{itemize}
+\subsubsection{Electronic Tubes}
+\begin{itemize}
+ \circuititem{magnetron}{Magnetron}{}
+\end{itemize}
+\begin{LTXexample}[varwidth=true]
+ \begin{circuitikz}
+ \draw (0,-2)node[rground](gnd){} to[voltage source,v<={HV}]++(0,3)--++(1,0)to[V,n=DC]++(2,0);
+ \draw (2,-1) node[magnetron,scale=1](magn){};
+ \draw (DC.left)++(-0.2,0)to [short,*-] ++(0,-1) to [short] (magn.cathode1);
+ \draw (DC.right)++(0.2,0)to [short,*-] ++(0,-1) to [short] (magn.cathode2);
+ \draw (magn.anode) to [short] (magn.anode|-gnd) node[rground]{};
+ \draw (magn.cathode1)node[above]{$1$};
+ \draw (magn.cathode2)node[above]{$2$};
+ \draw[->](magn.east) --++(1,0)node[right]{$RF_{out}$};
+ \end{circuitikz}
+\end{LTXexample}
+
\subsubsection{Block diagram}
These come from Stefan Erhardt's contribution of block diagram components. Add a box around them with the option \texttt{box}.
\begin{itemize}
@@ -759,6 +778,7 @@ If otherwise \texttt{europeanports} option is active (or the style \texttt{[euro
\circuititem{inputarrow}{Arrow to draw at its tip, useful for block diagrams.}{}
\circuititem{circ}{Connected terminal}{}
\circuititem{ocirc}{Unconnected terminal}{}
+ \circuititem{diamondpole}{Diamond-style terminal}{}
\end{itemize}
@@ -810,17 +830,20 @@ Long names/styles for the bipoles can be used:
;\end{circuitikz}
\end{LTXexample}
-\subsection{Labels}
+\subsection{Labels and Annotations}
+Since Version 0.7, beside the original label (l) option, there is a new option to place a second label, called annotation (a) at each bipole. Up to now this is a beta-test and there can be problems. For example, up to now this option is not compatible with the concurrent use of voltage labels.
+
+The position of (a) and (l) labels can be adjusted with \_ and \^, respectively.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, l^=$R_1$] (2,0);
+ \draw (0,0) to[R, l=$R_1$,a=1<\kilo\ohm>] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[R, l_=$R_1$] (2,0);
+ \draw (0,0) to[R, l_=$R_1$,a^=1<\kilo\ohm>] (2,0);
\end{circuitikz}
\end{LTXexample}
@@ -1326,7 +1349,8 @@ If the option {\ttfamily siunitx} is active (and \emph{not} in \ConTeXt), then t
-\subsection{Mirroring}
+\subsection{Mirroring and Inverting}
+Bipole paths can also mirrored and inverted (or reverted) to change the drawing direction.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -1338,30 +1362,37 @@ If the option {\ttfamily siunitx} is active (and \emph{not} in \ConTeXt), then t
\begin{circuitikz}
\draw (0,0) to[pD, mirror] (2,0);
\end{circuitikz}
+\end{LTXexample}
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[pD, invert] (2,0);
+\end{circuitikz}
\end{LTXexample}
-At the moment, placing labels and currents on mirrored bipoles works:
+Placing labels, currents and voltages works also, please note, that mirroring and inverting does not incfluence the positioning of labels and voltages. Labels are by default above/right of the bipole and voltages below/left, respectively.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[ospst=T] (2,0);
+ \draw (0,0) to[ospst=T, i=$i_1$, v=$v$] (2,0);
\end{circuitikz}
\end{LTXexample}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[ospst=T, mirror, i=$i_1$] (2,0);
+ \draw (0,0) to[ospst=T, mirror, i=$i_1$, v=$v$] (2,0);
\end{circuitikz}
\end{LTXexample}
-But voltages don't:
-
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
- \draw (0,0) to[ospst=T, mirror, v=v] (2,0);
+ \draw (0,0) to[ospst=T, invert, i=$i_1$, v=$v$] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[ospst=T,mirror,invert, i=$i_1$, v=$v$] (2,0);
\end{circuitikz}
\end{LTXexample}
-Sorry about that.
\subsection{Putting them together}
\begin{LTXexample}[varwidth=true]
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 cbf664a6c64..d3c9d6949a1 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.6}
-\def\pgfcircversiondate{2016/06/06}
+\def\pgfcircversion{0.7}
+\def\pgfcircversiondate{2016/09/08}
\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 1616cd556e2..4c962cdc74c 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
@@ -569,10 +569,6 @@
\ctikzset{logic ports/european/.code= {\pgf@circuit@europeanlogicporttrue } }
\ctikzset{logic ports/american/.code= {\pgf@circuit@europeanlogicportfalse } }
-\newif\ifpgf@circuit@bipole@voltage@backward
-\ctikzset{bipole/voltage/direction/.is choice}
-\ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
-\ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
\ctikzset{tripoles/american and port/width/.initial=1.1}
\ctikzset{tripoles/american and port/height/.initial=.8}
@@ -722,6 +718,9 @@
\ctikzset{quadpoles/coupler2/width/.initial=1.3}
\ctikzset{quadpoles/coupler2/height/.initial=1.3}
+\ctikzset{/tikz/circuitikz/tripoles/magnetron/width/.initial=1}
+
+
% %Mechanical section
\ctikzset{/tikz/circuitikz/tripoles/elmech/height/.initial=.8}
\ctikzset{/tikz/circuitikz/tripoles/elmech/width/.initial=.6}
@@ -739,8 +738,6 @@
\ctikzset{bipole/.is family}
\ctikzset{bipole/kind/.initial = }
\ctikzset{bipole/name/.initial = }
-\newif\ifpgf@circuit@bipole@reversed
-\ctikzset{bipole/reversed/.is if=pgf@circuit@bipole@reversed}
\newif\ifpgf@circuit@bipole@isvoltage
\ctikzset{bipole/is voltage/.is if=pgf@circuit@bipole@isvoltage}
\newif\ifpgf@circuit@bipole@voltageoutsideofsymbol
@@ -784,6 +781,10 @@
\ctikzset{bipole/label/position/.initial=90}
\ctikzset{bipole/label/unit/.initial=}
\ctikzset{bipole/label/name/.initial=}
+\ctikzset{bipole/annotation/.is family}
+\ctikzset{bipole/annotation/position/.initial=-90}
+\ctikzset{bipole/annotation/unit/.initial=}
+\ctikzset{bipole/annotation/name/.initial=}
\ctikzset{bipole/nodes/.is family}
\ctikzset{bipole/nodes/left/.is choice}
\ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
@@ -831,6 +832,15 @@
\newif\ifpgf@circ@siunitx
\newif\ifpgf@circ@siunitx@res
+\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}
+
+
\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
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
index 012bb2c9f77..a66e907e656 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
@@ -57,73 +57,73 @@
}
\anchor{center}{\pgfpointorigin}
\anchor{n}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@x=0cm
}
\anchor{ne}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
}
\anchor{nw}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@x=-\pgf@x
}
\anchor{e}{%
- \ifpgf@circuit@bipole@reversed\else\southwest\northeast\fi
+ \northeast
\pgf@y=0cm
}
\anchor{s}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@x=0cm
}
\anchor{se}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@x=-\pgf@x
}
\anchor{sw}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
}
\anchor{w}{
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\anchor{north}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@x=0cm
}
\anchor{east}{%
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
\anchor{south}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@x=0cm
}
\anchor{west}{
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\anchor{right}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
\anchor{above}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@x=0cm
}
\anchor{left}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\anchor{below}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@x=0cm
}
\anchor{a}{%
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
\anchor{b} {
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\savedanchor{\textanchor}{%
@@ -134,8 +134,7 @@
\textanchor
}
\anchorborder{%
- \def\pgf@temp{false}
- \ifpgf@circuit@bipole@reversed\pgf@temp
+ \ifpgf@circuit@bipole@inverted
\pgf@circ@res@left=-\pgf@x
\pgf@circ@res@right=-\pgf@y
\else
@@ -164,7 +163,7 @@
\pgf@circ@res@down = \pgf@y
\pgfstartlinewidth=\pgflinewidth
-
+ \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
#6
\pgfsetlinewidth{\pgfstartlinewidth}
@@ -314,17 +313,17 @@
\divide \pgf@circ@res@step by 6
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@down}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{.5\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{.5\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
\pgfusepath{draw}
}
@@ -340,11 +339,11 @@
\pgfusepath{draw}
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}}
- \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}}
@@ -1044,23 +1043,19 @@
%% Black varcap
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{fullvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfscope
- \pgftransformxshift{\pgf@circ@res@left}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{0pt}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{0pt}}
- \pgfusepath{draw,fill}
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \endpgfscope
+ \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+ \pgfsetlinewidth{\pgf@circ@res@temp}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
+ \pgfusepath{draw,fill}
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
}
%% Empty generic diode
@@ -1228,30 +1223,27 @@
\anchor{strokepathstart}{
\northeast
\pgf@y=0cm
- \pgf@x=.8\pgf@x
- }
+ \advance\pgf@x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
+ \advance\pgf@x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
+ }
\anchor{strokepathend}{
\northeast
\pgf@y=0cm
}
}{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfscope
- \pgftransformxshift{\pgf@circ@res@left}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{0pt}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{0pt}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \endpgfscope
+ \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+ \pgfsetlinewidth{\pgf@circ@res@temp}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
+ \pgfusepath{draw}
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
}
%% SPST
@@ -1727,7 +1719,7 @@
\ctikzset{*-d/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=diamond}}
\ctikzset{d-d/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=diamond}}
-\tikzset{reversed/.style = {\circuitikzbasekey/bipole/reversed=true}}
+\tikzset{reversed/.style = {\circuitikzbasekey/bipole/inverted=true}}
%% The output routine
@@ -1735,7 +1727,7 @@
\def\drawpoles{
\pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{diamond} }
\ifx\pgf@temp\pgf@circ@temp
- { (\tikztostart) node[diamond] {} }
+ { (\tikztostart) node[diamondpole] {} }
\else
\pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{empty} }
\ifx\pgf@temp\pgf@circ@temp
@@ -1749,7 +1741,7 @@
\fi
\pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{diamond} }
\ifx\pgf@temp\pgf@circ@temp
- { (\tikztotarget) node[diamond] {} }
+ { (\tikztotarget) node[diamondpole] {} }
\else
\pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{empty} }
\ifx\pgf@temp\pgf@circ@temp
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
index 053149bfb19..bf4777a6ae4 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
@@ -128,24 +128,24 @@
\def\pgf@circ@drawnormalcurrent{
\ifpgf@circuit@bipole@current@before
\ifpgf@circuit@bipole@current@backward
- { (\ctikzvalof{bipole/name}.left) --
+ { (anchorstartnode) --
node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
(\tikztostart)
}
\else
{ (\tikztostart) --
node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
- (\ctikzvalof{bipole/name}.left)
+ (anchorstartnode)
}
\fi
\else
\ifpgf@circuit@bipole@current@backward
{ (\tikztotarget) --
node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
- (\ctikzvalof{bipole/name}.right)
+ (anchorendnode)
}
\else
- { (\ctikzvalof{bipole/name}.right) --
+ { (anchorendnode) --
node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
(\tikztotarget)
}
@@ -242,10 +242,10 @@
\ifpgf@circuit@bipole@iscurrent
node [anchor=\pgf@circ@dir] at (\ctikzvalof{bipole/name}.\pgf@circ@bipole@current@label@where)
- { \pgf@circ@finallabel{current/} }
+ { \pgf@circ@finallabels{current/label} }
\else
(Iarrow.\pgf@circ@bipole@current@label@where) node [anchor=\pgf@circ@dir]
- { \pgf@circ@finallabel{current/} }
+ { \pgf@circ@finallabels{current/label} }
\fi
}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
index b487023ac91..81aacdc99a3 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
@@ -29,43 +29,81 @@
}}
\ctikzset{label above/.code = {
- l=#1,
- \circuitikzbasekey/bipole/label/position=90 }
+ l=#1,
+ \circuitikzbasekey/bipole/label/position=90 }
}
\ctikzset{l^/.style = {
- l=#1,
- \circuitikzbasekey/bipole/label/position=90 }
+ l=#1,
+ \circuitikzbasekey/bipole/label/position=90 }
}
\ctikzset{label below/.code = {
- l=#1,
- \circuitikzbasekey/bipole/label/position=-90 }
+ l=#1,
+ \circuitikzbasekey/bipole/label/position=-90 }
}
\ctikzset{l_/.style = {
- l=#1,
- \circuitikzbasekey/bipole/label/position=-90 }
+ l=#1,
+ \circuitikzbasekey/bipole/label/position=-90 }
+}
+%value options
+\ctikzset{annotation/.style = { a=#1 } }
+\ctikzset{a/.code = {
+ \pgfkeys{/tikz/circuitikz/bipole/annotation/name=#1}
+ \ctikzsetvalof{bipole/annotation/unit}{}
+ \ifpgf@circ@siunitx
+ \pgf@circ@handleSI{#1}
+ \ifpgf@circ@siunitx@res
+ \edef\pgf@temp{\pgf@circ@handleSI@val}
+ \pgfkeyslet{/tikz/circuitikz/bipole/annotation/name}{\pgf@temp}
+ \edef\pgf@temp{\pgf@circ@handleSI@unit}
+ \pgfkeyslet{/tikz/circuitikz/bipole/annotation/unit}{\pgf@temp}
+ \else
+ \fi
+ \else
+ \fi
+ }}
+
+
+
+\ctikzset{annotation above/.code = {
+ a=#1,
+ \circuitikzbasekey/bipole/annotation/position=90 }
+}
+\ctikzset{a^/.style = {
+ a=#1,
+ \circuitikzbasekey/bipole/annotation/position=90 }
+}
+
+\ctikzset{annotation below/.code = {
+ a=#1,
+ \circuitikzbasekey/bipole/annotation/position=-90 }
+}
+\ctikzset{a_/.style = {
+ a=#1,
+ \circuitikzbasekey/bipole/annotation/position=-90 }
}
-\def\pgf@circ@drawlabel{
+\def\pgf@circ@drawlabels#1{
\pgfextra{
\edef\pgf@temp{\ctikzvalof{label/align}}
\def\pgf@circ@temp{straight}
}
\ifx\pgf@temp\pgf@circ@temp %straight
- \pgf@circ@drawreglabel
+ \pgf@circ@drawreglabels{#1}
\else
\pgfextra{\def\pgf@circ@temp{rotate}}
\ifx\pgf@temp\pgf@circ@temp %rotate
- \pgf@circ@drawrotlabel
+ \pgf@circ@drawrotlabels{#1}
\else % smart
- \pgf@circ@drawsmartlabel
+ \pgf@circ@drawsmartlabels{#1}
\fi
\fi
}
-\def\pgf@circ@drawsmartlabel{
+
+\def\pgf@circ@drawsmartlabels#1{
\pgfextra{
%\pgfmathadd{\pgf@circ@direction}{360}
\pgfmathmod{\pgf@circ@direction}{90}
@@ -73,22 +111,22 @@
}
\ifnum \pgfcircmathresult > 20
\ifnum \pgfcircmathresult < 70 % NON quasi retto
- \pgf@circ@drawrotlabel
+ \pgf@circ@drawrotlabels{#1}
\else
- \pgf@circ@drawreglabel
+ \pgf@circ@drawreglabels{#1}
\fi
\else
- \pgf@circ@drawreglabel
+ \pgf@circ@drawreglabels{#1}
\fi
}
%% Output routing
%% #1 - node name
-\def\pgf@circ@drawrotlabel{
+\def\pgf@circ@drawrotlabels#1{
\pgfextra{
% calcolo rotazione label
- \def\pgf@circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
+ \def\pgf@circ@temp{\ctikzvalof{bipole/#1/position}} %%% àncora label
\edef\pgfcirclabrot{\pgf@circ@direction} % primo e quarto quadrante
\edef\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
\ifnum \pgfcircmathresult > 90 \ifnum \pgfcircmathresult < 270 % terzo e secondo
@@ -98,33 +136,51 @@
\edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil} %%%
\fi\fi
+ }
\ifnum \ctikzvalof{mirror value} = -1
- \pgfmathadd{\pgf@circ@temp}{180}
- \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+ % \pgfmathadd{\pgf@circ@temp}{180}
+ % \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+ coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.south)$)
+ (labelcoor) node [rotate=\pgfcirclabrot] {\pgf@circ@finallabels{#1}} % c'era un transform shape
+ \else
+ coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.north)$)
+ (labelcoor) node [rotate=\pgfcirclabrot] {\pgf@circ@finallabels{#1}} % c'era un transform shape
\fi
- }
- coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.north)$)
- (labelcoor) node [rotate=\pgfcirclabrot] {\pgf@circ@finallabel{}} % c'era un transform shape
+
}
-\def\pgf@circ@drawreglabel{
+\def\pgf@circ@drawreglabels#1{
\pgfextra{
\pgfmathsubtract{\pgf@circ@direction}{90}
\edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
- \edef\pgf@circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
+ \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/position}} %%% àncora label
\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@labanc}{180}
- \edef\pgf@circ@labanc{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
+ \pgfmathadd{\pgf@circ@temp}{180}
+ \edef\pgf@circ@temp{\expandafter\pgf@circ@stripdecimals\pgfmathresult\pgf@nil}
\fi
}
node [ anchor = \pgf@circ@labanc]
- at (\ctikzvalof{bipole/name}.\pgf@circ@temp) {\pgf@circ@finallabel{}}
+ at (\ctikzvalof{bipole/name}.\pgf@circ@temp) {\pgf@circ@finallabels{#1}}
+}
+
+\def\pgf@circ@finallabels#1{%
+ \edef\pgf@temp{}%
+ \edef\pgf@circ@temp{\ctikzvalof{bipole/#1/unit}}%
+ \ifx\pgf@temp\pgf@circ@temp%
+ \ctikzvalof{bipole/#1/name}%
+ \else%
+ $\SI{\ctikzvalof{bipole/#1/name}}{\ctikzvalof{bipole/#1/unit}}$%
+ \fi%
}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
index 4a7a2c113aa..38dee46769c 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
@@ -1,6 +1,6 @@
\pgf@circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-
+\def\pgf@circ@direction{0.0}
% Names
\ctikzset{name/.style = { n=#1 } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@
@@ -15,10 +15,27 @@
\ctikzset{mirrored/false/.code = {\ctikzsetvalof{mirror value}{1}} }
\ctikzset{mirror/.style = {/tikz/circuitikz/mirrored=true}}
+% Invert node along path
+\ctikzset{inverted/.is choice}
+\ctikzset{invert value/.initial=1}
+\ctikzset{inverted/true/.code = {\ctikzsetvalof{invert value}{-1}\pgf@circuit@bipole@invertedtrue}}
+\ctikzset{inverted/false/.code = {\ctikzsetvalof{invert value}{1}\pgf@circuit@bipole@invertedfalse}}
+\ctikzset{invert/.style = {/tikz/circuitikz/inverted=true}}
+\newif\ifpgf@circuit@bipole@inverted
+\ctikzset{bipole/inverted/.is if=pgf@circuit@bipole@inverted}
+
+
+\newif\ifpgf@circuit@bipole@voltage@backward
+\ctikzset{bipole/voltage/direction/.is choice}
+\ctikzset{bipole/voltage/direction/forward/.code={\pgf@circuit@bipole@voltage@backwardfalse}}
+\ctikzset{bipole/voltage/direction/backward/.code={\pgf@circuit@bipole@voltage@backwardtrue}}
+
+
+
% Initialize paths
\def\pgfcircresetpath{
- \ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90,
- bipole/reversed=false, bipole/kind=,
+ \ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90, ,bipole/annotation/name=, bipole/annotation/position=-90,
+ bipole/inverted=false, bipole/kind=,
bipole/voltage/direction=backward, bipole/voltage/label/name=, bipole/voltage/position=below,
bipole/nodes/left=none, bipole/nodes/right=none, bipole/is voltage=false,bipole/is voltageoutsideofsymbol=false,bipole/is strokedsymbol=false,
bipole/is current=false, bipole/current/label/name=, bipole/current/x position=after,
@@ -43,41 +60,54 @@
\def\pgf@temp{open}
\def\pgf@circ@temp{#1}
}
- \ifpgf@circuit@bipole@reversed
- (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
- (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
- \else
- (\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
- (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
- \fi
- \pgfextra{
- \pgf@circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
- {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
- \edef\pgf@circ@direction{\pgfmathresult}
- }
- ($(\tikztostart) ! .5 ! (\tikztotarget)$)
- node[#1shape, rotate=\pgf@circ@direction, yscale=\ctikzvalof{mirror value}]
+
+ (\tikztostart) coordinate (\ctikzvalof{bipole/name}start)
+ (\tikztotarget) coordinate (\ctikzvalof{bipole/name}end)
+ \pgfextra{
+ \pgf@circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
+ {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
+ \edef\pgf@circ@direction{\pgfmathresult}
+ }
+
+ ($(\tikztostart) ! .5 ! (\tikztotarget)$)
+ node[#1shape, rotate=\pgf@circ@direction, yscale=\ctikzvalof{mirror value}, xscale=\ctikzvalof{invert value}]
(\ctikzvalof{bipole/name}) {}
+ \ifpgf@circuit@bipole@inverted
+ \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them!
+ coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.pathend)
+ coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.pathstart)
+ \else
+ coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.right)
+ coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.left)
+ \fi
+ \else
+ \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them!
+ coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.pathstart)
+ coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.pathend)
+ \else
+ coordinate (anchorstartnode) at (\ctikzvalof{bipole/name}.left)
+ coordinate (anchorendnode) at (\ctikzvalof{bipole/name}.right)
+ \fi
+ \fi
\ifx\pgf@temp\pgf@circ@temp % if it is an open
\else
\ifpgf@circuit@bipole@strokedsymbol%draw line thrue symbol(e.g. diodes)
- \ifcsname pgf@anchor@#1shape@strokepathstart\endcsname%if special path-anchors are defined, use them!
+ \ifcsname pgf@anchor@#1shape@strokepathstart\endcsname%if special path-anchors are defined, use them!
(\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.strokepathstart)
(\ctikzvalof{bipole/name}.strokepathend) -- (\ctikzvalof{bipole/name}end.center)
\else
(\ctikzvalof{bipole/name}start.center)--(\ctikzvalof{bipole/name}end.center)
\fi
- \else
- \ifcsname pgf@anchor@#1shape@pathstart\endcsname%if special path-anchors are defined, use them!
- (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart)
- (\ctikzvalof{bipole/name}.pathend) -- (\ctikzvalof{bipole/name}end.center)
- \else
- (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
- (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
- \fi
+ \else
+ (\ctikzvalof{bipole/name}start.center) --(anchorstartnode)
+ (anchorendnode) -- (\ctikzvalof{bipole/name}end.center)
+
\fi
\fi
- \pgf@circ@ifkeyempty{bipole/label/name}\else\pgf@circ@drawlabel\fi
+
+
+ \pgf@circ@ifkeyempty{bipole/label/name}\else\pgf@circ@drawlabels{label}\fi
+ \pgf@circ@ifkeyempty{bipole/annotation/name}\else\pgf@circ@drawlabels{annotation}\fi
\drawpoles
\pgf@circ@ifkeyempty{bipole/voltage/label/name}\else\pgf@circ@drawvoltage\fi
\pgf@circ@ifkeyempty{bipole/current/label/name}\else\pgf@circ@drawcurrent\fi
@@ -90,7 +120,6 @@
%% Path definitions
-
\def\pgf@circ@resistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{generic}{#1}\else\pgf@circ@bipole@path{resistor}{#1}\fi}
\def\pgf@circ@vresistor@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{tgeneric}{#1}\else\pgf@circ@bipole@path{vresistor}{#1}\fi}
\def\pgf@circ@potentiometer@path#1{\ifpgf@circuit@europeanresistor\pgf@circ@bipole@path{genericpotentiometer}{#1}\else\pgf@circ@bipole@path{potentiometer}{#1}\fi}
@@ -579,7 +608,7 @@
\ctikzset{bipole/name = trans\pgf@circ@rand} % create it
\fi
}
- \ifpgf@circuit@bipole@reversed
+ \ifpgf@circuit@bipole@inverted
(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
(\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
\else
@@ -595,6 +624,8 @@
($(\tikztostart) ! .5 ! (\tikztotarget)$)
node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}]
(\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
+ node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}]
+ (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/value/name}}
\ifcsname pgf@anchor@#1@pathstart\endcsname%if special path-anchors are defined, use them!
(\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.pathstart)
(\ctikzvalof{bipole/name}.pathend) -- (\ctikzvalof{bipole/name}end.center)
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
index b0566e7840c..c70b851ff9f 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
@@ -340,7 +340,7 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf@circ@res@up}}
\pgftext[left, at=\pgfpoint{0.3\pgf@circ@res@left}{.3\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
-
+ \pgfsetrectcap
% Draw them all!
\pgfusepath{draw}
@@ -355,6 +355,7 @@
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
+ \pgfpathclose
\pgfusepath{draw}
\endpgfscope
}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
index a811ff610ff..3f5091a6ea2 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
@@ -94,7 +94,7 @@
%% Diamond terminal
-\pgfdeclareshape{diamond}{
+\pgfdeclareshape{diamondpole}{
\anchor{center}{
\pgfpointorigin
}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
index 4a35e91e88d..255aa335f0e 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
@@ -658,6 +658,116 @@
}
}
+\pgfdeclareshape{invschmitt}
+ {
+ \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=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ }
+ \savedanchor\left{%
+ \pgf@y=0pt
+ }
+ \anchor{in}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{out}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{east}{
+ \left
+ \pgf@x=-.8\pgf@x
+ }
+ \anchor{west}{
+ \left
+ }
+ \anchor{south}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{south west}{
+ \northwest
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ }
+ \anchor{north west}{
+ \northwest
+ }
+ \anchor{south east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+
+
+ \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@other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf@circ@res@right
+
+ \pgfscope
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgftransformxshift{.7\pgf@circ@res@left}
+ \pgf@circ@res@step=\pgf@circ@res@right
+ \advance\pgf@circ@res@step by -\pgf@circ@res@left
+ \pgf@circ@res@step=.7\pgf@circ@res@step
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
+ \pgfusepath{draw}
+ \pgfpathellipse
+ {\pgfpoint{\pgf@circ@res@step-.5\pgf@circ@res@other}{0pt}}
+ {\pgfpoint{.5\pgf@circ@res@other}{0pt}}
+ {\pgfpoint{0pt}{.5\pgf@circ@res@other}}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@left}{0pt}}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
+ \pgfusepath{draw}
+ %draw inner shape
+
+ \pgfsetlinewidth{2\pgflinewidth}
+
+ \pgfpathmoveto{\pgfpoint{.6\pgf@circ@res@left}{.3\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.05\pgf@circ@res@left}{.3\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{.3\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.3\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ }
+ }
@@ -1769,14 +1879,14 @@
\northeast
}
\anchor{anode}{
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\anchor{G}{
\northeast
}
\anchor{cathode}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
}{\ctikzvalof{tripoles/thyristor/height 2}}{fullthyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
@@ -1827,14 +1937,14 @@
\northeast
}
\anchor{anode}{
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\anchor{G}{
\northeast
}
\anchor{cathode}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
}{\ctikzvalof{tripoles/thyristor/height 2}}{emptythyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
@@ -1888,11 +1998,11 @@
\northeast
}
\anchor{anode}{
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\anchor{cathode}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
}{\ctikzvalof{tripoles/triac/height}}{emptytriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
@@ -1940,11 +2050,11 @@
\northeast
}
\anchor{anode}{
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\anchor{cathode}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
}{\ctikzvalof{tripoles/triac/height}}{fulltriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
@@ -1990,11 +2100,11 @@
\pgfcircdeclarebipole{
\anchor{out 1}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
\anchor{out 2}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=.8\pgf@y
}
}{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{
@@ -2062,6 +2172,10 @@
\savedanchor\left{%
\pgf@y=0pt
}
+ \anchor{leftedge}
+ {\left
+ \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
@@ -2144,7 +2258,7 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
\pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{0pt}}
-
+ \pgfsetrectcap
\pgfusepath{draw}
@@ -2158,7 +2272,7 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}}
+ \pgfpathclose
\pgfusepath{draw}
\endpgfscope
@@ -2189,6 +2303,10 @@
\savedanchor\left{%
\pgf@y=0pt
}
+ \anchor{leftedge}
+ {\left
+ \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
@@ -2270,7 +2388,7 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
\pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{0pt}} %
-
+ \pgfsetrectcap
\pgfusepath{draw}
\pgfscope
@@ -2281,16 +2399,14 @@
\pgf@circ@res@step=.7\pgf@circ@res@step
%Umrandung:
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0}} %geändert startpunkt neu am ausgangsstrich
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{15pt}}%vom Ausgang nach oben
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}%vom Ausgang nach oben
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} %neu ecke links oben nach rechts oben
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}} %bei deneigängen runter
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-15pt}}%ecke links unten nach rechts unten
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} %rechts unten zum ausgang
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}%ecke links unten nach rechts unten
+ \pgfpathclose
\pgfusepath{draw}
\endpgfscope
-
-
-
+
}
}
@@ -2741,12 +2857,13 @@
% draw inner sine waves
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
\pgfsetlinewidth{\pgfstartlinewidth}
-
+ \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
\pgfpathmoveto{\pgfpoint{-0.3\pgf@circ@res@step}{0\pgf@circ@res@step}}
\pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
\pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
\pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
\pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
+
\pgfusepath{draw}
\endpgfscope
@@ -3095,4 +3212,161 @@
}
}
+\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=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ %\fi
+ }
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{anode}{
+ \northwest
+ \pgf@circ@res@step= \pgf@y
+ \pgfpointorigin
+ \pgfpathmoveto{ \pgfpointpolar{-90}{\pgf@circ@res@step}}
+ }
+ \anchor{cathode1}{
+ \northwest
+ \pgf@circ@res@step= \pgf@y
+ \pgfpointorigin
+ \pgfpathmoveto{ \pgfpointpolar{105}{\pgf@circ@res@step}}
+ }
+ \anchor{cathode2}{
+ \northwest
+ \pgf@circ@res@step= \pgf@y
+ \pgfpointorigin
+ \pgfpathmoveto{ \pgfpointpolar{75}{\pgf@circ@res@step}}
+ }
+ \anchor{text}{
+ \pgfpointorigin
+ \advance \pgf@x by -.5\wd\pgfnodeparttextbox
+ \advance \pgf@y by -.5\ht\pgfnodeparttextbox
+ }
+ \anchor{left}{%
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{right}{%
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{top}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{pathstart}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{pathend}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{bottom}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{center}{
+ \pgf@y=0pt
+ \pgf@x=0pt
+ }
+ \anchor{east}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{west}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{south}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+ \pgf@circ@res@step=\ctikzvalof{tripoles/magnetron/width}\pgf@circ@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
+ \pgfmathsetlength{\pgf@circ@res@other}{sin(15)*\pgf@circ@res@up}
+
+ \pgfscope
+ \pgfstartlinewidth=\pgflinewidth
+ % draw outer box
+ % \ifpgf@circuit@boxed
+ % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
+ % \fi
+ % draw outer circle
+ %\ifpgf@circuit@boxed
+ % \pgf@circ@res@step=.7\pgf@circ@res@step
+ % \pgfsetdash{}{0pt} % draw solid circle if boxed
+ %\else
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ %\fi
+ %create outer circle
+ \pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@right}
+ \pgfsetfillcolor{white}
+ \pgfusepath{draw}
+ %create chambers
+ \foreach \angle in {45,135,225,315}{
+ \pgfpathmoveto{ \pgfpointpolar{\angle}{0.6\pgf@circ@res@right}}
+ \pgfpathlineto{ \pgfpointpolar{\angle}{\pgf@circ@res@right}}
+ }
+ \pgfsetroundcap
+ \pgfusepath{draw}
+ \pgfscope
+ %draw connection from outside
+ %anode
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{0\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0\pgf@circ@res@right}{.5\pgf@circ@res@down}}
+ %cathodes
+ \pgfpathmoveto{\pgfpointpolar{105}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{.5\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpointpolar{75}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
+ \pgfsetbuttcap
+ \pgfusepath{draw}
+ \endpgfscope
+ %create cathode
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0}{.15\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{.5\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ %create anode
+ \pgfpathmoveto{\pgfpoint{0.3\pgf@circ@res@left}{.5\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0.3\pgf@circ@res@right}{.5\pgf@circ@res@down}}
+
+ \pgfsetbuttcap
+ \pgfusepath{draw}
+ \endpgfscope
+ }
+}
+
\endinput
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
index b22fc77bd0c..e7d2b6bd9d5 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
@@ -44,16 +44,6 @@
\fi
}
-\def\pgf@circ@finallabel#1{%
- \edef\pgf@temp{}%
- \edef\pgf@circ@temp{\ctikzvalof{bipole/#1label/unit}}%
- \ifx\pgf@temp\pgf@circ@temp%
- \ctikzvalof{bipole/#1label/name}%
- \else%
- $\SI{\ctikzvalof{bipole/#1label/name}}{\ctikzvalof{bipole/#1label/unit}}$%
- \fi%
-}
-
\def\pgf@circ@ifkeyempty#1{
\pgfextra{
\ctikzset{#1/.get=\pgf@circ@temp}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
index 57fb00e0f0c..5a944419fd8 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
@@ -91,7 +91,33 @@
\def\pgf@circ@drawvoltagegeneric{
\pgfextra{
\ifnum \ctikzvalof{mirror value}=-1
- \ifpgf@circuit@bipole@voltage@below\pgf@circuit@bipole@voltage@belowfalse\else\pgf@circuit@bipole@voltage@belowtrue\fi
+ \ifpgf@circuit@bipole@inverted
+ \ifpgf@circuit@bipole@voltage@straight
+ \def\distfromline{\eudist}
+ \else
+ \def\distfromline{\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
+ \fi
+ \else
+ \ifpgf@circuit@bipole@voltage@straight
+ \def\distfromline{-\eudist}
+ \else
+ \def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
+ \fi
+ \fi
+ \else
+ \ifpgf@circuit@bipole@inverted
+ \ifpgf@circuit@bipole@voltage@straight
+ \def\distfromline{-\eudist}
+ \else
+ \def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
+ \fi
+ \else
+ \ifpgf@circuit@bipole@voltage@straight
+ \def\distfromline{\eudist}
+ \else
+ \def\distfromline{\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen}
+ \fi
+ \fi
\fi
\ifpgf@circuit@bipole@voltage@below
@@ -109,12 +135,12 @@
{ \edef\bumpb{\ctikzvalof{bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/bump b}} }
{ \edef\bumpb{\ctikzvalof{voltage/bump b}} }
}
+
- coordinate (pgfcirc@mid) at ($(\tikztostart) ! \distacefromnode ! (\ctikzvalof{bipole/name}.left)$)
- coordinate (pgfcirc@Vfrom) at ($(pgfcirc@mid) ! -\ctikzvalof{voltage/distance from line}\pgf@circ@Rlen ! \pgf@circ@voltage@angle:(\ctikzvalof{bipole/name}.left)$)
-
- coordinate (pgfcirc@mid) at ($(\tikztotarget) ! \distacefromnode ! (\ctikzvalof{bipole/name}.right)$)
- coordinate (pgfcirc@Vto) at ($(pgfcirc@mid) ! \ctikzvalof{voltage/distance from line}\pgf@circ@Rlen ! \pgf@circ@voltage@angle : (\ctikzvalof{bipole/name}.right)$)
+ coordinate (pgfcirc@midtmp) at ($(\tikztostart) ! \distacefromnode ! (anchorstartnode)$)
+ coordinate (pgfcirc@Vfrom) at ($(pgfcirc@midtmp) ! -\distfromline ! \pgf@circ@voltage@angle:(anchorstartnode)$)
+ coordinate (pgfcirc@mid) at ($(\tikztotarget) ! \distacefromnode ! (anchorendnode)$)
+ coordinate (pgfcirc@Vto) at ($(pgfcirc@mid) ! \distfromline ! \pgf@circ@voltage@angle : (anchorendnode)$)
\ifpgf@circuit@bipole@voltage@below
coordinate (pgfcirc@Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
@@ -125,15 +151,24 @@
\fi
\ifpgf@circuit@europeanvoltage
- \ifpgf@circuit@bipole@voltage@backward
- (pgfcirc@Vto) .. controls (pgfcirc@Vcont2) and (pgfcirc@Vcont1) ..
- node[currarrow, sloped, allow upside down, pos=1] {}
- (pgfcirc@Vfrom)
+ \ifpgf@circuit@bipole@voltage@straight
+ \ifpgf@circuit@bipole@voltage@backward
+ (pgfcirc@Vto) --(pgfcirc@Vfrom) node[currarrow, sloped, allow upside down, pos=1] {}
+ \else
+ (pgfcirc@Vfrom) --(pgfcirc@Vto) node[currarrow, sloped, allow upside down, pos=1] {}
+
+ \fi
\else
- (pgfcirc@Vfrom) .. controls (pgfcirc@Vcont1) and (pgfcirc@Vcont2) ..
- node[currarrow, sloped, allow upside down, pos=1] {}
- (pgfcirc@Vto)
- \fi
+ \ifpgf@circuit@bipole@voltage@backward
+ (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
+ \fi
\else
\ifpgf@circuit@bipole@voltage@backward
\ifpgf@circ@oldvoltagedirection
@@ -178,7 +213,7 @@
\ifpgf@circuit@bipole@voltageoutsideofsymbol
% if it is a battery, must put + and -
\ifpgf@circuit@bipole@voltage@backward
- (pgfcirc@Vcont2) node {$-$} (pgfcirc@Vcont1) node {$+$}
+ (pgfcirc@Vcont1) node {$-$} (pgfcirc@Vcont2) node {$+$}
\else
(pgfcirc@Vcont1) node {$+$} (pgfcirc@Vcont2) node {$-$}
\fi
@@ -247,48 +282,53 @@
\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
+ \else
+ \pgf@circuit@bipole@voltage@belowtrue
+ \fi
+ \fi
+
+ \ifpgf@circuit@bipole@inverted
+ \ifpgf@circuit@bipole@voltage@below
+ \pgf@circuit@bipole@voltage@belowfalse
+ \else
+ \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
\ifpgf@circuit@bipole@isvoltage
\pgf@circ@drawvoltagegenerator
\else
\pgf@circ@drawvoltagegeneric
\fi
+
+
+
(\ctikzvalof{bipole/name}.\pgf@circ@bipole@voltage@label@where)
coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
\ifpgf@circuit@europeanvoltage\eudist\else\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=0]
- at (Vlab) { \pgf@circ@finallabel{voltage/} }
+ at (Vlab) { \pgf@circ@finallabels{voltage/label} }
}
-
-
-
\endinput
-
-% coordinate (pgfcirc@Vcont1) at ($ (\ctikzvalof{bipole/name}.center) !
-% \ctikzvalof{voltage/bump b} !
-% (\ctikzvalof{bipole/name}.-110) $)
-% coordinate (pgfcirc@Vcont2) at ($ (\ctikzvalof{bipole/name}.center) !
-% \ctikzvalof{voltage/bump b} !
-% (\ctikzvalof{bipole/name}.-70) $)
-% \else
-% coordinate (pgfcirc@Vcont1) at ($ (\ctikzvalof{bipole/name}.center) !
-% \ctikzvalof{voltage/bump b} !
-% (\ctikzvalof{bipole/name}.110) $)
-% coordinate (pgfcirc@Vcont2) at ($ (\ctikzvalof{bipole/name}.center) !
-% \ctikzvalof{voltage/bump b} !
-% (\ctikzvalof{bipole/name}.70) $)
-% \fi
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
index a021cf12eef..acc29cf5ef7 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
@@ -17,8 +17,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{0.6}
-\def\pgfcircversiondate{2016/06/06}
+\def\pgfcircversion{0.7}
+\def\pgfcircversiondate{2016/09/08}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
@@ -35,6 +35,10 @@
\ctikzset{voltage=european}
}
+\DeclareOption{straightvoltages}{
+ \pgf@circuit@bipole@voltage@straighttrue
+}
+
\DeclareOption{americanvoltage}{
\ctikzset{voltage=american}
}
@@ -47,9 +51,7 @@
\ctikzset{current = american}
}
-\DeclareOption{europeanvoltage}{
- \ctikzset{voltage = european}
-}
+
\DeclareOption{americanresistor}{
\ctikzset{resistor = american}
@@ -117,10 +119,6 @@
\ctikzset{current = american}
}
-\DeclareOption{europeanvoltages}{
- \ctikzset{voltage = european}
-}
-
\DeclareOption{americanresistors}{
\ctikzset{resistor = american}
}