diff options
author | Karl Berry <karl@freefriends.org> | 2019-01-22 22:19:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-01-22 22:19:16 +0000 |
commit | 515dfa25529631975742790e3c35b272f3ea42c8 (patch) | |
tree | e0a034f68ac63b488722bd59e4256f4a8bdca77d /Master/texmf-dist/tex/generic/pst-circ | |
parent | fd9683dc698ae7c7639a4a6b716c1e328425d44b (diff) |
pst-circ (22jan19)
git-svn-id: svn://tug.org/texlive/trunk@49791 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-circ')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex | 161 |
1 files changed, 84 insertions, 77 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex b/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex index db268caba9e..8b3b4485c04 100644 --- a/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex +++ b/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex @@ -1,4 +1,4 @@ -%% $Id: pst-circ.tex 646 2017-11-16 09:46:12Z herbert $ +%% $Id: pst-circ.tex 918 2019-01-22 16:41:03Z herbert $ %% This is file `pst-circ.tex' %% %% IMPORTANT NOTICE: @@ -26,8 +26,8 @@ \ifx\PSTXKeyLoaded\endinput \else\input pst-xkey \fi \ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi % -\def\fileversion{2.15} -\def\filedate{2017/11/16} +\def\fileversion{2.16} +\def\filedate{2019/01/22} \message{`pst-circ' v\fileversion (hv)} % \edef\PstAtCode{\the\catcode`\@} @@ -155,6 +155,7 @@ \ifx\psk@Ttype\pst@Ttype@FET \Pst@transistorcirclefalse\fi} \newdimen\Pst@basesep \define@key[psset]{pst-circ}{basesep}[0]{\pst@getlength{#1}\Pst@basesep} +%\define@key[psset]{pst-circ}{TRot}[0]{\def\Pst@TRot{#1}} \define@key[psset]{pst-circ}{TRot}[0]{\pst@checknum{#1}\Pst@TRot} \define@key[psset]{pst-circ}{circedge}[\pcangle]{% \let\pscirc@edge#1% @@ -1154,7 +1155,7 @@ \newif\ifPst@temp \def\transistor{\def\pst@par{}\pst@object{transistor}} \def\transistor@i(#1){% -% \addbefore@par{circedge=\pcangle} + \addbefore@par{dimen=inner} \pst@killglue \begingroup \use@par @@ -1165,7 +1166,7 @@ \def\transistor@ii(#1)#2#3{% with one node, the base \pst@killglue% \ifPst@temp\pnode(#1){TBaseNode}% - \else% + \else \pst@getcoor{#1}\pst@tempA% \pnode(! \pst@tempA /YB exch \pst@number\psyunit div def @@ -1173,33 +1174,36 @@ /basesep \Pst@basesep\space \pst@number\psxunit div def XB basesep \Pst@TRot\space cos mul add YB basesep \Pst@TRot\space sin mul add){TBaseNode}% base node - \fi% + \fi \rput[c]{\Pst@TRot}(! \pst@tempA /YB exch \pst@number\psyunit div def /XB exch \pst@number\psxunit div def /basesep \Pst@basesep\space \pst@number\psxunit div def XB basesep \Pst@TRot\space cos mul add YB basesep \Pst@TRot\space sin mul add){% - \ifnum180=\Pst@TRot - \ifPst@transistorcircle\pscircle(0.3,0){0.7}\fi - \ifx\psk@Ttype\pst@Ttype@NPN -% \psdot[dotscale=3] + \ifdim180pt=\Pst@TRot pt\relax + \ifPst@transistorcircle\pscircle(0.3,0){0.7}\fi + \ifx\psk@Ttype\pst@Ttype@NPN\relax \ifPst@transistorinvert - \pnode(0.5,-0.5){#2} - \pnode(0.5,0.5){#3} - \psline[arrowinset=0,arrowsize=8\pslinewidth,arrows=<-](0.5,0.5)(TBaseNode)(0.5,-0.5)% + \pnode(0.5,-0.5){#2}% + \pnode(0.5,0.5){#3}% \else - \pnode(0.5,-0.5){#3} - \pnode(0.5,0.5){#2} - \psline[arrowinset=0,arrowsize=8\pslinewidth,arrows=->](0.5,0.5)(TBaseNode)(0.5,-0.5)% + \pnode(0.5,-0.5){#3}% + \pnode(0.5,0.5){#2}% \fi \psline[linewidth=4\pslinewidth,arrows=-](TBaseNode|0,0.4)(TBaseNode|0,-0.4)% - \else - \ifx\psk@Ttype\pst@Ttype@PNP\relax% - \ifPst@transistorinvert\pnode(0.5,-0.5){#2}\else\pnode(0.5,-0.5){#3}\fi% - \ifPst@transistorinvert\pnode(0.5,0.5){#3}\else\pnode(0.5,0.5){#2}\fi% - \psline[arrows=-](0.5,0.5)(TBaseNode)(0.5,-0.5)% - \else% FET + \psline[arrowinset=0,arrowsize=8\pslinewidth,arrows=->](#2)(TBaseNode)(#3)% + \else + \ifx\psk@Ttype\pst@Ttype@PNP\relax + \ifPst@transistorinvert + \pnode(0.5,-0.5){#2}\pnode(0.5,0.5){#3}% + \else + \pnode(0.5,-0.5){#3}\pnode(0.5,0.5){#2}% + \fi + \psline[linewidth=4\pslinewidth,arrows=-](TBaseNode|0,0.4)(TBaseNode|0,-0.4)% + \psline[arrowinset=0,arrowsize=8\pslinewidth,arrows=->,dimen=middle](0.5,-0.5)(TBaseNode)% + \psline(0.5,0.5)(TBaseNode) + \else% FET \ifx\psk@Ttype\pst@Ttype@FET\relax% \ifPst@transistorinvert\pnode(0.75,-0.5){#2}\else\pnode(0.75,-0.5){#3}\fi% \ifPst@transistorinvert\pnode(0.75,0.5){#3}\else\pnode(0.75,0.5){#2}\fi% @@ -1277,9 +1281,7 @@ \psline[arrows=-](0.65,0.4)(0.15,0.4) % upper line \psline[linewidth=3\psk@I@width,arrows=-](0.15,0.6)(0.15,-0.6) % gate \psline[arrows=-](0.65,-0.4)(0.15,-0.4)% lower line - \psline[arrows=-,linewidth=1.5\psk@I@width](TBaseNode|0,0.4)(TBaseNode|0,-0.4)% - \ifPst@transistorinvert\pnode(0.65,0.4){#2}\else\pnode(0.65,0.4){#3}\fi% \ifPst@transistorinvert\pnode(0.65,-0.4){#3}\else\pnode(0.65,-0.4){#2}\fi% \ifPst@transistorinvert @@ -1294,30 +1296,35 @@ \psline[linewidth=3\psk@I@width,arrows=-](0.15,0.6)(0.15,-0.6) % gate \psline[arrows=-](0.65,-0.4)(0.15,-0.4)% lower line \psline[arrows=-,linewidth=1.5\psk@I@width](TBaseNode|0,0.4)(TBaseNode|0,-0.4)% - \ifPst@transistorinvert\pnode(0.65,0.4){#2}\else\pnode(0.65,0.4){#3}\fi% - \ifPst@transistorinvert\pnode(0.65,-0.4){#3}\else\pnode(0.65,-0.4){#2}\fi% - \ifPst@transistorinvert - \psline[arrowinset=0,arrowsize=8\pslinewidth]{<-}(0.15,0.4)(0.65,0.4)% - \else - \psline[arrowinset=0,arrowsize=8\pslinewidth]{<-}(0.15,-0.4)(0.65,-0.4)% - \fi - \else % PNP or NPN - \ifPst@transistorinvert\pnode(0.5,0.5){#2}\pnode(0.5,-0.5){#3}% - \else \pnode(0.5,0.5){#3}\pnode(0.5,-0.5){#2}% - \fi - \ifx\psk@Ttype\pst@Ttype@NPN\relax% % NPN - \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(TBaseNode)(#2)% - \psline[arrows=-,linewidth=4\pslinewidth](TBaseNode|0,0.4)(TBaseNode|0,-0.4)% - \psline[arrows=-](0.5,0.5)(TBaseNode)(0.5,-0.5)% - \else% % PNP - \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(#3)(TBaseNode)% - \psline[arrows=-,linewidth=4\pslinewidth](TBaseNode|0,0.4)(TBaseNode|0,-0.4)% - \psline[arrows=-](0.5,0.5)(TBaseNode)(0.5,-0.5)% - \fi - \fi% - \fi% - \fi% - \fi% + \ifPst@transistorinvert + \pnode(0.65,0.4){#2}\pnode(0.65,-0.4){#3} + \else + \pnode(0.65,0.4){#3}\pnode(0.65,-0.4){#2} + \fi% + \ifPst@transistorinvert + \psline[arrowinset=0,arrowsize=8\pslinewidth]{<-}(0.15,0.4)(0.65,0.4)% + \else + \psline[arrowinset=0,arrowsize=8\pslinewidth]{<-}(0.15,-0.4)(0.65,-0.4)% + \fi + \else % PNP or NPN + \ifPst@transistorinvert + \pnode(0.5,0.5){#2}\pnode(0.5,-0.5){#3}% + \else + \pnode(0.5,0.5){#3}\pnode(0.5,-0.5){#2}% + \fi + \ifx\psk@Ttype\pst@Ttype@NPN\relax% % NPN + \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(TBaseNode)(#2)% + \psline[arrows=-,linewidth=4\pslinewidth](TBaseNode|0,0.4)(TBaseNode|0,-0.4)% + \psline[arrows=-](0.5,0.5)(TBaseNode)(0.5,-0.5)% + \else% % PNP + \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(#3)(TBaseNode)% + \psline[arrows=-,linewidth=4\pslinewidth](TBaseNode|0,0.4)(TBaseNode|0,-0.4)% + \psline[arrows=-](0.5,0.5)(TBaseNode)(0.5,-0.5)% + \fi + \fi + \fi + \fi + \fi }% \ifPst@temp\else\endgroup\fi% \ignorespaces% @@ -1343,64 +1350,64 @@ \global\Pst@temptrue% \transistor@ii(@@base){@@emitter}{@@collector}% % - \if\psk@labeltransistoribase\@empty\else\psset{transistoribase=true}\fi% - \if\psk@labeltransistoriemitter\@empty\else\psset{transistoriemitter=true}\fi% - \if\psk@labeltransistoricollector\@empty\else\psset{transistoricollector=true}\fi% - \ifPst@intensity\psset{transistoribase=true,transistoriemitter=true,transistoricollector=true}\fi% + \if\psk@labeltransistoribase\@empty\else\psset{transistoribase=true}\fi + \if\psk@labeltransistoriemitter\@empty\else\psset{transistoriemitter=true}\fi + \if\psk@labeltransistoricollector\@empty\else\psset{transistoricollector=true}\fi + \ifPst@intensity\psset{transistoribase=true,transistoriemitter=true,transistoricollector=true}\fi % - \bgroup\psset{style=baseOpt}\pscirc@edge(#1)(TBaseNode)\egroup% + \bgroup\psset{style=baseOpt}\pscirc@edge(#1)(TBaseNode)\egroup \ifPst@transistoribase% base current? \ncput[npos=0.5,nrot=\Pst@TRot]{% \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,% arrowsize=6\pslinewidth,arrowinset=0]{->}(-.1,0)(.1,0)}% \naput[npos=0.5]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoribase}% - \fi% - \bgroup% + \fi + \bgroup \psset{style=collectorOpt}% \ifPst@transistorinvert \pscirc@edge(#3)(@@emitter) \else \pscirc@edge(#3)(@@collector) - \fi% - \egroup% + \fi + \egroup \ncput[npos=2]{\pnode{\ifPst@transistorinvert @@emitter\else @@collector\fi}}% \ifPst@transistoriemitter% emitter current? \ifPst@transistorinvert% emitter/collector changed? \ncput[npos=\pscirc@edge@sector,nrot=:U]{% \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,% - arrowsize=6\pslinewidth,arrowinset=0]{->}(-0.1,0)(0.1,0)} - \nbput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoriemitter} - \fi\fi% + arrowsize=6\pslinewidth,arrowinset=0]{->}(-0.1,0)(0.1,0)}% + \nbput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoriemitter}% + \fi\fi \ifPst@transistoricollector% collector current? \ifPst@transistorinvert\else% emitter/collector changed? \ncput[npos=\pscirc@edge@sector,nrot=:U]{% - \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,% + \psline[linecolor=\psk@I@color,linewidth=\psk@I@width, arrowsize=6\pslinewidth,arrowinset=0]{->}(-.1,0)(.1,0)} - \nbput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoricollector} - \fi\fi% + \nbput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoricollector}% + \fi\fi \bgroup - \psset{style=emitterOpt} + \psset{style=emitterOpt}% \ifPst@transistorinvert\pscirc@edge(#2)(@@collector)\else\pscirc@edge(#2)(@@emitter)\fi \egroup - \ncput[npos=2]{\pnode{\ifPst@transistorinvert @@collector\else @@emitter\fi}} + \ncput[npos=2]{\pnode{\ifPst@transistorinvert @@collector\else @@emitter\fi}}% \ifPst@transistoriemitter \ifPst@transistorinvert\else \ncput[npos=\pscirc@edge@sector,nrot=:U]{% \psline[linecolor=\psk@I@color,linewidth=\psk@I@width, arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)} - \naput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoriemitter} - \fi\fi% + \naput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoriemitter}% + \fi\fi \ifPst@transistoricollector% collector current? \ifPst@transistorinvert% emitter/collector changed? \ncput[npos=\pscirc@edge@sector,nrot=:U]{% \psline[linecolor=\psk@I@color,linewidth=\psk@I@width, arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)} - \naput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoricollector} + \naput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoricollector}% \fi\fi \psline[linestyle=none](#1)(#2)% for the end arrows \psline[linestyle=none](#1)(#3)% for the end arrows \endgroup - \ignorespaces% + \ignorespaces } % \def\Tswitch{\pst@object{Tswitch}} @@ -1999,19 +2006,19 @@ % \def\pst@draw@coil{% \ifx\psk@Dstyle\pst@Dstyle@curved - \pscurve[arrows=-](-0.7,0)(-0.6,0.3)(-0.35,0)(-0.4,-0.2) - (-0.5,0)(-0.4,0.3)(-0.15,0)(-0.2,-0.2)(-0.3,0) - (-0.2,0.3)(0.05,0)(0,-0.2)(-0.1,0) - (0,0.3)(0.25,0)(0.2,-0.2)(0.1,0) - (0.2,0.3)(0.45,0)(0.4,-0.2)(0.3,0) - (0.4,0.3)(0.65,0)(0.6,-0.2)(0.5,0) + \pscurve[arrows=-](-0.7,0)(-0.6,0.3)(-0.35,0)(-0.4,-0.2)% + (-0.5,0)(-0.4,0.3)(-0.15,0)(-0.2,-0.2)(-0.3,0)% + (-0.2,0.3)(0.05,0)(0,-0.2)(-0.1,0)% + (0,0.3)(0.25,0)(0.2,-0.2)(0.1,0)% + (0.2,0.3)(0.45,0)(0.4,-0.2)(0.3,0)% + (0.4,0.3)(0.65,0)(0.6,-0.2)(0.5,0)% \pnode(-0.7,0){dipole@1} \pnode(0.5,0){dipole@2} \else \ifx\psk@Dstyle\pst@Dstyle@elektor \psarcn[arrows=c-](-0.3885794,0){0.1295265}{-180}{0} - \psarcn(-0.1295265,0){0.1295265}{-180}{0} - \psarcn(0.1295265,0){0.1295265}{-180}{0} + \psarcn[arrows=-](-0.1295265,0){0.1295265}{-180}{0} + \psarcn[arrows=-](0.1295265,0){0.1295265}{-180}{0} \psarcn[arrows=-c](0.3885794,0){0.1295265}{-180}{0} \pnode(-0.5181058,0){dipole@1} \pnode(0.5181058,0){dipole@2} |