summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-06-06 23:01:18 +0000
committerKarl Berry <karl@freefriends.org>2016-06-06 23:01:18 +0000
commit04e211f107eb8723e3df5cb49ee72fb0a191e6e4 (patch)
tree91b70654e05a91c7fb8c0944d14371161d019b53 /Master
parent24f9b9f3765cce36b365687c66f49278a94fbc7a (diff)
circuitikz (6jun16)
git-svn-id: svn://tug.org/texlive/trunk@41299 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdfbin12185 -> 12180 bytes
-rw-r--r--Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md11
-rw-r--r--Master/texmf-dist/doc/generic/circuitikz/README.md18
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/changelog.tex30
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdfbin254347 -> 261924 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex184
-rw-r--r--Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex18
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex176
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex615
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex (renamed from Master/texmf-dist/tex/generic/circuitikz/pgfcircbasic.tex)254
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex23
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex2206
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex3
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex21
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty24
15 files changed, 1478 insertions, 2105 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 8da491a0ca3..0742037452f 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 83d9a049f04..b5e521839ff 100644
--- a/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
+++ b/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
@@ -1,5 +1,14 @@
<!--- CircuiTikz - Changelog --->
-The major changes among the different circuitikz versions are listed here. See <https://github.com/mredaelli/circuitikz/commits> for a full list of changes.
+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.6 (2016-06-06)
+ - Added Mechanical Symbols (damper,mass,spring)
+ - Added new connection style diamond, use (d-d)
+ - Added new sources voosource and ioosource (double zero-style)
+ - All diode can now drawn in a stroked way, just use globel option "strokediode" or stroke instead of full/empty, or D-. Use this option for compliance with DIN standard EN-60617
+ - Improved Shape of Diodes:tunnel diode, Zener diode, schottky diode (bit longer lines at cathode)
+ - Reworked igbt: New anchors G,gate and new L-shaped form Lnigbt, Lpigbt
+ - Improved shape of all fet-transistors and mirrored p-chan fets as default, as pnp, pmos, pfet are already. This means a backward-incompatibility, but smaller code, because p-channels mosfet are by default in the correct direction(source at top). Just remove the 'yscale=-1' from your p-chan fets at old pictures.
* Version 0.5 (2016-04-24)
- new option boxed and dashed for hf-symbols
diff --git a/Master/texmf-dist/doc/generic/circuitikz/README.md b/Master/texmf-dist/doc/generic/circuitikz/README.md
index ac87a1f6c61..f7c87d44ba1 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.5 (2016-04-24).
+This is CircuiTikz, version 0.6 (2016-06-05).
This package provides a set of macros for naturally typesetting electrical and (somewhat less naturally, perhaps) electronical networks.
@@ -16,7 +16,7 @@ So I based everything with the very impressive (if somewhat verbose at times) Ti
* xstrings not older than 2009/03/13
## Installation
-Unpack everything in a directory in the TeX search path and refresh the TeX db.
+The stable version is available on ctan and is included within the major latex distributions(Texlive, Miktex). If you want to test the latest version, have a look at http://circuitikz.github.io/circuitikz/. There you can find the latest git-version as a single file, just copy it to your project or to your local tex tree.
## Usage
Just place
@@ -29,13 +29,23 @@ or, for ConTeXt,
````
in the preamble and compile away, both with PS and PDF target output.
+If you want to use or to try the git version, just append a git the package name:
+````latex
+ \usepackage{circuitikzgit}
+````
+or, for ConTeXt,
+````latex
+ \usemodule[circuitikzgit]
+````
+## More Information
+More Information can be found in the manual and at the wiki of the project located at https://github.com/circuitikz/circuitikz/wiki.
+
## Contact the authors
-* git: https://github.com/mredaelli/circuitikz
+* git: https://github.com/circuitikz/circuitikz
* Massimo Redaelli (m.redaelli@gmail.com)
* Stefan Lindner (stefan.lindner@fau.de)
* Stefan Erhardt (stefan.erhardt@fau.de)
-
-------------
Copyright 2007-16 by Massimo Redaelli
diff --git a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
index 4fb58529660..c8d89491bed 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
@@ -1,11 +1,39 @@
%DO NOT EDIT THIS AUTOMATICALLY GENERATED FILE, run "make changelog" at toplevel!!!
The major changes among the different circuitikz versions are listed
-here. See \url{https://github.com/mredaelli/circuitikz/commits} for a
+here. See \url{https://github.com/circuitikz/circuitikz/commits} for a
full list of changes.
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
+ Version 0.6 (2016-06-06)
+
+ \begin{itemize}
+ \itemsep1pt\parskip0pt\parsep0pt
+ \item
+ Added Mechanical Symbols (damper,mass,spring)
+ \item
+ Added new connection style diamond, use (d-d)
+ \item
+ Added new sources voosource and ioosource (double zero-style)
+ \item
+ All diode can now drawn in a stroked way, just use globel option
+ ``strokediode'' or stroke instead of full/empty, or D-. Use this
+ option for compliance with DIN standard EN-60617
+ \item
+ Improved Shape of Diodes:tunnel diode, Zener diode, schottky diode
+ (bit longer lines at cathode)
+ \item
+ Reworked igbt: New anchors G,gate and new L-shaped form Lnigbt,
+ Lpigbt
+ \item
+ Improved shape of all fet-transistors and mirrored p-chan fets as
+ default, as pnp, pmos, pfet are already. This means a
+ backward-incompatibility, but smaller code, because p-channels
+ mosfet are by default in the correct direction(source at top). Just
+ remove the `yscale=-1' from your p-chan fets at old pictures.
+ \end{itemize}
+\item
Version 0.5 (2016-04-24)
\begin{itemize}
diff --git a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
index 95903938cb1..2654b941356 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 8896c748b7a..676900927aa 100644
--- a/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
+++ b/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
@@ -1,4 +1,3 @@
-% !TeX document-id = {5e9c4ee1-adf2-4a3c-b550-ad6df747cc75}
% % Konfiguration für Texstudio (Version > 2.9)
% !TeX program = xelatex
% !TeX TXS-program:compile = txs:///xelatex/[-8bit]
@@ -31,8 +30,7 @@
%\usepackage{babel}
\fi
\fi
-
-
+\def\tightlist{} %needed for latest pandoc-versions(pandoc used for including changelog)
\usepackage{microtype}
\sisetup{load=derived} % loading \siemens
@@ -142,7 +140,15 @@ So, if loaded with said option, one must write \verb!(0,0) to[*R] (2,0)! and, fo
Copyright \copyright\ 2007--2016 Massimo Redaelli. This package is author-maintained. Permission is granted to copy, distribute and/or modify this software under the terms of the \LaTeX\ Project Public License, version 1.3.1, or the GNU Public License. This software is provided ‘as is’, without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
\subsection{Feedback}
-The easiest way to contact the authors is via the official Github repository: \url{https://github.com/mredaelli/circuitikz/issues}
+The easiest way to contact the authors is via the official Github repository: \url{https://github.com/circuitikz/circuitikz/issues}
+
+
+\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.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}
\section{Package options}
@@ -195,8 +201,9 @@ Feel free to load the package with your own cultural options:
\item \texttt{american}: equivalent to \texttt{americancurrents}, \texttt{americanvoltages}, \texttt{americanresistors}, \texttt{americaninductors}, \texttt{americanports}, \texttt{americangfsurgearrester};
\item \texttt{siunitx}: integrates with \texttt{SIunitx} package. If labels, currents or voltages are of the form \verb!#1<#2>! then what is shown is actually \verb!\SI{#1}{#2}!;
\item \texttt{nosiunitx}: labels are not interpreted as above;
- \item \texttt{fulldiodes}: the various diodes are drawn \emph{and} filled by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Un-filled diode can always be forced with \texttt{Do}, \texttt{sDo}, \ldots
- \item \texttt{emptydiodes}: the various diodes are drawn \emph{but not} filled by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Filled diode can always be forced with \texttt{D*}, \texttt{sD*}, \ldots
+ \item \texttt{fulldiode}: the various diodes are drawn \emph{and} filled by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Other diode styles can always be forced with e.g. \texttt{Do}, \texttt{D-}, \ldots
+ \item \texttt{strokediode}: the various diodes are drawn \emph{and} stroke by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Other diode styles can always be forced with e.g. \texttt{Do}, \texttt{D*}, \ldots
+ \item \texttt{emptydiode}: the various diodes are drawn \emph{but not} filled by default, i.e. when using styles such as \texttt{D}, \texttt{sD}, \ldots Other diode styles can always be forced with e.g. \texttt{Do}, \texttt{D-}, \ldots
\item \texttt{arrowmos}: pmos and nmos have arrows analogous to those of pnp and npn transistors;
\item \texttt{noarrowmos}: pmos and nmos do not have arrows analogous to those of pnp and npn transistors;
\item \texttt{fetbodydiode}: draw the body diode of a FET;
@@ -341,29 +348,12 @@ Other miscellaneous resistor-like devices:
\circuititembip{afuse}{Asymmetric fuse}{asymmetric fuse}
\end{itemize}
-\subsubsection{Stationary sources}
-\begin{itemize}
- \circuititembip{battery}{Battery}{}
- \circuititembip{battery1}{Single battery cell}{}
- \circuititembip{european voltage source}{Voltage source (european style)}{}
- \circuititembip{american voltage source}{Voltage source (american style)}{}
- \circuititembip{european current source}{Current source (european style)}{}
- \circuititembip{american current source}{Current source (american style)}{}
-\end{itemize}
-
-\begin{framed}
-If (default behaviour) \texttt{europeancurrents} option is active (or the style \texttt{[european currents]} is used), the shorthands \texttt{current source}, \texttt{isource}, and \texttt{I} are equivalent to \texttt{european current source}. Otherwise, if \texttt{americancurrents} option is active (or the style \texttt{[american currents]} is used) they are equivalent to \texttt{american current source}.
-
-Similarly, if (default behaviour) \texttt{europeanvoltages} option is active (or the style \texttt{[european voltages]} is used), the shorthands \texttt{voltage source}, \texttt{vsource}, and \texttt{V} are equivalent to \texttt{european voltage source}. Otherwise, if \texttt{americanvoltages} option is active (or the style \texttt{[american voltages]} is used) they are equivalent to \texttt{american voltage source}.
-\end{framed}
-
-
-
\subsubsection{Diodes and such}
\begin{itemize}
\circuititembip{empty diode}{Empty diode}{Do}
\circuititembip{empty Schottky diode}{Empty Schottky diode}{sDo}
\circuititembip{empty Zener diode}{Empty Zener diode}{zDo}
+ \circuititembip{empty ZZener diode}{Empty ZZener diode}{zzDo}
\circuititembip{empty tunnel diode}{Empty tunnel diode}{tDo}
\circuititembip{empty photodiode}{Empty photodiode}{pDo}
\circuititembip{empty led}{Empty led}{leDo}
@@ -371,16 +361,38 @@ Similarly, if (default behaviour) \texttt{europeanvoltages} option is active (or
\circuititembip{full diode}{Full diode}{D*}
\circuititembip{full Schottky diode}{Full Schottky diode}{sD*}
\circuititembip{full Zener diode}{Full Zener diode}{zD*}
+ \circuititembip{full ZZener diode}{Full ZZener diode}{zzD*}
\circuititembip{full tunnel diode}{Full tunnel diode}{tD*}
\circuititembip{full photodiode}{Full photodiode}{pD*}
\circuititembip{full led}{Full led}{leD*}
\circuititembip{full varcap}{Full varcap}{VC*}
+ \circuititembip{stroke diode}{Stroke diode}{D-}
+ \circuititembip{stroke Schottky diode}{Stroke Schottky diode}{sD-}
+ \circuititembip{stroke Zener diode}{Stroke Zener diode}{zD-}
+ \circuititembip{stroke ZZener diode}{Stroke ZZener diode}{zzD-}
+ \circuititembip{stroke tunnel diode}{Stroke tunnel diode}{tD-}
+ \circuititembip{stroke photodiode}{Stroke photodiode}{pD-}
+ \circuititembip{stroke led}{Stroke led}{leD-}
+ \circuititembip{stroke varcap}{Stroke varcap}{VC-}
\end{itemize}
+\subsubsection{Other tripole-like diodes}\label{sec:othertrip} The following tripoles are entered with the usual command of the form
+\begin{itemize}
+ \circuititembip{triac}{Standard triac (shape depends on package option)}{Tr}
+ \circuititembip{empty triac}{Empty triac}{Tro}
+ \circuititembip{full triac}{Full triac}{Tr*}
+ \circuititembip{thyristor}{Standard thyristor (shape depends on package option)}{Ty}
+ \circuititembip{empty thyristor}{Empty thyristor}{Tyo}
+ \circuititembip{full thyristor}{Full thyristor}{Ty*}
+ \circuititembip{stroke thyristor}{Stroke thyristor}{Ty-}
+\end{itemize}
+See chapter \ref{bipole-naming} for information how access the third connector
+
\begin{framed}
-The options \texttt{fulldiodes} and \texttt{emptydiodes} (and the styles \texttt{[full diodes]} and \texttt{[empty diodes]}) define which shape will be used by abbreviated commands such that \texttt{D}, \texttt{sD}, \texttt{zD}, \texttt{tD}, \texttt{pD}, \texttt{leD}, and \texttt{VC}.
+The package options \texttt{fulldiode}, \texttt{strokediode}, and \texttt{emptydiode} (and the styles \texttt{[full diodes]}, \texttt{[stroke diodes]}, and \texttt{[empty diodes]}) define which shape will be used by abbreviated commands such that \texttt{D}, \texttt{sD}, \texttt{zD}, \texttt{zzD}, \texttt{tD}, \texttt{pD}, \texttt{leD}, \texttt{VC}, \texttt{Ty},\texttt{Tr}(no stroke symbol available!).
\end{framed}
+
\begin{itemize}
\circuititembip{squid}{Squid}{}
\circuititembip{barrier}{Barrier}{}
@@ -432,6 +444,23 @@ There is also a transmission line:
\circuititembip{TL}{Transmission line}{transmission line, tline}
\end{itemize}
+\subsubsection{Stationary sources}
+\begin{itemize}
+ \circuititembip{battery}{Battery}{}
+ \circuititembip{battery1}{Single battery cell}{}
+ \circuititembip{european voltage source}{Voltage source (european style)}{}
+ \circuititembip{american voltage source}{Voltage source (american style)}{}
+ \circuititembip{european current source}{Current source (european style)}{}
+ \circuititembip{american current source}{Current source (american style)}{}
+\end{itemize}
+
+\begin{framed}
+If (default behaviour) \texttt{europeancurrents} option is active (or the style \texttt{[european currents]} is used), the shorthands \texttt{current source}, \texttt{isource}, and \texttt{I} are equivalent to \texttt{european current source}. Otherwise, if \texttt{americancurrents} option is active (or the style \texttt{[american currents]} is used) they are equivalent to \texttt{american current source}.
+
+Similarly, if (default behaviour) \texttt{europeanvoltages} option is active (or the style \texttt{[european voltages]} is used), the shorthands \texttt{voltage source}, \texttt{vsource}, and \texttt{V} are equivalent to \texttt{european voltage source}. Otherwise, if \texttt{americanvoltages} option is active (or the style \texttt{[american voltages]} is used) they are equivalent to \texttt{american voltage source}.
+\end{framed}
+
+
\subsubsection{Sinusoidal sources} Here because I was asked for them. But how do you distinguish one from the other?!
\begin{itemize}
\circuititembip{sinusoidal voltage source}{Sinusoidal voltage source}{vsourcesin, sV}
@@ -444,6 +473,8 @@ There is also a transmission line:
\circuititembip{vsourcetri}{Triangle voltage source}{tV}
\circuititembip{esource}{Empty voltage source}{}
\circuititembip{pvsource}{Photovoltaic-voltage source}{}
+ \circuititembip{ioosource}{Double Zero style current source}{}
+ \circuititembip{voosource}{Double Zero style voltage source}{}
\end{itemize}
\subsubsection{DC sources}
@@ -452,6 +483,15 @@ There is also a transmission line:
\circuititembip{dcisource}{DC current source}{}
\end{itemize}
+
+\subsubsection{Mechanical Analogy}
+\begin{itemize}
+ \circuititembip{damper}{Mechanical Damping}{}
+ \circuititembip{spring}{Mechanical Stiffness}{}
+ \circuititembip{mass}{Mechanical Mass}{}
+\end{itemize}
+
+
%\begin{framed}
%The options \texttt{europeancurrent} [resp. \texttt{europeanvoltage}] (the default) and \texttt{americancurrent} [resp. \texttt{americanvoltage}] define which sinusoidal current [resp. voltage] source is selected by default when the abbreviated styles \texttt{sinusoidal current source}, \texttt{csourcesin}, \texttt{cI} [resp. \texttt{sinusoidal voltage source}, \texttt{vsourcesin}, \texttt{cV}] are used.
@@ -522,12 +562,26 @@ Similarly, if (default behaviour) \texttt{europeanvoltages} option is active (or
\circuititem{pnp}{\scshape pnp}{}
\circuititem{npn,photo}{\scshape npn}{}
\circuititem{pnp,photo}{\scshape pnp}{}
- \circuititem{nigbt}{\scshape npigbt}{}
- \circuititem{pigbt}{\scshape pigbt}{}
+ \circuititem{nigbt}{\scshape nigbt}{}
+ \circuititem{pigbt}{\scshape pigbt}{}
+ \circuititem{Lnigbt}{\scshape Lnigbt}{}
+ \circuititem{Lpigbt}{\scshape Lpigbt}{}
\end{itemize}
-The Base/Gate connection of all transistors can be disable by using the options \textit{nogate} or \textit{nobase}, respectively. The Base/Gate anchors are floating, but there an additional anchor "nogate"/"nobase", which can be used to point to the unconnected base:
+For all transistors a bodydiode(or freewheeling diode) can automatically be drawn. Just use the global option bodydiode, or for single transistors, the tikz-option bodydiode:
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) node[npn,bodydiode](npn){}++(2,0)node[pnp,bodydiode](npn){};
+ \draw (0,-2) node[nigbt,bodydiode](npn){}++(2,0)node[pigbt,bodydiode](npn){};
+ \draw (0,-4) node[nfet,bodydiode](npn){}++(2,0)node[pfet,bodydiode](npn){};
+\end{circuitikz}
+\end{LTXexample}
+
+
+
+
+The Base/Gate connection of all transistors can be disable by using the options \textit{nogate} or \textit{nobase}, respectively. The Base/Gate anchors are floating, but there an additional anchor "nogate"/"nobase", which can be used to point to the unconnected base:
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
\draw (2,0) node[npn,nobase](npn){};
@@ -627,18 +681,7 @@ The symbols can also be used along a path, using the transistor-path-syntax(T in
\end{circuitikz}
\end{LTXexample}
-\subsubsection{Other bipole-like tripoles}\label{sec:othertrip} The following tripoles are entered with the usual command of the form
-\begin{itemize}
- \circuititembip{triac}{triac}{Tr}
- \circuititembip{thyristor}{thyristor}{Ty}
- %\circuititembip{IGBT}{IGBT}{}
-\end{itemize}
-% now part of block diagram parts above
-%\subsubsection{Misc}
-%\begin{itemize}
-% \circuititem{mixer}{Mixer}{}
-%\end{itemize}
\subsection{Double bipoles}
@@ -1050,6 +1093,24 @@ See introduction note at Currents (chapter \ref{currents}, page \pageref{current
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
+ \draw (0,0) to[R, d-d] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, -d] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, d-] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
\draw (0,0) to[R, o-*] (2,0);
\end{circuitikz}
\end{LTXexample}
@@ -1060,6 +1121,30 @@ See introduction note at Currents (chapter \ref{currents}, page \pageref{current
\end{circuitikz}
\end{LTXexample}
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, o-d] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, d-o] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, *-d] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,0) to[R, d-*] (2,0);
+\end{circuitikz}
+\end{LTXexample}
+
\subsection{Special components}
@@ -1349,7 +1434,6 @@ In the case of \textsc{not}, there are only \texttt{in} and \texttt{out} (althou
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
(0,0) node[nmos] (mos) {}
- (mos.base) node[anchor=west] {B}
(mos.gate) node[anchor=east] {G}
(mos.drain) node[anchor=south] {D}
(mos.source) node[anchor=north] {S}
@@ -1359,10 +1443,10 @@ In the case of \textsc{not}, there are only \texttt{in} and \texttt{out} (althou
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
(0,0) node[pigfete] (pigfete) {}
- (pigfete.B) node[anchor=west] {B}
(pigfete.G) node[anchor=east] {G}
- (pigfete.D) node[anchor=south] {D}
- (pigfete.S) node[anchor=north] {S}
+ (pigfete.D) node[anchor=north] {D}
+ (pigfete.S) node[anchor=south] {S}
+ (pigfete.bulk) node[anchor=east] {Bulk}
;\end{circuitikz}
\end{LTXexample}
@@ -1415,10 +1499,10 @@ Similarly, transistors and other components can be reflected vertically:
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
(0,0) node[pigfete, yscale=-1] (pigfete) {}
- (pigfete.B) node[anchor=west] {B}
+ (pigfete.bulk) node[anchor=west] {Bulk}
(pigfete.G) node[anchor=east] {G}
- (pigfete.D) node[anchor=north] {D}
- (pigfete.S) node[anchor=south] {S}
+ (pigfete.D) node[anchor=south] {D}
+ (pigfete.S) node[anchor=north] {S}
;\end{circuitikz}
\end{LTXexample}
@@ -1432,7 +1516,7 @@ Similarly, transistors and other components can be reflected vertically:
\end{LTXexample}
\subsubsection{Other tripoles} When inserting a thrystor, a triac or a potentiometer, one needs to refer to the third node--gate (\texttt{gate} or \texttt{G}) for the former two; wiper (\texttt{wiper} or \texttt{W}) for the latter one. This is done by giving a name to the bipole:
-
+\label{bipole-naming}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz} \draw
(0,0) to[Tr, n=TRI] (2,0)
@@ -2005,8 +2089,10 @@ Just substitute every occurrence of the environment \verb!circuitikz! with \verb
% % changelog.tex will be updated by makefile from CHANGELOG.md
\section{Changelog}
-\input{changelog.tex}
+\IfFileExists{changelog.tex}
+{\input{changelog.tex}}
+{The file changelog.tex was not found, run 'make changelog' at toplevel to generate it with pandoc from CHANGELOG.md}
\printindex
-\end{document} \ No newline at end of file
+\end{document}
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 91a730409e1..cbf664a6c64 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.5}
-\def\pgfcircversiondate{2016/04/24}
+\def\pgfcircversion{0.6}
+\def\pgfcircversiondate{2016/06/06}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]
@@ -18,6 +18,18 @@
\catcode`\!=12
\input pgfcirc.defines.tex
+\input pgfcircutils.tex
+\input pgfcircmath.tex
+
+\input pgfcircshapes.tex
+\input pgfcircmonopoles.tex
+\input pgfcircbipoles.tex
+\input pgfcirctripoles.tex
+\input pgfcircquadpoles.tex
+
+\input pgfcirclabel.tex
+\input pgfcircvoltage.tex
+\input pgfcirccurrent.tex
% defaults
@@ -107,7 +119,7 @@
\ctikzset{tripoles/op amp/font/.initial=\switchtobodyfont[small]}
-\input pgfcircbasic.tex
+\input pgfcircpath.tex
\catcode`\@=\tikzatcode
\catcode`\|=\tikzbarcode
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
index dabfbcbdb27..1616cd556e2 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirc.defines.tex
@@ -1,9 +1,20 @@
%% Options
-
-
-
+%%%%%%%%%%%%
+%% Dimensions
+
+% coordinates
+\newdimen\pgf@circ@res@up
+\newdimen\pgf@circ@res@down
+\newdimen\pgf@circ@res@zero
+\newdimen\pgf@circ@res@left
+\newdimen\pgf@circ@res@right
+\newdimen\pgf@circ@res@other
+\newdimen\pgf@circ@res@step
+\newdimen\pgf@circ@res@temp
+% inital thickness
+\newdimen \pgfstartlinewidth
%% Keys
\long\def\pgf@circ@comment#1{}
@@ -97,22 +108,20 @@
\ctikzset{bipoles/vresistor/height/.initial=.6}
\ctikzset{bipoles/vresistor/width/.initial=.8}
\ctikzset{bipoles/cuteinductor/height/.initial=.3}
+\ctikzset{bipoles/cuteinductor/lower coil height/.initial=.15}
\ctikzset{bipoles/cuteinductor/width/.initial=.6}
-\ctikzset{bipoles/cuteinductor/coils/.initial=6}
-\ctikzset{bipoles/cuteinductor/coil height/.initial=.15}
-\ctikzset{bipoles/cuteinductor/coil aspect/.initial=.25}
-\ctikzset{bipoles/cuteinductor/lower coil height/.initial=.05}
+\ctikzset{bipoles/cuteinductor/coils/.initial=5}
+\ctikzset{bipoles/cuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
\ctikzset{bipoles/americaninductor/height/.initial=.3}
\ctikzset{bipoles/americaninductor/height 2/.initial=.1}
\ctikzset{bipoles/americaninductor/width/.initial=.8}
\ctikzset{bipoles/americaninductor/coils/.initial=4}
\ctikzset{bipoles/americaninductor/coil height/.initial=.15}
-\ctikzset{bipoles/vcuteinductor/height/.initial=.3}
+\ctikzset{bipoles/vcuteinductor/height/.initial=.6}
+\ctikzset{bipoles/vcuteinductor/lower coil height/.initial=.3}
\ctikzset{bipoles/vcuteinductor/width/.initial=.6}
-\ctikzset{bipoles/vcuteinductor/coils/.initial=6}
-\ctikzset{bipoles/vcuteinductor/coil height/.initial=.15}
-\ctikzset{bipoles/vcuteinductor/coil aspect/.initial=.25}
-\ctikzset{bipoles/vcuteinductor/lower coil height/.initial=.05}
+\ctikzset{bipoles/vcuteinductor/coils/.initial=5}
+\ctikzset{bipoles/vcuteinductor/coil aspect/.initial=.5}%percentage of inductor width, which is covered by lower coil
\ctikzset{bipoles/vamericaninductor/height/.initial=.6}
\ctikzset{bipoles/vamericaninductor/height 2/.initial=.2}
\ctikzset{bipoles/vamericaninductor/width/.initial=.8}
@@ -124,6 +133,10 @@
\ctikzset{bipoles/pvsource/width/.initial=.60}
\ctikzset{bipoles/isource/height/.initial=.60}
\ctikzset{bipoles/isource/width/.initial=.60}
+\ctikzset{bipoles/oosource/height/.initial=.60}
+\ctikzset{bipoles/oosource/width/.initial=.60}
+\ctikzset{bipoles/oosource/circlesize/.initial=.65}%circlesize+circleoffset should be =1
+\ctikzset{bipoles/oosource/circleoffset/.initial=.35}%circlesize+circleoffset should be =1
\ctikzset{bipoles/dcisource/height/.initial=.60}
\ctikzset{bipoles/dcisource/width/.initial=.60}
\ctikzset{bipoles/dcvsource/height/.initial=.60}
@@ -258,6 +271,10 @@
\ctikzset{bipoles/vphaseshifter/width/.initial=.7}
\ctikzset{bipoles/detector/width/.initial=.7}
+
+\newif\ifpgf@circuit@trans@depletiontype
+\pgf@circuit@trans@depletiontypefalse
+
\newif\ifpgf@circuit@mos@arrows
\ctikzset{tripoles/mos style/.is choice}
\ctikzset{tripoles/mos style/no arrows/.code={\pgf@circuit@mos@arrowsfalse}}
@@ -309,109 +326,121 @@
\ctikzset{tripoles/pmos style/emptycircle/.add code={}{\pgf@circuit@pmos@emptycircletrue}}
-\newif\ifpgf@circuit@fet@ntype
-\pgf@circuit@fet@ntypetrue %default true
-%\newif\ifpgf@circuit@fet@ptype
-%\ctikzset{tripoles/nmos/.add code={\pgf@circuit@fet@ntypetrue}}
+\newif\ifpgf@circuit@trans@ntype
+\pgf@circuit@trans@ntypetrue %default true
+%\newif\ifpgf@circuit@trans@ptype
+%\ctikzset{tripoles/nmos/.add code={\pgf@circuit@trans@ntypetrue}}
\ctikzset{tripoles/nmos/width/.initial=.7}
\ctikzset{tripoles/nmos/gate height/.initial=.35}
\ctikzset{tripoles/nmos/base height/.initial=.5}
+\ctikzset{tripoles/nmos/conn height/.initial=0}
\ctikzset{tripoles/nmos/height/.initial=1.1}
\ctikzset{tripoles/nmos/base width/.initial=.5}
\ctikzset{tripoles/nmos/gate width/.initial=.62}
\ctikzset{tripoles/nmos/bodydiode scale/.initial=.3}
\ctikzset{tripoles/nmos/bodydiode distance/.initial=.3}
\ctikzset{tripoles/nmos/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nmos/curr direction/.initial=1}
\ctikzset{tripoles/pmos/width/.initial=.7}
\ctikzset{tripoles/pmos/gate height/.initial=.35}
\ctikzset{tripoles/pmos/base height/.initial=.5}
+\ctikzset{tripoles/pmos/conn height/.initial=0}
\ctikzset{tripoles/pmos/height/.initial=1.1}
\ctikzset{tripoles/pmos/base width/.initial=.5}
\ctikzset{tripoles/pmos/gate width/.initial=.62}
\ctikzset{tripoles/pmos/bodydiode scale/.initial=.3}
\ctikzset{tripoles/pmos/bodydiode distance/.initial=.3}
\ctikzset{tripoles/pmos/bodydiode conn/.initial=.6}
-
+\ctikzset{tripoles/pmos/curr direction/.initial=-1}
\ctikzset{tripoles/nfet/width/.initial=.7}
\ctikzset{tripoles/nfet/gate height/.initial=.35}
\ctikzset{tripoles/nfet/base height/.initial=.5}
+\ctikzset{tripoles/nfet/conn height/.initial=0}
\ctikzset{tripoles/nfet/height/.initial=1.1}
\ctikzset{tripoles/nfet/base width/.initial=.5}
\ctikzset{tripoles/nfet/gate width/.initial=.62}
\ctikzset{tripoles/nfet/bodydiode scale/.initial=.3}
\ctikzset{tripoles/nfet/bodydiode distance/.initial=.3}
\ctikzset{tripoles/nfet/bodydiode conn/.initial=.6}
-
+\ctikzset{tripoles/nfet/curr direction/.initial=1}
\ctikzset{tripoles/pfet/width/.initial=.7}
\ctikzset{tripoles/pfet/gate height/.initial=.35}
\ctikzset{tripoles/pfet/base height/.initial=.5}
+\ctikzset{tripoles/pfet/conn height/.initial=0}
\ctikzset{tripoles/pfet/height/.initial=1.1}
\ctikzset{tripoles/pfet/base width/.initial=.5}
\ctikzset{tripoles/pfet/gate width/.initial=.62}
\ctikzset{tripoles/pfet/bodydiode scale/.initial=.3}
\ctikzset{tripoles/pfet/bodydiode distance/.initial=.3}
\ctikzset{tripoles/pfet/bodydiode conn/.initial=.6}
-
+\ctikzset{tripoles/pfet/curr direction/.initial=-1}
\ctikzset{tripoles/nigfete/width/.initial=.7}
\ctikzset{tripoles/nigfete/gate height/.initial=.35}
\ctikzset{tripoles/nigfete/base height/.initial=.5}
+\ctikzset{tripoles/nigfete/conn height/.initial=.35}
\ctikzset{tripoles/nigfete/height/.initial=1.1}
\ctikzset{tripoles/nigfete/base width/.initial=.5}
\ctikzset{tripoles/nigfete/gate width/.initial=.62}
\ctikzset{tripoles/nigfete/bodydiode scale/.initial=.3}
\ctikzset{tripoles/nigfete/bodydiode distance/.initial=.3}
\ctikzset{tripoles/nigfete/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nigfete/curr direction/.initial=1}
\ctikzset{tripoles/nigfetd/width/.initial=.7}
\ctikzset{tripoles/nigfetd/gate height/.initial=.35}
\ctikzset{tripoles/nigfetd/base height/.initial=.5}
+\ctikzset{tripoles/nigfetd/conn height/.initial=.35}
\ctikzset{tripoles/nigfetd/height/.initial=1.1}
\ctikzset{tripoles/nigfetd/base width/.initial=.5}
\ctikzset{tripoles/nigfetd/gate width/.initial=.62}
\ctikzset{tripoles/nigfetd/bodydiode scale/.initial=.3}
\ctikzset{tripoles/nigfetd/bodydiode distance/.initial=.3}
\ctikzset{tripoles/nigfetd/bodydiode conn/.initial=.6}
-
+\ctikzset{tripoles/nigfetd/curr direction/.initial=1}
\ctikzset{tripoles/nigfetebulk/width/.initial=.7}
\ctikzset{tripoles/nigfetebulk/gate height/.initial=.35}
\ctikzset{tripoles/nigfetebulk/base height/.initial=.5}
+\ctikzset{tripoles/nigfetebulk/conn height/.initial=.35}
\ctikzset{tripoles/nigfetebulk/height/.initial=1.1}
\ctikzset{tripoles/nigfetebulk/base width/.initial=.5}
\ctikzset{tripoles/nigfetebulk/gate width/.initial=.62}
\ctikzset{tripoles/nigfetebulk/bodydiode scale/.initial=.3}
\ctikzset{tripoles/nigfetebulk/bodydiode distance/.initial=.3}
\ctikzset{tripoles/nigfetebulk/bodydiode conn/.initial=.6}
-
+\ctikzset{tripoles/nigfetebulk/curr direction/.initial=1}
\ctikzset{tripoles/pigfete/width/.initial=.7}
\ctikzset{tripoles/pigfete/gate height/.initial=.35}
\ctikzset{tripoles/pigfete/base height/.initial=.5}
+\ctikzset{tripoles/pigfete/conn height/.initial=.35}
\ctikzset{tripoles/pigfete/height/.initial=1.1}
\ctikzset{tripoles/pigfete/base width/.initial=.5}
\ctikzset{tripoles/pigfete/gate width/.initial=.62}
\ctikzset{tripoles/pigfete/bodydiode scale/.initial=.3}
\ctikzset{tripoles/pigfete/bodydiode distance/.initial=.3}
\ctikzset{tripoles/pigfete/bodydiode conn/.initial=.6}
-
+\ctikzset{tripoles/pigfete/curr direction/.initial=-1}
\ctikzset{tripoles/pigfetd/width/.initial=.7}
\ctikzset{tripoles/pigfetd/gate height/.initial=.35}
\ctikzset{tripoles/pigfetd/base height/.initial=.5}
+\ctikzset{tripoles/pigfetd/conn height/.initial=.35}
\ctikzset{tripoles/pigfetd/height/.initial=1.1}
\ctikzset{tripoles/pigfetd/base width/.initial=.5}
\ctikzset{tripoles/pigfetd/gate width/.initial=.62}
\ctikzset{tripoles/pigfetd/bodydiode scale/.initial=.3}
\ctikzset{tripoles/pigfetd/bodydiode distance/.initial=.3}
\ctikzset{tripoles/pigfetd/bodydiode conn/.initial=.6}
-
+\ctikzset{tripoles/pigfetd/curr direction/.initial=-1}
\ctikzset{tripoles/pigfetebulk/width/.initial=.7}
\ctikzset{tripoles/pigfetebulk/gate height/.initial=.35}
+\ctikzset{tripoles/pigfetebulk/conn height/.initial=.35}
\ctikzset{tripoles/pigfetebulk/base height/.initial=.5}
\ctikzset{tripoles/pigfetebulk/height/.initial=1.1}
\ctikzset{tripoles/pigfetebulk/base width/.initial=.5}
@@ -419,53 +448,105 @@
\ctikzset{tripoles/pigfetebulk/bodydiode scale/.initial=.3}
\ctikzset{tripoles/pigfetebulk/bodydiode distance/.initial=.3}
\ctikzset{tripoles/pigfetebulk/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pigfetebulk/curr direction/.initial=-1}
\ctikzset{tripoles/npn/width/.initial=.6}
\ctikzset{tripoles/npn/base height/.initial=.45}
\ctikzset{tripoles/npn/base height 2/.initial=.15}
\ctikzset{tripoles/npn/base height/.initial=.4}
+\ctikzset{tripoles/npn/conn height/.initial=0}
\ctikzset{tripoles/npn/height/.initial=1.1}
\ctikzset{tripoles/npn/base width/.initial=.5}
+\ctikzset{tripoles/npn/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/npn/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/npn/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/npn/curr direction/.initial=1}
\ctikzset{tripoles/pnp/width/.initial=.6}
\ctikzset{tripoles/pnp/base height/.initial=.45}
\ctikzset{tripoles/pnp/base height 2/.initial=.15}
\ctikzset{tripoles/pnp/base height/.initial=.4}
+\ctikzset{tripoles/pnp/conn height/.initial=0}
\ctikzset{tripoles/pnp/height/.initial=1.1}
\ctikzset{tripoles/pnp/base width/.initial=.5}
+\ctikzset{tripoles/pnp/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pnp/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pnp/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pnp/curr direction/.initial=-1}
\ctikzset{tripoles/pigbt/width/.initial=.6}
\ctikzset{tripoles/pigbt/gate height/.initial=.45}
\ctikzset{tripoles/pigbt/gate height 2/.initial=.15}
\ctikzset{tripoles/pigbt/base height/.initial=.4}
+\ctikzset{tripoles/pigbt/conn height/.initial=0}
\ctikzset{tripoles/pigbt/height/.initial=1.1}
\ctikzset{tripoles/pigbt/gate width/.initial=.62}
\ctikzset{tripoles/pigbt/base width/.initial=.5}
+\ctikzset{tripoles/pigbt/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pigbt/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pigbt/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pigbt/curr direction/.initial=-1}
+
\ctikzset{tripoles/nigbt/width/.initial=.6}
\ctikzset{tripoles/nigbt/gate height/.initial=.45}
\ctikzset{tripoles/nigbt/gate height 2/.initial=.15}
\ctikzset{tripoles/nigbt/base height/.initial=.4}
+\ctikzset{tripoles/nigbt/conn height/.initial=0}
\ctikzset{tripoles/nigbt/height/.initial=1.1}
\ctikzset{tripoles/nigbt/gate width/.initial=.62}
\ctikzset{tripoles/nigbt/base width/.initial=.5}
+\ctikzset{tripoles/nigbt/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nigbt/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nigbt/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nigbt/curr direction/.initial=1}
+
+\ctikzset{tripoles/Lpigbt/width/.initial=.6}
+\ctikzset{tripoles/Lpigbt/gate height/.initial=.45}
+\ctikzset{tripoles/Lpigbt/gate height 2/.initial=.15}
+\ctikzset{tripoles/Lpigbt/base height/.initial=.4}
+\ctikzset{tripoles/Lpigbt/conn height/.initial=.4}
+\ctikzset{tripoles/Lpigbt/height/.initial=1.1}
+\ctikzset{tripoles/Lpigbt/gate width/.initial=.62}
+\ctikzset{tripoles/Lpigbt/base width/.initial=.5}
+\ctikzset{tripoles/Lpigbt/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/Lpigbt/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/Lpigbt/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/Lpigbt/curr direction/.initial=-1}
+
+\ctikzset{tripoles/Lnigbt/width/.initial=.6}
+\ctikzset{tripoles/Lnigbt/gate height/.initial=.45}
+\ctikzset{tripoles/Lnigbt/gate height 2/.initial=.15}
+\ctikzset{tripoles/Lnigbt/base height/.initial=.4}
+\ctikzset{tripoles/Lnigbt/conn height/.initial=.4}
+\ctikzset{tripoles/Lnigbt/height/.initial=1.1}
+\ctikzset{tripoles/Lnigbt/gate width/.initial=.62}
+\ctikzset{tripoles/Lnigbt/base width/.initial=.5}
+\ctikzset{tripoles/Lnigbt/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/Lnigbt/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/Lnigbt/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/Lnigbt/curr direction/.initial=1}
\ctikzset{tripoles/njfet/width/.initial=.7}
\ctikzset{tripoles/njfet/gate height/.initial=.5}
\ctikzset{tripoles/njfet/gate height 2/.initial=.35}
\ctikzset{tripoles/njfet/gate width/.initial=.5}
+\ctikzset{tripoles/njfet/conn height/.initial=.35}
\ctikzset{tripoles/njfet/height/.initial=1.1}
\ctikzset{tripoles/njfet/bodydiode scale/.initial=.3}
\ctikzset{tripoles/njfet/bodydiode distance/.initial=.3}
\ctikzset{tripoles/njfet/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/njfet/curr direction/.initial=1}
\ctikzset{tripoles/pjfet/width/.initial=.7}
\ctikzset{tripoles/pjfet/gate height/.initial=.5}
\ctikzset{tripoles/pjfet/gate height 2/.initial=.35}
\ctikzset{tripoles/pjfet/gate width/.initial=.5}
+\ctikzset{tripoles/pjfet/conn height/.initial=.35}
\ctikzset{tripoles/pjfet/height/.initial=1.1}
\ctikzset{tripoles/pjfet/bodydiode scale/.initial=.3}
\ctikzset{tripoles/pjfet/bodydiode distance/.initial=.3}
\ctikzset{tripoles/pjfet/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pjfet/curr direction/.initial=-1}
\ctikzset{tripoles/isfet/width/.initial=1}
\ctikzset{tripoles/isfet/gate height/.initial=.35}
@@ -473,6 +554,7 @@
\ctikzset{tripoles/isfet/height/.initial=1.1}
\ctikzset{tripoles/isfet/base width/.initial=.3}
\ctikzset{tripoles/isfet/gate width/.initial=.5}
+\ctikzset{tripoles/isfet/conn height/.initial=0}
\ctikzset{tripoles/isfet/wave width/.initial=.16}
\ctikzset{tripoles/isfet/wave amp/.initial=.06}
\ctikzset{tripoles/isfet/waves y sep/.initial=.22}
@@ -480,6 +562,7 @@
\ctikzset{tripoles/isfet/bodydiode scale/.initial=.3}
\ctikzset{tripoles/isfet/bodydiode distance/.initial=.3}
\ctikzset{tripoles/isfet/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/isfet/curr direction/.initial=1}
\newif\ifpgf@circuit@europeanlogicport
\ctikzset{logic ports/.is choice}
@@ -639,9 +722,18 @@
\ctikzset{quadpoles/coupler2/width/.initial=1.3}
\ctikzset{quadpoles/coupler2/height/.initial=1.3}
-
+% %Mechanical section
\ctikzset{/tikz/circuitikz/tripoles/elmech/height/.initial=.8}
\ctikzset{/tikz/circuitikz/tripoles/elmech/width/.initial=.6}
+\ctikzset{bipoles/spring/height/.initial=.5}
+\ctikzset{bipoles/spring/width/.initial=.5}
+\ctikzset{bipoles/mass/height/.initial=.55}
+\ctikzset{bipoles/mass/box height/.initial=.4}
+\ctikzset{bipoles/mass/width/.initial=.5}
+
+\ctikzset{bipoles/damper/height/.initial=.35}
+\ctikzset{bipoles/damper/length/.initial=.3}
+\ctikzset{bipoles/damper/width/.initial=.4}
\ctikzset{bipole/.is family}
@@ -651,6 +743,10 @@
\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
+\ctikzset{bipole/is voltageoutsideofsymbol/.is if=pgf@circuit@bipole@voltageoutsideofsymbol}
+\newif\ifpgf@circuit@bipole@strokedsymbol
+\ctikzset{bipole/is strokedsymbol/.is if=pgf@circuit@bipole@strokedsymbol}
\newif\ifpgf@circuit@bipole@iscurrent
\ctikzset{bipole/is current/.is if=pgf@circuit@bipole@iscurrent}
@@ -693,10 +789,12 @@
\ctikzset{bipole/nodes/left/none/.code={\ctikzsetvalof{bipole/nodes/left}{none}}}
\ctikzset{bipole/nodes/left/empty/.code={\ctikzsetvalof{bipole/nodes/left}{empty}}}
\ctikzset{bipole/nodes/left/full/.code={\ctikzsetvalof{bipole/nodes/left}{full}}}
+\ctikzset{bipole/nodes/left/diamond/.code={\ctikzsetvalof{bipole/nodes/left}{diamond}}}
\ctikzset{bipole/nodes/right/.is choice}
\ctikzset{bipole/nodes/right/none/.code={\ctikzsetvalof{bipole/nodes/right}{none}}}
\ctikzset{bipole/nodes/right/empty/.code={\ctikzsetvalof{bipole/nodes/right}{empty}}}
\ctikzset{bipole/nodes/right/full/.code={\ctikzsetvalof{bipole/nodes/right}{full}}}
+\ctikzset{bipole/nodes/right/diamond/.code={\ctikzsetvalof{bipole/nodes/right}{diamond}}}
@@ -711,11 +809,20 @@
\ctikzset{inductor/european/.code={\ctikzsetvalof{inductor}{european}}}
\ctikzset{inductor/american/.code={\ctikzsetvalof{inductor}{american}}}
+\newif\ifpgf@circuit@strokediode
\newif\ifpgf@circuit@fulldiode
-\ctikzset{diode/.is if=pgf@circuit@fulldiode}
+\pgf@circuit@strokediodefalse
+\pgf@circuit@fulldiodefalse
+
\ctikzset{diode/.is choice}
-\ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse }
+\ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodefalse}%default
\ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue }
+\ctikzset{diode/stroke/.code = \pgf@circuit@strokediodetrue}
+
+\tikzset{full diodes/.style = { \circuitikzbasekey/diode = full }}
+\tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty }}
+\tikzset{stroke diodes/.style = { \circuitikzbasekey/diode = stroke }}
+
\ctikzset{thickness/.initial=2}
\ctikzset{color/.initial=black}
\pgfkeys{/tikz/color/.add code={}{\ctikzset{color=#1}}}
@@ -784,8 +891,6 @@
\tikzset{american inductors/.style = { \circuitikzbasekey/inductor = american } }
\tikzset{european inductors/.style = { \circuitikzbasekey/inductor = european } }
\tikzset{cute inductors/.style = { \circuitikzbasekey/inductor = cute } }
-\tikzset{full diodes/.style = { \circuitikzbasekey/diode = full } }
-\tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty } }
\tikzset{american ports/.style = { \circuitikzbasekey/logic ports = american } }
\tikzset{european ports/.style = { \circuitikzbasekey/logic ports = european } }
\tikzset{european/.style = { european currents, european voltages, european resistors, european inductors, european ports, european gas filled surge arrester } }
@@ -811,18 +916,3 @@
%%%%%%%%%% new
\pgfkeys{\circuitikzbasekey/.search also={/tikz}}
-
-
-\input pgfcircutils.tex
-\input pgfcircmath.tex
-
-\input pgfcircshapes.tex
-\input pgfcircmonopoles.tex
-\input pgfcircbipoles.tex
-\input pgfcirctripoles.tex
-\input pgfcircquadpoles.tex
-
-\input pgfcirclabel.tex
-\input pgfcircvoltage.tex
-\input pgfcirccurrent.tex
-
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
index 8a7bd806ea1..012bb2c9f77 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
@@ -177,64 +177,65 @@
%% Resistor
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/resistor/height}}{resistor}{\ctikzvalof{bipoles/resistor/height}}{\ctikzvalof{bipoles/resistor/width}}{
- \pgf@circ@res@step = \ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen
- \divide \pgf@circ@res@step by 12
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by \pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
- \pgfusepath{draw}
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \divide \pgf@circ@res@step by 12
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \pgf@circ@res@other = \pgf@circ@res@left
+ \advance\pgf@circ@res@other by \pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
+ \advance\pgf@circ@res@other by \pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
+ \pgfsetbeveljoin
+ \pgfusepath{draw}
}
%% Variable resistor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{
- \pgf@circ@res@step = \ctikzvalof{bipoles/vresistor/width}\pgf@circ@Rlen
- \divide \pgf@circ@res@step by 12
- \def\myfrac{.5}
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by \pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
- \pgfusepath{draw}
-
- \pgfscope
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistor/height}}{vresistor}{\ctikzvalof{bipoles/vresistor/height}}{\ctikzvalof{bipoles/vresistor/width}}{ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \divide \pgf@circ@res@step by 12
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+
+ \pgf@circ@res@other = \pgf@circ@res@left
+ \advance\pgf@circ@res@other by \pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@up}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{.5\pgf@circ@res@down}}
+ \advance\pgf@circ@res@other by \pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
+ \pgfsetbeveljoin
+ \pgfusepath{draw}
+
+ \pgfscope
\pgfsetarrowsend{latex'}
\pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@other}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@other}{\pgf@circ@res@down}}
\pgfusepath{draw}
- \endpgfscope
+ \endpgfscope
}
@@ -355,51 +356,109 @@
%% cute inductor
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
- \pgf@circ@res@step=\ctikzvalof{bipoles/cuteinductor/width}\pgf@circ@Rlen
- \divide \pgf@circ@res@step by \ctikzvalof{bipoles/cuteinductor/coils} %divide by number of coils
- \divide \pgf@circ@res@step by 2 %div by two for arcs
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/cuteinductor/lower coil height}}{cuteinductor}{\ctikzvalof{bipoles/cuteinductor/height}}{\ctikzvalof{bipoles/cuteinductor/width}}{
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
- \def\pgf@circ@coilsmall@width{\ctikzvalof{bipoles/cuteinductor/coil aspect}\pgf@circ@res@step}
-
- \advance \pgf@circ@res@step by \pgf@circ@coilsmall@width %adjust for overlapping lower arc
+ \pgfmathsetlength{\pgf@circ@res@other}%width of small coil
+ {0.5*\ctikzvalof{bipoles/cuteinductor/coil aspect}*\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/cuteinductor/coils}-1)}
- \def\pgf@circ@coilwide@width{\pgf@circ@res@step}
-
- \pgf@circ@res@other = \ctikzvalof{bipoles/cuteinductor/coil height}\pgf@circ@Rlen
- \pgf@circ@res@temp =\ctikzvalof{bipoles/cuteinductor/lower coil height}\pgf@circ@Rlen
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+0.5\pgfstartlinewidth}{-0.5\pgfstartlinewidth}}
+ \pgfmathsetlength{\pgf@circ@res@step}
+ {(\ctikzvalof{bipoles/cuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/cuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/cuteinductor/coils}/2}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
\foreach \x in {2,...,\ctikzvalof{bipoles/cuteinductor/coils}}
{
- \pgfpatharc{180}{0}{\pgf@circ@coilwide@width and \pgf@circ@res@other}
- \pgfpatharc{0}{-180}{\pgf@circ@coilsmall@width and \pgf@circ@res@temp}
+ \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up}
+ \pgfpatharc{0}{-180}{\pgf@circ@res@other and -\pgf@circ@res@down}
}
- \pgfpatharc{180}{0}{\pgf@circ@coilwide@width and \pgf@circ@res@other}
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfusepath{stroke}
+ \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@up}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
+ \pgfusepath{stroke}
}
+%% variable cute inductor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/lower coil height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+
+ \pgfmathsetlength{\pgf@circ@res@other}%width of small coil
+ {0.5*\ctikzvalof{bipoles/vcuteinductor/coil aspect}*\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen/(\ctikzvalof{bipoles/vcuteinductor/coils}-1)}
+
+
+ \pgfmathsetlength{\pgf@circ@res@step}
+ {(\ctikzvalof{bipoles/vcuteinductor/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment\pgflinewidth+(\ctikzvalof{bipoles/vcuteinductor/coils}-1)*2*\pgf@circ@res@other)/\ctikzvalof{bipoles/vcuteinductor/coils}/2}
+
+ \pgfscope
+ \pgfsetarrowsend{latex'}
+ \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
+ \foreach \x in {2,...,\ctikzvalof{bipoles/vcuteinductor/coils}}
+ {
+ \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up}
+ \pgfpatharc{0}{-180}{\pgf@circ@res@other and -.5\pgf@circ@res@down}
+ }
+ \pgfpatharc{180}{0}{\pgf@circ@res@step and .5\pgf@circ@res@up}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
+ \pgfusepath{stroke}
+}
%% american inductor
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/americaninductor/height 2}}{americaninductor}{\ctikzvalof{bipoles/americaninductor/height}}{\ctikzvalof{bipoles/americaninductor/width}}{
\pgf@circ@res@step=\ctikzvalof{bipoles/americaninductor/width}\pgf@circ@Rlen
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+ \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth
\divide \pgf@circ@res@step by \ctikzvalof{bipoles/americaninductor/coils}
\divide \pgf@circ@res@step by 2
\pgf@circ@res@other = \ctikzvalof{bipoles/americaninductor/coil height}\pgf@circ@Rlen
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{-0.5\pgfstartlinewidth}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
\pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
\pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
\pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
\pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-0.5\pgfstartlinewidth}}
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfusepath{stroke}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
+ \pgfusepath{stroke}
}
+%% variable american inductor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
+ \pgf@circ@res@step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf@circ@Rlen
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+ \advance \pgf@circ@res@step by \pgfhorizontaltransformationadjustment\pgflinewidth
+ \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vamericaninductor/coils}
+ \divide \pgf@circ@res@step by 2
+ \pgf@circ@res@other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf@circ@Rlen
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{-\pgfverticaltransformationadjustment*0.4*\pgfstartlinewidth}}%correct value would be 0.5 but arcs are not really flat, therefore 0.4 is better is (almost) all cases
+ \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
+ \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
+ \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
+ \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
+ \pgfusepath{stroke}
+ \pgfscope
+ \pgfsetarrowsend{latex'}
+ \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
%% Independent voltage source
@@ -460,7 +519,7 @@
\endpgfscope
}
-% Triangle Voltage source – contributed by Ralf Farkas
+% Triangle Voltage source - contributed by Ralf Farkas
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
@@ -499,7 +558,7 @@
\endpgfscope
}
-% Triangle Voltage source – contributed by Ralf Farkas
+% Triangle Voltage source - contributed by Ralf Farkas
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vsourcetri/height}}{vsourcetri}{\ctikzvalof{bipoles/vsourcetri/height}}{\ctikzvalof{bipoles/vsourcetri/width}}{
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
@@ -624,7 +683,17 @@
\pgfusepath{draw}
}
+%% Independent double oo source
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/oosource/height}}{oosource}{\ctikzvalof{bipoles/oosource/height}}{\ctikzvalof{bipoles/oosource/width}}{
+ \pgfpointorigin
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@left}{0}}
+ {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@left}
+ \pgfpathcircle{\pgfpoint{\ctikzvalof{bipoles/oosource/circleoffset}\pgf@circ@res@right}{0}}
+ {\ctikzvalof{bipoles/oosource/circlesize}\pgf@circ@res@right}
+ \pgfusepath{draw}
+}
%% Independent current source - American
@@ -845,13 +914,32 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
\pgfusepath{draw,fill}
\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@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.2\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@up}}
\pgfusepath{draw}
\endpgfscope
}
+%% Black alternative zigzag Zener diode
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+ \pgfscope
+ \pgftransformxshift{\pgf@circ@res@left}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\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-\pgf@circ@res@left}{0pt}}
+ \pgfusepath{draw,fill}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-0.5\pgf@circ@res@up}}
+ \pgfpathlineto{\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}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-0.5\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+
%% Black Schottky diode
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{fullsdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
@@ -865,13 +953,13 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
\pgfusepath{draw,fill}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{.8\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{.6\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\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@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.2\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.2\pgf@circ@res@left}{.8\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.4\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.4\pgf@circ@res@left}{.6\pgf@circ@res@up}}
\pgfusepath{draw}
\endpgfscope
@@ -890,10 +978,10 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
\pgfusepath{draw,fill}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\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}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@up}}
\pgfusepath{draw}
\endpgfscope
}
@@ -1009,13 +1097,31 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
\pgfusepath{draw}
\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@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.2\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.6\pgf@circ@res@left}{\pgf@circ@res@up}}
\pgfusepath{draw}
\endpgfscope
}
+%% Empty alternative zigzag Zener diode
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptyzzdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
+
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+ \pgfscope
+ \pgftransformxshift{\pgf@circ@res@left}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\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-\pgf@circ@res@left}{0pt}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-0.5\pgf@circ@res@up}}
+ \pgfpathlineto{\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}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-0.5\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
%% Empty Schottky diode
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/diode/height}}{emptysdiode}{\ctikzvalof{bipoles/diode/height}}{\ctikzvalof{bipoles/diode/width}}{
@@ -1029,13 +1135,13 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
\pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{.8\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{.6\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\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@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.2\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.2\pgf@circ@res@left}{.8\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.4\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-1.4\pgf@circ@res@left}{.6\pgf@circ@res@up}}
\pgfusepath{draw}
\endpgfscope
@@ -1054,10 +1160,10 @@
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{0pt}}
\pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\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}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.6\pgf@circ@res@left}{\pgf@circ@res@up}}
\pgfusepath{draw}
\endpgfscope
}
@@ -1118,7 +1224,17 @@
%% Empty varcap
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
+\pgfcircdeclarebipole{
+ \anchor{strokepathstart}{
+ \northeast
+ \pgf@y=0cm
+ \pgf@x=.8\pgf@x
+ }
+ \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
@@ -1212,12 +1328,8 @@
\pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}}
}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% Ammeter
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
+%METERINGSHAPE
+\long\def\drawmeteringcircle{
\def\pgf@circ@temp{right}
\ifx\tikz@res@label@pos\pgf@circ@temp
\pgf@circ@res@step=-1.2\pgf@circ@res@up
@@ -1229,118 +1341,39 @@
\pgf@circ@res@step=1.2\pgf@circ@res@up
\fi
\fi
-
+ %draw connections to circle
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
- \pgfusepath{draw}
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
- \pgfscope
- \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfsetlinewidth{\pgfstartlinewidth}
-
- \pgfsetarrowsend{latex}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
- \pgfusepath{draw}
- \pgfsetarrowsend{}
-
-
- \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfpathmoveto{\pgfpoint{.9\pgf@circ@res@right}{\pgf@circ@res@zero}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
\pgfusepath{draw}
-
+ %draw circle
+ \pgfscope
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
+ \pgfusepath{draw}
+ \endpgfscope
+ %draw arrow
+ \pgfscope
+ \pgfsetarrowsend{latex}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+%AMPEREMETER
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ammeter/height}}{ammeter}{\ctikzvalof{bipoles/ammeter/height}}{\ctikzvalof{bipoles/ammeter/width}}{
+ \drawmeteringcircle
\pgfnode{circle}{center}{\textbf{A}}{}{}
}
-
-%% Ohmmeter – contributed by Ralf Farkas
-
+%OHMMETER
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ohmmeter/height}}{ohmmeter}{\ctikzvalof{bipoles/ohmmeter/height}}{\ctikzvalof{bipoles/ohmmeter/width}}{
- \def\pgf@circ@temp{right}
- \ifx\tikz@res@label@pos\pgf@circ@temp
- \pgf@circ@res@step=-1.2\pgf@circ@res@up
- \else
- \def\pgf@circ@temp{below}
- \ifx\tikz@res@label@pos\pgf@circ@temp
- \pgf@circ@res@step=-1.2\pgf@circ@res@up
- \else
- \pgf@circ@res@step=1.2\pgf@circ@res@up
- \fi
- \fi
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
- \pgfusepath{draw}
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
- \pgfscope
- \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfsetlinewidth{\pgfstartlinewidth}
-
- \pgfsetarrowsend{latex}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
- \pgfusepath{draw}
- \pgfsetarrowsend{}
-
-
- \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
- \pgfusepath{draw}
-
+ \drawmeteringcircle
\pgfnode{circle}{center}{\boldmath$\Omega$}{}{}
}
-
-%% Voltmeter
-
+%VOLTMETER
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/voltmeter/height}}{voltmeter}{\ctikzvalof{bipoles/voltmeter/height}}{\ctikzvalof{bipoles/voltmeter/width}}{
- \def\pgf@circ@temp{right}
- \ifx\tikz@res@label@pos\pgf@circ@temp
- \pgf@circ@res@step=-1.2\pgf@circ@res@up
- \else
- \def\pgf@circ@temp{below}
- \ifx\tikz@res@label@pos\pgf@circ@temp
- \pgf@circ@res@step=-1.2\pgf@circ@res@up
- \else
- \pgf@circ@res@step=1.2\pgf@circ@res@up
- \fi
- \fi
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgfpointorigin \pgf@circ@res@other = \pgf@x \advance \pgf@circ@res@other by -\pgf@circ@res@up
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
- \pgfusepath{draw}
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
-
- \pgfscope
- \pgfpathcircle{\pgfpointorigin}{.9\pgf@circ@res@up}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfsetlinewidth{\pgfstartlinewidth}
-
- \pgfsetarrowsend{latex}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
- \pgfusepath{draw}
- \pgfsetarrowsend{}
-
-
- \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@zero}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
- \pgfusepath{draw}
-
+ \drawmeteringcircle
\pgfnode{circle}{center}{\textbf{V}}{}{}
}
@@ -1611,65 +1644,7 @@
}
-%% variable cute inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vcuteinductor/height}}{vcuteinductor}{\ctikzvalof{bipoles/vcuteinductor/height}}{\ctikzvalof{bipoles/vcuteinductor/width}}{
- \pgf@circ@res@step=\ctikzvalof{bipoles/vcuteinductor/width}\pgf@circ@Rlen
- \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vcuteinductor/coils} %divide by number of coils
- \divide \pgf@circ@res@step by 2 %div by two for arcs
-
- \def\pgf@circ@coilsmall@width{\ctikzvalof{bipoles/vcuteinductor/coil aspect}\pgf@circ@res@step}
-
- \advance \pgf@circ@res@step by \pgf@circ@coilsmall@width %adjust for overlapping lower arc
-
- \def\pgf@circ@coilwide@width{\pgf@circ@res@step}
-
- \pgf@circ@res@other = \ctikzvalof{bipoles/vcuteinductor/coil height}\pgf@circ@Rlen
- \pgf@circ@res@temp =\ctikzvalof{bipoles/vcuteinductor/lower coil height}\pgf@circ@Rlen
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+0.5\pgfstartlinewidth}{-0.5\pgfstartlinewidth}}
- \foreach \x in {2,...,\ctikzvalof{bipoles/vcuteinductor/coils}}
- {
- \pgfpatharc{180}{0}{\pgf@circ@coilwide@width and \pgf@circ@res@other}
- \pgfpatharc{0}{-180}{\pgf@circ@coilsmall@width and \pgf@circ@res@temp}
- }
- \pgfpatharc{180}{0}{\pgf@circ@coilwide@width and \pgf@circ@res@other}
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfusepath{stroke}
-
-\pgfscope
- \pgfsetarrowsend{latex'}
- \pgfpathmoveto{\pgfpoint{.5\pgf@circ@res@left}{1.5\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{-.5\pgf@circ@res@left}{2.5\pgf@circ@res@up}}
- \pgfusepath{draw}
- \endpgfscope
-}
-
-%% variable american inductor
-
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamericaninductor/height 2}}{vamericaninductor}{\ctikzvalof{bipoles/vamericaninductor/height}}{\ctikzvalof{bipoles/vamericaninductor/width}}{
- \pgf@circ@res@step=\ctikzvalof{bipoles/vamericaninductor/width}\pgf@circ@Rlen
- \divide \pgf@circ@res@step by \ctikzvalof{bipoles/vamericaninductor/coils}
- \divide \pgf@circ@res@step by 2
- \pgf@circ@res@other = \ctikzvalof{bipoles/vamericaninductor/coil height}\pgf@circ@Rlen
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{-0.5\pgfstartlinewidth}}
- \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
- \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
- \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
- \pgfpatharc{180}{0}{\pgf@circ@res@step and \pgf@circ@res@other}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfusepath{stroke}
-
- \pgfscope
- \pgfsetarrowsend{latex'}
- \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfusepath{draw}
- \endpgfscope
-}
@@ -1736,14 +1711,21 @@
%% Easily usable styles
-\ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
-\ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
-\ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
-\ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
\ctikzset{o-o/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=empty}}
-\ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
\ctikzset{-o/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{o-/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=none}}
+\ctikzset{*-o/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{o-*/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{d-o/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=empty}}
+\ctikzset{o-d/.style = {\circuitikzbasekey/bipole/nodes/left=empty, \circuitikzbasekey/bipole/nodes/right=diamond}}
+\ctikzset{*-/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=none}}
\ctikzset{-*/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{d-/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=none}}
+\ctikzset{-d/.style = {\circuitikzbasekey/bipole/nodes/left=none, \circuitikzbasekey/bipole/nodes/right=diamond}}
+\ctikzset{*-*/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=full}}
+\ctikzset{d-*/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=full}}
+\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}}
@@ -1751,24 +1733,34 @@
%% The output routine
\def\drawpoles{
- \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{empty} }
+ \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{diamond} }
\ifx\pgf@temp\pgf@circ@temp
- { (\tikztostart) node[ocirc] {} }
+ { (\tikztostart) node[diamond] {} }
\else
- \pgfextra{ \def\pgf@temp{full} }
- \ifx\pgf@temp\pgf@circ@temp
- { (\tikztostart) node[circ] {} }
+ \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{empty} }
+ \ifx\pgf@temp\pgf@circ@temp
+ { (\tikztostart) node[ocirc] {} }
+ \else
+ \pgfextra{ \def\pgf@temp{full} }
+ \ifx\pgf@temp\pgf@circ@temp
+ { (\tikztostart) node[circ] {} }
+ \fi
\fi
\fi
- \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{empty} }
- \ifx\pgf@temp\pgf@circ@temp
- { (\tikztotarget) node[ocirc] {} }
- \else
- \pgfextra{ \def\pgf@temp{full} }
- \ifx\pgf@temp\pgf@circ@temp
- { (\tikztotarget) node[circ] {} }
+ \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{diamond} }
+ \ifx\pgf@temp\pgf@circ@temp
+ { (\tikztotarget) node[diamond] {} }
+ \else
+ \pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{empty} }
+ \ifx\pgf@temp\pgf@circ@temp
+ { (\tikztotarget) node[ocirc] {} }
+ \else
+ \pgfextra{ \def\pgf@temp{full} }
+ \ifx\pgf@temp\pgf@circ@temp
+ { (\tikztotarget) node[circ] {} }
+ \fi
\fi
- \fi
+ \fi
}
@@ -3106,9 +3098,82 @@
\pgfusepath{fill}
}
+% % MECHANICAL SYMBOLS
+
+%% mechanical capacitance - stiffness/spring
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/spring/height}}{spring}{\ctikzvalof{bipoles/spring/height}}{\ctikzvalof{bipoles/spring/width}}{
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+
+ \pgfmathsetlength{\pgf@circ@res@step}
+ {(\ctikzvalof{bipoles/spring/width}*\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth)/16}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \pgfsetcornersarced{\pgfpoint{.5\pgf@circ@res@up}{.5\pgf@circ@res@up}}
+ \pgf@circ@res@other = \pgf@circ@res@left
+ \advance\pgf@circ@res@other by \pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
+ \advance\pgf@circ@res@other by 2\pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
+ \advance\pgf@circ@res@other by \pgf@circ@res@step
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
+ \pgfusepath{stroke}
+}
+
+%% mechanical inductance - mass
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/mass/box height}}{mass}{\ctikzvalof{bipoles/mass/height}}{\ctikzvalof{bipoles/mass/width}}{
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgftransformationadjustments
+ \pgfpathrectangle{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ {\pgfpoint{-2\pgf@circ@res@down}{-2\pgf@circ@res@down}}
+\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfsetrectcap
+ \pgfsetmiterjoin
+ \pgfusepath{stroke}
+}
+%% mechanical resistor - damper
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/damper/height}}{damper}{\ctikzvalof{bipoles/damper/height}}{\ctikzvalof{bipoles/damper/width}}{
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
+ {\pgf@circ@res@zero}}
+ \pgfusepath{stroke}
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+
+ \pgfsetrectcap
+ \pgfsetmiterjoin
+ \pgfusepath{stroke}
+
+ \pgfpathmoveto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
+ {.8\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}
+ {.8\pgf@circ@res@up}}
+ \pgfsetbuttcap
+ \pgfusepath{stroke}
+
+}
-\endinput
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbasic.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
index f6ff09e521d..4a7a2c113aa 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbasic.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircpath.tex
@@ -1,20 +1,7 @@
-%%%%%%%%%%%%
-%% Dimensions
-
-% coordinate bipoli
-\newdimen\pgf@circ@res@up \newdimen\pgf@circ@res@down \newdimen\pgf@circ@res@zero
-\newdimen\pgf@circ@res@left \newdimen\pgf@circ@res@right
-\newdimen\pgf@circ@res@other
-\newdimen\pgf@circ@res@step
-\newdimen\pgf@circ@res@temp
-
-% thickness iniziale
-\newdimen \pgfstartlinewidth
\pgf@circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-
% Names
\ctikzset{name/.style = { n=#1 } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@
\ctikzset{n/.code = {
@@ -33,7 +20,7 @@
\ctikzset{bipole/name=, bipole/label/name=, bipole/label/position=90,
bipole/reversed=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/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,
bipole/current/y position=above, bipole/current/direction=forward,
mirrored=false
@@ -58,10 +45,10 @@
}
\ifpgf@circuit@bipole@reversed
(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}end) {}
- (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
+ (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}start) {}
\else
(\tikztostart) node[coordinate] (\ctikzvalof{bipole/name}start) {}
- (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
+ (\tikztotarget) node[coordinate] (\ctikzvalof{bipole/name}end) {}
\fi
\pgfextra{
\pgf@circ@slope{\pgfpointanchor{\ctikzvalof{bipole/name}start}{center}}
@@ -73,12 +60,21 @@
(\ctikzvalof{bipole/name}) {}
\ifx\pgf@temp\pgf@circ@temp % if it is an open
\else
- \ifdefined\pgf@anchor@#1@pathstart% 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)
+ \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!
+ (\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
- (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
- (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
+ \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
\fi
\fi
\pgf@circ@ifkeyempty{bipole/label/name}\else\pgf@circ@drawlabel\fi
@@ -155,6 +151,7 @@
\def\pgf@circ@vsourceam@path#1{\pgf@circ@bipole@path{vsourceAM}{#1}}
\def\pgf@circ@vsourcesin@path#1{\pgf@circ@bipole@path{vsourcesin}{#1}}
\def\pgf@circ@isource@path#1{\pgf@circ@bipole@path{isource}{#1}}
+\def\pgf@circ@oosource@path#1{\pgf@circ@bipole@path{oosource}{#1}}
\def\pgf@circ@dcisource@path#1{\pgf@circ@bipole@path{dcisource}{#1}}
\def\pgf@circ@isourcesin@path#1{\pgf@circ@bipole@path{isourcesin}{#1}}
\def\pgf@circ@vsourcesquare@path#1{\pgf@circ@bipole@path{vsourcesquare}{#1}}
@@ -166,20 +163,6 @@
\def\pgf@circ@cisource@path#1{\pgf@circ@bipole@path{cisource}{#1}}
\def\pgf@circ@cisourceam@path#1{\pgf@circ@bipole@path{cisourceAM}{#1}}
\def\pgf@circ@cisourcesin@path#1{\pgf@circ@bipole@path{cisourcesin}{#1}}
-\def\pgf@circ@fulldiode@path#1{\pgf@circ@bipole@path{fulldiode}{#1}}
-\def\pgf@circ@fullzdiode@path#1{\pgf@circ@bipole@path{fullzdiode}{#1}}
-\def\pgf@circ@fullsdiode@path#1{\pgf@circ@bipole@path{fullsdiode}{#1}}
-\def\pgf@circ@fulltdiode@path#1{\pgf@circ@bipole@path{fulltdiode}{#1}}
-\def\pgf@circ@fulllediode@path#1{\pgf@circ@bipole@path{fulllediode}{#1}}
-\def\pgf@circ@fullpdiode@path#1{\pgf@circ@bipole@path{fullpdiode}{#1}}
-\def\pgf@circ@fullvarcap@path#1{\pgf@circ@bipole@path{fullvarcap}{#1}}
-\def\pgf@circ@emptydiode@path#1{\pgf@circ@bipole@path{emptydiode}{#1}}
-\def\pgf@circ@emptyzdiode@path#1{\pgf@circ@bipole@path{emptyzdiode}{#1}}
-\def\pgf@circ@emptysdiode@path#1{\pgf@circ@bipole@path{emptysdiode}{#1}}
-\def\pgf@circ@emptytdiode@path#1{\pgf@circ@bipole@path{emptytdiode}{#1}}
-\def\pgf@circ@emptylediode@path#1{\pgf@circ@bipole@path{emptylediode}{#1}}
-\def\pgf@circ@emptypdiode@path#1{\pgf@circ@bipole@path{emptypdiode}{#1}}
-\def\pgf@circ@emptyvarcap@path#1{\pgf@circ@bipole@path{emptyvarcap}{#1}}
\def\pgf@circ@short@path#1{\pgf@circ@bipole@path{short}{#1}}
\def\pgf@circ@cspst@path#1{\pgf@circ@bipole@path{cspst}{#1}}
\def\pgf@circ@spst@path#1{\pgf@circ@bipole@path{spst}{#1}}
@@ -196,10 +179,12 @@
\def\pgf@circ@voltmeter@path#1{\pgf@circ@bipole@path{voltmeter}{#1}}
\def\pgf@circ@empty@path#1{}
\def\pgf@circ@photoresistor@path#1{\pgf@circ@bipole@path{photoresistor}{#1}}
-\def\pgf@circ@thyristor@path#1{\pgf@circ@bipole@path{thyristor}{#1}}
+\def\pgf@circ@emptythyristor@path#1{\pgf@circ@bipole@path{emptythyristor}{#1}}
+\def\pgf@circ@fullthyristor@path#1{\pgf@circ@bipole@path{fullthyristor}{#1}}
\def\pgf@circ@toggleswitch@path#1{\pgf@circ@bipole@path{toggleswitch}{#1}}
\def\pgf@circ@memristor@path#1{\pgf@circ@bipole@path{memristor}{#1}}
-\def\pgf@circ@triac@path#1{\pgf@circ@bipole@path{triac}{#1}}
+\def\pgf@circ@emptytriac@path#1{\pgf@circ@bipole@path{emptytriac}{#1}}
+\def\pgf@circ@fulltriac@path#1{\pgf@circ@bipole@path{fulltriac}{#1}}
\def\pgf@circ@tline@path#1{\pgf@circ@bipole@path{tline}{#1}}
\def\pgf@circ@squid@path#1{\pgf@circ@bipole@path{squid}{#1}}
\def\pgf@circ@barrier@path#1{\pgf@circ@bipole@path{barrier}{#1}}
@@ -230,9 +215,15 @@
\def\pgf@circ@vphaseshifter@path#1{\pgf@circ@bipole@path{vphaseshifter}{#1}}
\def\pgf@circ@detector@path#1{\pgf@circ@bipole@path{detector}{#1}}
-%% Styles
+%%Mechanical
+\def\pgf@circ@spring@path#1{\pgf@circ@bipole@path{spring}{#1}}
+\def\pgf@circ@mass@path#1{\pgf@circ@bipole@path{mass}{#1}}
+\def\pgf@circ@damper@path#1{\pgf@circ@bipole@path{damper}{#1}}
-%% Aggiungere per thyristor e tripoli semplici
+
+
+
+%% Styles
\def\comnpatname{\ifpgf@circuit@compat *\else\fi}
\def\compattikzset#1{\tikzset{\comnpatname#1}}
@@ -241,6 +232,9 @@
% \tikzset{#1/.style= {to path=#2, \circuitikzbasekey, l=##1}}%
%}
+\compattikzset{spring/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@spring@path, l=#1}}
+\compattikzset{mass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@mass@path, l=#1}}
+\compattikzset{damper/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@damper@path, l=#1}}
\compattikzset{resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@resistor@path, l=#1}}
\compattikzset{american resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{resistor}{#1}, l=#1}}
\compattikzset{european resistor/.style= {\circuitikzbasekey, /tikz/to path=\pgf@circ@bipole@path{generic}{#1}, l=#1}}
@@ -261,8 +255,8 @@
\compattikzset{polar capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@polarcapacitor@path, l=#1}}
\compattikzset{variable capacitor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vcapacitor@path, l=#1}}
\compattikzset{piezoelectric/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@piezoelectric@path, l=#1}}
-\compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery1@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{battery/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{battery1/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@battery1@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
\compattikzset{inductor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@inductor@path, l=#1}}
\compattikzset{gf surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@gfsurgearrester@path, l=#1}}
\compattikzset{american gas filled surge arrester/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@americangfsurgearrester@path, l=#1}}
@@ -278,19 +272,19 @@
\compattikzset{tline/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@tline@path, l=#1}}
\compattikzset{transmission line/.style = {tline = #1}}
\compattikzset{TL/.style = {tline = #1}}
-\compattikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsource@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{european voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsource@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
\compattikzset{american voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
\compattikzset{european current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
\compattikzset{american current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\compattikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsource@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{european controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsource@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
\compattikzset{american controlled voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourceam@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
\compattikzset{european controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
\compattikzset{american controlled current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourceam@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\compattikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
-\compattikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesquare@path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
-\compattikzset{triangle voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcetri@path, \circuitikzbasekey/bipole/is voltage=true, v=#1 }}
+\compattikzset{sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
+\compattikzset{square voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcesquare@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
+\compattikzset{triangle voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vsourcetri@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1 }}
\compattikzset{sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@isourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
-\compattikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{controlled sinusoidal voltage source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cvsourcesin@path, \circuitikzbasekey/bipole/is voltage=true, \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
\compattikzset{controlled sinusoidal current source/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cisourcesin@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
\compattikzset{voltage source/.style = {\comnpatname \ifpgf@circuit@europeanvoltage european \else american \fi voltage source, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
@@ -334,37 +328,124 @@
\compattikzset{vphaseshifter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vphaseshifter@path}}
\compattikzset{detector/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@detector@path}}
+% % % % % %
+% % Beginn of Diodes
+% % % % % %
+
+\def\pgf@circ@fulldiode@path#1{\pgf@circ@bipole@path{fulldiode}{#1}}
+\def\pgf@circ@fullzdiode@path#1{\pgf@circ@bipole@path{fullzdiode}{#1}}
+\def\pgf@circ@fullzzdiode@path#1{\pgf@circ@bipole@path{fullzzdiode}{#1}}
+\def\pgf@circ@fullsdiode@path#1{\pgf@circ@bipole@path{fullsdiode}{#1}}
+\def\pgf@circ@fulltdiode@path#1{\pgf@circ@bipole@path{fulltdiode}{#1}}
+\def\pgf@circ@fulllediode@path#1{\pgf@circ@bipole@path{fulllediode}{#1}}
+\def\pgf@circ@fullpdiode@path#1{\pgf@circ@bipole@path{fullpdiode}{#1}}
+\def\pgf@circ@fullvarcap@path#1{\pgf@circ@bipole@path{fullvarcap}{#1}}
+\def\pgf@circ@emptydiode@path#1{\pgf@circ@bipole@path{emptydiode}{#1}}
+\def\pgf@circ@emptyzdiode@path#1{\pgf@circ@bipole@path{emptyzdiode}{#1}}
+\def\pgf@circ@emptyzzdiode@path#1{\pgf@circ@bipole@path{emptyzzdiode}{#1}}
+\def\pgf@circ@emptysdiode@path#1{\pgf@circ@bipole@path{emptysdiode}{#1}}
+\def\pgf@circ@emptytdiode@path#1{\pgf@circ@bipole@path{emptytdiode}{#1}}
+\def\pgf@circ@emptylediode@path#1{\pgf@circ@bipole@path{emptylediode}{#1}}
+\def\pgf@circ@emptypdiode@path#1{\pgf@circ@bipole@path{emptypdiode}{#1}}
+\def\pgf@circ@emptyvarcap@path#1{\pgf@circ@bipole@path{emptyvarcap}{#1}}
+
\compattikzset{full diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulldiode@path}}
\compattikzset{full Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullsdiode@path}}
\compattikzset{full Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzdiode@path}}
+\compattikzset{full ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullzzdiode@path}}
\compattikzset{full tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltdiode@path}}
\compattikzset{full photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullpdiode@path}}
\compattikzset{full led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulllediode@path}}
\compattikzset{full varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullvarcap@path}}
+\compattikzset{full thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fullthyristor@path}}
+\compattikzset{full triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@fulltriac@path}}
\compattikzset{empty diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptydiode@path}}
\compattikzset{empty Schottky diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptysdiode@path}}
\compattikzset{empty Zener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzdiode@path}}
+\compattikzset{empty ZZener diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyzzdiode@path}}
\compattikzset{empty tunnel diode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytdiode@path}}
\compattikzset{empty photodiode/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptypdiode@path}}
\compattikzset{empty led/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptylediode@path}}
\compattikzset{empty varcap/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptyvarcap@path}}
+\compattikzset{empty thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptythyristor@path}}
+\compattikzset{empty triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@emptytriac@path}}
+
+\compattikzset{stroke diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptydiode@path}}
+\compattikzset{stroke Schottky diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptysdiode@path}}
+\compattikzset{stroke Zener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzdiode@path}}
+\compattikzset{stroke ZZener diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyzzdiode@path}}
+\compattikzset{stroke tunnel diode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytdiode@path}}
+\compattikzset{stroke photodiode/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptypdiode@path}}
+\compattikzset{stroke led/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptylediode@path}}
+\compattikzset{stroke varcap/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptyvarcap@path}}
+\compattikzset{stroke thyristor/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptythyristor@path}}
+%\compattikzset{stroke triac/.style = {\circuitikzbasekey,\circuitikzbasekey/bipole/is strokedsymbol=true, /tikz/to path=\pgf@circ@emptytriac@path}}
+
+\def\pgfcircdiodestylemacro{\ifpgf@circuit@strokediode stroke \else\ifpgf@circuit@fulldiode full \else empty \fi\fi}
+
+\compattikzset{Schottky diode/.style = {\comnpatname \pgfcircdiodestylemacro Schottky diode}}
+\compattikzset{Zener diode/.style = {\comnpatname \pgfcircdiodestylemacro Zener diode}}
+\compattikzset{ZZener diode/.style = {\comnpatname \pgfcircdiodestylemacro ZZener diode}}
+\compattikzset{tunnel diode/.style = {\comnpatname \pgfcircdiodestylemacro tunnel diode}}
+\compattikzset{photodiode/.style = {\comnpatname \pgfcircdiodestylemacro photodiode}}
+\compattikzset{led/.style = {\comnpatname \pgfcircdiodestylemacro led}}
+\compattikzset{varcap/.style = {\comnpatname \pgfcircdiodestylemacro varcap}}
+\compattikzset{diode/.style = {\comnpatname \pgfcircdiodestylemacro diode}}
+\compattikzset{thyristor/.style = {\comnpatname \pgfcircdiodestylemacro thyristor}}
+\compattikzset{triac/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi triac}}%no stroke triac!
+
+%% Define Shortcuts
+\compattikzset{Do/.style = {\comnpatname empty diode}}
+\compattikzset{tDo/.style = {\comnpatname empty tunnel diode}}
+\compattikzset{zDo/.style = {\comnpatname empty Zener diode}}
+\compattikzset{zzDo/.style = {\comnpatname empty ZZener diode}}
+\compattikzset{sDo/.style = {\comnpatname empty Schottky diode}}
+\compattikzset{pDo/.style = {\comnpatname empty photodiode}}
+\compattikzset{leDo/.style = {\comnpatname empty led}}
+\compattikzset{VCo/.style = {\comnpatname empty varcap}}
+\compattikzset{Tyo/.style = {\comnpatname empty thyristor}}
+\compattikzset{Tro/.style = {\comnpatname empty triac}}
- \compattikzset{Schottky diode/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi Schottky diode}}
- \compattikzset{Zener diode/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi Zener diode}}
- \compattikzset{tunnel diode/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi tunnel diode}}
- \compattikzset{photodiode/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi photodiode}}
- \compattikzset{led/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi led}}
- \compattikzset{varcap/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi varcap}}
- \compattikzset{diode/.style = {\comnpatname \ifpgf@circuit@fulldiode full \else empty \fi diode}} %%%%%%%%%%%%@@@
-
-
-
-
-\compattikzset{thyristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@thyristor@path}}
-\compattikzset{memristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@memristor@path}}
-\compattikzset{triac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@triac@path}}
+\compattikzset{D*/.style = {\comnpatname full diode}}
+\compattikzset{tD*/.style = {\comnpatname full tunnel diode}}
+\compattikzset{zD*/.style = {\comnpatname full Zener diode}}
+\compattikzset{zzD*/.style = {\comnpatname full ZZener diode}}
+\compattikzset{sD*/.style = {\comnpatname full Schottky diode}}
+\compattikzset{pD*/.style = {\comnpatname full photodiode}}
+\compattikzset{leD*/.style = {\comnpatname full led}}
+\compattikzset{VC*/.style = {\comnpatname full varcap}}
+\compattikzset{Ty*/.style = {\comnpatname full thyristor}}
+\compattikzset{Tr*/.style = {\comnpatname full triac}}
+\compattikzset{D/.style = {\comnpatname diode}}
+\compattikzset{tD/.style = {\comnpatname tunnel diode}}
+\compattikzset{zD/.style = {\comnpatname Zener diode}}
+\compattikzset{zzD/.style = {\comnpatname ZZener diode}}
+\compattikzset{sD/.style = {\comnpatname Schottky diode}}
+\compattikzset{pD/.style = {\comnpatname photodiode}}
+\compattikzset{leD/.style = {\comnpatname led}}
+\compattikzset{VC/.style = {\comnpatname varcap}}
+\compattikzset{Ty/.style = {\comnpatname thyristor}}
+\compattikzset{Tr/.style = {\comnpatname triac}}
+
+\compattikzset{D-/.style = {\comnpatname stroke diode}}
+\compattikzset{tD-/.style = {\comnpatname stroke tunnel diode}}
+\compattikzset{zD-/.style = {\comnpatname stroke Zener diode}}
+\compattikzset{zzD-/.style = {\comnpatname stroke ZZener diode}}
+\compattikzset{sD-/.style = {\comnpatname stroke Schottky diode}}
+\compattikzset{pD-/.style = {\comnpatname stroke photodiode}}
+\compattikzset{leD-/.style = {\comnpatname stroke led}}
+\compattikzset{VC-/.style = {\comnpatname stroke varcap}}
+\compattikzset{Ty-/.style = {\comnpatname stroke thyristor}}
+\compattikzset{Tr-/.style = {\comnpatname empty triac}}%no stroke triac!
+
+% % % % % %
+% % End of Diodes
+% % % % % %
+
+
+\compattikzset{memristor/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@memristor@path}}
\compattikzset{closing switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@cspst@path, l=#1}}
\compattikzset{opening switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ospst@path, l=#1}}
\compattikzset{switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@spst@path, l=#1}}
@@ -376,11 +457,13 @@
\compattikzset{ohmmeter/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@ohmmeter@path}}
% short forms
-\compattikzset{esource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@esource@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{pvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pvsource@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
-\compattikzset{dcvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcvsource@path, \circuitikzbasekey/bipole/is voltage=true, v=#1}}
+\compattikzset{esource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@esource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{pvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@pvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
+\compattikzset{dcvsource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcvsource@path, \circuitikzbasekey/bipole/is voltage=true,\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true, v=#1}}
\compattikzset{dcisource/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dcisource@path, \circuitikzbasekey/bipole/is current=true, i=#1}}
+\compattikzset{ioosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is current=true,/tikz/to path=\pgf@circ@oosource@path}}
+\compattikzset{voosource/.style = {\circuitikzbasekey, \circuitikzbasekey/bipole/is voltage=true,/tikz/to path=\pgf@circ@oosource@path}}
\compattikzset{vsource/.style = {\comnpatname voltage source = #1}}
\compattikzset{isource/.style = {\comnpatname current source = #1}}
@@ -437,34 +520,13 @@
\compattikzset{sI#1/.style = {\comnpatname sinusoidal current source, i#1=##1} }
\compattikzset{csI#1/.style = {\comnpatname controlled sinusoidal current source, i#1=##1} }
}
-\pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
-\pgf@temp{>_} \pgf@temp{<_} \pgf@temp{>^} \pgf@temp{<^}
-\pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
-\compattikzset{Do/.style = {\comnpatname empty diode}}
-\compattikzset{tDo/.style = {\comnpatname empty tunnel diode}}
-\compattikzset{zDo/.style = {\comnpatname empty Zener diode}}
-\compattikzset{sDo/.style = {\comnpatname empty Schottky diode}}
-\compattikzset{pDo/.style = {\comnpatname empty photodiode}}
-\compattikzset{leDo/.style = {\comnpatname empty led}}
-\compattikzset{VCo/.style = {\comnpatname empty varcap}}
-\compattikzset{D*/.style = {\comnpatname full diode}}
-\compattikzset{tD*/.style = {\comnpatname full tunnel diode}}
-\compattikzset{zD*/.style = {\comnpatname full Zener diode}}
-\compattikzset{sD*/.style = {\comnpatname full Schottky diode}}
-\compattikzset{pD*/.style = {\comnpatname full photodiode}}
-\compattikzset{leD*/.style = {\comnpatname full led}}
-\compattikzset{VC*/.style = {\comnpatname full varcap}}
-\compattikzset{D/.style = {\comnpatname diode}}
-\compattikzset{tD/.style = {\comnpatname tunnel diode}}
-\compattikzset{zD/.style = {\comnpatname Zener diode}}
-\compattikzset{sD/.style = {\comnpatname Schottky diode}}
-\compattikzset{pD/.style = {\comnpatname photodiode}}
-\compattikzset{leD/.style = {\comnpatname led}}
-\compattikzset{VC/.style = {\comnpatname varcap}}
+\pgf@temp{_>} \pgf@temp{_<} \pgf@temp{^>} \pgf@temp{^<}
+\pgf@temp{>_} \pgf@temp{<_} \pgf@temp{>^} \pgf@temp{<^}
+\pgf@temp{>} \pgf@temp{<} \pgf@temp{^} \pgf@temp{_}
+
+
-\compattikzset{Tr/.style = {\comnpatname triac}}
\compattikzset{Mr/.style = {\comnpatname memristor}}
-\compattikzset{Ty/.style = {\comnpatname thyristor}}
\compattikzset{cspst/.style = {\comnpatname closing switch = #1}}
\compattikzset{ospst/.style = {\comnpatname opening switch = #1}}
@@ -533,13 +595,13 @@
($(\tikztostart) ! .5 ! (\tikztotarget)$)
node[#1, /tikz/rotate=\pgf@circ@direction, xscale=\ctikzvalof{mirror value}]
(\ctikzvalof{bipole/name}) {} node {\ctikzvalof{bipole/label/name}}
- \@ifundefined{pgf@anchor@#1@pathstart}{%if special path-anchors are defined, use them!
- (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
- (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
- }{
+ \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)
- }
+ \else
+ (\ctikzvalof{bipole/name}start.center) --(\ctikzvalof{bipole/name}.left)
+ (\ctikzvalof{bipole/name}.right) -- (\ctikzvalof{bipole/name}end.center)
+ \fi
\pgfextra{
\pgfcircresetpath
}
@@ -568,3 +630,5 @@
\pgf@circ@definetranspath{pjfet}
\pgf@circ@definetranspath{pigbt}
\pgf@circ@definetranspath{nigbt}
+\pgf@circ@definetranspath{Lpigbt}
+\pgf@circ@definetranspath{Lnigbt} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
index 4673d710b31..a811ff610ff 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircshapes.tex
@@ -92,6 +92,29 @@
}
}
+%% Diamond terminal
+
+\pgfdeclareshape{diamond}{
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchorborder{
+ \pgf@circ@res@left=\pgf@x
+ \pgf@circ@res@up=\pgf@y
+ }
+ \behindforegroundpath{
+ \pgfscope
+ \pgfmathsetlength{\pgf@circ@res@temp}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+ \pgftransformrotate{45}
+ \pgfpathrectanglecorners
+ {\pgfpoint{\pgf@circ@res@left-\pgf@circ@res@temp}{\pgf@circ@res@up+\pgf@circ@res@temp}}
+ {\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@temp}{\pgf@circ@res@up-\pgf@circ@res@temp}}
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+ \pgfusepath{draw,fill}
+ \endpgfscope
+ }
+}
+
%% Current arrow
\pgfdeclareshape{currarrow}{
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
index 5c8313efe67..4a35e91e88d 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
@@ -812,104 +812,150 @@
\pgfcircdeclareeurologicport{nor}{$\ge 1$}{2}{not}
\pgfcircdeclareeurologicport{xnor}{$=1$}{2}{not}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
\long\def\pgfcircdeclaretransistor#1#2#3{
\pgfdeclareshape{#1}
{
- \anchor{center}{\pgfpointorigin}
- \savedanchor\northeast{% upper right
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \savedanchor\northeast{% upper right
\pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y
\pgf@y=.5\pgf@y
\pgf@x=0pt
- }
-% \savedanchor\northeast{%
-% \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-% \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y
-% \pgf@y=.5\pgf@y
-% \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
-% \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x
-% }
- \savedanchor\left{%center left
+ }
+ \savedanchor\left{%center left
\pgf@y=0pt
\pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
\pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x
- }
- \anchor{text}{
- \northeast
- \pgfpoint
- {12\pgf@circ@res@right +0.2*(\pgf@circ@res@right-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left)}
- {0.6\pgf@y}
- }
- %
- % pseudo-bipole
- \anchor{left}{ % south
+ }
+ \anchor{text}{
+ \northeast
+ \pgf@y=.7\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=0.1\pgf@x
+ }
+ \anchor{pathstart}{ % south
\northeast
\pgf@y=-\pgf@y
- }
- \anchor{right}{
+ }
+ \anchor{pathend}{
\northeast
- }
- \anchor{north}{
+ }
+ \anchor{north}{
\northeast
\pgf@circ@res@step=\pgf@y
\left
\pgf@y=\pgf@circ@res@step
\pgf@x=.5\pgf@x
}
- \anchor{west}{
+ \anchor{west}{
\left
- }
- \anchor{east}{
- \pgf@x=0pt
+ }
+ \anchor{east}{
+ \northeast
\pgf@y=0pt
- }
- \anchor{south}{
+ }
+ \anchor{south}{
\northeast
\pgf@circ@res@step=\pgf@y
\left
\pgf@y=-\pgf@circ@res@step
\pgf@x=.5\pgf@x
- }
- \anchor{south west}{
+ }
+ \anchor{south west}{
\northeast
\pgf@circ@res@step=\pgf@y
\left
\pgf@y=-\pgf@circ@res@step
- }
- \anchor{north east}{
+ }
+ \anchor{north east}{
\northeast
- }
- \anchor{north west}{
+ }
+ \anchor{north west}{
\northeast
\pgf@circ@res@step=\pgf@y
\left
\pgf@y=\pgf@circ@res@step
- }
- \anchor{south east}{
+ }
+ \anchor{south east}{
\northeast
\pgf@y=-\pgf@y
- }
- \anchor{B}{
- \left
+ }
+ \anchor{B}{
+ \northeast
+ \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
+ \left
+ \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
+ }
+ \anchor{base}{
+ \northeast
+ \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
+ \left
+ \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
+ }
+ \anchor{G}{
+ \northeast
+ \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
+ \left
+ \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
+ }
+ \anchor{gate}{
+ \northeast
+ \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@y
+ \left
+ \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@circ@res@step
+ }
+ \anchor{nobase}{
+ \left
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
}
- \anchor{base}{
- \left
- }
- \anchor{nobase}{
- \left
- \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
- }
+ \anchor{nogate}{
+ \left
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@x
+ }
+ \anchor{E}{
+ \northeast
+ \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
+ }
+ \anchor{emitter}{
+ \northeast
+ \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
+ }
+ \anchor{C}{
+ \northeast
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
+ }
+ \anchor{collector}{
+ \northeast
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
+ }
+ \anchor{S}{
+ \northeast
+ \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
+ }
+ \anchor{source}{
+ \northeast
+ \pgf@y=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
+ }
+ \anchor{D}{
+ \northeast
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
+ }
+ \anchor{drain}{
+ \northeast
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction}\pgf@y
+ }
#2
- \backgroundpath{
+ \backgroundpath{
+ \pgftransformationadjustments
\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
%
- %
+ \ifnum \pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/curr direction} > 0
+ \pgf@circuit@trans@ntypetrue
+ \else
+ \pgf@circuit@trans@ntypefalse
+ \fi
\northeast
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@down = -\pgf@y
@@ -918,509 +964,19 @@
\pgf@circ@res@left = \pgf@x
%
#3
+ % BODY DIODE
+ \ifpgf@circuit@fet@bodydiode
+ \drawbodydiode{#1}
+ \fi
%
}
}
}
-\pgfcircdeclaretransistor{pnp}{
- \anchor{E}{
- \northeast
- }
- \anchor{emitter}{
- \northeast
- }
- \anchor{C}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{collector}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height 2}\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height 2}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.5}{%
- \pgfpoint%
- {\pgf@circ@res@right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@up}%
- }{%
- \pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height 2}\pgf@circ@res@up}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf@circuit@bpt@drawphoto
- \pgfscope
- \pgfsetarrowsstart{latex'}
- \pgfpathmoveto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
- \pgfpathlineto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}}
- \pgfpathlineto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
- \pgfusepath{draw}
- \endpgfscope
- \else
- \ifpgf@circuit@bpt@drawbase
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfusepath{draw}
- \fi
- \fi
-}
-
-
-
-
-
-
-\pgfcircdeclaretransistor{npn}{
- \anchor{C}{
- \northeast
- }
- \anchor{collector}{
- \northeast
- }
- \anchor{E}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{emitter}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{%
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height 2}\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height 2}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.5}{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height 2}\pgf@circ@res@down}%
- }{%
- \pgfpoint{\pgf@circ@res@right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
-
- \ifpgf@circuit@bpt@drawphoto
- \pgfscope
- \pgfsetarrowsstart{latex'}
- \pgfpathmoveto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
- \pgfpathlineto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}}
- \pgfpathlineto{\pgfpointadd{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
- \pgfusepath{draw}
- \endpgfscope
- \else
- \ifpgf@circuit@bpt@drawbase
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfusepath{draw}
- \fi
- \fi
-}
-
-
-
-\pgfcircdeclaretransistor{pigbt}{
- \anchor{E}{
- \northeast
- }
- \anchor{emitter}{
- \northeast
- }
- \anchor{B}{
- \left
- }
- \anchor{base}{
- \left
- }
- \anchor{C}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{collector}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.5}{%
- \pgfpoint%
- {\pgf@circ@res@right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@up}%
- }{%
- \pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@up}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfusepath{draw}
-
-
-}
-
-
-
-\pgfcircdeclaretransistor{nigbt}{
- \anchor{C}{
- \northeast
- }
- \anchor{collector}{
- \northeast
- }
- \anchor{B}{
- \left
- }
- \anchor{base}{
- \left
- }
- \anchor{E}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{emitter}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base height}\pgf@circ@res@down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.5}{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/base width}\pgf@circ@res@left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height 2}\pgf@circ@res@down}%
- }{%
- \pgfpoint{\pgf@circ@res@right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate height}\pgf@circ@res@down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigbt/gate width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfusepath{draw}
-
-
-}
-
-
-
-
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Contrib
-
-
-%%
-% IGFET (e.g. MOSFET)
-\long\def\pgfcircdeclarefet#1#2#3{
-\pgfdeclareshape{#1}{
- \anchor{center}
- {\pgfpointorigin}
- \savedanchor\northeast{% upper right
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y
- \pgf@y=.5\pgf@y
- \pgf@x=0pt
- }
- \savedanchor\left{%center left
- \pgf@y=0pt
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x
- }
- \anchor{text}{
- \northeast
- \pgfpoint
- {12\pgf@circ@res@right +0.2*(\pgf@circ@res@right-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left)}
- {0.6\pgf@y}
- }
- %
- % pseudo-bipole
- \anchor{left}{ % south
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{right}{
- \northeast
- }
- \anchor{north}{
- \northeast
- \pgf@circ@res@step=\pgf@y
- \left
- \pgf@y=\pgf@circ@res@step
- \pgf@x=.5\pgf@x
- }
- \anchor{west}{
- \left
- }
- \anchor{east}{
- \pgf@x=0pt
- \pgf@y=0pt
- }
- \anchor{south}{
- \northeast
- \pgf@circ@res@step=\pgf@y
- \left
- \pgf@y=-\pgf@circ@res@step
- \pgf@x=.5\pgf@x
- }
- \anchor{south west}{
- \northeast
- \pgf@circ@res@step=\pgf@y
- \left
- \pgf@y=-\pgf@circ@res@step
- }
- \anchor{north east}{
- \northeast
- }
- \anchor{north west}{
- \northeast
- \pgf@circ@res@step=\pgf@y
- \left
- \pgf@y=\pgf@circ@res@step
- }
- \anchor{south east}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{G}{
- \left
- }
- \anchor{gate}{
- \left
- }
- \anchor{B}{
- \left
- \pgf@x=\pgf@circ@res@right
- }
- \anchor{base}{
- \left
- \pgf@x=\pgf@circ@res@right
- }
- \anchor{Bulk}{
- \left
- \pgf@x=\pgf@circ@res@right
- }
- \anchor{nobase}{
- \left
- \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@x
- }
- \anchor{nogate}{
- \left
- \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@x
- }
- #2
- \backgroundpath{
- \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
- %
- %
- \northeast
- \pgf@circ@res@up = \pgf@y
- \pgf@circ@res@down = -\pgf@y
- \pgf@circ@res@right = \pgf@x
- \left
- \pgf@circ@res@left = \pgf@x
- %
- #3
- % BODY DIODE
- \ifpgf@circuit@fet@bodydiode
- \drawbodydiode{#1}
- \fi
- }
-}
-}
-
\long\def\drawbodydiode#1{
\pgfscope
\pgftransformshift{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \ifpgf@circuit@fet@ntype
- \pgftransformrotate{90}
- \else
- \pgftransformrotate{-90}
- \fi
+ \pgftransformrotate{90}
\pgftransformscale{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode scale}}
\ifpgf@circuit@fulldiode
\pgfnode{fulldiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
@@ -1433,11 +989,7 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
- \ifpgf@circuit@fet@ntype
\pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}}
- \else
- \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{west}}
- \fi
\pgfusepath{draw}
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}
@@ -1449,45 +1001,194 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
- \ifpgf@circuit@fet@ntype
\pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{west}}
- \else
- \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}}
- \fi
\pgfusepath{draw}
\pgfscope
- \pgftransformshift{\pgfpoint{\pgf@circ@res@right} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
- \pgftransformscale{0.5}
- \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
- \endpgfscope
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@right} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
+ \pgftransformscale{0.5}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
+ \endpgfscope
}
-\pgfcircdeclarefet{nmos}{
- \anchor{B}{
- \left
- \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@x
- }
- \anchor{base}{
- \left
- \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@x
- }
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{%
- \pgf@circuit@fet@ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+\long\def\declarebpt#1{
+ \pgfcircdeclaretransistor{#1}{}{
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfusepath{draw}
+ %draw arrow depending on type of transiytor
+ \pgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \ifpgf@circuit@trans@ntype
+ \pgftransformlineattime{.5}{%
+ \pgfpoint%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@down}%
+ }{%
+ \pgfpoint{\pgf@circ@res@right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}%
+ }
+ \else
+ \pgftransformlineattime{.5}{%
+ \pgfpoint{\pgf@circ@res@right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}%
+ }{%
+ \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height 2}\pgf@circ@res@up}%
+ }
+ \fi
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
+
+ \ifpgf@circuit@bpt@drawphoto
+ \pgfscope
+ \pgfsetarrowsstart{latex'}
+ \pgfpathmoveto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
+ \pgfpathlineto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}}
+ \pgfpathlineto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
+ \pgfusepath{draw}
+ \endpgfscope
+ \else
+ \ifpgf@circuit@bpt@drawbase
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
+ \fi
+ }
+}
+
+\declarebpt{npn}
+\declarebpt{pnp}
+
+\long\def\declareigbt#1{
+\pgfcircdeclaretransistor{#1}{}
+{
+ %draw upper connection
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ %draw thicker gate lines
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+ %draw lower connection
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfusepath{draw}
+ %draw arrow depending on type of transiytor
+ \pgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \ifpgf@circuit@trans@ntype
+ \pgftransformlineattime{.5}{%
+ \pgfpoint%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@down}%
+ }{%
+ \pgfpoint{\pgf@circ@res@right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}%
+ }
+ \else
+ \pgftransformlineattime{.5}{%
+ \pgfpoint{\pgf@circ@res@right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}%
+ }{%
+ \pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height 2}\pgf@circ@res@up}%
+ }
+ \fi
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
+ %draw gate
+ \ifpgf@circuit@trans@ntype
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
+ \else
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@up}}
+ \fi
+ \pgfusepath{draw}
+}
+}
+
+\declareigbt{pigbt}
+\declareigbt{nigbt}
+\declareigbt{Lnigbt}
+\declareigbt{Lpigbt}
+
+
+\pgfcircdeclaretransistor{nmos}{}{%
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
@@ -1496,21 +1197,20 @@
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@down}}
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfusepath{draw}
\pgfscope
\pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
@@ -1541,38 +1241,14 @@
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfusepath{draw}
\fi
}
-\pgfcircdeclarefet{pmos}{
- \anchor{B}{
- \left
- \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@x
- }
- \anchor{base}{
- \left
- \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@x
- }
- \anchor{S}{
- \northeast
- }
- \anchor{source}{
- \northeast
- }
- \anchor{D}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{drain}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{%
- \pgf@circuit@fet@ntypefalse
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+\pgfcircdeclaretransistor{pmos}{}{%
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
@@ -1605,6 +1281,12 @@
\pgfpathlineto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
\pgfsetlinewidth{2\pgflinewidth}
\pgfusepath{draw}
\endpgfscope
@@ -1614,20 +1296,15 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
\pgfusepath{draw}
\ifpgf@circuit@bpt@drawgate
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfusepath{draw}
\fi
\pgfpathcircle{\pgfpoint
@@ -1639,287 +1316,138 @@
\pgfusepath{draw,fill}
}
-
-
-\pgfcircdeclarefet{nfet}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{G}{
- \left
- }
- \anchor{gate}{
- \left
- }
-
-}{%
- \pgf@circuit@fet@ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+\long\def\drawfetcore#1{
+ \pgftransformationadjustments
+ %top connection
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@up}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@up}}
-
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \pgfscope
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@up}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up}}
+ \ifpgf@circuit@trans@depletiontype
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
+ \else
+
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@up*0.45}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.45}}
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@up*0.25}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@up*0.25}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down*0.25}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down*0.25}}
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down*0.45}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base height}\pgf@circ@res@down}}
-
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base height}\pgf@circ@res@down}}
+ \fi
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+ %Bulk connection line
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
{\pgf@circ@res@up+\pgf@circ@res@down}}
+ %bottom connection
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@down}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfusepath{draw}
-
+
+ %draw thick gate line
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate height}\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+
\pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+
+ \pgftransformlineattime{.6}{%
+ \pgfpoint
+ {\pgf@circ@res@right}%
+ {\pgf@circ@res@up+\pgf@circ@res@down}%
+ }{%
+ \pgfpoint%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left}%
+ {\pgf@circ@res@up+\pgf@circ@res@down}%
+ }
+ \ifpgf@circuit@trans@ntype
+ \else
+ \pgftransformrotate{180}
+ \fi
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint
- {\pgf@circ@res@right}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
+ % GATE CONNECTION
+ \ifpgf@circuit@bpt@drawgate
+ \ifpgf@circuit@trans@ntype
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
+ \else
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left}
+ {-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/conn height}\pgf@circ@res@down}}
+ \fi
+ \pgfusepath{draw}
+ \fi
- \ifpgf@circuit@bpt@drawgate
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfusepath{draw}
- \fi
}
+\long\def\pgfdeclaretransistorwrapperaddbulk#1#2#3
+{\pgfcircdeclaretransistor{#1}{
+ \anchor{bulk}{\left\pgf@x=0pt}
+ \anchor{B}{\left\pgf@x=0pt}%override Base anchor from npn&igbt
+ #2
+ }
+ {#3}
+}
-\pgfcircdeclarefet{pfet}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{G}{
- \left
- }
- \anchor{gate}{
- \left
- }
-
-}{%
- \pgf@circuit@fet@ntypefalse
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@up*0.45}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@up*0.25}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@down*0.25}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@down*0.45}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint
- {\pgf@circ@res@right}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }
- \pgftransformrotate{180}
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf@circuit@bpt@drawgate
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfusepath{draw}
- \fi
+\pgfdeclaretransistorwrapperaddbulk{nfet}{}{%
+ \pgf@circuit@trans@depletiontypefalse
+ \drawfetcore{nfet}
}
+\pgfdeclaretransistorwrapperaddbulk{pfet}{}{%
+ \pgf@circuit@trans@depletiontypefalse
+ \drawfetcore{pfet}
+}
% N-CHANNEL IGFET ENHANCEMENT TYPE
-\pgfcircdeclarefet{nigfete}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{G}{
- \northeast
- \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
- \left
- \pgf@y=-\pgf@circ@res@step
- }
- \anchor{gate}{
- \northeast
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
- }
-}{%
- \pgf@circuit@fet@ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
-
- % GATE, ENHANCEMENT TYPE (DASHED)
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@up*0.45}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@up*0.25}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@down*0.25}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@down*0.45}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base height}\pgf@circ@res@down}}
-
- % BULK
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
+\pgfdeclaretransistorwrapperaddbulk{nigfete}{}{%
+ \pgf@circuit@trans@depletiontypefalse
+ \drawfetcore{nigfete}
+
% SOURCE CONNECTION
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -1933,230 +1461,37 @@
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint
- {\pgf@circ@res@right}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
-
- \ifpgf@circuit@bpt@drawgate
- % GATE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
- \pgfusepath{draw}
- \fi
}
% N-CHANNEL IGFET ENHANCEMENT TYPE with Bulk connector
-\pgfcircdeclarefet{nigfetebulk}{ %nur ohne strich zwischen Bulk und Source
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{G}{
- \northeast
- \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@y
- \left
- \pgf@y=-\pgf@circ@res@step
- }
- \anchor{gate}{
- \northeast
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@y
- }
-}{%
- \pgf@circuit@fet@ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@up}}
-
- % GATE, ENHANCEMENT TYPE (DASHED)
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf@circ@res@up*0.45}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf@circ@res@up*0.25}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf@circ@res@down*0.25}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf@circ@res@down*0.45}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base height}\pgf@circ@res@down}}
-
- % BULK
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
- % SOURCE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}} %Geändert
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
+\pgfdeclaretransistorwrapperaddbulk{nigfetebulk}{}{%
+ \pgf@circuit@trans@depletiontypefalse
+ \drawfetcore{nigfetebulk}
+ % SOLDER DOT at source-bulk connection
+ \ifpgf@circuit@fet@solderdot
\pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint
- {\pgf@circ@res@right}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/base width}\pgf@circ@res@left}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf@circuit@bpt@drawgate
- % GATE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
- \pgfusepath{draw}
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
+ \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
+ \pgfnode{circ}{center}{}{}{}
+ \endpgfscope{}
\fi
}
% N-CHANNEL IGFET DEPLETION TYPE
-\pgfcircdeclarefet{nigfetd}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{G}{
- \northeast
- \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@y
- \left
- \pgf@y=-\pgf@circ@res@step
- }
- \anchor{gate}{
- \northeast
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@y
- }
-
-}{%
- \pgf@circuit@fet@ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@up}}
-
- % GATE, DEPLETION TYPE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base height}\pgf@circ@res@down}}
-
- % BULK
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
+\pgfdeclaretransistorwrapperaddbulk{nigfetd}{}{%
+ \pgf@circuit@trans@depletiontypetrue
+ \drawfetcore{nigfetd}
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
% SOURCE CONNECTION
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
\pgfusepath{draw}
-
-
+
% SOLDER DOT at source-bulk connection
\ifpgf@circuit@fet@solderdot
\pgfscope
@@ -2165,123 +1500,17 @@
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint
- {\pgf@circ@res@right}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/base width}\pgf@circ@res@left}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf@circuit@bpt@drawgate
- % GATE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
- %\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
- \pgfusepath{draw}
- \fi
}
% P-CHANNEL IGFET ENHANCEMENT TYPE
-\pgfcircdeclarefet{pigfete}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{G}{
- \northeast
- \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@y
- \left
- \pgf@y=-\pgf@circ@res@step
- }
- \anchor{gate}{
- \northeast
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@y
- }
-}{%
-\pgf@circuit@fet@ntypefalse
+\pgfdeclaretransistorwrapperaddbulk{pigfete}{}{%
+ \pgf@circuit@trans@depletiontypefalse
+ \drawfetcore{pigfete}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- % GATE, DASHED, BOLD
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@up*0.45}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@up*0.25}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@down*0.25}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@down*0.45}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % BULK
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
+
% SOURCE CONNECTION
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
@@ -2289,245 +1518,27 @@
\ifpgf@circuit@fet@solderdot
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
- \pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
+ \pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope
\fi
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- % Arrow has to be rotated, as this is a p-channel fet
- \pgftransformrotate{180}
- \pgftransformlineattime{-.6}{%
- \pgfpoint
- {\pgf@circ@res@right}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf@circuit@bpt@drawgate
- % GATE CONNECTION (in line with source)
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
- %\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
- \pgfusepath{draw}
- \fi
}
% P-CHANNEL IGFET ENHANCEMENT TYPE with bulk connector
-\pgfcircdeclarefet{pigfetebulk}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{G}{
- \northeast
- \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@y
- \left
- \pgf@y=-\pgf@circ@res@step
- }
- \anchor{gate}{
- \northeast
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@y
- }
-}{%
- \pgf@circuit@fet@ntypefalse
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@circ@res@up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- % GATE, DASHED, BOLD
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf@circ@res@up*0.45}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf@circ@res@up*0.25}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf@circ@res@down*0.25}}
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf@circ@res@down*0.45}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % BULK
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@circ@res@down}}
- % SOURCE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@circ@res@down}} %Geändert
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@circ@res@down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- % Arrow has to be rotated, as this is a p-channel fet
- \pgftransformrotate{180}
- \pgftransformlineattime{-.6}{%
- \pgfpoint
- {\pgf@circ@res@right}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/base width}\pgf@circ@res@left}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf@circuit@bpt@drawgate
- % GATE CONNECTION (in line with source)
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@circ@res@down}}
- %\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@circ@res@down}}
- \pgfusepath{draw}
- \fi
+\pgfdeclaretransistorwrapperaddbulk{pigfetebulk}{}{%
+ \pgf@circuit@trans@depletiontypefalse
+ \drawfetcore{pigfetebulk}
}
% P-CHANNEL IGFET DEPLETION TYPE
-\pgfcircdeclarefet{pigfetd}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{G}{
- \northeast
- \pgf@circ@res@step=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
- \left
- \pgf@y=-\pgf@circ@res@step
- }
- \anchor{gate}{
- \northeast
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
- }
-}{%
- \pgf@circuit@fet@ntypefalse
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- % DRAIN CONNECTION
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@up}}
- % DRAIN
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@up}}
-
- \pgfusepath{draw}
-
-
- % GATE DEPLETION TYPE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % BULK
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
-
-
- % SOURCE
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
+\pgfdeclaretransistorwrapperaddbulk{pigfetd}{}{%
+ \pgf@circuit@trans@depletiontypetrue
+ \drawfetcore{pigfetd}
+
% SOURCE CONNECTION
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfusepath{draw}
@@ -2535,89 +1546,14 @@
\ifpgf@circuit@fet@solderdot
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
- \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
+ \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@up}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
- % GATE
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
- %\pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- % ARROW
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- % PFET!
- \pgftransformrotate{180}
- \pgftransformlineattime{-.6}{%
- \pgfpoint
- {\pgf@circ@res@right}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/base width}\pgf@circ@res@left}%
- {\pgf@circ@res@up+\pgf@circ@res@down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \ifpgf@circuit@bpt@drawgate
- % GATE CONNECTION
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
- %\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
- \pgfusepath{draw}
- \fi
}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% Contrib Danilo Piazzalunga
-
-\pgfcircdeclarefet{njfet}{
- \anchor{G}{
- \left
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/height}\pgf@y
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@y
- \pgf@y=-.5\pgf@y
- }
- \anchor{gate}{
- \left
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/height}\pgf@y
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@y
- \pgf@y=-.5\pgf@y
- }
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{%
- \pgf@circuit@fet@ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+\pgfcircdeclaretransistor{njfet}{}{%
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
@@ -2629,7 +1565,7 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfusepath{draw}
\pgfscope
@@ -2661,44 +1597,14 @@
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
\pgfusepath{draw}
}
-\pgfcircdeclarefet{pjfet}{
- \anchor{G}{
- \left
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/height}\pgf@y
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@y
- \pgf@y=.5\pgf@y
- }
- \anchor{gate}{
- \left
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/height}\pgf@y
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@y
- \pgf@y=.5\pgf@y
- }
- \anchor{S}{
- \northeast
- }
- \anchor{source}{
- \northeast
- }
- \anchor{D}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{drain}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{%
- \pgf@circuit@fet@ntypefalse
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+\pgfcircdeclaretransistor{pjfet}{}{%
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
@@ -2710,7 +1616,7 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfusepath{draw}
\pgfscope
@@ -2743,45 +1649,14 @@
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
\pgfusepath{draw}
}
-
-
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-
-
-
-
-
-% ISFET
-\pgfcircdeclarefet{isfet}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{%
- \pgf@circuit@fet@ntypetrue
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+\pgfdeclaretransistorwrapperaddbulk{isfet}{}{%
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
% DRAIN CONNECTION
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@up}}
@@ -2807,7 +1682,7 @@
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/base width}\pgf@circ@res@left}
{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+.5\pgflinewidth}
{\pgf@circ@res@up+\pgf@circ@res@down}}
% SOURCE
@@ -2818,7 +1693,7 @@
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/isfet/gate height}\pgf@circ@res@down}}
% SOURCE CONNECTION
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
\pgfusepath{draw}
% GATE
@@ -2904,7 +1779,7 @@
\ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
\pgf@y=0cm
}
-}{\ctikzvalof{tripoles/thyristor/height 2}}{thyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
+}{\ctikzvalof{tripoles/thyristor/height 2}}{fullthyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
@@ -2945,6 +1820,63 @@
}
+%% Empty thyristor
+
+\pgfcircdeclarebipole{
+ \anchor{gate}{
+ \northeast
+ }
+ \anchor{anode}{
+ \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \pgf@y=0cm
+ }
+ \anchor{G}{
+ \northeast
+ }
+ \anchor{cathode}{
+ \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \pgf@y=0cm
+ }
+}{\ctikzvalof{tripoles/thyristor/height 2}}{emptythyristor}{\ctikzvalof{tripoles/thyristor/height}}{\ctikzvalof{tripoles/thyristor/width}}{
+
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+ \pgf@circ@res@other = \ctikzvalof{tripoles/thyristor/diode width left}\pgf@circ@res@left
+ \pgf@circ@res@step = \ctikzvalof{tripoles/thyristor/diode width right}\pgf@circ@res@right
+
+ \pgfscope
+ \pgftransformxshift{\pgf@circ@res@other}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
+
+ \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
+ \pgfusepath{draw}
+
+ \pgfsetlinewidth{\pgfstartlinewidth}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step-\pgf@circ@res@other}{0pt}}
+ \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\ctikzvalof{tripoles/thyristor/diode height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{2*\pgf@circ@res@step-2*\pgf@circ@res@other}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@down}}
+
+ \pgfusepath{draw}
+
+ \pgfsetlinewidth{\pgfstartlinewidth}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+
+ \pgfusepath{draw}
+
+}
%% Empty triac
@@ -2963,7 +1895,7 @@
\ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
\pgf@y=0cm
}
-}{\ctikzvalof{tripoles/triac/height}}{triac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
+}{\ctikzvalof{tripoles/triac/height}}{emptytriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
@@ -2998,7 +1930,57 @@
}
+%% Empty triac
+\pgfcircdeclarebipole{
+ \anchor{gate}{
+ \northeast
+ }
+ \anchor{G}{
+ \northeast
+ }
+ \anchor{anode}{
+ \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \pgf@y=0cm
+ }
+ \anchor{cathode}{
+ \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \pgf@y=0cm
+ }
+}{\ctikzvalof{tripoles/triac/height}}{fulltriac}{\ctikzvalof{tripoles/triac/height}}{\ctikzvalof{tripoles/triac/width}}{
+
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+
+ \pgf@circ@res@other = \ctikzvalof{tripoles/triac/diode width left}\pgf@circ@res@left
+ \pgf@circ@res@step = \ctikzvalof{tripoles/triac/diode width right}\pgf@circ@res@right
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
+ \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@step}{0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
+ \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@other}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}}
+
+ \pgfusepath{draw,fill}
+
+ \pgfsetlinewidth{\pgfstartlinewidth}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{-0.707*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-1.414*(\pgf@circ@res@other-\pgf@circ@res@step)}} % sqrt(1/2)
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} % sqrt(1/2)
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@other}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+
+ \pgfusepath{draw}
+
+}
@@ -3325,36 +2307,38 @@
\pgfpoint{0pt}{\pgf@y}
}
}{\ctikzvalof{bipoles/potentiometer/height 2}}{potentiometer}{\ctikzvalof{bipoles/potentiometer/height}}{\ctikzvalof{bipoles/potentiometer/width}}{
- \pgf@circ@res@step = \ctikzvalof{bipoles/potentiometer/width}\pgf@circ@Rlen
- \divide \pgf@circ@res@step by 12
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by 2\pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
- \advance\pgf@circ@res@other by \pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
- \pgfusepath{draw}
-
- \pgfscope
- %\pgfsetlinewidth{\pgfstartlinewidth}
- \pgfsetarrowsend{latex'}
- \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
- \pgfusepath{draw}
- \endpgfscope
+\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+\pgftransformationadjustments
+\pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+\divide \pgf@circ@res@step by 12
+
+\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+
+\pgf@circ@res@other = \pgf@circ@res@left
+\advance\pgf@circ@res@other by \pgf@circ@res@step
+\pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
+\advance\pgf@circ@res@other by 2\pgf@circ@res@step
+\pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
+\advance\pgf@circ@res@other by 2\pgf@circ@res@step
+\pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
+\advance\pgf@circ@res@other by 2\pgf@circ@res@step
+\pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
+\advance\pgf@circ@res@other by 2\pgf@circ@res@step
+\pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{-\pgf@circ@res@down}}
+\advance\pgf@circ@res@other by 2\pgf@circ@res@step
+\pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
+\advance\pgf@circ@res@other by \pgf@circ@res@step
+\pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
+\pgfsetbeveljoin
+\pgfusepath{draw}
+
+\pgfscope
+ %\pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfsetarrowsend{latex'}
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@down}}
+ \pgfusepath{draw}
+\endpgfscope
}
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
index dc7e3f703f8..b22fc77bd0c 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircutils.tex
@@ -62,5 +62,4 @@
\ifx\pgf@circ@temp\pgf@temp
}
-
-\endinput
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
index 2127cecb934..57fb00e0f0c 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircvoltage.tex
@@ -175,27 +175,12 @@
\else % american voltage
- \pgfextra{
- \def\pgf@temp{\pgfkeysvalueof{/tikz/circuitikz/bipole/kind}}
- \def\pgf@circ@temp{battery}
- \ifx\pgf@temp\pgf@circ@temp
- \edef\pgf@circ@batteria{battery}
- \else
- \def\pgf@circ@temp{battery1}
- \ifx\pgf@temp\pgf@circ@temp
- \edef\pgf@circ@batteria{battery}
- \else
- \edef\pgf@circ@batteria{false}
- \fi
- \fi
- \edef\pgf@circ@temp{battery}
- }
-
- \ifx\pgf@circ@batteria\pgf@circ@temp % if it is a battery, must put + and -
+ \ifpgf@circuit@bipole@voltageoutsideofsymbol
+ % if it is a battery, must put + and -
\ifpgf@circuit@bipole@voltage@backward
(pgfcirc@Vcont2) node {$-$} (pgfcirc@Vcont1) node {$+$}
\else
- (pgfcirc@Vcont1) node {$-$} (pgfcirc@Vcont2) node {$+$}
+ (pgfcirc@Vcont1) node {$+$} (pgfcirc@Vcont2) node {$-$}
\fi
\fi
diff --git a/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty b/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
index 610a5767d17..a021cf12eef 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.5}
-\def\pgfcircversiondate{2016/04/24}
+\def\pgfcircversion{0.6}
+\def\pgfcircversiondate{2016/06/06}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
@@ -173,6 +173,10 @@
\ctikzset{diode = empty}
}
+\DeclareOption{strokediode}{
+ \ctikzset{diode = stroke}
+}
+
\DeclareOption{arrowmos}{
\pgf@circuit@mos@arrowstrue
}
@@ -305,18 +309,32 @@
%%%%%%%%%
\input pgfcirc.defines.tex
+\input pgfcircutils.tex
+\input pgfcircmath.tex
+
+\input pgfcircshapes.tex
+\input pgfcircmonopoles.tex
+\input pgfcircbipoles.tex
+\input pgfcirctripoles.tex
+\input pgfcircquadpoles.tex
+
+\input pgfcirclabel.tex
+\input pgfcircvoltage.tex
+\input pgfcirccurrent.tex
\ExecuteOptions{nofetbodydiode,nofetsolderdot,nooldvoltagedirection,europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility}
\ProcessOptions\relax
+\input pgfcircpath.tex
+
\ifpgf@circ@siunitx
\RequirePackage{xstring}[2009/03/13]
%\expandafter\let\csname angstrom\endcsname\relax
\RequirePackage{siunitx}
\fi
-\input pgfcircbasic.tex
+
\newenvironment{circuitikz}{\begin{tikzpicture}}{\end{tikzpicture}}
%override (unused) circuitikz environment for compability to externalization)