[pstricks] pst-circ2

Christophe Jorssen christophe.jorssen at free.fr
Thu Dec 7 22:08:24 CET 2006


pstricks-bounces at tug.org wrote:
> How can I use the nodes defined within a \DeclareNewMultipole with
> \PSTCMPNode from outside the component?  For instance, given:
> 	\documentclass{minimal} % Simple op-amp inverting buffer
> 	\usepackage{pstricks}
> 	\usepackage{pst-circ2}
> 	\begin{document}
> 	\pagestyle{empty}
> 	\begin{pspicture}(10,10)
> 		\psgrid[subgriddiv=1,griddots=10]
> 		\OpAmp(5,5)
> 		% more stuff goes here
> 	\end{pspicture}
> 	\end{document}
> how would I add and properly connect the resistors R_i and R_f?  In
> pst-circ version 1 I'd define 3 nodes P, N, and O and then type
> \OA[options...](P)(N)(O). 

OpAmp.Plus, OpAmp.Minus, OpAmp.Out nodes

An example (with pst-PSPNodes, pst-circ2 and pst-eucl)

  \begin{pspicture}(10,5)
    \psDefPSPNodes*
    \psset[pst-circ2]{%
      LabelRot=0,capacitor.ShowAutoLabel=false,resistor.LabelOffset=0pt}
    \bgroup
      \psset{linestyle=none}
      \pcline(PSPbl)(PSPtl)\ncput[npos=.6]{\pnode{vE}}
      \pcline(vE)(PSPbr|vE)\ncput[npos=.2]{\pstGeonode[PosAngle=-90]{A}}
        \ncput[npos=.4]{\pnode{vPlus}}\ncput[npos=.7]{\pnode{AO}}
    \egroup
    \capacitor[Label=$C$](vE)(A)
    \capacitor[Label=$C$](A)(vPlus)
    \resistor(A)(A|PSPtl)
    \resistor(vPlus)(vPlus|PSPbl)
    \OpAmp[Style=french+-](AO|PSPcl)
    \pcangle[angleB=180](vPlus)(OpAmp.Plus)
    \pcloop[angleA=180,angleB=0](OpAmp.Minus)(OpAmp.Out)
    \pcangle[angleA=0,angleB=0](A|PSPtl)(OpAmp.Out)
    \ground(vPlus|PSPbl)
    \wire(OpAmp.Out)(PSPbr|OpAmp.Out)
    \pcline[nodesep=.1]{->}(PSPbl)(vE)\nbput{$v_e$}
    \ground(PSPbl)
    \pcline[nodesep=.1]{->}(PSPbr)(PSPbr|OpAmp.Out)\naput{$v_s$}
    \ground(PSPbr)
  \end{pspicture}

Where \psDefPSPNodes* is definied in

http://christophe.jorssen.free.fr/pst-PSPNodes


For your specific needs, I'll have a look this WE.

--
Christophe




More information about the PSTricks mailing list