From 5a2a066ad2bb1f45481e00ba816bac18458e6856 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 29 Feb 2008 19:16:32 +0000 Subject: pst-circ 1.44 (28feb08) git-svn-id: svn://tug.org/texlive/trunk@6775 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/pst-circ/Changes | 1 + .../doc/generic/pst-circ/pst-circ-doc.bib | 7 +- .../doc/generic/pst-circ/pst-circ-doc.pdf | Bin 428660 -> 506212 bytes .../doc/generic/pst-circ/pst-circ-doc.tex | 817 +++++++++++++++++- Master/texmf-dist/dvips/pst-circ/pst-circ.pro | 2 + .../texmf-dist/tex/generic/pst-circ/pst-circ.tex | 922 ++++++++++++++++++++- Master/texmf-dist/tex/latex/pst-circ/pst-circ.sty | 1 + 7 files changed, 1683 insertions(+), 67 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/generic/pst-circ/Changes b/Master/texmf-dist/doc/generic/pst-circ/Changes index 92309c71048..ff340303f99 100644 --- a/Master/texmf-dist/doc/generic/pst-circ/Changes +++ b/Master/texmf-dist/doc/generic/pst-circ/Changes @@ -1,3 +1,4 @@ +1.44 2008-02-28 (hv) - added the microwave part (Francois Boone) 1.43 2007-12-18 (hv) - fixed bug with \@empty 1.42 2007-10-15 (hv) - added better FET support (Ted Pavlic) - small changes to draw@dipole (Alan Ristow) diff --git a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.bib b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.bib index 3b785845e22..716e220fb1e 100644 --- a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.bib +++ b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.bib @@ -101,12 +101,11 @@ @Book{companion, - author = {Michel Goosens and Frank Mittelbach and Alexander - Samarin}, + author = {Michel Goosens and Frank Mittelbach and Serbastian Rahtz and Denis Roegel and Herbert Vo\ss}, title = {The {\LaTeX} {G}raphics {C}ompanion}, publisher = {{Addison-Wesley Publishing Company}}, - year = {2004}, - edition = {2.}, + year = {2007}, + edition = {2nd}, address = {Reading, Mass.} } diff --git a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.pdf b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.pdf index c34ec7b22fa..990e456369b 100644 Binary files a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.pdf and b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.pdf differ diff --git a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.tex b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.tex index 63a82398914..d1877f73eb7 100644 --- a/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-circ/pst-circ-doc.tex @@ -1,14 +1,17 @@ +%% $Id: pst-circ-doc.tex 3 2007-12-23 16:23:22Z herbert $ \listfiles \documentclass{article} \usepackage[a4paper]{geometry} +\usepackage[T1]{fontenc} +\usepackage{mathpazo} \usepackage{fancyhdr} \usepackage{url} % -\usepackage{pst-all} +\usepackage[dvipsnames]{pstricks} \usepackage{pst-circ} \let\verPstCirc\fileversion \usepackage{multicol} -\usepackage{showexpl} +\usepackage{showexpl,lscape} % \makeatletter \def\@UrlFont{\small\ttfamily} @@ -32,8 +35,9 @@ \begin{document} \title{\texttt{pst-circ}\\ A PSTricks package for drawing electric circuits\\\normalsize ver. \verPstCirc} -\author{Christophe Jorssen\thanks{\url{}} and -Herbert Vo\ss\thanks{\url{}}} +\author{Christophe Jorssen\thanks{\url{}} \and +Herbert Vo\ss\thanks{\url{}} \and Fran\c{c}ois Boone% +\thanks{(microwave symbols) \url{francois.boone@usherbrooke.ca}}} \date{\today} \maketitle @@ -61,7 +65,7 @@ details of the exact placement are hidden as much as possible so the author can focus on the circuitry without the distraction of sorting out the underlying vector graphics. -\section{Usage} +\section{The basic system} \subsection{Parameters} @@ -128,9 +132,9 @@ objects you are drawing. \end{description} %\end{multicols} -\section{Macros} +\subsection{Macros} -\subsection{Dipole macros} +\subsubsection{Dipole macros} \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,2)\psgrid @@ -237,7 +241,7 @@ objects you are drawing. \end{LTXexample} \bigskip -\subsection{Tripole macros} +\subsubsection{Tripole macros} Obviously, tripoles are not node connections. So \CircPackage{} tries its best to adjust the position of the tripole regarding the three nodes. Internally, the connections are done by the @@ -304,7 +308,7 @@ ideas, please mail us.}, so don't try to use tripole macros in strange situation \end{LTXexample} \bigskip -\subsection{Quadrupole macros} +\subsubsection{Quadrupole macros} \begin{LTXexample}[width=5.5cm] \begin{pspicture}(5,5)\psgrid @@ -327,7 +331,7 @@ ideas, please mail us.}, so don't try to use tripole macros in strange situation \end{LTXexample} \clearpage -\subsection{Multidipole} +\subsubsection{Multidipole} \cs{multidipole} is a macro that allows multiple dipoles to be drawn between two specified nodes. @@ -361,7 +365,7 @@ restore original values. We recommand not using it. \bigskip -\subsection{Wire} +\subsubsection{Wire} \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,2)\psgrid @@ -372,7 +376,7 @@ restore original values. We recommand not using it. \end{LTXexample} \bigskip -\subsection{Potential} +\subsubsection{Potential} \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,2)\psgrid @@ -383,7 +387,7 @@ restore original values. We recommand not using it. \end{LTXexample} \bigskip -\subsection{ground} +\subsubsection{ground} \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,2)\psgrid @@ -397,9 +401,9 @@ restore original values. We recommand not using it. \end{LTXexample} \bigskip -\section{Parameters} +\subsection{Parameters} -\subsection{Label parameters} +\subsubsection{Label parameters} \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,1)\psgrid @@ -451,7 +455,7 @@ restore original values. We recommand not using it. \end{LTXexample} \bigskip -\subsection{Current intensity and electrical potential parameters} +\subsubsection{Current intensity and electrical potential parameters} If the \texttt{intensity} parameter is set to \texttt{true}, an arrow is drawn on the wire connecting one of the nodes to the dipole. If the \texttt{tension} parameter is set to \texttt{true}, @@ -567,7 +571,7 @@ Some specific intensity parameters are available for tripoles and quadrupoles. \end{LTXexample} -\subsection{Parallel parameters} +\subsubsection{Parallel parameters} If the \texttt{parallel} parameter is set to \texttt{true}, the dipole is drawn parallel to the line connecting the nodes. @@ -626,7 +630,7 @@ must not be set for the first dipole. -\subsection{Wire intersections} +\subsubsection{Wire intersections} \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,3)\psgrid @@ -656,7 +660,7 @@ Wire intersect parameters work also with \cs{multidipole}. \bigskip -\subsection{Dipole style parameters} +\subsubsection{Dipole style parameters} \begin{LTXexample}[width=3.5cm] \begin{pspicture}[showgrid=true](3,2) @@ -818,7 +822,7 @@ the coils are drawn as rectangles and the resistor as a zigzag. \end{LTXexample} -\subsection{Tripole style parameters} +\subsubsection{Tripole style parameters} \begin{LTXexample}[width=5.5cm] \begin{pspicture}(5,3) @@ -847,7 +851,7 @@ the coils are drawn as rectangles and the resistor as a zigzag. \end{pspicture} \end{LTXexample} -\subsection{Potentiometer tripole} +\subsubsection{Potentiometer tripole} \begin{pspicture}(3,3) \psgrid @@ -926,7 +930,7 @@ the coils are drawn as rectangles and the resistor as a zigzag. \potentiometer[dipolestyle=zigzag](A)(B)(C){P} \end{pspicture} -\subsection{Other Parameters} +\subsubsection{Other Parameters} \begin{LTXexample}[width=5.5cm] \begin{pspicture}(5,3) @@ -980,9 +984,9 @@ the coils are drawn as rectangles and the resistor as a zigzag. \end{LTXexample} \clearpage -\section{Special objects} +\subsection{Special objects} -\subsection{\texttt{\textbackslash dashpot}} +\subsubsection{\texttt{\textbackslash dashpot}} \begin{LTXexample}[pos=t] @@ -1017,7 +1021,7 @@ the coils are drawn as rectangles and the resistor as a zigzag. -\section{Examples} +\subsection{Examples} \begin{LTXexample}[width=8cm] \begin{pspicture}(-1.5,-1)(6,5) @@ -1242,7 +1246,7 @@ the coils are drawn as rectangles and the resistor as a zigzag. % \makeatother -The fellowing example was written by Manuel Luque. +The following example was written by Manuel Luque. \begin{LTXexample}[pos=t] \begin{pspicture}(0,-0.5)(14,4) @@ -1271,7 +1275,7 @@ The fellowing example was written by Manuel Luque. \end{LTXexample} \clearpage -The fellowing example was written by Lionel Cordesses. +The following example was written by Lionel Cordesses. @@ -1297,7 +1301,7 @@ The fellowing example was written by Lionel Cordesses. \end{LTXexample} \clearpage -The fellowing example was written by Christian Hoffmann. +The following example was written by Christian Hoffmann. \begin{LTXexample}[pos=t] @@ -1327,6 +1331,759 @@ The fellowing example was written by Christian Hoffmann. + +\clearpage +\section{Microwave symbols} +Since for microwave signal, the direction in which the signal spreads is very important, +There are dipoleinput or tripoleinput or quadripoleinput and arrowinput parameters. +The value of theses parameters are left or right for the first one and true or false for second one. +% +\begin{verbatim} +%%%%% +\ifPst@inputarrow + \ifx\psk@Dinput\pst@Dinput@right + \pcline[arrows=-C](#2)(dipole@1) + \pcline[arrows=->,arrowinset=0](#3)(dipole@2) + \else + \pcline[arrows=->,arrowinset=0](#2)(dipole@1) + \pcline[arrows=C-](dipole@2)(#3) + \fi +\else + \pcline[arrows=-C](#2)(dipole@1) + \pcline[arrows=C-](dipole@2)(#3) +\fi +\pcline[fillstyle=none,linestyle=none](#2)(#3) +%%%%% +\end{verbatim} +The last line is to correct somme problems when I use colors (see example2) + +To add color in components (Monopole, tripole and Quadripole) I add a new +argument since I don't know how to do this by another way. However, +I think it is not the optimal solution. For dipole, to put commands for +color in the first optionnal argument is ok. + +Finally, something doesn't work with multidipole: this following example works: +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(4,2)\psgrid + \pnode(0.5,1){A} + \pnode(3.5,1){B} + \multidipole(A)(B)\filter{BPF}% + \resistor{$R$}. +\end{pspicture} +\end{LTXexample} +However, this following one doesn't work: +\begin{verbatim} +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(4,2)\psgrid + \pnode(0.5,1){A} + \pnode(3.5,1){B} + \multidipole(A)(B)\amplifier{LNA}% + \resistor{$R$}. +\end{pspicture} +\end{LTXexample} +\end{verbatim} + + +\subsection{New monopole components} +\subsubsection{New ground} +\begin{description} + \item[groundstyle:] ads | old | triangle +\end{description} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(0.5,1){A} + \pnode(1,1){B} + \pnode(2.5,1){C} + \newground(A) + \newground[groundstyle=old]{135}(B) + \newground[linecolor=blue,groundstyle=triangle]{180}(C) +\end{pspicture} +\end{LTXexample} + + +\subsubsection{Antenna} +\begin{description} + \item[antennastyle:] two | three | triangle +\end{description} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(1,0.5){A} + \antenna[antennastyle=three](A) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(1,0.5){A} + \antenna(A) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(1,0.5){A} + \antenna[antennastyle=triangle](A) +\end{pspicture} +\end{LTXexample} + + +\subsection{New monopole macro-components} +\subsubsection{Oscillator} +\begin{description} + \item[output:] top | right | bottom | left + \item[inputarrow:] false | true + \item[LOstyle:] -- | crystal +\end{description} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(1,1){A} + \oscillator[output=left,inputarrow=false](A)% + {$f_{LO}$}{} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(1,1){A} + \oscillator[output=top,inputarrow=true,LOstyle=crystal](A)% + {f$_{\textrm{LO}}$}{} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(1,1){A} + \oscillator[output=right,inputarrow=false](A)% + {$f_{LO}$}{fillstyle=solid,fillcolor=blue} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(1,1){A} + \oscillator[output=bottom,inputarrow=false](A)% + {$f_{LO}$}{} +\end{pspicture} +\end{LTXexample} + +\subsection{New dipole macro-components} +\subsubsection{Filters} +\begin{description} + \item[dipolestyle:] bandpass | lowpass | highpass + \item[inputarrow:] false | true + \item[dipoleinput:] left | right +\end{description} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(0,1){A} + \pnode(3,1){B} + \filter(A)(B){BPF} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(0,1){A} + \pnode(3,1){B} + \filter[dipolestyle=lowpass,fillstyle=solid,% + fillcolor=red](A)(B){LPF} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(0,1){A} + \pnode(3,1){B} + \filter[dipolestyle=highpass,dipoleinput=right,% + inputarrow=true](A)(B){HPF} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(0,1){A} + \pnode(3,1){B} + \filter[dipolestyle=highpass,inputarrow=true](A)(B){BPF} +\end{pspicture} +\end{LTXexample} + +\subsubsection{Isolator} +\begin{description} + \item[inputarrow:] false | true + \item[dipoleinput:] left | right +\end{description} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(0,1){A} + \pnode(3,1){B} + \isolator[inputarrow=true](A)(B){} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(0,1){A} + \pnode(3,1){B} + \isolator[dipoleinput=right,inputarrow=true,fillstyle=solid,% + fillcolor=yellow](A)(B){Isolator} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(0,1){A} + \pnode(3,1){B} + \isolator[dipoleinput=left](A)(B){} +\end{pspicture} +\end{LTXexample} + +\subsubsection{Frequency multiplier/divider} +\begin{description} + \item[dipolestyle:] multiplier | divider + \item[value:] N | $n\in N$ + \item[programmable:] false | true + \item[inputarrow:] false | true + \item[dipoleinput:] left | right +\end{description} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(0,1){A} + \pnode(3,1){B} + \freqmult[dipolestyle=divider,inputarrow=true](A)(B){} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,2)\psgrid + \pnode(0,1){A} + \pnode(3,1){B} + \freqmult[dipolestyle=multiplier,value=10](A)(B){} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=3.5cm,rframe={}] +\begin{pspicture}(3,3)\psgrid + \pnode(0,1.5){A} + \pnode(3,1.5){B} + \freqmult[dipolestyle=multiplier,programmable=true,% + labeloffset=-1,% + dipoleinput=right,% + inputarrow=true, + fillstyle=solid, + fillcolor=green](A)(B){10}(-0.1,0)(0.1,0)} + arrowsize=6\pslinewidth,arrowinset=0]{->}(-0.1,0)(0.1,0)} \nbput[npos=1.5]{\csname\psk@I@labelcolor\endcsname\psk@labelT@iE} \fi\fi% \ifPst@T@iC% collector current? \ifPst@T@invert\else% emitter/collector changed? \ncput[npos=1.5,nrot=:U]{% \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,% - arrowsize=6\pslinewidth,arrowinset=0]{->}(-.1,0)(.1,0)} + arrowsize=6\pslinewidth,arrowinset=0]{->}(-.1,0)(.1,0)} \nbput[npos=1.5]{\csname\psk@I@labelcolor\endcsname\psk@labelT@iC} \fi\fi% \bgroup @@ -495,14 +495,14 @@ \ifPst@T@invert\else \ncput[npos=1.5,nrot=:U]{% \psline[linecolor=\psk@I@color,linewidth=\psk@I@width, - arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)} + arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)} \naput[npos=1.5]{\csname\psk@I@labelcolor\endcsname\psk@labelT@iE} \fi\fi% \ifPst@T@iC% collector current? \ifPst@T@invert% emitter/collector changed? \ncput[npos=1.5,nrot=:U]{% \psline[linecolor=\psk@I@color,linewidth=\psk@I@width, - arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)} + arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)} \naput[npos=1.5]{\csname\psk@I@labelcolor\endcsname\psk@labelT@iC} \fi\fi \psline[linestyle=none](#1)(#2)% for the end arrows @@ -766,8 +766,16 @@ \ifx\dashpot #4%%% pd change \let\next\pst@multidipole@dashpot \else%%% pd change - \let\next\ignorespaces - \fi%%% pd change + \ifx\filter #4% + \let\next\pst@multidipole@filter + \else + \ifx\isolator #4% + \let\next\pst@multidipole@filter + \else + \let\next\ignorespaces + \fi + \fi + \fi%%% pd change \fi \fi \fi @@ -829,8 +837,16 @@ \ifx\dashpot #1%%% pd change \let\next\pst@multidipole@dashpot \else%%% pd change - \let\next\ignorespaces - \pst@multidipole@output + \ifx\filter #1% + \let\next\pst@multidipole@filter + \else + \ifx\isolator #1% + \let\next\pst@multidipole@isolator + \else + \let\next\ignorespaces + \pst@multidipole@output + \fi + \fi \fi%%% pd change \fi \fi @@ -1154,9 +1170,9 @@ \ncput[npos=\psk@parallel@sep]{\pnode{dipole@@1}} \pcline[arrows=-,linestyle=none,fillstyle=none](#3)(dipole@M) \ncput[npos=\psk@parallel@sep]{\pnode{dipole@@2}} - \pcline[arrows=-,linestyle=none, - fillstyle=none, - offset=\psk@parallel@arm](dipole@@1)(dipole@@2) + \pcline[arrows=-,linestyle=none, + fillstyle=none, + offset=\psk@parallel@arm](dipole@@1)(dipole@@2) \ncput[npos=0]{\pnode{dipole@@@1}} \ncput[npos=1]{\pnode{dipole@@@2}} \ncput[nrot=:U]{#5} @@ -1167,24 +1183,36 @@ \ifPst@parallel@node \pscircle*(dipole@@1){2\pslinewidth} \pscircle*(dipole@@2){2\pslinewidth} - \fi - \pcline[arrows=-,linestyle=none, - fillstyle=none, - offset=\psk@label@offset](dipole@@@1)(dipole@@@2) + \fi + \pcline[arrows=-,linestyle=none, + fillstyle=none, + offset=\psk@label@offset](dipole@@@1)(dipole@@@2) \ncput[nrot=\psk@label@angle]{#4} \pst@intensity{dipole@@@1}{dipole@@@2} \pst@tension{dipole@@@1}{dipole@@@2} \else \ncput[nrot=:U]{#5} - \pcline[arrows=-,linestyle=none, - fillstyle=none,offset=\psk@label@offset](#2)(#3) + \pcline[arrows=-,linestyle=none, + fillstyle=none,offset=\psk@label@offset](#2)(#3) \ncput[nrot=\psk@label@angle]{#4} %%% % CHANGES HERE!!! %%% - \pcline[arrows=-C](#2)(dipole@1) - \pcline[arrows=C-](dipole@2)(#3) - \pcline[linestyle=none](#2)(#3) +%%%%% + \ifPst@inputarrow + \ifx\psk@Dinput\pst@Dinput@right + \pcline[fillstyle=none,arrows=-C](#2)(dipole@1) + \pcline[fillstyle=none,arrows=->,arrowinset=0](#3)(dipole@2) + \else + \pcline[fillstyle=none,arrows=->,arrowinset=0](#2)(dipole@1) + \pcline[fillstyle=none,arrows=C-](dipole@2)(#3) + \fi + \else + \pcline[fillstyle=none,arrows=-C](#2)(dipole@1) + \pcline[fillstyle=none,arrows=C-](dipole@2)(#3) + \fi + \pcline[fillstyle=none,linestyle=none](#2)(#3) +%%%%% \pst@intensity{#2}{#3} \pst@tension{#2}{#3} \fi% @@ -1871,8 +1899,832 @@ \ncput[nrot=\psk@label@angle]{\csname\psk@tension@labelcolor\endcsname #4} }\ignorespaces} % -\def\node(#1){% -\pscircle*(#1){2\pslinewidth}} +\def\node(#1){\pscircle*(#1){2\pslinewidth}} +% +% +% +\newif\ifPst@inputarrow +\define@key[psset]{pst-circ}{inputarrow}[false]{\@nameuse{Pst@inputarrow#1}} +\newif\ifPst@programmable +\define@key[psset]{pst-circ}{programmable}[false]{\@nameuse{Pst@programmable#1}} +% +\def\pst@Gstyle@old{old} +\def\pst@Gstyle@ads{ads} +\def\pst@Gstyle@triangle{triangle} +\def\pst@Astyle@two{two} +\def\pst@Astyle@three{three} +\def\pst@Astyle@triangle{triangle} +\def\pst@LOoutput@left{left} +\def\pst@LOoutput@top{top} +\def\pst@LOoutput@right{right} +\def\pst@LOoutput@bottom{bottom} +\def\pst@LOstyle@crystal{crystal} +\def\pst@Dstyle@lowpass{lowpass} +\def\pst@Dstyle@highpass{highpass} +\def\pst@Dinput@right{right} +\def\pst@Dinput@left{left} +\def\pst@Dstyle@multiplier{multiplier} +\def\pst@Dstyle@divider{divider} +\def\pst@FMvalue@value{0} +\def\pst@tripole@style@bottom{bottom} +\def\pst@tripole@style@top{top} +\def\pst@Tinput@left{left} +\def\pst@Tinput@right{right} +\def\pst@tripole@style@circulator{circulator} +\def\pst@tripole@style@isolator{isolator} +\def\pst@Tconfig@left{left} +\def\pst@Tconfig@right{right} +\def\pst@Qstyle@directional{directional} +\def\pst@Qstyle@hybrid{hybrid} +\def\pst@Qinput@left{left} +\def\pst@Qinput@right{right} +\define@key[psset]{pst-circ}{groundstyle}{\def\psk@Gstyle{#1}} +\define@key[psset]{pst-circ}{antennastyle}{\def\psk@Astyle{#1}} +\define@key[psset]{pst-circ}{output}{\def\psk@LOoutput{#1}} +\define@key[psset]{pst-circ}{LOstyle}{\def\psk@LOstyle{#1}} +\define@key[psset]{pst-circ}{dipoleinput}{\def\psk@Dinput{#1}} +\define@key[psset]{pst-circ}{value}{\def\psk@FMvalue{#1}} +\define@key[psset]{pst-circ}{tripoleinput}{\def\psk@Tinput{#1}} +\define@key[psset]{pst-circ}{tripoleconfig}{\def\psk@Tconfig{#1}} +\define@key[psset]{pst-circ}{couplerstyle}{\def\psk@Qstyle{#1}} +\define@key[psset]{pst-circ}{quadripoleinput}{\def\psk@Qinput{#1}} +\psset{groundstyle=ads,% + antennastyle=two,% + output=top,% + dipoleinput=left,% + dipolestyle=multiplier,% + value=0,% + dipoleinput=left,% + inputarrow=false,% + tripoleinput=left,% + tripolestyle=bottom,% + tripoleconfig=left,% + quadripoleinput=left,% + couplerstyle=hybrid} +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% monopole +%%% newground: groundstyle: (ads), old, triangle +%%% Antenna: antennastyle: (two), three, triangle +%%% Oscillator: oscioutput: (top), right, bottom, left, +%%% inputarrow: (false), true +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% newground %%% +\def\newground{\@ifnextchar[{\pst@newground}{\pst@newground[]}} +\def\pst@newground[#1]{% + \@ifnextchar({\pst@newgroundi[#1]{0}}{\pst@newgroundi[#1]}% +} +\def\pst@newgroundi[#1]#2(#3){% + \psset{#1}% + \rput{#2}(#3){% + \ifx\psk@Gstyle\pst@Gstyle@ads + \psline[linewidth=1.5\pslinewidth]{c-c}(-0.3,-0.5)(0.3,-0.5) + \psline[linewidth=1.5\pslinewidth]{c-c}(-0.2,-0.6)(0.2,-0.6) + \psline[linewidth=1.5\pslinewidth]{c-c}(-0.1,-0.7)(0.1,-0.7) + \fi + \ifx\psk@Gstyle\pst@Gstyle@old + \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,-0.5) + \fi + \ifx\psk@Gstyle\pst@Gstyle@triangle + \pstriangle[linewidth=1.5\pslinewidth](0,-0.5)(0.4,-0.4) + \fi + \psline(0,0)(0,-0.5) + \pscircle*(#3){2\pslinewidth}% + } + \ignorespaces% +} +% +%%% antenna %%% +% +\def\antenna{\@ifnextchar[{\pst@antenna}{\pst@antenna[]}} +\def\pst@antenna[#1]{% + \@ifnextchar({\pst@antennai[#1]{0}}{\pst@antennai[#1]}% +} +\def\pst@antennai[#1]#2(#3){% + \psset{#1}% + \rput{#2}(#3){% + \ifx\psk@Astyle\pst@Astyle@two + \psline[linewidth=1.5\pslinewidth](0,.75)(-0.2,1.25) + \psline[linewidth=1.5\pslinewidth](0,.75)(0.2,1.25) + \fi + \ifx\psk@Astyle\pst@Astyle@three + \psline[linewidth=1.5\pslinewidth](0,.75)(-0.2,1.25) + \psline[linewidth=1.5\pslinewidth](0,.75)(0,1.25) + \psline[linewidth=1.5\pslinewidth](0,.75)(0.2,1.25) + \fi + \ifx\psk@Astyle\pst@Astyle@triangle + \pstriangle[linewidth=1.5\pslinewidth](0,1.25)(0.4,-0.5) + \fi + \psline(0,0)(0,.75) + } + \ignorespaces% +} +% +%%% oscillator %%% +% +\def\oscillator{\@ifnextchar[{\pst@oscillator}{\pst@oscillator[]}} +\def\pst@oscillator[#1]{% + \@ifnextchar({\pst@oscillatori[#1]{0}}{\pst@oscillatori[#1]}% +} +\def\pst@oscillatori[#1]#2(#3)#4#5{% + \psset{#1}% + \rput{#2}(#3){% + \pscircle[#5,linewidth=1.5\pslinewidth](0,0){0.5} + \ifx\psk@LOstyle\pst@LOstyle@crystal + \psline(-0.2,-0.35)(-0.2,0.35) + \psframe(-0.15,-0.3)(0.15,0.3) + \psline(0.2,-0.35)(0.2,0.35) + \else + \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.3,0.000)(-0.225,0.088375)(-0.15,0.1250)(-0.075,0.088375)% + (0,0.000)(0.075,-0.088375)(0.15,-0.125)(0.225,-0.088375)(0.3,0.000) + \fi + \ifx\psk@LOoutput\pst@LOoutput@left + \pst@getcoor{#3}\pst@tempa + \pnode(!% + \pst@tempa /Y1 exch \pst@number\psyunit div def + /X1 exch \pst@number\psxunit div def + /XC X1 def + /YC Y1 -0.6 add def + XC YC){C@} + \rput[t]{#2}(C@){#4} + \ifPst@inputarrow + \psline[arrows=->,arrowinset=0](-0.5,0)(-1,0) + \else + \psline(-0.5,0)(-1,0) + \fi + \fi + \ifx\psk@LOoutput\pst@LOoutput@top + \pst@getcoor{#3}\pst@tempa + \pnode(!% + \pst@tempa /Y1 exch \pst@number\psyunit div def + /X1 exch \pst@number\psxunit div def + /XC X1 def + /YC Y1 -0.6 add def + XC YC){C@} + \rput[t]{#2}(C@){#4} + \ifPst@inputarrow + \psline[arrows=->,arrowinset=0](0,0.5)(0,1) + \else + \psline(0,0.5)(0,1) + \fi + \fi + \ifx\psk@LOoutput\pst@LOoutput@right + \pst@getcoor{#3}\pst@tempa + \pnode(!% + \pst@tempa /Y1 exch \pst@number\psyunit div def + /X1 exch \pst@number\psxunit div def + /XC X1 def + /YC Y1 -0.6 add def + XC YC){C@} + \rput[t]{#2}(C@){#4} + \ifPst@inputarrow + \psline[arrows=->,arrowinset=0](0.5,0)(1,0) + \else + \psline(0.5,0)(1,0) + \fi + \fi + \ifx\psk@LOoutput\pst@LOoutput@bottom + \pst@getcoor{#3}\pst@tempa + \pnode(!% + \pst@tempa /Y1 exch \pst@number\psyunit div def + /X1 exch \pst@number\psxunit div def + /XC X1 def + /YC Y1 0.6 add def + XC YC){C@} + \rput[b]{#2}(C@){#4} + \ifPst@inputarrow + \psline[arrows=->,arrowinset=0](0,-0.5)(0,-1) + \else + \psline(0,-0.5)(0,-1) + \fi + \fi + } + \ignorespaces% +} +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Dipole +%%% filtre: dipolestyle: (bandpass), lowpass, highpass +%%% inputarrow: (false), true +%%% dipoleinput: (left), right +%%% isolator: dipoleinput: (left), right +%%% inputarrow: (false), true +%%% freqmult: dipolestyle: (multiplier), divider, +%%% value: (N), integer +%%% programmable: (false) true +%%% inputarrow: (false), true +%%% dipoleinput: (left), right +%%% phaseshifter: +%%% inputarrow: (false), true +%%% dipoleinput: (left), right +%%% vco: +%%% inputarrow: (false), true +%%% dipoleinput: (left), right +%%% amplifier: +%%% inputarrow: (false), true +%%% dipoleinput: (left), right +%%% detector: +%%% inputarrow: (false), true +%%% dipoleinput: (left), right +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% FILTER %%% +% +\def\filter{\@ifnextchar[{\pst@filter}{\pst@filter[]}} +% +\def\pst@filter[#1](#2)(#3)#4{{% + \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@filter% + }\ignorespaces} +% +\def\pst@multidipole@filter{\@ifnextchar[{\pst@multidipole@filter@}% +{\pst@multidipole@filter@[]}} +% +\def\pst@multidipole@filter@[#1]#2{% + \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% + {\psset{#1}% + \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% + \pst@count@ii=\pst@count@i% + \advance\pst@count@ii\@ne% + \toks0\expandafter{\pst@multidipole@output}% + \edef\pst@multidipole@output{% + \the\toks0% + \pst@multidipole@def@coor% + \noexpand\filter[#1]% + (! X@\the\pst@count@i\space Y@\the\pst@count@i)% + (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% + {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% + }% + \pst@multidipole@ +} +% +\def\pst@draw@filter{% + \pnode(-0.5,0){dipole@1} + \pnode(0.5,0){dipole@2} + \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) + \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,0.250)(-0.2,0.3750)(0,0.250)(0.2,0.1250)(0.4,0.250) + \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,0.000)(-0.2,0.1250)(0,0.000)(0.2,-0.125)(0.4,0.000) + \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,-0.25)(-0.2,-0.125)(0,-0.25)(0.2,-0.375)(0.4,-0.25) +% \psline{c-c}(-0.1,0.2)(0.1,0.3) + \ifx\psk@Dstyle\pst@Dstyle@lowpass + \psline[fillstyle=none]{c-c}(-0.1,0.2)(0.1,0.3) + \psline[fillstyle=none]{c-c}(-0.1,-0.05)(0.1,0.05) + \else + \ifx\psk@Dstyle\pst@Dstyle@highpass + \psline[fillstyle=none]{c-c}(-0.1,-0.3)(0.1,-0.2) + \psline[fillstyle=none]{c-c}(-0.1,-0.05)(0.1,0.05) + \else + \psline[fillstyle=none]{c-c}(-0.1,0.2)(0.1,0.3) + \psline[fillstyle=none]{c-c}(-0.1,-0.3)(0.1,-0.2) + \fi + \fi +} + +%%% ISOLATOR %%% +% +\def\isolator{\@ifnextchar[{\pst@isolator}{\pst@isolator[]}} +% +\def\pst@isolator[#1](#2)(#3)#4{{% + \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@isolator% + }\ignorespaces} +% +\def\pst@multidipole@isolator{\@ifnextchar[{\pst@multidipole@isolator@}% +{\pst@multidipole@isolator@[]}} +% +\def\pst@multidipole@isolator@[#1]#2{% + \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% + {\psset{#1}% + \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% + \pst@count@ii=\pst@count@i% + \advance\pst@count@ii\@ne% + \toks0\expandafter{\pst@multidipole@output}% + \edef\pst@multidipole@output{% + \the\toks0% + \pst@multidipole@def@coor% + \noexpand\isolator[#1]% + (! X@\the\pst@count@i\space Y@\the\pst@count@i)% + (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% + {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% + }% + \pst@multidipole@ +} +% +\def\pst@draw@isolator{% + \pnode(-0.5,0){dipole@1} + \pnode(0.5,0){dipole@2} + \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) + \ifx\psk@Dinput\pst@Dinput@right + \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{<-}(-0.4,0)(0.4,0) + \else + \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{->}(-0.4,0)(0.4,0) + \fi +} +% +%%% Frequency Multiplier or Divider %%% +\def\freqmult{\@ifnextchar[{\pst@freqmult}{\pst@freqmult[]}} +% +\def\pst@freqmult[#1](#2)(#3)#4{{% + \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@freqmult% + }\ignorespaces} +% +\def\pst@multidipole@freqmult{\@ifnextchar[{\pst@multidipole@freqmult@}% +{\pst@multidipole@freqmult@[]}} +% +\def\pst@multidipole@freqmult@[#1]#2{% + \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% + {\psset{#1}% + \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% + \pst@count@ii=\pst@count@i% + \advance\pst@count@ii\@ne% + \toks0\expandafter{\pst@multidipole@output}% + \edef\pst@multidipole@output{% + \the\toks0% + \pst@multidipole@def@coor% + \noexpand\freqmult[#1]% + (! X@\the\pst@count@i\space Y@\the\pst@count@i)% + (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% + {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% + }% + \pst@multidipole@ +} +% +\def\pst@draw@freqmult{% + \pnode(-0.5,0){dipole@1} + \pnode(0.5,0){dipole@2} + \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) + \ifPst@programmable% + \psline[fillstyle=none](-0.4,-0.75)(-0.4,-0.5) + \psline[fillstyle=none](-0.2,-0.75)(-0.2,-0.5) + \psline(0,-0.75)(0,-0.5) + \psline[fillstyle=none](0.2,-0.75)(0.2,-0.5) + \psline[fillstyle=none](0.4,-0.75)(0.4,-0.5) + \ifx\psk@Dstyle\pst@Dstyle@divider + \rput(0,0){$\div\textrm{N}$} + \else + \rput(0,0){$\times\textrm{N}$} + \fi + \else + \ifx\psk@FMvalue\pst@FMvalue@value + \ifx\psk@Dstyle\pst@Dstyle@divider + \rput(0,0){$\div\textrm{N}$} + \else + \rput(0,0){$\times\textrm{N}$} + \fi + \else + \ifx\psk@Dstyle\pst@Dstyle@divider + \rput(0,0){$\div\textrm{\psk@FMvalue}$} + \else + \rput(0,0){$\times\textrm{\psk@FMvalue}$} + \fi + \fi + \fi% +} +% +%%% phaseshifter +\def\phaseshifter{\@ifnextchar[{\pst@phaseshifter}{\pst@phaseshifter[]}} +% +\def\pst@phaseshifter[#1](#2)(#3)#4{{% + \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@phaseshifter% + }\ignorespaces} +% +\def\pst@multidipole@phaseshifter{\@ifnextchar[{\pst@multidipole@phaseshifter@}% +{\pst@multidipole@phaseshifter@[]}} +% +\def\pst@multidipole@phaseshifter@[#1]#2{% + \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% + {\psset{#1}% + \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% + \pst@count@ii=\pst@count@i% + \advance\pst@count@ii\@ne% + \toks0\expandafter{\pst@multidipole@output}% + \edef\pst@multidipole@output{% + \the\toks0% + \pst@multidipole@def@coor% + \noexpand\phaseshifter[#1]% + (! X@\the\pst@count@i\space Y@\the\pst@count@i)% + (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% + {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% + }% + \pst@multidipole@ +} +% +\def\pst@draw@phaseshifter{% + \pnode(-0.4,0){dipole@1} + \pnode(0.4,0){dipole@2} + \pscircle[linewidth=1.5\pslinewidth](0,0){0.4} + \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{->}(-0.5,-0.5)(0.5,0.5) +} +% +%%% VCO +\def\vco{\@ifnextchar[{\pst@vco}{\pst@vco[]}} +% +\def\pst@vco[#1](#2)(#3)#4{{% + \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@vco% + }\ignorespaces} +% +\def\pst@multidipole@vco{\@ifnextchar[{\pst@multidipole@vco@}% +{\pst@multidipole@vco@[]}} +% +\def\pst@multidipole@vco@[#1]#2{% + \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% + {\psset{#1}% + \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% + \pst@count@ii=\pst@count@i% + \advance\pst@count@ii\@ne% + \toks0\expandafter{\pst@multidipole@output}% + \edef\pst@multidipole@output{% + \the\toks0% + \pst@multidipole@def@coor% + \noexpand\vco[#1]% + (! X@\the\pst@count@i\space Y@\the\pst@count@i)% + (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% + {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% + }% + \pst@multidipole@ +} +% +\def\pst@draw@vco{% + \pnode(-0.5,0){dipole@1} + \pnode(0.5,0){dipole@2} + \pscircle[linewidth=1.5\pslinewidth](0,0){0.5} + \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.3,0.000)(-0.225,0.088375)(-0.15,0.1250)(-0.075,0.088375)% + (0,0.000)(0.075,-0.088375)(0.15,-0.125)(0.225,-0.088375)(0.3,0.000) +} +% +%%% amplifier %%% +% +\def\amplifier{\@ifnextchar[{\pst@amplifier}{\pst@amplifier[]}} +% +\def\pst@amplifier[#1](#2)(#3)#4{{% + \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@amplifier% + }\ignorespaces} +% +\def\pst@multidipole@amplifier{\@ifnextchar[{\pst@multidipole@amplifier@}% +{\pst@multidipole@amplifier@[]}} +% +\def\pst@multidipole@amplifier@[#1]#2{% + \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% + {\psset{#1}% + \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% + \pst@count@ii=\pst@count@i% + \advance\pst@count@ii\@ne% + \toks0\expandafter{\pst@multidipole@output}% + \edef\pst@multidipole@output{% + \the\toks0% + \pst@multidipole@def@coor% + \noexpand\amplifier[#1]% + (! X@\the\pst@count@i\space Y@\the\pst@count@i)% + (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% + {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% + }% + \pst@multidipole@ +} +% +\def\pst@draw@amplifier{% + \pnode(-0.433,0){dipole@1} + \pnode(0.433,0){dipole@2} + \ifx\psk@Dinput\pst@Dinput@right + \pstriangle[gangle=90,linewidth=1.5\pslinewidth](0.433,0)(1,0.866) + \else + \pstriangle[gangle=-90,linewidth=1.5\pslinewidth](-0.433,0)(1,0.866) + \fi +} +% +%%% detector %%% +% +\def\detector{\@ifnextchar[{\pst@detector}{\pst@detector[]}} +% +\def\pst@detector[#1](#2)(#3)#4{{% + \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@detector% + }\ignorespaces} +% +\def\pst@multidipole@detector{\@ifnextchar[{\pst@multidipole@detector@}% +{\pst@multidipole@detector@[]}} +% +\def\pst@multidipole@detector@[#1]#2{% + \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{#2}% + {\psset{#1}% + \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}% + \pst@count@ii=\pst@count@i% + \advance\pst@count@ii\@ne% + \toks0\expandafter{\pst@multidipole@output}% + \edef\pst@multidipole@output{% + \the\toks0% + \pst@multidipole@def@coor% + \noexpand\detector[#1]% + (! X@\the\pst@count@i\space Y@\the\pst@count@i)% + (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)% + {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}% + }% + \pst@multidipole@ +} +% +\def\pst@draw@detector{% + \pnode(-0.5,0){dipole@1} + \psline[fillstyle=none](-0.5,0)(-0.2165,0) + \pnode(0.5,0){dipole@2} + \psline[fillstyle=none](0.5,0)(0.2165,0) + \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) + \ifx\psk@Dinput\pst@Dinput@right + \pstriangle[gangle=90,linewidth=1.5\pslinewidth,fillstyle=none](0.2165,0)(0.5,0.433) + \psline[fillstyle=none,linewidth=1.5\pslinewidth](-0.2165,-0.25)(-0.2165,0.25) + \else + \pstriangle[gangle=-90,linewidth=1.5\pslinewidth,fillstyle=none](-0.2165,0)(0.5,0.433) + \psline[fillstyle=none,linewidth=1.5\pslinewidth](0.2165,-0.25)(0.2165,0.25) + \fi +} +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Tripole +%%% mixer: tripolestyle:(bottom), top +%%% inputarrow: (false) | true +%%% tripoleinput: (left) | right +%%% Circulator: tripolestyle=(circulator), isolator +%%% tripoleconfig: (left) | right +%%% inputarrow: (false) | true +%%% tripoleinput: (left) | right +%%% AGC: tripoleinput=(left)|right +%%% inputarrow: (false) | true +%%% tripoleinput: (left) | right +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +\def\mixer{\pst@object{mixer}} +\def\mixer@i(#1)(#2)(#3)#4#5{% + \addbefore@par{dimen=middle}% + \begin@ClosedObj + \pst@getcoor{#1}\pst@tempa + \pst@getcoor{#2}\pst@tempb + \pst@getcoor{#3}\pst@tempc + \pnode(!% + \pst@tempa /Y1 exch \pst@number\psyunit div def + /X1 exch \pst@number\psxunit div def + \pst@tempb /Y2 exch \pst@number\psyunit div def + /X2 exch \pst@number\psxunit div def + \pst@tempc /Y3 exch \pst@number\psyunit div def + /X3 exch \pst@number\psxunit div def + /XC X1 X2 add 2 div def + /YC Y2 def + XC YC){C@} + \rput(C@){\pst@draw@mixer{#3}{#4}{#5}} + \ifx\psk@Tinput\pst@Tinput@left% + \ifPst@inputarrow + \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left} + \else + \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} + \fi + \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tport@right} + \else + \ifPst@inputarrow + \ncangle[arrows=<-,arrowinset=0,arm=0.5,angleB=180]{Tport@right}{#2} + \else + \ncangle[arrows=-,arm=0.5,angleB=180]{Tport@right}{#2} + \fi + \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} + \fi + \pcline[linestyle=none](#1)(#2)% for the endarrows + \pcline[linestyle=none](#2)(#3)% for the endarrows + \end@ClosedObj + \ignorespaces% +} +\newcommand{\pst@draw@mixer}[3]{% + \pscircle[#3,linewidth=1.5\pslinewidth](0,0){0.5} + \psline[linewidth=1.5\pslinewidth](-0.3535,-0.3535)(0.3535,0.3535) + \psline[linewidth=1.5\pslinewidth](-0.3535,0.3535)(0.3535,-0.3535) + \pnode(-0.5,0){Tport@left} + \pnode(0.5,0){Tport@right} + \ifx\psk@tripole@style\pst@tripole@style@top% + \rput[t](0,-0.6){#2} + \pnode(0,0.5){Tport@center} + \ifPst@inputarrow + \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=90]{#1}{Tport@center} + \else + \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{Tport@center} + \fi + \else + \rput[b](0,0.6){#2} + \pnode(0,-0.5){Tport@center} + \ifPst@inputarrow + \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=-90]{#1}{Tport@center} + \else + \ncangle[arrows=-,arm=0.5,angleB=-90]{#1}{Tport@center} + \fi + \fi +} +% +%%% Circulator +% +\def\circulator{\pst@object{circulator}} +\def\circulator@i#1(#2)(#3)(#4)#5#6{% + \addbefore@par{dimen=middle}% + \begin@ClosedObj + \pst@getcoor{#2}\pst@tempa + \pst@getcoor{#3}\pst@tempb + \pst@getcoor{#4}\pst@tempc + \pnode(!% + \pst@tempa /Y1 exch \pst@number\psyunit div def + /X1 exch \pst@number\psxunit div def + \pst@tempb /Y2 exch \pst@number\psyunit div def + /X2 exch \pst@number\psxunit div def + \pst@tempc /Y3 exch \pst@number\psyunit div def + /X3 exch \pst@number\psxunit div def + /XC X1 X2 add 2 div def + /YC Y1 Y2 add 2 div def + XC YC){C@} + \rput{#1}(C@){\pst@draw@circulator{#4}{#5}{#6}} + \nput{! 90 #1 add}{Tport@label}{#5} + \ifPst@inputarrow + \ncline[arrows=->,arrowinset=0]{#2}{Tport@input} %,arm=0.5,angleB=180 + \else + \ncline[arrows=-]{#2}{Tport@input} + \fi + \ncline[arrows=-]{#3}{Tport@output} %,arm=0.5,angleB=0 + \pcline[linestyle=none](#2)(#3)% for the endarrows + \pcline[linestyle=none](#3)(#4)% for the endarrows + \end@ClosedObj + \ignorespaces% +} +\newcommand{\pst@draw@circulator}[3]{% + \pscircle[#3,linewidth=1.5\pslinewidth](0,0){0.5} + \pnode(0,0.6){Tport@label} + \ifx\psk@Tconfig\pst@Tconfig@left% + \psarc[linewidth=1.5\pslinewidth,arrowinset=0]{<-}{0.35}{15}{155} + \pnode(-0.5,0){Tport@input} + \pnode(0.5,0){Tport@output} + \else + \psarc[linewidth=1.5\pslinewidth,arrowinset=0]{->}{0.35}{25}{165} + \pnode(-0.5,0){Tport@output} + \pnode(0.5,0){Tport@input} + \fi + \ifx\psk@tripole@style\pst@tripole@style@isolator% + \psline(0,-0.5)(0,-0.95) + \multips{0}(-0.225,-1)(0.1,0){5}% + {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}% + \else + \pnode(0,-0.5){Tport@center} + \ncline[arrows=-]{#1}{Tport@center} + \fi +} +% +%%% AGC +\def\agc{\pst@object{agc}} +\def\agc@i(#1)(#2)(#3)#4#5{% + \addbefore@par{dimen=middle}% + \begin@ClosedObj + \pst@getcoor{#1}\pst@tempa + \pst@getcoor{#2}\pst@tempb + \pst@getcoor{#3}\pst@tempc + \pnode(!% + \pst@tempa /Y1 exch \pst@number\psyunit div def + /X1 exch \pst@number\psxunit div def + \pst@tempb /Y2 exch \pst@number\psyunit div def + /X2 exch \pst@number\psxunit div def + \pst@tempc /Y3 exch \pst@number\psyunit div def + /X3 exch \pst@number\psxunit div def + /XC X1 X2 add 2 div def + /YC Y2 def + XC YC){C@} + \rput(C@){\pst@draw@agc{#1}{#2}{#4}{#5}} + \ncangle[arrows=-,arm=0.5,angleB=-90]{#3}{Tport@center} + \pcline[linestyle=none](#1)(#2)% for the endarrows + \pcline[linestyle=none](#2)(#3)% for the endarrows + \end@ClosedObj + \ignorespaces% +} +\newcommand{\pst@draw@agc}[4]{% + \pnode(-0.433,0){Tport@left} + \pnode(0.433,0){Tport@right} + \pnode(0,-0.5){Tport@center} + \rput[b](0,0.6){#3} + \psline[arrows=->,arrowinset=0](0,-0.5)(0,-0.25) + \ifx\psk@Tinput\pst@Tinput@left% + \pstriangle[#4,gangle=-90,linewidth=1.5\pslinewidth](-0.433,0)(1,0.866) + \psline[linewidth=1.5\pslinewidth,arrows=->,arrowinset=0](-0.55,-0.5)(0.25,0.5) + \ifPst@inputarrow + \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left} + \else + \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} + \fi + \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tport@right} + \else + \pstriangle[#4,gangle=90,linewidth=1.5\pslinewidth](0.433,0)(1,0.866) + \psline[linewidth=1.5\pslinewidth,arrows=->,arrowinset=0](0.55,-0.5)(-0.25,0.5) + \ifPst@inputarrow + \ncangle[arrows=<-,arrowinset=0,arm=0.5,angleB=180]{Tport@right}{#2} + \else + \ncangle[arrows=-,arm=0.5,angleB=180]{Tport@right}{#2} + \fi + \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} + \fi +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Quadripole +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Coupler %%% +\def\coupler{\pst@object{coupler}} +\def\coupler@i(#1)(#2)(#3)(#4)#5#6{% + \addbefore@par{dimen=middle,arm=0}% + \begin@ClosedObj% + \pst@getcoor{#1}\pst@tempa + \pst@getcoor{#2}\pst@tempb + \pst@getcoor{#3}\pst@tempc + \pst@getcoor{#4}\pst@tempd + \pnode(!% + \pst@tempa /Y1 exch \pst@number\psyunit div def + /X1 exch \pst@number\psxunit div def + \pst@tempb /Y2 exch \pst@number\psyunit div def + /X2 exch \pst@number\psxunit div def + \pst@tempc /Y3 exch \pst@number\psyunit div def + /X3 exch \pst@number\psxunit div def + \pst@tempc /Y4 exch \pst@number\psyunit div def + /X4 exch \pst@number\psxunit div def + /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def + /YC Y1 -0.4 add def + XC YC){C@} + \rput(C@){\pst@draw@coupler{#6}} + \ncangle[arrows=-,angleA=0,angleB=-180]{#1}{inup@} + \ncangle[arrows=-,angleA=180,angleB=0]{#3}{outup@} + \ifx\psk@Qinput\pst@Qinput@left% + \ifx\psk@Qstyle\pst@Qstyle@hybrid + \ncangle[arrows=-,angleA=0,angleB=-180]{#2}{indown@} + \fi + \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@} + \else + \ncangle[arrows=-,angleA=0,angleB=-180]{#2}{indown@} + \ifx\psk@Qstyle\pst@Qstyle@hybrid + \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@} + \fi + \fi +% \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@} + \ncline[arrows=-,linestyle=none,fillstyle=none]{inup@}{outup@} + \naput{#5} + \pcline[linestyle=none](#1)(#3)% for the end arrows + \pcline[linestyle=none](#2)(#4)% for the end arrows + \end@ClosedObj% + \ignorespaces% +} +% +\newcommand{\pst@draw@coupler}[1]{% + \pnode(-0.75,0.4){inup@} + \pnode(0.75,0.4){outup@} + \psframe[#1,linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) + \psline(-0.5,0.4)(0.5,0.4) + \psline(-0.5,-0.4)(0.5,-0.4) + \psline(-0.4,0.35)(0.4,-0.35) + \psline(-0.4,-0.35)(0.4,0.35) +% + \ifx\psk@Qinput\pst@Qinput@left% + \pnode(0.75,-0.4){outdown@} + \ifPst@inputarrow% + \psline[arrows=->,arrowinset=0](-0.75,0.4)(-0.5,0.4) + \else + \psline(-0.75,0.4)(-0.5,0.4) + \fi + \psline(0.5,0.4)(0.75,0.4) + \psline(0.5,-0.4)(0.75,-0.4) + \ifx\psk@Qstyle\pst@Qstyle@hybrid + \pnode(-0.75,-0.4){indown@} + \ifPst@inputarrow% + \psline[arrows=->,arrowinset=0](-0.75,-0.4)(-0.5,-0.4) + \else + \psline(-0.75,-0.4)(-0.5,-0.4) + \fi + \else + \ifx\psk@Qstyle\pst@Qstyle@directional + \psline[arrows=-,linewidth=1.5\pslinewidth](-0.8,-0.75)(-0.8,-0.675) + \multips{90}(-0.8,-0.675)(0,0.1){4}% + {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}% + \psline[arrows=-,linewidth=1.5\pslinewidth](-0.8,-0.275)(-0.8,-0.2) + \psline(-0.75,-0.4)(-0.5,-0.4) + \fi + \fi + \else + \pnode(-0.75,-0.4){indown@} + \ifPst@inputarrow + \psline[arrows=->,arrowinset=0](0.75,0.4)(0.5,0.4) + \else + \psline(0.75,0.4)(0.5,0.4) + \fi + \psline(-0.5,0.4)(-0.75,0.4) + \psline(-0.5,-0.4)(-0.75,-0.4) + \ifx\psk@Qstyle\pst@Qstyle@hybrid + \pnode(0.75,-0.4){outdown@} + \ifPst@inputarrow% + \psline[arrows=->,arrowinset=0](0.75,-0.4)(0.5,-0.4) + \else + \psline(0.75,-0.4)(0.5,-0.4) + \fi + \else + \ifx\psk@Qstyle\pst@Qstyle@directional + \psline[arrows=-,linewidth=1.5\pslinewidth](0.8,-0.75)(0.8,-0.675) + \multips{90}(0.8,-0.675)(0,0.1){4}% + {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}% + \psline[arrows=-,linewidth=1.5\pslinewidth](0.8,-0.275)(0.8,-0.2) + \psline(0.75,-0.4)(0.5,-0.4) + \fi + \fi + \fi +% +} +% +\catcode`\@=\PstAtCode\relax % \endinput % diff --git a/Master/texmf-dist/tex/latex/pst-circ/pst-circ.sty b/Master/texmf-dist/tex/latex/pst-circ/pst-circ.sty index ec608bcb557..5034be3d68c 100644 --- a/Master/texmf-dist/tex/latex/pst-circ/pst-circ.sty +++ b/Master/texmf-dist/tex/latex/pst-circ/pst-circ.sty @@ -1,3 +1,4 @@ +%% $Id: pst-circ.sty 3 2007-12-23 16:23:22Z herbert $ \RequirePackage{pstricks} \ProvidesPackage{pst-circ}[2007/12/23 package wrapper for pst-circ.tex (hv)] -- cgit v1.2.3