texlive[58352] Master/texmf-dist: circuitikz (14mar21)

commits+karl at tug.org commits+karl at tug.org
Sun Mar 14 23:52:27 CET 2021


Revision: 58352
          http://tug.org/svn/texlive?view=revision&revision=58352
Author:   karl
Date:     2021-03-14 23:52:27 +0100 (Sun, 14 Mar 2021)
Log Message:
-----------
circuitikz (14mar21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
    trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
    trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
    trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
    trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
    trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
    trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty

Modified: trunk/Master/texmf-dist/doc/context/third/circuitikz/circuitikz-context.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2021-03-14 22:52:07 UTC (rev 58351)
+++ trunk/Master/texmf-dist/doc/generic/circuitikz/CHANGELOG.md	2021-03-14 22:52:27 UTC (rev 58352)
@@ -1,6 +1,13 @@
 <!--- CircuiTikz - Changelog --->
 The major changes among the different circuitikz versions are listed here. See <https://github.com/circuitikz/circuitikz/commits> for a full list of changes.
 
+* Version 1.3.2 (2021-03-14)
+
+    - Added the simplified (2-waves) highpass and lowpass blocks
+    - Added graphene FETs (suggested by Cees Keyer)
+    - Added left/right anchors to transistors
+    - Fixed a bug in flip-flops (https://tex.stackexchange.com/q/587213/38080)
+
 * Version 1.3.1 (2021-02-20)
 
     - Fixed a bug in "fuse" and "afuse" fill

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2021-03-14 22:52:07 UTC (rev 58351)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/changelog.tex	2021-03-14 22:52:27 UTC (rev 58352)
@@ -5,6 +5,21 @@
 
 \begin{itemize}
 \item
+  Version 1.3.2 (2021-03-14)
+
+  \begin{itemize}
+  \tightlist
+  \item
+    Added the simplified (2-waves) highpass and lowpass blocks
+  \item
+    Added graphene FETs (suggested by Cees Keyer)
+  \item
+    Added left/right anchors to transistors
+  \item
+    Fixed a bug in flip-flops
+    (https://tex.stackexchange.com/q/587213/38080)
+  \end{itemize}
+\item
   Version 1.3.1 (2021-02-20)
 
   \begin{itemize}

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2021-03-14 22:52:07 UTC (rev 58351)
+++ trunk/Master/texmf-dist/doc/latex/circuitikz/circuitikzmanual.tex	2021-03-14 22:52:27 UTC (rev 58352)
@@ -2595,6 +2595,8 @@
     \circuitdescbip*{highpass}{highpass}{}
     \circuitdescbip*{lowpass}{lowpass}{}
     \circuitdescbip*{allpass}{allpass}{}
+    \circuitdescbip*{highpass2}{simplified highpass (with only 2 waves)}{}
+    \circuitdescbip*{lowpass2}{simplified lowpass (with only 2 waves)}{}
     \circuitdescbip*{adc}{A/D converter}{}
     \circuitdescbip*{dac}{D/A converter}{}
     \circuitdescbip*{dsp}{DSP}{}
@@ -2867,6 +2869,13 @@
     \circuitdesc{isfet}{isfet}{Q}
 \end{groupdesc}
 
+\textsc{Graphene fet} have been added in version \texttt{1.3.2}\footnote{added by Romano Giannetti after a suggestion by Cees Keyer.}. They look better if you set \texttt{transistors/arrow pos=end} and \texttt{transistor/thickness=3} or higher for them, so they are plotted with this option here.
+\begin{groupdesc}
+    \ctikzset{transistors/thickness=3, transistors/arrow pos=end}
+    \circuitdesc*{ngfet}{N-type graphene FET}{Q}(outer hex up/45/0.3, outer hex down/-45/0.3, right/0/0.4)
+    \circuitdesc*{pgfet}{pgfet}{Q}(inner hex up/135/0.3, inner hex down/-135/0.3)
+\end{groupdesc}
+
 \subsubsection{Transistor texts (labels)}\label{sec:transistors-labels}
 
 In versions before \texttt{0.9.7}, transistors text (the node text) was positioned near the collector terminal; since version \texttt{0.9.7} the default has been changed to a more natural position near the center of the device, similar to the multi-teminal transistors. You can revert to the old behavior locally with the key \texttt{legacy transistors text}, or globally by setting the package option \texttt{legacytransistorstext}.
@@ -2918,7 +2927,7 @@
 \texttt{\textbackslash ctikzset\{tripoles/mos style/no arrows\}}.
 
 
-\paragraph{Circles.} Since \texttt{1.2.6}, you can add a circle\footnote{Suggested by Matthias Jung \href{https://github.com/circuitikz/circuitikz/issues/442}{on GitHub}} to most of the transistor shapes --- with the exception of multi-terminal ones (\texttt{bjtnpn} and \texttt{bjtpnp}, where it would be awkward anyway). The circle is intended in some case as the component's housing, and used to distinguish discrete components from integrated ones.
+\paragraph{Circles.} Since \texttt{1.2.6}, you can add a circle\footnote{Suggested by Matthias Jung \href{https://github.com/circuitikz/circuitikz/issues/442}{on GitHub}} to most of the transistor shapes --- with the exception of multi-terminal (\texttt{bjtnpn} and \texttt{bjtpnp}, where it would be awkward anyway) and graphene FETs. The circle is intended in some case as the component's housing, and used to distinguish discrete components from integrated ones.
 
 To add the circle to a single transistor, you use the \texttt{tr circle} keys in the node; if you want all of your transistors with a circle, you can set the property \texttt{tr circle} with a \verb|\ctikzset| command (it will respect normal grouping, of course); in that case, you can use \texttt{tr circle=false} to locally disable them.
 
@@ -3218,8 +3227,16 @@
 ;\end{circuitikz}
 \end{LTXexample}
 
-Finally, all transistors, except the multi-terminal \texttt{bjtnpn} and \texttt{bjtpnp}, (since \texttt{0.9.6}) have internal nodes on the terminal corners, called \texttt{inner up}  and \texttt{inner down}; you do not normally need them, but they are here for special applications:
 
+Notice that the geographical anchors of transistors are \emph{not} affected by either the bodydiode and the circle options; the label text is also outside of them. This is to permit to align the components independently from that features. On the other hand, that can sometimes create problems because that element are outside the bounding box automatically calculated by \TikZ{}.
+
+The exception is the \texttt{right} anchor which, when a circle is present, indicates the edge of the circle itself (since \texttt{v1.3.2})
+
+{\geolrcoord{npn}  \geolrcoord{npn, bodydiode} \geolrcoord{npn, bodydiode, tr circle}}
+
+
+All transistors, except the multi-terminal \texttt{bjtnpn} and \texttt{bjtpnp}, (since \texttt{0.9.6}) have internal nodes on the terminal corners, called \texttt{inner up}  and \texttt{inner down}; you do not normally need them, but they are here for special applications:
+
 \begin{LTXexample}[varwidth=true]
 \begin{circuitikz}
     \node [npn](A) at(0,2) {};

Modified: trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2021-03-14 22:52:07 UTC (rev 58351)
+++ trunk/Master/texmf-dist/tex/context/third/circuitikz/t-circuitikz.tex	2021-03-14 22:52:27 UTC (rev 58352)
@@ -10,8 +10,8 @@
 %
 % See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
 
-\def\pgfcircversion{1.3.1}
-\def\pgfcircversiondate{2021/02/20}
+\def\pgfcircversion{1.3.2}
+\def\pgfcircversiondate{2021/03/14}
 \writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
 
 \usemodule[tikz]

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex	2021-03-14 22:52:07 UTC (rev 58351)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircmultipoles.tex	2021-03-14 22:52:27 UTC (rev 58352)
@@ -1406,7 +1406,7 @@
                 \ifx\@@tmp\@@x\else\edef\@@or{1}\fi
                 \edef\@@tmp{\ctikzvalof{multipoles/flipflop/cd}}
                 \ifnum\@@tmp>0\edef\@@or{1}\fi
-                \edef\@@tmp{\ctikzvalof{multipoles/flipflop/nu}}
+                \edef\@@tmp{\ctikzvalof{multipoles/flipflop/nd}}
                 \ifnum\@@tmp>0\edef\@@or{1}\fi
                 % \typeout{TEST\space\@@tmp\space\@@x}
                 \ifnum\@@or>0

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex	2021-03-14 22:52:07 UTC (rev 58351)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcircquadpoles.tex	2021-03-14 22:52:27 UTC (rev 58352)
@@ -417,7 +417,9 @@
 \ctikzset{bipoles/bandpass/width/.initial=.7}
 \ctikzset{bipoles/bandstop/width/.initial=.7}
 \ctikzset{bipoles/highpass/width/.initial=.7}
+\ctikzset{bipoles/highpass2/width/.initial=.7}
 \ctikzset{bipoles/lowpass/width/.initial=.7}
+\ctikzset{bipoles/lowpass2/width/.initial=.7}
 \ctikzset{bipoles/allpass/width/.initial=.7}
 \ctikzset{bipoles/adc/width/.initial=.7}
 \ctikzset{bipoles/dac/width/.initial=.7}
@@ -870,6 +872,70 @@
     \pgfusepath{draw}
 }
 
+%% highpass2 filter ---simplyfied with just two waves
+\pgfcircdeclarebipolescaled{blocks}
+{}
+{\ctikzvalof{bipoles/highpass2/width}}
+{highpass2}
+{\ctikzvalof{bipoles/highpass2/width}}
+{\ctikzvalof{bipoles/highpass2/width}}
+{
+    \pgf at circ@res at step = \ctikzvalof{bipoles/highpass2/width}\pgf at circ@scaled at Rlen
+    \divide \pgf at circ@res at step by 2
+
+    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+    \pgf at circ@res at other = \pgf at circ@res at left
+    \advance\pgf at circ@res at other by \pgf at circ@res at step
+
+    \ifpgf at circuit@dashed
+        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \fi
+
+    % draw outer box
+    \pgf at circ@twoportbox
+
+    \ifpgf at circuit@inputarrow
+        {
+            \advance \pgf at circ@res at left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+            \pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+            \pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+        }
+    \fi
+
+    % rotate inner symbol
+    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+        \pgftransformrotate{270}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+        \pgftransformrotate{180}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+        \pgftransformrotate{90}
+    \fi\fi
+
+    % draw inner symbol
+    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+    \pgfsetarrows{-} %never draw arrows
+    \pgfsetlinewidth{\pgfstartlinewidth}
+    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
+    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+    \pgfusepath{draw}
+
+    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.25\pgf at circ@res at step}}
+    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{-0.3\pgf at circ@res at step}{-0.5\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{0.3\pgf at circ@res at step}{-0.1\pgf at circ@res at step}}
+    \pgfusepath{draw}
+}
+
 %% lowpass filter
 \pgfcircdeclarebipolescaled{blocks}
 {}
@@ -944,6 +1010,70 @@
     \pgfusepath{draw}
 }
 
+%% lowpass2 filter: simplyfied with just two waves
+\pgfcircdeclarebipolescaled{blocks}
+{}
+{\ctikzvalof{bipoles/lowpass2/width}}
+{lowpass2}
+{\ctikzvalof{bipoles/lowpass2/width}}
+{\ctikzvalof{bipoles/lowpass2/width}}
+{
+    \pgf at circ@res at step = \ctikzvalof{bipoles/lowpass2/width}\pgf at circ@scaled at Rlen
+    \divide \pgf at circ@res at step by 2
+
+    \pgfpathmoveto{\pgfpoint{\pgf at circ@res at left}{\pgf at circ@res at zero}}
+    \pgf at circ@res at other = \pgf at circ@res at left
+    \advance\pgf at circ@res at other by \pgf at circ@res at step
+
+    \ifpgf at circuit@dashed
+        \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+    \fi
+
+    % draw outer box
+    \pgf at circ@twoportbox
+
+    \ifpgf at circuit@inputarrow
+        {
+            \advance \pgf at circ@res at left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+            \pgftransformshift{\pgfpoint{\pgf at circ@res at left}{0pt}}
+            \pgfnode{inputarrow}{tip}{}{pgf at inputarrow}{\pgfusepath{fill}}
+        }
+    \fi
+
+    % rotate inner symbol
+    \def\pgfcircmathresult{\expandafter\pgf at circ@stripdecimals\pgf at circ@direction\pgf at nil}
+    \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+        \pgftransformrotate{270}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225  % 134 degree, because >= 135 is not possible
+        \pgftransformrotate{180}
+    \fi\fi
+    \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+        \pgftransformrotate{90}
+    \fi\fi
+
+    % draw inner symbol
+    \pgfsetdash{}{0pt}	% always draw solid line for inner symbol
+    \pgfsetarrows{-} %never draw arrows
+    \pgfsetlinewidth{\pgfstartlinewidth}
+    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{0.25\pgf at circ@res at step}}
+    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+    \pgfusepath{draw}
+    \pgfpathmoveto{\pgfpoint{-0.3\pgf at circ@res at step}{0.1\pgf at circ@res at step}}
+    \pgfpathlineto{\pgfpoint{0.3\pgf at circ@res at step}{0.5\pgf at circ@res at step}}
+    \pgfusepath{draw}
+
+    \pgfpathmoveto{\pgfpoint{-0.5\pgf at circ@res at step}{-0.25\pgf at circ@res at step}}
+    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+    \pgfpathsine{\pgfpoint{.25\pgf at circ@res at step}{-.25\pgf at circ@res at step}}
+    \pgfpathcosine{\pgfpoint{.25\pgf at circ@res at step}{.25\pgf at circ@res at step}}
+    \pgfusepath{draw}
+}
+
 %% allpass filter
 \pgfcircdeclarebipolescaled{blocks}
 {}
@@ -2121,7 +2251,9 @@
 \pgfcirc at activate@bipole at simple{l}{bandpass}
 \pgfcirc at activate@bipole at simple{l}{bandstop}
 \pgfcirc at activate@bipole at simple{l}{highpass}
+\pgfcirc at activate@bipole at simple{l}{highpass2}
 \pgfcirc at activate@bipole at simple{l}{lowpass}
+\pgfcirc at activate@bipole at simple{l}{lowpass2}
 \pgfcirc at activate@bipole at simple{l}{allpass}
 \pgfcirc at activate@bipole at simple{l}{adc}
 \pgfcirc at activate@bipole at simple{l}{dac}

Modified: trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2021-03-14 22:52:07 UTC (rev 58351)
+++ trunk/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex	2021-03-14 22:52:27 UTC (rev 58352)
@@ -3255,6 +3255,38 @@
 \ctikzset{tripoles/isfet/bodydiode conn/.initial=.6}
 \ctikzset{tripoles/isfet/curr direction/.initial=1}
 %
+% graphene FET
+%
+\ctikzset{tripoles/pgfet/width/.initial=.6}
+\ctikzset{tripoles/pgfet/gate height/.initial=.5}
+\ctikzset{tripoles/pgfet/gate height 2/.initial=0.25}  % must be "gate height"/2
+\ctikzset{tripoles/pgfet/base height/.initial=.5}  % must be "gate height"
+\ctikzset{tripoles/pgfet/outer base height/.initial=.25} % must be "gate height 2"
+\ctikzset{tripoles/pgfet/outer base thickness/.initial=1}
+\ctikzset{tripoles/pgfet/conn height/.initial=0}
+\ctikzset{tripoles/pgfet/height/.initial=1.1}
+\ctikzset{tripoles/pgfet/gate width/.initial=.5}
+\ctikzset{tripoles/pgfet/base width/.initial=0.36084} % must be "gate height"*cos(60)/(2*width)
+\ctikzset{tripoles/pgfet/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pgfet/bodydiode distance/.initial=.6}
+\ctikzset{tripoles/pgfet/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pgfet/curr direction/.initial=-1}
+
+\ctikzset{tripoles/ngfet/width/.initial=.6}
+\ctikzset{tripoles/ngfet/gate height/.initial=.5}
+\ctikzset{tripoles/ngfet/gate height 2/.initial=0.25}  % must be "gate height"/2
+\ctikzset{tripoles/ngfet/base height/.initial=.5}  % must be "gate height"
+\ctikzset{tripoles/ngfet/outer base height/.initial=.25} % must be "gate height 2"
+\ctikzset{tripoles/ngfet/outer base thickness/.initial=1}
+\ctikzset{tripoles/ngfet/conn height/.initial=0}
+\ctikzset{tripoles/ngfet/height/.initial=1.1}
+\ctikzset{tripoles/ngfet/gate width/.initial=.5}
+\ctikzset{tripoles/ngfet/base width/.initial=0.36084} % must be "gate height"*cos(60)/(2*width)
+\ctikzset{tripoles/ngfet/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/ngfet/bodydiode distance/.initial=.6}
+\ctikzset{tripoles/ngfet/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/ngfet/curr direction/.initial=1}
+%
 % multi-emitter and multi-collector BJTs by Romano Giannetti
 %
 \ctikzset{tripoles/bjt/emitters/.initial=1}
@@ -3349,7 +3381,7 @@
                 \pgf at x=0pt\relax
             \fi
         }
-        \savedmacro{\scaecircleradius}{
+        \savedmacro{\scalecircleradius}{
             \edef\scalecircleradius{\ctikzvalof{transistor circle/scale circle radius}}
         }
         \saveddimen{\circleradius}{
@@ -3400,9 +3432,39 @@
             \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
             \pgf at x=-\ctikzvalof{tripoles/#1/width}\pgf at circ@scaled at Rlen
         }
-        \savedanchor\right{%center right -- added by Burak Kelleci % this is really 0,0
-            \pgf at y=0pt
-            \pgf at x=0pt
+        \savedanchor\right{
+            \pgf at x=0pt\pgf at y=0pt
+            \ifpgf at circ@trcircle
+            % repeat the \circleradius computation (GRRRR)
+                \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+                % repeat the extrabodydiodelen (grrr)
+                \ifpgf at circuit@fet at bodydiode
+                    % try to put the text to the right of the flyback diode
+                    \pgfmathsetlength{\pgf at circ@res at other}{(
+                        \ctikzvalof{tripoles/#1/bodydiode distance}*
+                        \ctikzvalof{tripoles/#1/width} +
+                        \ctikzvalof{tripoles/#1/bodydiode scale}*
+                        \ctikzvalof{bipoles/diode/height}/2
+                    )*\pgf at circ@scaled at Rlen}
+                \else
+                    \pgf at circ@res at other=0pt\relax
+                \fi
+                % left
+                \pgf at xa=-\ctikzvalof{tripoles/#1/width}\pgf at circ@scaled at Rlen
+                \pgf at xa=\circlebase\pgf at xa % this is the base point of the circle
+                % northeast
+                \pgf at yb=\ctikzvalof{tripoles/#1/height}\pgf at circ@scaled at Rlen % y of the left point of circle
+                \pgf at yb=.5\pgf at yb
+                \pgf at xb=\pgf at circ@res at other % this is the x of the right points of the circle
+                %
+                \pgf at yb=\ctikzvalof{tripoles/#1/bodydiode conn}\pgf at yb %this is #3 of the circle
+                % find the radius of the circle
+                \pgfmathsetlength{\pgf at circ@res at other}{((\pgf at xb)-(\pgf at xa)+(\pgf at yb)*(\pgf at yb)/((\pgf at xb)-(\pgf at xa)))/2*\scalecircleradius}
+                % repeat the circleleft computation
+                \pgf at xa=-\ctikzvalof{tripoles/#1/width}\pgf at circ@scaled at Rlen
+                \pgf at xb=\circlebase\pgf at xa
+                \pgfmathsetlength{\pgf at x}{\pgf at xb+2*\pgf at circ@res at other}
+            \fi
         }
         \anchor{text}{
             \northeast
@@ -3442,10 +3504,16 @@
         \anchor{west}{
             \left
         }
+        \anchor{left}{
+            \left
+        }
         \anchor{east}{
             \northeast
             \pgf at y=0pt
         }
+        \anchor{right}{
+            \right
+        }
         \anchor{south}{
             \northeast
             \pgf at circ@res at step=\pgf at y
@@ -4302,6 +4370,187 @@
 \declareigbt{Lnigbt}
 \declareigbt{Lpigbt}
 
+% Graphene FET, See https://github.com/circuitikz/circuitikz/issues/496
+\long\def\declaregfet#1{
+    \pgfcircdeclaretransistor{#1}{
+        \anchor{inner up}{
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/#1/gate height}\pgf at y
+        }
+        \anchor{inner down}{
+            \northeast
+            \pgf at y=-\ctikzvalof{tripoles/#1/gate height}\pgf at y
+        }
+        \anchor{outer hex up}{
+            \left
+            \pgf at xa=\ctikzvalof{tripoles/#1/base width}\pgf at x
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/#1/gate height 2}\pgf at y
+            \pgf at x=-\pgf at xa
+        }
+        \anchor{outer hex down}{
+            \left
+            \pgf at xa=\ctikzvalof{tripoles/#1/base width}\pgf at x
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/#1/gate height 2}\pgf at y
+            \pgf at y=-\pgf at y
+            \pgf at x=-\pgf at xa
+        }
+        \anchor{inner hex up}{
+            \left
+            \pgf at xa=\ctikzvalof{tripoles/#1/base width}\pgf at x
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/#1/gate height 2}\pgf at y
+            \pgf at x=\pgf at xa
+        }
+        \anchor{inner hex down}{
+            \left
+            \pgf at xa=\ctikzvalof{tripoles/#1/base width}\pgf at x
+            \northeast
+            \pgf at y=\ctikzvalof{tripoles/#1/gate height 2}\pgf at y
+            \pgf at y=-\pgf at y
+            \pgf at x=\pgf at xa
+        }
+        \anchor{right}{
+            \northeast\pgf at y=0pt\relax
+            \pgfmathsetlength{\pgf at xa}{\ctikzvalof{tripoles/#1/base width}*
+                \ctikzvalof{tripoles/#1/width}*\pgf at circ@scaled at Rlen}
+            \advance \pgf at x by \pgf at xa
+        }
+        \anchor{text}{% need a different text: no circle, shift to the right
+            \northeast
+            \pgfmathsetlength{\pgf at circ@scaled at Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf at circ@Rlen}
+            \ifpgf at circuit@transisors at fixlabels
+                \ifpgf at circuit@fet at bodydiode
+                    \advance \pgf at x by \extrabodydiodelen
+                \else
+                    \pgfmathsetlength{\pgf at xa}{\ctikzvalof{tripoles/#1/base width}*
+                        \ctikzvalof{tripoles/#1/width}*\pgf at circ@scaled at Rlen}
+                    \advance \pgf at x by \pgf at xa
+                \fi
+                % no circle for gfets
+                % add a bit of space to avoid central (substrate) terminal if drawn
+                \advance\pgf at x by 0.05\pgf at circ@scaled at Rlen\relax
+                \pgf at y=\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax
+            \else
+                \pgf at y=.7\pgf at y
+                \pgf at x= \pgf at circ@scaled at Rlen
+                \pgf at x=0.1\pgf at x
+            \fi
+        }
+    }
+    {
+        % no circle for gfets (clearly!)
+        %draw upper connection to hexagon
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+            {\ctikzvalof{tripoles/#1/gate height}\pgf at circ@res at up}}
+        \pgfpathmoveto{\pgfpoint{\pgf at circ@res at right}
+            {\ctikzvalof{tripoles/#1/gate height}\pgf at circ@res at down}}
+        \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}{\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+        \pgfusepath{draw}
+        % draw (fillable) hexagon
+        \pgfscope
+            \pgfpathmoveto{\pgfpoint
+                {\ctikzvalof{tripoles/#1/base width}\pgf at circ@res at left}
+                {\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at up}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+                {\ctikzvalof{tripoles/#1/gate height}\pgf at circ@res at up}}
+            \pgfpathlineto{\pgfpoint
+                 {-\ctikzvalof{tripoles/#1/base width}\pgf at circ@res at left}
+                 {\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at up}}
+            \pgfpathlineto{\pgfpoint
+                 {-\ctikzvalof{tripoles/#1/base width}\pgf at circ@res at left}
+                 {\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at down}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at right}
+                 {\ctikzvalof{tripoles/#1/gate height}\pgf at circ@res at down}}
+            \pgfpathlineto{\pgfpoint
+                {\ctikzvalof{tripoles/#1/base width}\pgf at circ@res at left}
+                {-\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at up}}
+            \pgfpathclose
+            \pgf at circ@draworfill
+        \endpgfscope
+        %draw thicker gate lines
+        \pgfscope
+            \pgfscope
+                \pgfpathmoveto{\pgfpoint
+                    {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+                {\ctikzvalof{tripoles/#1/outer base height}\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+                \pgfpathlineto{\pgfpoint
+                    {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+                {\ctikzvalof{tripoles/#1/outer base height}\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+                % set the normal thickness
+                \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
+                \edef\@@extrat{\ctikzvalof{tripoles/#1/outer base thickness}}
+                \pgfsetlinewidth{\@@extrat\pgflinewidth}
+                \pgfusepath{draw}
+            \endpgfscope
+            \pgfpathmoveto{\pgfpoint
+                {\ctikzvalof{tripoles/#1/base width}\pgf at circ@res at left}
+            {\ctikzvalof{tripoles/#1/base height}\pgf at circ@res at up+\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+            \pgfpathlineto{\pgfpoint
+                {\ctikzvalof{tripoles/#1/base width}\pgf at circ@res at left}
+            {\ctikzvalof{tripoles/#1/base height}\pgf at circ@res at down-\pgfverticaltransformationadjustment*.5\pgflinewidth}}
+            \pgf at circ@setlinewidth{tripoles}{\pgflinewidth}
+            \pgfusepath{draw}
+        \endpgfscope
+        %draw arrow depending on type of transistor
+        \pgfscope
+            \pgfslopedattimetrue
+            \pgfallowupsidedownattimetrue
+            \pgfresetnontranslationattimefalse
+            \ifpgf at circuit@trans at arrowatend
+                \ifpgf at circuit@trans at ntype
+                    \edef\@@anchor{btip}\edef\@@pos{1.0}
+                \else
+                    \edef\@@anchor{tip}\edef\@@pos{1.0}
+                \fi
+            \else
+                \edef\@@anchor{center}\edef\@@pos{0.5}
+            \fi
+            \ifpgf at circuit@trans at ntype
+                \pgftransformlineattime{\@@pos}{%
+                    \pgfpoint%
+                    {\ctikzvalof{tripoles/#1/base width}\pgf at circ@res at left}%
+                    {\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at down}%
+                    }{%
+                    \pgfpoint{\pgf at circ@res at right}%
+                    {\ctikzvalof{tripoles/#1/gate height}\pgf at circ@res at down}%
+                }
+            \else
+                \pgftransformlineattime{\@@pos}{%
+                    \pgfpoint{\pgf at circ@res at right}%
+                    {\ctikzvalof{tripoles/#1/gate height}\pgf at circ@res at up}%
+                    }{%
+                    \pgfpoint{\ctikzvalof{tripoles/#1/base width}\pgf at circ@res at left}%
+                    {\ctikzvalof{tripoles/#1/gate height 2}\pgf at circ@res at up}%
+                }
+            \fi
+            \pgfnode{trarrow}{\@@anchor}{}{}{\pgfusepath{stroke}}
+        \endpgfscope
+        %draw gate
+        \ifpgf at circuit@trans at ntype
+            \pgfpathmoveto{\pgfpoint
+                {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+            {\ctikzvalof{tripoles/#1/conn height}\pgf at circ@res at down}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
+            {\ctikzvalof{tripoles/#1/conn height}\pgf at circ@res at down}}
+        \else
+            \pgfpathmoveto{\pgfpoint
+                {\ctikzvalof{tripoles/#1/gate width}\pgf at circ@res at left}
+            {\ctikzvalof{tripoles/#1/conn height}\pgf at circ@res at up}}
+            \pgfpathlineto{\pgfpoint{\pgf at circ@res at left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}%
+            {\ctikzvalof{tripoles/#1/conn height}\pgf at circ@res at up}}
+        \fi
+        \pgfusepath{draw}
+    }
+}
+
+\declaregfet{pgfet}
+\declaregfet{ngfet}
+
+% Plain MOSes
+
 \pgfcircdeclaretransistor{nmos}{
         \anchor{inner up}{
             \northeast

Modified: trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2021-03-14 22:52:07 UTC (rev 58351)
+++ trunk/Master/texmf-dist/tex/latex/circuitikz/circuitikz.sty	2021-03-14 22:52:27 UTC (rev 58352)
@@ -12,8 +12,8 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\pgfcircversion{1.3.1}
-\def\pgfcircversiondate{2021/02/20}
+\def\pgfcircversion{1.3.2}
+\def\pgfcircversiondate{2021/03/14}
 
 \ProvidesPackage{circuitikz}%
 [\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]



More information about the tex-live-commits mailing list.