texlive[42017] Master/texmf-dist: circuitikz (8sep16)
commits+karl at tug.org
commits+karl at tug.org
Thu Sep 8 23:57:45 CEST 2016
Revision: 42017
http://tug.org/svn/texlive?view=revision&revision=42017
Author: karl
Date: 2016-09-08 23:57:45 +0200 (Thu, 08 Sep 2016)
Log Message:
-----------
circuitikz (8sep16)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
trunk/Master/texmf-dist/doc/generic/circuitikz/README.md
trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
Modified: trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md 2016-09-08 21:57:45 UTC (rev 42017)
@@ -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)
Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/README.md
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -6,6 +6,33 @@
\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}
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -146,6 +146,7 @@
\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 @@
\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 @@
\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 @@
\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 @@
;\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 @@
-\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 @@
\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]
Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -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]
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -569,10 +569,6 @@
\ctikzset{logic ports/european/.code= {\pgf at circuit@europeanlogicporttrue } }
\ctikzset{logic ports/american/.code= {\pgf at circuit@europeanlogicportfalse } }
-\newif\ifpgf at circuit@bipole at voltage@backward
-\ctikzset{bipole/voltage/direction/.is choice}
-\ctikzset{bipole/voltage/direction/forward/.code={\pgf at circuit@bipole at voltage@backwardfalse}}
-\ctikzset{bipole/voltage/direction/backward/.code={\pgf at circuit@bipole at 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 at circuit@bipole at reversed
-\ctikzset{bipole/reversed/.is if=pgf at circuit@bipole at reversed}
\newif\ifpgf at circuit@bipole at isvoltage
\ctikzset{bipole/is voltage/.is if=pgf at circuit@bipole at isvoltage}
\newif\ifpgf at circuit@bipole at 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 at circ@siunitx
\newif\ifpgf at circ@siunitx at res
+\ctikzset{straight/.is choice}
+\ctikzset{straightvoltage value/.initial=true}
+\ctikzset{straight/true/.code = {\pgf at circuit@bipole at voltage@straighttrue}}
+\ctikzset{straight/false/.code = {\pgf at circuit@bipole at voltage@straightfalse}}
+\ctikzset{straightvoltage/.style = {/tikz/circuitikz/straight=true}}
+\newif\ifpgf at circuit@bipole at voltage@straight
+\ctikzset{bipole/straight/.is if=pgf at circuit@bipole at voltage@straight}
+
+
\ctikzset{voltage/.is family}
\ctikzset{voltage/distance from node/.initial=.5} %\pgf at circ@Rlen units
\ctikzset{voltage/distance from line/.initial=.08} % pos, tra 0 e 1
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -57,73 +57,73 @@
}
\anchor{center}{\pgfpointorigin}
\anchor{n}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at x=0cm
}
\anchor{ne}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
}
\anchor{nw}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at x=-\pgf at x
}
\anchor{e}{%
- \ifpgf at circuit@bipole at reversed\else\southwest\northeast\fi
+ \northeast
\pgf at y=0cm
}
\anchor{s}{%
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at x=0cm
}
\anchor{se}{%
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at x=-\pgf at x
}
\anchor{sw}{%
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
}
\anchor{w}{
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at y=0cm
}
\anchor{north}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at x=0cm
}
\anchor{east}{%
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at y=0cm
}
\anchor{south}{%
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at x=0cm
}
\anchor{west}{
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at y=0cm
}
\anchor{right}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at y=0cm
}
\anchor{above}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at x=0cm
}
\anchor{left}{%
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at y=0cm
}
\anchor{below}{%
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at x=0cm
}
\anchor{a}{%
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at y=0cm
}
\anchor{b} {
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at y=0cm
}
\savedanchor{\textanchor}{%
@@ -134,8 +134,7 @@
\textanchor
}
\anchorborder{%
- \def\pgf at temp{false}
- \ifpgf at circuit@bipole at reversed\pgf at temp
+ \ifpgf at circuit@bipole at inverted
\pgf at circ@res at left=-\pgf at x
\pgf at circ@res at right=-\pgf at y
\else
@@ -164,7 +163,7 @@
\pgf at circ@res at down = \pgf at y
\pgfstartlinewidth=\pgflinewidth
-
+ \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
#6
\pgfsetlinewidth{\pgfstartlinewidth}
@@ -314,17 +313,17 @@
\divide \pgf at circ@res at step by 6
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
- \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint{-\pgf at circ@res at step}{.5\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{-\pgf at circ@res at step}{.5\pgf at circ@res at down}}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{.5\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{.5\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{\pgf at circ@res at down}}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{.5\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{.5\pgf at circ@res at down}}
\pgfusepath{draw}
}
@@ -340,11 +339,11 @@
\pgfusepath{draw}
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{.5\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{.33\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{.5\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{.33\pgf at circ@res at right}{.5\pgf at circ@res at down}}
- \pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at right}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{.33\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathmoveto{\pgfpoint{.33\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{.33\pgf at circ@res at left}{\pgf at circ@res at 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 at circ@res at left}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
- \pgfusepath{draw,fill}
-
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfusepath{draw}
-
- \endpgfscope
+ \pgf at circ@res at temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+ \pgfsetlinewidth{\pgf at circ@res at temp}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-2\pgf at circ@res at temp}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-2\pgf at circ@res at temp}{0pt}}
+ \pgfusepath{draw,fill}
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-2\pgf at circ@res at temp}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-2\pgf at circ@res at temp}{\pgf at circ@res at up}}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+ \pgfusepath{draw}
}
%% Empty generic diode
@@ -1228,30 +1223,27 @@
\anchor{strokepathstart}{
\northeast
\pgf at y=0cm
- \pgf at x=.8\pgf at x
- }
+ \advance\pgf at x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
+ \advance\pgf at x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
+ }
\anchor{strokepathend}{
\northeast
\pgf at 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 at circ@res at left}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{0pt}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-.8\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-\pgf at circ@res at left}{\pgf at circ@res at up}}
- \pgfusepath{draw}
-
- \endpgfscope
+ \pgf at circ@res at temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+ \pgfsetlinewidth{\pgf at circ@res at temp}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-2\pgf at circ@res at temp}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-2\pgf at circ@res at temp}{0pt}}
+ \pgfusepath{draw}
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right-2\pgf at circ@res at temp}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right-2\pgf at circ@res at temp}{\pgf at circ@res at up}}
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up}}
+ \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 at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{diamond} }
\ifx\pgf at temp\pgf at circ@temp
- { (\tikztostart) node[diamond] {} }
+ { (\tikztostart) node[diamondpole] {} }
\else
\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf at temp{empty} }
\ifx\pgf at temp\pgf at circ@temp
@@ -1749,7 +1741,7 @@
\fi
\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{diamond} }
\ifx\pgf at temp\pgf at circ@temp
- { (\tikztotarget) node[diamond] {} }
+ { (\tikztotarget) node[diamondpole] {} }
\else
\pgfextra{ \edef\pgf at circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf at temp{empty} }
\ifx\pgf at temp\pgf at circ@temp
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirccurrent.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -128,7 +128,7 @@
\def\pgf at circ@drawnormalcurrent{
\ifpgf at circuit@bipole at current@before
\ifpgf at circuit@bipole at current@backward
- { (\ctikzvalof{bipole/name}.left) --
+ { (anchorstartnode) --
node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
(\tikztostart)
}
@@ -135,7 +135,7 @@
\else
{ (\tikztostart) --
node [currarrow, pos=\ctikzvalof{current/distance}, sloped, allow upside down] (Iarrow) {}
- (\ctikzvalof{bipole/name}.left)
+ (anchorstartnode)
}
\fi
\else
@@ -142,10 +142,10 @@
\ifpgf at circuit@bipole at 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 at circuit@bipole at iscurrent
node [anchor=\pgf at circ@dir] at (\ctikzvalof{bipole/name}.\pgf at circ@bipole at current@label at where)
- { \pgf at circ@finallabel{current/} }
+ { \pgf at circ@finallabels{current/label} }
\else
(Iarrow.\pgf at circ@bipole at current@label at where) node [anchor=\pgf at circ@dir]
- { \pgf at circ@finallabel{current/} }
+ { \pgf at circ@finallabels{current/label} }
\fi
}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirclabel.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -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 at circ@siunitx
+ \pgf at circ@handleSI{#1}
+ \ifpgf at circ@siunitx at res
+ \edef\pgf at temp{\pgf at circ@handleSI at val}
+ \pgfkeyslet{/tikz/circuitikz/bipole/annotation/name}{\pgf at temp}
+ \edef\pgf at temp{\pgf at circ@handleSI at unit}
+ \pgfkeyslet{/tikz/circuitikz/bipole/annotation/unit}{\pgf at temp}
+ \else
+ \fi
+ \else
+ \fi
+ }}
-\def\pgf at circ@drawlabel{
+\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 at circ@drawlabels#1{
\pgfextra{
\edef\pgf at temp{\ctikzvalof{label/align}}
\def\pgf at circ@temp{straight}
}
\ifx\pgf at temp\pgf at circ@temp %straight
- \pgf at circ@drawreglabel
+ \pgf at circ@drawreglabels{#1}
\else
\pgfextra{\def\pgf at circ@temp{rotate}}
\ifx\pgf at temp\pgf at circ@temp %rotate
- \pgf at circ@drawrotlabel
+ \pgf at circ@drawrotlabels{#1}
\else % smart
- \pgf at circ@drawsmartlabel
+ \pgf at circ@drawsmartlabels{#1}
\fi
\fi
}
-\def\pgf at circ@drawsmartlabel{
+
+\def\pgf at circ@drawsmartlabels#1{
\pgfextra{
%\pgfmathadd{\pgf at circ@direction}{360}
\pgfmathmod{\pgf at circ@direction}{90}
@@ -73,12 +111,12 @@
}
\ifnum \pgfcircmathresult > 20
\ifnum \pgfcircmathresult < 70 % NON quasi retto
- \pgf at circ@drawrotlabel
+ \pgf at circ@drawrotlabels{#1}
\else
- \pgf at circ@drawreglabel
+ \pgf at circ@drawreglabels{#1}
\fi
\else
- \pgf at circ@drawreglabel
+ \pgf at circ@drawreglabels{#1}
\fi
}
@@ -85,10 +123,10 @@
%% Output routing
%% #1 - node name
-\def\pgf at circ@drawrotlabel{
+\def\pgf at circ@drawrotlabels#1{
\pgfextra{
% calcolo rotazione label
- \def\pgf at circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
+ \def\pgf at circ@temp{\ctikzvalof{bipole/#1/position}} %%% àncora label
\edef\pgfcirclabrot{\pgf at circ@direction} % primo e quarto quadrante
\edef\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
\ifnum \pgfcircmathresult > 90 \ifnum \pgfcircmathresult < 270 % terzo e secondo
@@ -98,36 +136,54 @@
\edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil} %%%
\fi\fi
+ }
\ifnum \ctikzvalof{mirror value} = -1
- \pgfmathadd{\pgf at circ@temp}{180}
- \edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+ % \pgfmathadd{\pgf at circ@temp}{180}
+ % \edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+ coordinate (labelcoor) at ($(\ctikzvalof{bipole/name})!2!(\ctikzvalof{bipole/name}.south)$)
+ (labelcoor) node [rotate=\pgfcirclabrot] {\pgf at 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 at 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 at circ@finallabel{}} % c'era un transform shape
+
}
-\def\pgf at circ@drawreglabel{
+\def\pgf at circ@drawreglabels#1{
\pgfextra{
\pgfmathsubtract{\pgf at circ@direction}{90}
\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
- \edef\pgf at circ@temp{\ctikzvalof{bipole/label/position}} %%% àncora label
+ \edef\pgf at circ@temp{\ctikzvalof{bipole/#1/position}} %%% àncora label
\ifnum \pgf at circ@temp < 0
\pgfmathadd{\pgf at circ@labanc}{180}
\edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
\fi
+ \ifpgf at circuit@bipole at inverted
+ \pgfmathadd{\pgf at circ@temp}{180}
+ \edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+ \fi
\ifnum \ctikzvalof{mirror value} = -1
- \pgfmathadd{\pgf at circ@labanc}{180}
- \edef\pgf at circ@labanc{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
+ \pgfmathadd{\pgf at circ@temp}{180}
+ \edef\pgf at circ@temp{\expandafter\pgf at circ@stripdecimals\pgfmathresult\pgf at nil}
\fi
}
node [ anchor = \pgf at circ@labanc]
- at (\ctikzvalof{bipole/name}.\pgf at circ@temp) {\pgf at circ@finallabel{}}
+ at (\ctikzvalof{bipole/name}.\pgf at circ@temp) {\pgf at circ@finallabels{#1}}
}
+\def\pgf at circ@finallabels#1{%
+ \edef\pgf at temp{}%
+ \edef\pgf at circ@temp{\ctikzvalof{bipole/#1/unit}}%
+ \ifx\pgf at temp\pgf at circ@temp%
+ \ctikzvalof{bipole/#1/name}%
+ \else%
+ $\SI{\ctikzvalof{bipole/#1/name}}{\ctikzvalof{bipole/#1/unit}}$%
+ \fi%
+}
+
\ctikzset{text/.style = { t=#1 } }
\ctikzset{t/.code = {
\ctikzsetvalof{bipoles/twoport/text}{#1}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -1,7 +1,7 @@
\pgf at circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+\def\pgf at circ@direction{0.0}
-
% Names
\ctikzset{name/.style = { n=#1 } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@
\ctikzset{n/.code = {
@@ -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 at circuit@bipole at invertedtrue}}
+\ctikzset{inverted/false/.code = {\ctikzsetvalof{invert value}{1}\pgf at circuit@bipole at invertedfalse}}
+\ctikzset{invert/.style = {/tikz/circuitikz/inverted=true}}
+\newif\ifpgf at circuit@bipole at inverted
+\ctikzset{bipole/inverted/.is if=pgf at circuit@bipole at inverted}
+
+
+\newif\ifpgf at circuit@bipole at voltage@backward
+\ctikzset{bipole/voltage/direction/.is choice}
+\ctikzset{bipole/voltage/direction/forward/.code={\pgf at circuit@bipole at voltage@backwardfalse}}
+\ctikzset{bipole/voltage/direction/backward/.code={\pgf at circuit@bipole at 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 at temp{open}
\def\pgf at circ@temp{#1}
}
- \ifpgf at circuit@bipole at 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 at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
- {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
- \edef\pgf at circ@direction{\pgfmathresult}
- }
- ($(\tikztostart) ! .5 ! (\tikztotarget)$)
- node[#1shape, rotate=\pgf at circ@direction, yscale=\ctikzvalof{mirror value}]
+
+ (\tikztostart) coordinate (\ctikzvalof{bipole/name}start)
+ (\tikztotarget) coordinate (\ctikzvalof{bipole/name}end)
+ \pgfextra{
+ \pgf at circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
+ {\pgfpointanchor{\ctikzvalof{bipole/name}end}{center}}
+ \edef\pgf at circ@direction{\pgfmathresult}
+ }
+
+ ($(\tikztostart) ! .5 ! (\tikztotarget)$)
+ node[#1shape, rotate=\pgf at circ@direction, yscale=\ctikzvalof{mirror value}, xscale=\ctikzvalof{invert value}]
(\ctikzvalof{bipole/name}) {}
+ \ifpgf at circuit@bipole at inverted
+ \ifcsname pgf at anchor@#1shape at 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 at anchor@#1shape at 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 at temp\pgf at circ@temp % if it is an open
\else
\ifpgf at circuit@bipole at strokedsymbol%draw line thrue symbol(e.g. diodes)
- \ifcsname pgf at anchor@#1shape at strokepathstart\endcsname%if special path-anchors are defined, use them!
+ \ifcsname pgf at anchor@#1shape at 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 at anchor@#1shape at 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 at circ@ifkeyempty{bipole/label/name}\else\pgf at circ@drawlabel\fi
+
+
+ \pgf at circ@ifkeyempty{bipole/label/name}\else\pgf at circ@drawlabels{label}\fi
+ \pgf at circ@ifkeyempty{bipole/annotation/name}\else\pgf at circ@drawlabels{annotation}\fi
\drawpoles
\pgf at circ@ifkeyempty{bipole/voltage/label/name}\else\pgf at circ@drawvoltage\fi
\pgf at circ@ifkeyempty{bipole/current/label/name}\else\pgf at circ@drawcurrent\fi
@@ -90,7 +120,6 @@
%% Path definitions
-
\def\pgf at circ@resistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{generic}{#1}\else\pgf at circ@bipole at path{resistor}{#1}\fi}
\def\pgf at circ@vresistor at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{tgeneric}{#1}\else\pgf at circ@bipole at path{vresistor}{#1}\fi}
\def\pgf at circ@potentiometer at path#1{\ifpgf at circuit@europeanresistor\pgf at circ@bipole at path{genericpotentiometer}{#1}\else\pgf at circ@bipole at path{potentiometer}{#1}\fi}
@@ -579,7 +608,7 @@
\ctikzset{bipole/name = trans\pgf at circ@rand} % create it
\fi
}
- \ifpgf at circuit@bipole at reversed
+ \ifpgf at circuit@bipole at 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 at circ@direction, xscale=\ctikzvalof{mirror value}]
(\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
+ node[#1, /tikz/rotate=\pgf at circ@direction, xscale=\ctikzvalof{mirror value}]
+ (\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/value/name}}
\ifcsname pgf at anchor@#1 at 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)
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -340,7 +340,7 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/input height}\pgf at circ@res at up}}
\pgftext[left, at=\pgfpoint{0.3\pgf at circ@res at left}{.3\pgf at circ@res at up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
-
+ \pgfsetrectcap
% Draw them all!
\pgfusepath{draw}
@@ -355,6 +355,7 @@
\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
\pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+ \pgfpathclose
\pgfusepath{draw}
\endpgfscope
}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -94,7 +94,7 @@
%% Diamond terminal
-\pgfdeclareshape{diamond}{
+\pgfdeclareshape{diamondpole}{
\anchor{center}{
\pgfpointorigin
}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -658,6 +658,116 @@
}
}
+\pgfdeclareshape{invschmitt}
+ {
+ \anchor{center}{\pgfpointorigin}
+ \savedanchor\northwest{%
+ \pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/height}\pgf at y
+ \pgf at y=.5\pgf at y
+ \pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/width}\pgf at x
+ \pgf at x=.5\pgf at x
+ }
+ \savedanchor\left{%
+ \pgf at y=0pt
+ }
+ \anchor{in}{
+ \northwest
+ \pgf at y=0pt
+ }
+ \anchor{out}{
+ \northwest
+ \pgf at y=0pt
+ \pgf at x=-\pgf at x
+ }
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{east}{
+ \left
+ \pgf at x=-.8\pgf at x
+ }
+ \anchor{west}{
+ \left
+ }
+ \anchor{south}{
+ \northwest
+ \pgf at x=0pt
+ \pgf at y=-\pgf at y
+ }
+ \anchor{north}{
+ \northwest
+ \pgf at x=0pt
+ }
+ \anchor{south west}{
+ \northwest
+ \pgf at y=-\pgf at y
+ }
+ \anchor{north east}{
+ \northwest
+ \pgf at x=-\pgf at x
+ }
+ \anchor{north west}{
+ \northwest
+ }
+ \anchor{south east}{
+ \northwest
+ \pgf at x=-\pgf at x
+ \pgf at y=-\pgf at y
+ }
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+
+
+ \northwest
+ \pgf at circ@res at up = \pgf at y
+ \pgf at circ@res at down = -\pgf at y
+ \pgf at circ@res at right = -\pgf at x
+ \pgf at circ@res at left = \pgf at x
+
+ \pgf at circ@res at other = \pgfkeysvalueof{/tikz/circuitikz/bipoles/not port/circle width}\pgf at circ@res at right
+
+ \pgfscope
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgftransformxshift{.7\pgf at circ@res at left}
+ \pgf at circ@res at step=\pgf at circ@res at right
+ \advance\pgf at circ@res at step by -\pgf at circ@res at left
+ \pgf at circ@res at step=.7\pgf at circ@res at step
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at step-\pgf at circ@res at other}{0pt}}
+ \pgfusepath{draw}
+ \pgfpathellipse
+ {\pgfpoint{\pgf at circ@res at step-.5\pgf at circ@res at other}{0pt}}
+ {\pgfpoint{.5\pgf at circ@res at other}{0pt}}
+ {\pgfpoint{0pt}{.5\pgf at circ@res at other}}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{0pt}}
+ \pgfpathlineto{\pgfpoint{.7\pgf at circ@res at left}{0pt}}
+
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
+ \pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
+ \pgfusepath{draw}
+ %draw inner shape
+
+ \pgfsetlinewidth{2\pgflinewidth}
+
+ \pgfpathmoveto{\pgfpoint{.6\pgf at circ@res at left}{.3\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{.3\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{.4\pgf at circ@res at left}{.3\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{.05\pgf at circ@res at left}{.3\pgf at circ@res at up}}
+ \pgfpathmoveto{\pgfpoint{.4\pgf at circ@res at left}{.3\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{.25\pgf at circ@res at left}{.3\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{.25\pgf at circ@res at left}{.3\pgf at circ@res at up}}
+ \pgfusepath{draw}
+
+ }
+ }
@@ -1769,7 +1879,7 @@
\northeast
}
\anchor{anode}{
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at y=0cm
}
\anchor{G}{
@@ -1776,7 +1886,7 @@
\northeast
}
\anchor{cathode}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at y=0cm
}
}{\ctikzvalof{tripoles/thyristor/height 2}}{fullthyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
@@ -1827,7 +1937,7 @@
\northeast
}
\anchor{anode}{
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at y=0cm
}
\anchor{G}{
@@ -1834,7 +1944,7 @@
\northeast
}
\anchor{cathode}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at y=0cm
}
}{\ctikzvalof{tripoles/thyristor/height 2}}{emptythyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
@@ -1888,11 +1998,11 @@
\northeast
}
\anchor{anode}{
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at y=0cm
}
\anchor{cathode}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at y=0cm
}
}{\ctikzvalof{tripoles/triac/height}}{emptytriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
@@ -1940,11 +2050,11 @@
\northeast
}
\anchor{anode}{
- \ifpgf at circuit@bipole at reversed\northeast\else\southwest\fi
+ \southwest
\pgf at y=0cm
}
\anchor{cathode}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at y=0cm
}
}{\ctikzvalof{tripoles/triac/height}}{fulltriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
@@ -1990,11 +2100,11 @@
\pgfcircdeclarebipole{
\anchor{out 1}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at y=0cm
}
\anchor{out 2}{
- \ifpgf at circuit@bipole at reversed\southwest\else\northeast\fi
+ \northeast
\pgf at y=.8\pgf at y
}
}{\ctikzvalof{tripoles/toggleswitch/height 2}}{toggleswitch}{\ctikzvalof{tripoles/toggleswitch/height}}{\ctikzvalof{tripoles/toggleswitch/width}}{
@@ -2062,6 +2172,10 @@
\savedanchor\left{%
\pgf at y=0pt
}
+ \anchor{leftedge}
+ {\left
+ \pgf at x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at x
+ }
\savedanchor\inOne{%
\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/height}\pgf at y
@@ -2144,7 +2258,7 @@
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
\pgfpathlineto{\pgfpoint{.7\pgf at circ@res at right}{0pt}}
-
+ \pgfsetrectcap
\pgfusepath{draw}
@@ -2158,7 +2272,7 @@
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at step}{0pt}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}}
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at step}{0pt}}
+ \pgfpathclose
\pgfusepath{draw}
\endpgfscope
@@ -2189,6 +2303,10 @@
\savedanchor\left{%
\pgf at y=0pt
}
+ \anchor{leftedge}
+ {\left
+ \pgf at x = \pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/port width}\pgf at x
+ }
\savedanchor\inOne{%
\pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
\pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/height}\pgf at y
@@ -2270,7 +2388,7 @@
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0pt}}
\pgfpathlineto{\pgfpoint{.3\pgf at circ@res at right}{0pt}} %
-
+ \pgfsetrectcap
\pgfusepath{draw}
\pgfscope
@@ -2281,16 +2399,14 @@
\pgf at circ@res at step=.7\pgf at circ@res at step
%Umrandung:
\pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{0}} %geändert startpunkt neu am ausgangsstrich
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{15pt}}%vom Ausgang nach oben
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{.5\pgf at circ@res at up}}%vom Ausgang nach oben
\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at up}} %neu ecke links oben nach rechts oben
\pgfpathlineto{\pgfpoint{0pt}{\pgf at circ@res at down}} %bei deneigängen runter
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{-15pt}}%ecke links unten nach rechts unten
- \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{0pt}} %rechts unten zum ausgang
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{.5\pgf at circ@res at 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 at circ@res at step}{0\pgf at circ@res at step}}
\pgfpathsine{\pgfpoint{.15\pgf at circ@res at step}{.15\pgf at circ@res at step}}
\pgfpathcosine{\pgfpoint{.15\pgf at circ@res at step}{-.15\pgf at circ@res at step}}
\pgfpathsine{\pgfpoint{.15\pgf at circ@res at step}{-.15\pgf at circ@res at step}}
\pgfpathcosine{\pgfpoint{.15\pgf at circ@res at step}{.15\pgf at circ@res at step}}
+
\pgfusepath{draw}
\endpgfscope
@@ -3095,4 +3212,161 @@
}
}
+\pgfdeclareshape{magnetron}
+{
+ \savedanchor\northwest{
+ %\ifpgf at circuit@boxed
+ % \pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ % \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at y
+ % \pgf at y=.5\pgf at y
+ % \pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ % \pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf at x
+ % \pgf at x=.5\pgf at x
+ %\else
+ \pgf at y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf at y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf at y
+ \pgf at y=.5\pgf at y
+ \pgf at x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf at x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/magnetron/width}\pgf at x
+ \pgf at x=.5\pgf at x
+ %\fi
+ }
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{anode}{
+ \northwest
+ \pgf at circ@res at step= \pgf at y
+ \pgfpointorigin
+ \pgfpathmoveto{ \pgfpointpolar{-90}{\pgf at circ@res at step}}
+ }
+ \anchor{cathode1}{
+ \northwest
+ \pgf at circ@res at step= \pgf at y
+ \pgfpointorigin
+ \pgfpathmoveto{ \pgfpointpolar{105}{\pgf at circ@res at step}}
+ }
+ \anchor{cathode2}{
+ \northwest
+ \pgf at circ@res at step= \pgf at y
+ \pgfpointorigin
+ \pgfpathmoveto{ \pgfpointpolar{75}{\pgf at circ@res at step}}
+ }
+ \anchor{text}{
+ \pgfpointorigin
+ \advance \pgf at x by -.5\wd\pgfnodeparttextbox
+ \advance \pgf at y by -.5\ht\pgfnodeparttextbox
+ }
+ \anchor{left}{%
+ \northwest
+ \pgf at y=0pt
+ }
+ \anchor{right}{%
+ \northwest
+ \pgf at y=0pt
+ \pgf at x=-\pgf at x
+ }
+ \anchor{top}{
+ \northwest
+ \pgf at x=0pt
+ }
+ \anchor{pathstart}{
+ \northwest
+ \pgf at x=0pt
+ }
+ \anchor{pathend}{
+ \northwest
+ \pgf at x=0pt
+ \pgf at y=-\pgf at y
+ }
+ \anchor{bottom}{
+ \northwest
+ \pgf at x=0pt
+ \pgf at y=-\pgf at y
+ }
+ \anchor{center}{
+ \pgf at y=0pt
+ \pgf at x=0pt
+ }
+ \anchor{east}{
+ \northwest
+ \pgf at y=0pt
+ \pgf at x=-\pgf at x
+ }
+ \anchor{west}{
+ \northwest
+ \pgf at y=0pt
+ }
+ \anchor{south}{
+ \northwest
+ \pgf at x=0pt
+ \pgf at y=-\pgf at y
+ }
+ \anchor{north}{
+ \northwest
+ \pgf at x=0pt
+ }
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+ \pgf at circ@res at step=\ctikzvalof{tripoles/magnetron/width}\pgf at circ@Rlen
+ \northwest
+ \pgf at circ@res at up = \pgf at y
+ \pgf at circ@res at down = -\pgf at y
+ \pgf at circ@res at right = -\pgf at x
+ \pgf at circ@res at left = \pgf at x
+ \pgfmathsetlength{\pgf at circ@res at other}{sin(15)*\pgf at circ@res at up}
+
+ \pgfscope
+ \pgfstartlinewidth=\pgflinewidth
+ % draw outer box
+ % \ifpgf at circuit@boxed
+ % \pgfnode{box}{center}{}{pgf at box}{\pgfusepath{draw}}
+ % \fi
+ % draw outer circle
+ %\ifpgf at circuit@boxed
+ % \pgf at circ@res at step=.7\pgf at circ@res at 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 at circ@res at right}
+ \pgfsetfillcolor{white}
+ \pgfusepath{draw}
+ %create chambers
+ \foreach \angle in {45,135,225,315}{
+ \pgfpathmoveto{ \pgfpointpolar{\angle}{0.6\pgf at circ@res at right}}
+ \pgfpathlineto{ \pgfpointpolar{\angle}{\pgf at circ@res at right}}
+ }
+ \pgfsetroundcap
+ \pgfusepath{draw}
+ \pgfscope
+ %draw connection from outside
+ %anode
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{0\pgf at circ@res at left}{\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{0\pgf at circ@res at right}{.5\pgf at circ@res at down}}
+ %cathodes
+ \pgfpathmoveto{\pgfpointpolar{105}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{.5\pgf at circ@res at up}}
+ \pgfpathmoveto{\pgfpointpolar{75}{\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
+ \pgfsetbuttcap
+ \pgfusepath{draw}
+ \endpgfscope
+ %create cathode
+ \pgfpathmoveto{\pgfpoint{\pgf at circ@res at other}{.5\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{0}{.15\pgf at circ@res at up}}
+ \pgfpathlineto{\pgfpoint{-\pgf at circ@res at other}{.5\pgf at circ@res at up}}
+ \pgfusepath{draw}
+ %create anode
+ \pgfpathmoveto{\pgfpoint{0.3\pgf at circ@res at left}{.5\pgf at circ@res at down}}
+ \pgfpathlineto{\pgfpoint{0.3\pgf at circ@res at right}{.5\pgf at circ@res at down}}
+
+ \pgfsetbuttcap
+ \pgfusepath{draw}
+ \endpgfscope
+ }
+}
+
\endinput
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -44,16 +44,6 @@
\fi
}
-\def\pgf at circ@finallabel#1{%
- \edef\pgf at temp{}%
- \edef\pgf at circ@temp{\ctikzvalof{bipole/#1label/unit}}%
- \ifx\pgf at temp\pgf at circ@temp%
- \ctikzvalof{bipole/#1label/name}%
- \else%
- $\SI{\ctikzvalof{bipole/#1label/name}}{\ctikzvalof{bipole/#1label/unit}}$%
- \fi%
-}
-
\def\pgf at circ@ifkeyempty#1{
\pgfextra{
\ctikzset{#1/.get=\pgf at circ@temp}
Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex 2016-09-08 21:57:45 UTC (rev 42017)
@@ -91,7 +91,33 @@
\def\pgf at circ@drawvoltagegeneric{
\pgfextra{
\ifnum \ctikzvalof{mirror value}=-1
- \ifpgf at circuit@bipole at voltage@below\pgf at circuit@bipole at voltage@belowfalse\else\pgf at circuit@bipole at voltage@belowtrue\fi
+ \ifpgf at circuit@bipole at inverted
+ \ifpgf at circuit@bipole at voltage@straight
+ \def\distfromline{\eudist}
+ \else
+ \def\distfromline{\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen}
+ \fi
+ \else
+ \ifpgf at circuit@bipole at voltage@straight
+ \def\distfromline{-\eudist}
+ \else
+ \def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen}
+ \fi
+ \fi
+ \else
+ \ifpgf at circuit@bipole at inverted
+ \ifpgf at circuit@bipole at voltage@straight
+ \def\distfromline{-\eudist}
+ \else
+ \def\distfromline{-\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen}
+ \fi
+ \else
+ \ifpgf at circuit@bipole at voltage@straight
+ \def\distfromline{\eudist}
+ \else
+ \def\distfromline{\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen}
+ \fi
+ \fi
\fi
\ifpgf at circuit@bipole at 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 at mid) at ($(\tikztostart) ! \distacefromnode ! (\ctikzvalof{bipole/name}.left)$)
- coordinate (pgfcirc at Vfrom) at ($(pgfcirc at mid) ! -\ctikzvalof{voltage/distance from line}\pgf at circ@Rlen ! \pgf at circ@voltage at angle:(\ctikzvalof{bipole/name}.left)$)
-
- coordinate (pgfcirc at mid) at ($(\tikztotarget) ! \distacefromnode ! (\ctikzvalof{bipole/name}.right)$)
- coordinate (pgfcirc at Vto) at ($(pgfcirc at mid) ! \ctikzvalof{voltage/distance from line}\pgf at circ@Rlen ! \pgf at circ@voltage at angle : (\ctikzvalof{bipole/name}.right)$)
+ coordinate (pgfcirc at midtmp) at ($(\tikztostart) ! \distacefromnode ! (anchorstartnode)$)
+ coordinate (pgfcirc at Vfrom) at ($(pgfcirc at midtmp) ! -\distfromline ! \pgf at circ@voltage at angle:(anchorstartnode)$)
+ coordinate (pgfcirc at mid) at ($(\tikztotarget) ! \distacefromnode ! (anchorendnode)$)
+ coordinate (pgfcirc at Vto) at ($(pgfcirc at mid) ! \distfromline ! \pgf at circ@voltage at angle : (anchorendnode)$)
\ifpgf at circuit@bipole at voltage@below
coordinate (pgfcirc at Vcont1) at ($(\ctikzvalof{bipole/name}.center) ! \bumpb ! (\ctikzvalof{bipole/name}.-110)$)
@@ -125,15 +151,24 @@
\fi
\ifpgf at circuit@europeanvoltage
- \ifpgf at circuit@bipole at voltage@backward
- (pgfcirc at Vto) .. controls (pgfcirc at Vcont2) and (pgfcirc at Vcont1) ..
- node[currarrow, sloped, allow upside down, pos=1] {}
- (pgfcirc at Vfrom)
+ \ifpgf at circuit@bipole at voltage@straight
+ \ifpgf at circuit@bipole at voltage@backward
+ (pgfcirc at Vto) --(pgfcirc at Vfrom) node[currarrow, sloped, allow upside down, pos=1] {}
+ \else
+ (pgfcirc at Vfrom) --(pgfcirc at Vto) node[currarrow, sloped, allow upside down, pos=1] {}
+
+ \fi
\else
- (pgfcirc at Vfrom) .. controls (pgfcirc at Vcont1) and (pgfcirc at Vcont2) ..
- node[currarrow, sloped, allow upside down, pos=1] {}
- (pgfcirc at Vto)
- \fi
+ \ifpgf at circuit@bipole at voltage@backward
+ (pgfcirc at Vto) .. controls (pgfcirc at Vcont2) and (pgfcirc at Vcont1) ..
+ node[currarrow, sloped, allow upside down, pos=1] {}
+ (pgfcirc at Vfrom)
+ \else
+ (pgfcirc at Vfrom) .. controls (pgfcirc at Vcont1) and (pgfcirc at Vcont2) ..
+ node[currarrow, sloped, allow upside down, pos=1] {}
+ (pgfcirc at Vto)
+ \fi
+ \fi
\else
\ifpgf at circuit@bipole at voltage@backward
\ifpgf at circ@oldvoltagedirection
@@ -178,7 +213,7 @@
\ifpgf at circuit@bipole at voltageoutsideofsymbol
% if it is a battery, must put + and -
\ifpgf at circuit@bipole at voltage@backward
- (pgfcirc at Vcont2) node {$-$} (pgfcirc at Vcont1) node {$+$}
+ (pgfcirc at Vcont1) node {$-$} (pgfcirc at Vcont2) node {$+$}
\else
(pgfcirc at Vcont1) node {$+$} (pgfcirc at Vcont2) node {$-$}
\fi
@@ -247,18 +282,38 @@
\else\def\pgf at circ@bipole at voltage@label at anchor{south}
\fi
\fi\fi
-
+
+ \ifnum \ctikzvalof{mirror value}=-1
+ \ifpgf at circuit@bipole at voltage@below
+ \pgf at circuit@bipole at voltage@belowfalse
+ \else
+ \pgf at circuit@bipole at voltage@belowtrue
+ \fi
+ \fi
+
+ \ifpgf at circuit@bipole at inverted
+ \ifpgf at circuit@bipole at voltage@below
+ \pgf at circuit@bipole at voltage@belowfalse
+ \else
+ \pgf at circuit@bipole at voltage@belowtrue
+ \fi
+ \fi
+
\ifpgf at circuit@bipole at voltage@below
\def\pgf at circ@bipole at voltage@label at where{-90}
\else
\def\pgf at circ@bipole at voltage@label at where{90}
\fi
+
- \edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label distance}
+ \edef\pgf at temp{/tikz/circuitikz/bipoles/\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}/voltage/european label
+ distance}
\pgfkeysifdefined{\pgf at 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 at circuit@bipole at isvoltage
\pgf at circ@drawvoltagegenerator
@@ -265,30 +320,15 @@
\else
\pgf at circ@drawvoltagegeneric
\fi
+
+
+
(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where)
coordinate (Vlab) at ($(\ctikzvalof{bipole/name}.center) !
\ifpgf at circuit@europeanvoltage\eudist\else\ctikzvalof{voltage/american label distance}\fi !
(\ctikzvalof{bipole/name}.\pgf at circ@bipole at voltage@label at where)$)
node [anchor=\pgf at circ@bipole at voltage@label at anchor, inner sep=0]
- at (Vlab) { \pgf at circ@finallabel{voltage/} }
+ at (Vlab) { \pgf at circ@finallabels{voltage/label} }
}
-
-
-
\endinput
-
-% coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) !
-% \ctikzvalof{voltage/bump b} !
-% (\ctikzvalof{bipole/name}.-110) $)
-% coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) !
-% \ctikzvalof{voltage/bump b} !
-% (\ctikzvalof{bipole/name}.-70) $)
-% \else
-% coordinate (pgfcirc at Vcont1) at ($ (\ctikzvalof{bipole/name}.center) !
-% \ctikzvalof{voltage/bump b} !
-% (\ctikzvalof{bipole/name}.110) $)
-% coordinate (pgfcirc at Vcont2) at ($ (\ctikzvalof{bipole/name}.center) !
-% \ctikzvalof{voltage/bump b} !
-% (\ctikzvalof{bipole/name}.70) $)
-% \fi
Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2016-09-08 01:15:43 UTC (rev 42016)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty 2016-09-08 21:57:45 UTC (rev 42017)
@@ -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 at circuit@bipole at voltage@straighttrue
+}
+
\DeclareOption{americanvoltage}{
\ctikzset{voltage=american}
}
@@ -47,10 +51,8 @@
\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}
}
More information about the tex-live-commits
mailing list