summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pst-optexp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-15 22:23:09 +0000
committerKarl Berry <karl@freefriends.org>2013-04-15 22:23:09 +0000
commitf9fe08d0b133db79c326f1cc09c1ef16debf16c5 (patch)
treeb435364e794a55d97c32fcd76d14048780442d60 /Master/texmf-dist/source/latex/pst-optexp
parent86cf5bb0eb3a1ee72b3e40fb1dcf2297465fa4ff (diff)
pst-optexp (15apr13)
git-svn-id: svn://tug.org/texlive/trunk@29953 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/pst-optexp')
-rw-r--r--Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx5903
-rw-r--r--Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins2
2 files changed, 4045 insertions, 1860 deletions
diff --git a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx
index 89536791ff1..521555ee4b8 100644
--- a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx
+++ b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx
@@ -18,7 +18,7 @@
%<stylefile>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<stylefile>\ProvidesPackage{pst-optexp}
%<*stylefile>
- [2013/03/20 v3.6 Optical experimental setups with PSTricks]
+ [2013/04/15 v4.0 Optical experimental setups with PSTricks]
%</stylefile>
%
%<*driver>
@@ -54,7 +54,6 @@
\usepackage{nicefrac}
\usepackage{pst-func}
\usepackage{pst-optexp}
-\usepackage{pst-circ}
\usepackage[makeindex]{splitidx}
\usepackage{hypdoc}
\hypersetup{%
@@ -82,40 +81,43 @@
\newlength{\codeoverhang}
\setlength{\codeoverhang}{0.5\marginparwidth+\marginparsep}
\lstset{%
- language=[LaTeX]TeX, identifierstyle=\color{colIdentifier}, %
- keywordstyle=\color{colKeys}, %
- keywordstyle = [21]\color{DOrange}, %
- keywordstyle = [22]\color{DOrange}, %
- stringstyle=\color{colString}, %
- commentstyle=\color{colComments}, %
- float=hbp,%
- basicstyle=\ttfamily\small, %
- columns=flexible, %
- tabsize=4, %
- showspaces=false, %
- showstringspaces=false, %
- breaklines=true, %
- breakautoindent=true, %
- breakatwhitespace=true, %
- captionpos=t, %
- belowcaptionskip=0pt,%
- abovecaptionskip=0pt,%
- xleftmargin=1em, %
+ language=[LaTeX]TeX, identifierstyle=\color{colIdentifier},
+ keywordstyle=\color{colKeys},
+ keywordstyle = [21]\color{DOrange},
+ keywordstyle = [22]\color{DOrange},
+ stringstyle=\color{colString},
+ commentstyle=\color{colComments},
+ alsoletter={12},
+ float=hbp,
+ basicstyle=\ttfamily\small,
+ columns=flexible,
+ tabsize=4,
+ showspaces=false,
+ showstringspaces=false,
+ breaklines=true,
+ breakautoindent=true,
+ breakatwhitespace=true,
+ captionpos=t,
+ belowcaptionskip=0pt,
+ abovecaptionskip=0pt,
+ xleftmargin=1em,
prebreak = {\raisebox{-0.5ex}[\ht\strutbox]{\kern0.5ex\large\Righttorque}},
- rulecolor=\color{black!20}, %
- texcsstyle = [20]\color{DDOrange},%!60!black},%{red!60!black}, %
+ rulecolor=\color{black!20},
+ texcsstyle = [20]\color{DDOrange},
moretexcs = [20]{lens, optbox, oenode, oenodeIn, oenodeExt, oenodeOut,
- oenodeRefA, oenodeRefB, oenodeTrefA, oenodeTrefB, oenodeLabel, oenodeRotref,
- oenodeBeam, oenodeBeamUp, oenodeBeamLow, oenodeCenter, oenodeIfc,
- oeBeamVec, oeBeamVecUp, oeBeamVecLow,
- optplate, optretplate, pinhole, crystal,optdetector, optdiode,
- doveprism, glanthompson, polarization, mirror, beamsplitter,
- optgrating, optprism, rightangleprism, pentaprism, optdipole,
- optripole, optfiber, optamp, optmzm, optfilter, polcontrol,
- optisolator, optswitch, fiberdelayline, optfiberpolarizer,
- fibercollimator, optcoupler, wdmcoupler, wdmsplitter, optcirculator,
- fiberbox, drawbeam, drawwidebeam, drawfiber, frontlayer, backlayer,
- newOptexpDipole, newOptexpTripole, newOptexpFiberDipole,optplane}, %
+ oenodeRefA, oenodeRefB, oenodeTrefA, oenodeTrefB, oenodeLabel,
+ oenodeRotref, oenodeBeam, oenodeBeamUp, oenodeBeamLow, oenodeCenter,
+ oenodeIfc, oeBeamVec, oeBeamVecUp, oeBeamVecLow, optplate,
+ optretplate, pinhole, crystal, optdetector, optdiode, doveprism,
+ glanthompson, polarization, mirror, beamsplitter, optgrating,
+ optprism, rightangleprism, pentaprism, optdipole, optripole,
+ optfiber, optamp, optmzm, optfilter, polcontrol, optisolator,
+ optswitch, fiberdelayline, optfiberpolarizer, fibercollimator,
+ optcoupler, wdmcoupler, wdmsplitter, optcirculator, fiberbox,
+ eleccoupler, elecsynthesizer, elecmixer, optarrowcomp, optbarcomp,
+ drawbeam, drawwidebeam, drawfiber, drawwire, frontlayer, backlayer,
+ newOptexpDipole, newOptexpTripole, newOptexpFiberDipole,
+ newOptexpComp, newOptexpFiberComp, optplane},
explpreset={%
pos=l, width=-99pt, hsep=5mm, overhang=\codeoverhang, varwidth,
vsep=\bigskipamount, rframe={}}, extendedchars=true
@@ -176,12 +178,17 @@
\providerobustcmd*\ifrefundefined [1]{%
\begingroup%
\csname @safe@activestrue\endcsname%
- \expandafter\endgroup\csname @\ifcsname r@#1\endcsname second\else first\fi oftwo\endcsname
+ \expandafter\endgroup\csname @\ifodd
+ \ifcsname r@comp:#1\endcsname 1\else
+ \ifcsname r@prm:#1\endcsname 1\else
+ \ifcsname r@cs:#1\endcsname 1\else
+ \ifcsname r@sty:#1\endcsname 1\else 0
+ \fi\fi\fi\fi second\else first\fi oftwo\endcsname
}% \ifrefundefined
\def\lsthk@OutputBox@H@@k{%
\begingroup%
\let\lst@UM\@empty%
- \edef\@tempc{cmd:\detokenize\expandafter{\the\lst@token }}%\edef
+ \edef\@tempc{\detokenize\expandafter{\the\lst@token }}%\edef
\ifrefundefined{\@tempc}%
\endgroup%
\sethyperlistings%
@@ -193,12 +200,30 @@
\setbox\@tempboxa\hbox%
\bgroup%
\rlap{\hypersetup {linkcolor=.}\relax\fboxrule\z@%
- \hyperref[\hyperlistingsreference]{\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}%
+ \ifcsdef{r@prm:\hyperlistingsreference}%
+ {\hyperref[prm:\hyperlistingsreference]{\xLkeyword{\hyperlistingsreference}\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}%
+ {\ifcsdef{r@comp:\hyperlistingsreference}%
+ {\hyperref[comp:\hyperlistingsreference]{\xLcomp{\hyperlistingsreference}\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}%
+ {\ifcsdef{r@sty:\hyperlistingsreference}%
+ {\hyperref[sty:\hyperlistingsreference]{\xLstyle{\hyperlistingsreference}\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}%
+ {\hyperref[cs:\hyperlistingsreference]{\xLcs{\hyperlistingsreference}\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}}}}%
\unhbox\@tempboxa%
\egroup%
}% \hyperlistings
\let\lsthk@OutputBox\lsthk@OutputBox@H@@k
+\renewenvironment*{ltxsyntax}
+ {\list{}{%
+ \setlength{\labelwidth}{\marglistwidth}%
+ \setlength{\labelsep}{0pt}%
+ \setlength{\leftmargin}{0pt}%
+ \renewcommand*{\makelabel}[1]{%
+ \hss\ltxsyntaxfont\ltxsyntaxlabelfont##1}}%
+ \let\cmditem\POE@cmditem
+ \let\envitem\ltd@envitem
+ \let\compitem\POE@compitem}
+ {\endlist}
+
\newenvironment*{stylelist}
{\list{}{%
\setlength{\labelwidth}{\marglistwidth}%
@@ -222,104 +247,172 @@
\def\POE@styleitem{%
\@ifnextchar[%]
{\POE@styleitem@i}
- {\POE@styleitem@i[]}
-}
+ {\POE@styleitem@i[]}}
\def\POE@styleitem@i[#1]#2{%
\item[{#2}]%
- \label{prm:#2}%
+ \label{sty:#2}\xdefLstyle{#2}%
\begingroup\raggedright
\prm{psstyle}%
\settowidth\@tempdimb{\prm{psstyle}}%
\settowidth\@tempdimc{#2}%
\@tempdimc=\dimexpr\@tempdimc+\labelsep-\labelwidth\relax
\ifdim\@tempdimc>0pt%
- \@tempdima=\dimexpr\linewidth-\@tempdimb-\@tempdimc\relax
+ \@tempdima=\dimexpr\linewidth-\@tempdimb-\@tempdimc-1em\relax
\else
- \@tempdima=\dimexpr\linewidth-\@tempdimb\relax
+ \@tempdima=\dimexpr\linewidth-\@tempdimb-1em\relax
\fi
- \ifblank{#1}
- {}
- {\parbox[t]{\@tempdima}{\raggedleft default:~\ltd@textverb{#1}}}%
+ \ifblank{#1}{}{\hfill\parbox[t]{\@tempdima}{\raggedleft default:~\ltd@textverb{#1}}}%
\par\endgroup}
+\def\POE@option#1#2#3{%
+ \item[#1]%
+ \begingroup\raggedright
+ \ltd@textverb{=}%
+ \settowidth\@tempdimb{\ltd@textverb{=}}%
+ \settowidth\@tempdimc{#1}%
+ \@tempdimc=\dimexpr\labelwidth-\@tempdimc\relax
+ \ifdim\@tempdimc<0pt
+ \@tempdima=\dimexpr\linewidth-\@tempdimb+\@tempdimc-2em\relax
+ \else
+ \@tempdima=\dimexpr\linewidth-\@tempdimb-2em\relax
+ \fi
+ \ifblank{#3}
+ {}
+ {\settowidth\@tempdimb{default: #3}%
+ \@tempdima=\dimexpr\@tempdima-\@tempdimb-2em\relax}%
+ \parbox[t]{\@tempdima}{\raggedright #2}%
+ \ifblank{#3}
+ {}
+ {\hfill default:~#3}%
+ \par\endgroup
+ \nobreak\vspace{\itemsep}}
+
\def\POE@optitem{%
\@ifstar
{\boolfalse{@tempswa}\POE@optitem@i}
{\booltrue{@tempswa}\POE@optitem@i}}
\newcommand*{\POE@optitem@i}[3][]{%
- \ifbool{@tempswa}{\label{prm:#2}}{}%
- \xLkeyword{#2}%
+ \ifbool{@tempswa}%
+ {\label{prm:#2}\xdefLkeyword{#2}}%
+ {\xLkeyword{#2}}%
\ifblank{#1}
- {\ltd@option{#2}{#2}{#3}{}}
- {\ltd@option{#2}{#2}{#3}{\ltd@textverb{#1}}}}%
+ {\POE@option{#2}{#3}{}}
+ {\POE@option{#2}{#3}{\ltd@textverb{#1}}}}%
\def\POE@valitem{%
\@ifstar
{\boolfalse{@tempswa}\POE@valitem@i}
{\booltrue{@tempswa}\POE@valitem@i}}
\newcommand*{\POE@valitem@i}[3][]{%
- \ifbool{@tempswa}{\label{prm:#2}}{}%
- \xLkeyword{#2}%
+ \ifbool{@tempswa}%
+ {\label{prm:#2}\xdefLkeyword{#2}}%
+ {\xLkeyword{#2}}%
\ifblank{#1}
- {\ltd@option{#2}{#2}{\prm{#3}}{}}
- {\ltd@option{#2}{#2}{\prm{#3}}{\ltd@textverb{#1}}}}%
+ {\POE@option{#2}{\prm{#3}}{}}
+ {\POE@option{#2}{\prm{#3}}{\ltd@textverb{#1}}}}%
\def\POE@choitem{%
\@ifstar
{\boolfalse{@tempswa}\POE@choitem@i}
{\booltrue{@tempswa}\POE@choitem@i}}
\newcommand*{\POE@choitem@i}[3][]{%
- \ifbool{@tempswa}{\label{prm:#2}}{}%
- \xLkeyword{#2}%
+ \ifbool{@tempswa}%
+ {\label{prm:#2}\xdefLkeyword{#2}}%
+ {\xLkeyword{#2}}%
\ifblank{#1}
- {\ltd@option{#2}{#2}{\ltd@verblist{#3}}{}}
- {\ltd@option{#2}{#2}{\ltd@verblist{#3}}{\ltd@textverb{#1}}}}%
+ {\POE@option{#2}{\ltd@verblist{#3}}{}}
+ {\POE@option{#2}{\ltd@verblist{#3}}{\ltd@textverb{#1}}}}%
\def\POE@boolitem{%
\@ifstar
{\boolfalse{@tempswa}\POE@boolitem@i}
{\booltrue{@tempswa}\POE@boolitem@i}}
\newcommand*{\POE@boolitem@i}[2][]{%
- \ifbool{@tempswa}{\label{prm:#2}}{}%
- \xLkeyword{#2}%
+ \ifbool{@tempswa}%
+ {\label{prm:#2}\xdefLkeyword{#2}}%
+ {\xLkeyword{#2}}%
\ifblank{#1}
- {\ltd@option{#2}{#2}{\ltd@verblist{true,false}}{}}
- {\ltd@option{#2}{#2}{\ltd@verblist{true,false}}{\ltd@textverb{#1}}}}%
+ {\POE@option{#2}{\ltd@verblist{true,false}}{}}
+ {\POE@option{#2}{\ltd@verblist{true,false}}{\ltd@textverb{#1}}}}%
\def\POE@intitem{%
\@ifstar
{\boolfalse{@tempswa}\POE@intitem@i}
{\booltrue{@tempswa}\POE@intitem@i}}
\newcommand*{\POE@intitem@i}[2][]{%
- \ifbool{@tempswa}{\label{prm:#2}}{}%
- \xLkeyword{#2}%
+ \ifbool{@tempswa}%
+ {\label{prm:#2}\xdefLkeyword{#2}}%
+ {\xLkeyword{#2}}%
\ifblank{#1}
- {\ltd@option{#2}{#2}{\prm{int}}{}}
- {\ltd@option{#2}{#2}{\prm{int}}{\ltd@textverb{#1}}}}%
+ {\POE@option{#2}{\prm{int}}{}}
+ {\POE@option{#2}{\prm{int}}{\ltd@textverb{#1}}}}%
\def\POE@numitem{%
\@ifstar
{\boolfalse{@tempswa}\POE@numitem@i}
{\booltrue{@tempswa}\POE@numitem@i}}
\newcommand*{\POE@numitem@i}[2][]{%
- \ifbool{@tempswa}{\label{prm:#2}}{}%
- \xLkeyword{#2}%
+ \ifbool{@tempswa}%
+ {\label{prm:#2}\xdefLkeyword{#2}}%
+ {\xLkeyword{#2}}%
\ifblank{#1}
- {\ltd@option{#2}{#2}{\prm{num}}{}}
- {\ltd@option{#2}{#2}{\prm{num}}{\ltd@textverb{#1}}}}%
+ {\POE@option{#2}{\prm{num}}{}}
+ {\POE@option{#2}{\prm{num}}{\ltd@textverb{#1}}}}%
\def\POE@psnumitem{%
\@ifstar
{\boolfalse{@tempswa}\POE@psnumitem@i}
{\booltrue{@tempswa}\POE@psnumitem@i}}
\newcommand*{\POE@psnumitem@i}[2][]{%
- \ifbool{@tempswa}{\label{prm:#2}}{}%
- \xLkeyword{#2}%
+ \ifbool{@tempswa}%
+ {\label{prm:#2}\xdefLkeyword{#2}}%
+ {\xLkeyword{#2}}%
\ifblank{#1}
- {\ltd@option{#2}{#2}{\prm{psnum}}{}}
- {\ltd@option{#2}{#2}{\prm{psnum}}{\ltd@textverb{#1}}}}%
+ {\POE@option{#2}{\prm{psnum}}{}}
+ {\POE@option{#2}{\prm{psnum}}{\ltd@textverb{#1}}}}%
+
+\def\ltd@csitem{%
+ \@ifstar
+ {\boolfalse{@tempswa}\ltd@csitem@i}
+ {\booltrue{@tempswa}\ltd@csitem@i}}
+\def\ltd@csitem@i#1{%
+ \ifbool{@tempswa}
+ {\ltd@item@ii{\textbackslash#1\hspace\marglistsep}{#1}}
+ {\ltd@item@ii{\textbackslash#1\hspace\marglistsep}{}}}
+
+\def\POE@cmditem{%
+ \@ifstar
+ {\boolfalse{@tempswa}\POE@cmditem@i}
+ {\booltrue{@tempswa}\POE@cmditem@i}}
+\def\POE@cmditem@i#1{%
+ \ifbool{@tempswa}
+ {\POE@cmditem@ii{\textbackslash#1}{cs:#1}}
+ {\POE@cmditem@ii{\textbackslash#1}{}}}
+\def\POE@compitem{%
+ \@ifstar
+ {\boolfalse{@tempswa}\POE@compitem@i}
+ {\booltrue{@tempswa}\POE@compitem@i}}
+\def\POE@compitem@i#1{%
+ \ifbool{@tempswa}
+ {\POE@cmditem@ii{\textbackslash#1}{comp:#1}}
+ {\POE@cmditem@ii{\textbackslash#1}{}}}
+\def\POE@cmditem@ii#1#2{%
+ \ltd@itemsave
+ \ifhmode
+ \itemsep-\topsep
+ \else
+ \ltd@itembreak
+ \fi
+ \item[#1]%
+ \ltd@itemrest
+ \ifblank{#2}{}{\label{#2}}%
+ \begingroup
+ \ltd@syntaxsetup
+ \ltxsyntaxfont
+ \let\@tempa\@empty
+ \ltd@parseargs}
-\def\ltd@cmditem@ii#1#2{%
+\def\ltd@csitem@ii#1#2{%
\ltd@itemsave
\ifhmode
\itemsep-\topsep
@@ -328,7 +421,7 @@
\fi
\item[#1]%
\ltd@itemrest
- \ifblank{#2}{}{\label{cmd:#2}}%
+ \ifblank{#2}{}{\label{cs:#2}}%
\begingroup
\ltd@syntaxsetup
\ltxsyntaxfont
@@ -354,70 +447,84 @@
\newcommand*{\PSvar}[1]{{\normalfont\small\ttfamily #1}}
\newcommand*{\PSop}[1]{{\normalfont\small\ttfamily\color{DOrange}\hskip 3pt #1\hskip 3pt}}
+\newcommand*{\compref}[1]{\ref{comp:#1}}
+\newcommand*{\hyperpagedef}[1]{\textbf{\hyperpage{#1}}}
\newcommand*{\nodename}[1]{\emph{#1}}
\newcommand*{\param}[1]{\normalfont\texttt{#1}}
\newcommand*{\paramvalue}[1]{\texttt{#1}}
\newcommand*{\styleshape}[1]{\texttt{#1}}
\newcommand{\docindex}[1]{\sindex[doc]{#1|hyperpage}}
+\newcommand{\docindexdef}[1]{\sindex[doc]{#1|hyperpagedef}}
\makeatletter
\def\Lcs{\@ifstar{\Lcs@nobm}{\Lcs@bm}}
\def\Lcs@nobm#1{\nxLcs{#1}\xLcs{#1}}
-\def\Lcs@bm#1{\hyperref[cmd:#1]{\Lcs@nobm{#1}}}
+\def\Lcs@bm#1{\hyperref[cs:#1]{\Lcs@nobm{#1}}}
\def\xLcs#1{\docindex{#1=\nxLcs{#1}}\docindex{\POEindexMacro!#1=\nxLcs{#1}}}
\def\nxLcs#1{\texttt{\textbackslash#1}}
-\def\LPack#1{\texttt{#1}\docindex{#1=\texttt{#1}}\docindex{\POEindexPackage!#1=\texttt{#1}}}
+\def\Lcomp{\@ifstar{\Lcomp@nobm}{\Lcomp@bm}}
+\def\Lcomp@nobm#1{\nxLcomp{#1}\xLcomp{#1}}
+\def\Lcomp@bm#1{\hyperref[comp:#1]{\Lcomp@nobm{#1}}}
+\def\xLcomp#1{\docindex{#1=\nxLcomp{#1}}\docindex{\POEindexComp!#1=\nxLcomp{#1}}}
+\def\nxLcomp#1{\texttt{\textbackslash#1}}
+
+\def\LPack#1{\nxLPack{#1}\docindex{#1=\nxLPack{#1}}\docindex{\POEindexPack!#1=\nxLPack{#1}}}
\def\nxLPack#1{\texttt{#1}}
\def\Lenv{\@ifstar{\Lenv@nobm}{\Lenv@bm}}
\def\Lenv@nobm#1{\nxLenv{#1}\xLenv{#1}}
\def\Lenv@bm#1{\hyperref[env:#1]{\Lenv@nobm{#1}}}
-\def\xLenv#1{\docindex{#1=\texttt{#1}}\docindex{\POEindexEnv!#1=\texttt{#1}}}
+\def\xLenv#1{\docindex{#1=\nxLenv{#1}}\docindex{\POEindexEnv!#1=\nxLenv{#1}}}
\def\nxLenv#1{\texttt{#1}}
\let\orig@ltd@envitem\ltd@envitem
\def\ltd@envitem#1{\orig@ltd@envitem{#1}\label{env:#1}\xLenv{#1}}
\def\Lkeyword{\@ifstar{\Lkeyword@nobm}{\Lkeyword@bm}}
-\def\Lkeyword@nobm#1{\texttt{#1}\xLkeyword{#1}}
+\def\Lkeyword@nobm#1{\nxLkeyword{#1}\xLkeyword{#1}}
\def\Lkeyword@bm#1{\hyperref[prm:#1]{\Lkeyword@nobm{#1}}}
-\def\xLkeyword#1{\docindex{#1=\texttt{#1}}\docindex{\POEindexKeyword!#1=\texttt{#1}}}
+\def\xLkeyword#1{\docindex{#1=\nxLkeyword{#1}}\docindex{\POEindexKeyword!#1=\nxLkeyword{#1}}}
+\def\xdefLkeyword#1{\docindexdef{#1=\nxLkeyword{#1}}\docindexdef{\POEindexKeyword!#1=\nxLkeyword{#1}}}
\def\nxLkeyword#1{\texttt{#1}}
-\def\xLoption#1{\docindex{#1=\texttt{#1}}\docindex{\POEindexOption!#1=\texttt{#1}}}
+\def\xLoption#1{\docindex{#1=\texttt{#1}}}
\def\Loption#1{\texttt{#1}\xLoption{#1}}
\def\nxLoption#1{\texttt{#1}}
\def\Lstyle{\@ifstar{\Lstyle@nobm}{\Lstyle@bm}}
-\def\Lstyle@nobm#1{\texttt{#1}\xLstyle{#1}}
-\def\Lstyle@bm#1{\hyperref[prm:#1]{\Lstyle@nobm{#1}}}
-\def\xLstyle#1{\docindex{#1=\texttt{#1}}\docindex{\POEindexStyle!#1=\texttt{#1}}}
+\def\Lstyle@nobm#1{\nxLstyle{#1}\xLstyle{#1}}
+\def\Lstyle@bm#1{\hyperref[sty:#1]{\Lstyle@nobm{#1}}}
+\def\xLstyle#1{\docindex{#1=\nxLstyle{#1}}\docindex{\POEindexStyle!#1=\nxLstyle{#1}}}
+\def\xdefLstyle#1{\docindexdef{#1=\nxLstyle{#1}}\docindexdef{\POEindexStyle!#1=\nxLstyle{#1}}}
\def\nxLstyle#1{\texttt{#1}}
\def\Ldipole#1{\nxLcs{#1}\xLdipole{#1}}
-\def\xLdipole#1{\docindex{#1=\nxLcs{#1}}\docindex{\POEindexDipoles!#1=\nxLcs{#1}}}
+\def\xLdipole#1{\docindexdef{#1=\nxLcs{#1}}\docindexdef{\POEindexComp!#1=\nxLcs{#1}}}
\def\Ltripole#1{\nxLcs{#1}\xLtripole{#1}}
-\def\xLtripole#1{\docindex{#1=\nxLcs{#1}}\docindex{\POEindexTripoles!#1=\nxLcs{#1}}}
+\def\xLtripole#1{\docindexdef{#1=\nxLcs{#1}}\docindexdef{\POEindexComp!#1=\nxLcs{#1}}}
\def\Lfdipole#1{\nxLcs{#1}\xLfdipole{#1}}
-\def\xLfdipole#1{\docindex{#1=\nxLcs{#1}}\docindex{\POEindexFiberDipoles!#1=\nxLcs{#1}}}
+\def\xLfdipole#1{\docindexdef{#1=\nxLcs{#1}}\docindexdef{\POEindexComp!#1=\nxLcs{#1}}}
\def\Lfmultipole#1{\nxLcs{#1}\xLfmultipole{#1}}
-\def\xLfmultipole#1{\docindex{#1=\nxLcs{#1}}\docindex{\POEindexFiberMultipoles!#1=\nxLcs{#1}}}
+\def\xLfmultipole#1{\docindexdef{#1=\nxLcs{#1}}\docindexdef{\POEindexComp!#1=\nxLcs{#1}}}
+
+\def\Lemultipole#1{\nxLcs{#1}\xLemultipole{#1}}
+\def\xLemultipole#1{\docindexdef{#1=\nxLcs{#1}}\docindexdef{\POEindexComp!#1=\nxLcs{#1}}}
\makeatother
\newcommand{\dipoledesc}[1]{%
\xLdipole{#1}%
- \cmditem{#1}[options](in)(out){label}%
+ \compitem{#1}[options](in)(out){label}%
}
\newcommand{\tripoledesc}[1]{%
\xLtripole{#1}%
- \cmditem{#1}[options](in)(center)(out){label}%
+ \compitem{#1}[options](in)(center)(out){label}%
}
\newcommand{\fiberdipoledesc}[1]{%
\xLfdipole{#1}%
- \cmditem{#1}[options](in)(out){label}%
+ \compitem{#1}[options](in)(out){label}%
}
\newenvironment*{pssyntax}
@@ -502,16 +609,12 @@
% \newrefformat{fig}{Abb.~\ref{#1}}
% \newindex[Quelltextindex]{idx}
% \newindex[Dokumentationsindex]{doc}
-% \newcommand{\POEindexPackage}{Paket}
-% \newcommand{\POEindexMacro}{Makro}
-% \newcommand{\POEindexKeyword}{Schlüsselwort}
-% \newcommand{\POEindexEnv}{Umgebung}
-% \newcommand{\POEindexOption}{Option}
-% \newcommand{\POEindexStyle}{Stil}
-% \newcommand{\POEindexDipoles}{Zweipol}
-% \newcommand{\POEindexTripoles}{Dreipol}
-% \newcommand{\POEindexFiberDipoles}{Faserzweipol}
-% \newcommand{\POEindexFiberMultipoles}{Fasermultipol}
+% \newcommand{\POEindexComp}{Komponenten}
+% \newcommand{\POEindexStyle}{Stile}
+% \newcommand{\POEindexMacro}{Makros}
+% \newcommand{\POEindexKeyword}{Parameter}
+% \newcommand{\POEindexEnv}{Umgebungen}
+% \newcommand{\POEindexPack}{Pakete}
% \renewcommand*\lstlistingname{Bsp.}
% \fi
% \ifENGLISH
@@ -523,16 +626,12 @@
% \newrefformat{fig}{Fig.~\ref{#1}}
% \newindex[Code index]{idx}
% \newindex[Documentation index]{doc}
-% \newcommand{\POEindexPackage}{Package}
-% \newcommand{\POEindexMacro}{Macro}
-% \newcommand{\POEindexKeyword}{Keyword}
-% \newcommand{\POEindexEnv}{Environment}
-% \newcommand{\POEindexOption}{Option}
-% \newcommand{\POEindexStyle}{Style}
-% \newcommand{\POEindexDipoles}{Dipoles}
-% \newcommand{\POEindexTripoles}{Tripoles}
-% \newcommand{\POEindexFiberDipoles}{Fiber dipoles}
-% \newcommand{\POEindexFiberMultipoles}{Fiber multipoles}
+% \newcommand{\POEindexComp}{components}
+% \newcommand{\POEindexStyle}{styles}
+% \newcommand{\POEindexMacro}{macros}
+% \newcommand{\POEindexKeyword}{parameters}
+% \newcommand{\POEindexEnv}{environments}
+% \newcommand{\POEindexPack}{packages}
% \renewcommand*\lstlistingname{Ex.}
% \fi
%
@@ -1198,7 +1297,7 @@
% verteilt und mit einem Strahl verbunden.
%
% Zuerst werden Anfangsknoten \prm{A} und Endknoten \prm{B} definiert. Die erste
-% \Lcs{optbox} wird an den Anfang platziert, die Wellenplatte und der
+% \Lcomp{optbox} wird an den Anfang platziert, die Wellenplatte und der
% Polarisator werden innerhalb der Verbindungslinie positioniert. Der Parameter
% \Lkeyword{position} erwartet Werte zwischen \opt{0} und \opt{1}, die relativ
% zur Länge der Verbindungslinie sind, oder \opt{start}/\opt{end}. Der Detektor
@@ -1211,7 +1310,7 @@
% connected with a beam.
%
% First we define the start node \prm{A} and the stop node \prm{B}. The first
-% \Lcs{optbox} is positioned at the start, the wave plate and the polarizer are
+% \Lcomp{optbox} is positioned at the start, the wave plate and the polarizer are
% positioned between the nodes. The parameter \Lkeyword{position} expects a
% value between \opt{0} and \opt{1} which is relative to the length of the
% reference line, or \opt{start}/\opt{end}. The detector is always positioned at
@@ -1222,10 +1321,7 @@
% \iffalse
%<*ignore>
% \fi
-\begingroup
-\catcode`\*=13
-\def*{}%
-\begin{LTXexample}[style=example, linerange={1-7,10-10}]
+\begin{LTXexample}[linerange={1-7,10-10}]
\begin{pspicture}[showgrid](4,2)
\pnode(1,1){A}\pnode(3,1){B}
\optbox[position=start, optboxwidth=1.2, labeloffset=0](A)(B){Laser}
@@ -1237,14 +1333,12 @@
\uput[45](A){\color{Refline}A}\uput[135](B){\color{Refline}B}
\end{pspicture}
\end{LTXexample}
-\endgroup
% \iffalse
%</ignore>
% \fi
%
% \ifGERMAN\subsection{Galilei-Fernrohr}\fi
% \ifENGLISH\subsection{Galilean telescope}\fi
-% \label{ex:galileo}
%
% \ifGERMAN
% Im Folgenden wird ein sehr einfacher Aufbau mit einer konkaven und
@@ -1327,14 +1421,14 @@
%
% \ifGERMAN
% Die Lichtstrahlen sollen auf einer CCD-Kamera enden, die mit einer
-% \Lcs{optbox} gezeichnet wird. Mit \Lkeyword{position}\opt{=end} wird die Box
+% \Lcomp{optbox} gezeichnet wird. Mit \Lkeyword{position}\opt{=end} wird die Box
% ans Ende der Referenzlinie von \prm{A} nach \prm{B} gesetzt, die
% Beschriftung wird mit \Lkeyword{labeloffset} in die Mitte der Komponente
% gelegt.
% \fi
% \ifENGLISH
% The beam rays are supposed to end at the CCD camera which is drawn as a
-% \Lcs{optbox}. With \Lkeyword{position}\opt{=end} the box is positioned at
+% \Lcomp{optbox}. With \Lkeyword{position}\opt{=end} the box is positioned at
% the end of the reference line from \prm{A} to \prm{B}. The label is put at
% the center of the component with \Lkeyword{labeloffset}.
% \fi
@@ -1411,7 +1505,7 @@
\begingroup
\catcode`\*=13
\def*{}%
-\begin{LTXexample}[style=example]
+\begin{LTXexample}[style=example, label=ex:galileo, caption={caption}]
*\ON*\begin{pspicture}(5,2)
\pnode(0,1){A}\pnode(3.5,1){B}
\lens[lensradius=-0.7,
@@ -1445,10 +1539,10 @@
% Der Laser wird wieder an den Anfang gesetzt. Der Abstand
% der Beschriftung wird mit dem Parameter \Lkeyword{label} eingestellt,
% mit dem alle Beschriftungsparameter gesammelt eingestellt werden
-% können. Da eine \Lcs{optbox} sowohl als Freistrahl- als auch als
+% können. Da eine \Lcomp{optbox} sowohl als Freistrahl- als auch als
% Faserkomponente verwendet werden kann, wird in der Standardeinstellung
% keine Faser gezeichnet, was mit \Lkeyword{fiber} geändert werden
-% kann. Die Breite dieser und aller folgenden \Lcs{optbox} wird auf
+% kann. Die Breite dieser und aller folgenden \Lcomp{optbox} wird auf
% \opt{0.7} geändert.
% \fi
% \ifENGLISH
@@ -1461,9 +1555,9 @@
%
% The laser is set at the start. The label offset is set with the
% \Lkeyword{label} parameter, which would allow setting all label parameters at
-% once. A \Lcs{optbox} is originally a free-ray component, so that for it the
+% once. A \Lcomp{optbox} is originally a free-ray component, so that for it the
% fiber connection must be enabled with \Lkeyword{fiber}. The width of all
-% \Lcs{optbox} is changed to \opt{0.7}.
+% \Lcomp{optbox} is changed to \opt{0.7}.
% \fi
% \iffalse
%<*ignore>
@@ -1536,22 +1630,23 @@
% \fi
%
% \ifGERMAN
-% An die Enden des Kopplers wird ein optischer Spektrumanalysator (OSA) und eine
-% Leistungsmessgerät (PD) gesetzt. Der \Lcs{optdetector} wird immer ans Ende der
-% Referenzlinie gesetzt (\Lkeyword{position}\opt{=end}). Diese beiden
-% Komponenten werden ohne weitere Einstellungen ohne Faserverbindungen
-% gezeichnet. Das passt, da ihre jeweiligen Endpunkte mit den Ausgängen des
-% Kopplers zusammenfallen.
+% An die Enden des Kopplers wird ein optischer Spektrumanalysator (OSA)
+% und eine Leistungsmessgerät (PD) gesetzt. Der \Lcomp{optdetector} wird
+% nach Voreinstellung ans Ende der Referenzlinie gesetzt
+% (\Lkeyword{position}\opt{=end}). Diese beiden Komponenten werden ohne
+% weitere Einstellungen ohne Faserverbindungen gezeichnet. Das passt, da
+% ihre jeweiligen Endpunkte mit den Ausgängen des Kopplers
+% zusammenfallen.
%
% Die Schreibweise \opt{(A|E)} nimmt die $x$-Koordinate von \prm{A} und die
% $y$-Koordinate von \prm{E}.
% \fi
% \ifENGLISH
-% At the ends of the coupler we put an optical spectrum analyzer (OSA) and a
-% power meter (PD). The \Lcs{optdetector} is always set at the end of the
-% reference line, it has \Lkeyword{position} fixed to \opt{end}. These two
-% components are drawn without fibers, because their end nodes coincide with the
-% two outputs of the coupler.
+% At the ends of the coupler we put an optical spectrum analyzer (OSA)
+% and a power meter (PD). The \Lcomp{optdetector} is set by default at the
+% end of the reference line, it has \Lkeyword{position} preset to
+% \opt{end}. These two components are drawn without fibers, because
+% their end nodes coincide with the two outputs of the coupler.
%
% The notation \opt{(A|E)} uses the $x$-coordinate of \prm{A} and the
% $y$-coordinate of \prm{E}.
@@ -1610,7 +1705,7 @@
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}[style=example, caption={caption}, linerange={1-10,13-13}]
+\begin{LTXexample}[caption={caption}, label={ex:fiber-setup-alt}, linerange={1-10,13-13}]
\begin{pspicture}[showgrid](4.9,2)
\pnode(0.7,1){A}\pnode(4,1){B}
\psset{optboxwidth=0.7, labelstyle=\scriptsize, fiber=none}
@@ -1619,7 +1714,7 @@
\wdmsplitter[abspos=2.25, label=0.4](A)(B)(B){50\%}
\optbox[position=end,label=0, compshift=0.5](A)(B){OSA}
\optdetector[compshift=-0.5](A)(B){PD}
- \drawfiber{1}{2}{3}{4}
+ \drawfiber{1-4}
\drawfiber{3}{5}
\psset{style=Refline}\psdot(A)\psdot(B)
\color{Refline}\uput[45](A){A}\uput[135](B){B}
@@ -1637,7 +1732,6 @@
% \ifENGLISH
% \subsection{Michelson-Interferometer}
% \fi
-% \label{ex:michelson}
%
% \ifGERMAN
% In diesem Beispiel werden neben Linsen auch reflektierende Elemente
@@ -1649,13 +1743,13 @@
% which can be either transmittive or reflective (beamsplitter).
% \fi
%
-% \begingroup
-% \catcode`\*=13
-% \def*{}%
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}[style=example, hsep=8mm, numbers=left, numberstyle=\footnotesize, caption={caption}]
+\begingroup
+\catcode`\*=13
+\def*{}%
+\begin{LTXexample}[style=example, hsep=8mm, numbers=left, numberstyle=\footnotesize, caption={caption}, label=ex:michelson]
\begin{pspicture}(3.2,5)
\pnode(0,3){A}\pnode(1,3){BS}\pnode(3,3){M1}*\label{l:ex2-nodes1}*
\pnode(1,5){M2}\pnode(1,1){PD}*\label{l:ex2-nodes2}*
@@ -1671,7 +1765,7 @@
\end{optexp}
\end{pspicture}
\end{LTXexample}
-% \endgroup
+\endgroup
% \iffalse
%</ignore>
% \fi
@@ -1754,9 +1848,12 @@
%
% \begin{optionlist}
% \numitem[0.8]{labeloffset}
-% \ifGERMAN Der Abstand des Referenzknotens für die Beschriftung (roter Punkt) zur Komponentenmitte (blaues Kreuz).\fi
-% \ifENGLISH The offset of the label reference node (red dot) from the component
-% center (blue cross).\fi
+% \ifGERMAN Der Abstand des Referenzknotens für die Beschriftung (roter
+% Punkt) zur Komponentenmitte (blaues Kreuz).
+% \fi
+% \ifENGLISH The offset of the label reference node (red dot) from the
+% component center (blue cross).
+% \fi
% \iffalse
%<*ignore>
% \fi
@@ -2080,8 +2177,12 @@
% \fi
%
% \boolitem{endbox}
-% \ifGERMAN Dieser Parameter ist äquivalent zu \Lkeyword{position}\opt{=end}.\fi
-% \ifENGLISH This parameter is equivalent to \Lkeyword{position}\opt{=end}.\fi
+% \ifGERMAN Dieser Parameter sollte nicht mehr verwendet werden, er ist
+% äquivalent zu \Lkeyword{position}\opt{=end}.
+% \fi
+% \ifENGLISH This parameter should not be used any more, it is
+% equivalent to \Lkeyword{position}\opt{=end}.
+% \fi
% \end{optionlist}
%
%
@@ -2181,26 +2282,27 @@
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}[linerange={1-3,9-9}, morekeywords={[21]{compshift}}]
-\begin{pspicture}(3,2)
- \pnode(0,1){A}\pnode(2.7,1){B}
- \lens[compshift=0.3](A)(B){L}
- \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{})
+\begin{LTXexample}[linerange={1-3,10-10}, morekeywords={[21]{compshift}}]
+\begin{pspicture}(4,2)
+ \pnode(0.4, 0.5){A}\pnode(3.6,0.5){B}
+ \lens[lens=2 2 2, compshift=0.5](A)(B)
+ \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{})
\psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
\psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
\psdot[style=CenterNode](\oenodeIn{})
\psdot[style=CenterNode](\oenodeOut{})
+ \psline[linecolor=DOrange, arrows=|->, arrowscale=1.5, arrowinset=0](\oenodeCenter{}|A)(\oenodeCenter{})
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}[linerange={1-3,9-9}, morekeywords={[21]{compshift}}]
-\begin{pspicture}(3,2)
- \pnode(0,1){A}\pnode(2,0){B}
- \mirror[compshift=0.3](A)(2,1)(B){mirror}
- \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{}|\oenodeRefA{})(\oenodeRefB{})
+\begin{pspicture}(4,2)
+ \pnode(0.4,1.2){A}\pnode(3,0.2){B}
+ \mirror[compshift=0.5](A)(B|A)(B)
+ \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{}|\oenodeRefA{})(\oenodeRefB{})
\psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
- \psdot(\oenodeRefB{})\uput[180](\oenodeRefB{}){RefB}
+ \psdot(\oenodeRefB{})\uput[0](\oenodeRefB{}){RefB}
\psdot[style=CenterNode](\oenodeIn{})
- \psdot[style=CenterNode](\oenodeOut{})
+ \psline[linecolor=DOrange, arrows=|->, arrowscale=1.5, arrowinset=0](B|A)(\oenodeCenter{})
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -2225,26 +2327,27 @@
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}[linerange={1-3,9-9}, morekeywords={[21]{compshift}}]
-\begin{pspicture}(3,2)
- \pnode(0,1){A}\pnode(2.7,1){B}
- \lens[compoffset=0.3](A)(B){L}
- \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{})
+\begin{LTXexample}[linerange={1-3,10-10}, morekeywords={[21]{compoffset}}]
+\begin{pspicture}(4,2)
+ \pnode(0.4, 1){A}\pnode(3.6, 1){B}
+ \lens[lens=2 2 2, compoffset=0.5](A)(B)
+ \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{})
\psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
\psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
\psdot[style=CenterNode](\oenodeIn{})
\psdot[style=CenterNode](\oenodeOut{})
+ \psline[linecolor=DOrange, arrows=|->, arrowscale=1.5, arrowinset=0]([Xnodesep=-0.5]\oenodeCenter{})(\oenodeCenter{})
\end{pspicture}
\end{LTXexample}
-\begin{LTXexample}[linerange={1-3,9-9}, morekeywords={[21]{compshift}}]
-\begin{pspicture}(3,2)
- \pnode(0,1){A}\pnode(2,0){B}
- \mirror[compoffset=0.3](A)(2,1)(B){mirror}
- \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{}|\oenodeRefA{})(\oenodeRefB{})
+\begin{LTXexample}[linerange={1-3,9-9}, morekeywords={[21]{compoffset}}]
+\begin{pspicture}(4,2)
+ \pnode(0.4,1.2){A}\pnode(3,0.2){B}
+ \mirror[compoffset=0.5](A)(B|A)(B)
+ \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{}|\oenodeRefA{})(\oenodeRefB{})
\psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
- \psdot(\oenodeRefB{})\uput[180](\oenodeRefB{}){RefB}
+ \psdot(\oenodeRefB{})\uput[0](\oenodeRefB{}){RefB}
\psdot[style=CenterNode](\oenodeIn{})
- \psdot[style=CenterNode](\oenodeOut{})
+ \psline[linecolor=DOrange, arrows=|->, arrowscale=1.5, arrowinset=0](B|A)(\oenodeCenter{})
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -2253,20 +2356,20 @@
% \choitem{innercompalign}{rel, relative, abs, absolute}
% \ifGERMAN Ist dieser Parameter auf \opt{absolute} gesetzt, so wird das
% «Innere» einer Komponente nicht mitgedreht. Diese Option wird derzeit
-% nur von \Lcs{optfilter} verwendet.
+% von \Lcomp{optfilter}, \Lcomp{elecsynthesizer} und \Lcomp{optdipole} verwendet.
% \fi
% \ifENGLISH If this parameter is set to \opt{absolute}, the «inner»
% component part is not rotated with the component. At the moment, this
-% option is used only by \Lcs{optfilter}.
+% option is used by \Lcomp{optfilter}, \Lcomp{elecsynthesizer}, and \Lcomp{optdipole}.
% \fi
% \iffalse
%<*ignore>
% \fi
\begin{LTXexample}
\begin{pspicture}(3,2)
-\psset[optexp]{labelangle=-90, position=start}
-\optfilter[innercompalign=rel](0.5,1.2)(0.5,2){rel}
-\optfilter[innercompalign=abs](2.5,1.2)(2.5,2){abs}
+\psset[optexp]{labelangle=-90}
+\elecsynthesizer[innercompalign=rel](0.5,1.2)(0.5,2){rel}
+\elecsynthesizer[innercompalign=abs](2.5,1.2)(2.5,2){abs}
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -2385,12 +2488,12 @@
%
% \styleitem[linestyle=dashed,dash=1.5pt 1pt]{OptionalStyle}
% \ifGERMAN
-% Der Stil wird zusätzlich zu \Lkeyword{OptComp} auf Komponenten angewendet,
+% Der Stil wird zusätzlich zu \Lstyle{OptComp} auf Komponenten angewendet,
% die als \Lkeyword{optional} markiert sind.
% \fi
% \ifENGLISH
% This style is applied to components marked as \Lkeyword{optional} in addition
-% to \Lkeyword{OptComp}.
+% to \Lstyle{OptComp}.
% \fi
% \iffalse
%<*ignore>
@@ -2442,11 +2545,11 @@
% \fi
%
% \styleitem[linewidth=0.8\cs{pslinewidth}, arrowinset=0, arrowscale=0.8, arrows=<->]{VariableStyle}
-% \ifGERMAN Der Stil der Pfeile für verstellbare Komponenten (\Lcs{mirror} und
-% \Lcs{optgrating}).
+% \ifGERMAN Der Stil der Pfeile für verstellbare Komponenten (\Lcomp{mirror} und
+% \Lcomp{optgrating}).
% \fi
-% \ifENGLISH The style of the arrows of variable components (\Lcs{mirror} and
-% \Lcs{optgrating}).
+% \ifENGLISH The style of the arrows of variable components (\Lcomp{mirror} and
+% \Lcomp{optgrating}).
% \fi
% \end{stylelist}
%
@@ -2505,17 +2608,17 @@
% Faserkomponenten, transmittive und reflektive Grenzflächen haben, die für
% Raytracing von Lichtstrahlen verwendet werden können. Es gibt zwei
% unterschiedliche Komponententypen: manche benötigen nur zwei Knoten um
-% positioniert zu werden (\ref{cmd:lens}--\ref{cmd:polarization}), wohingegen
+% positioniert zu werden (\compref{lens}--\compref{polarization}), wohingegen
% z.B. Spiegel drei Knoten benötigen um korrekt ausgerichtet zu werden
-% (\ref{cmd:mirror}--\ref{cmd:pentaprism}).
+% (\compref{mirror}--\compref{pentaprism}).
% \fi
% \ifENGLISH This chapter describes all free-ray components and their
% options. Free-ray components differ from fiber components in that they provide
% transmittive or reflective interfaces which can be used to raytrace
% beams. They are divided in two types: some components like lenses need only
-% two nodes for positioning (\ref{cmd:lens}--\ref{cmd:polarization}), whereas
+% two nodes for positioning (\compref{lens}--\compref{polarization}), whereas
% e.g. mirrors require three nodes to determine the orientation
-% (\ref{cmd:mirror}--\ref{cmd:pentaprism}).
+% (\compref{mirror}--\compref{pentaprism}).
% \fi
%
% \ifGERMAN\section{Linse}\fi
@@ -2634,7 +2737,7 @@
% \fi
\begin{LTXexample}[morekeywords={[21]{lenswidth}}]
\begin{pspicture}(3,2)
- \lens[lenswidth=0.5, beam](0,1)(2,1){thicklens}
+ \lens[lenswidth=0.5, beam](0,1)(2,1){thick lens}
\lens[lenswidth=0.1, beam](2,1)(3,1)
\end{pspicture}
\end{LTXexample}
@@ -2684,7 +2787,8 @@
%
% \ifGERMAN\section{Optisches Plättchen}\fi
% \ifENGLISH\section{Optical plate}\fi
-%
+%
+%
% \begin{ltxsyntax}
% \dipoledesc{optplate}
% \iffalse
@@ -2838,6 +2942,175 @@
% \fi
% \end{optionlist}
%
+% \ifGERMAN\section{Pfeilkomponente}\fi
+% \ifENGLISH\section{Arrow component}\fi
+%
+% \begin{ltxsyntax}
+% \dipoledesc{optarrowcomp}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,1.7)
+ \optarrowcomp[wire](0,1)(3,1){box}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \ifENGLISH A general purpose component, similar to \Lcomp{fiberdelayline},
+% but much more flexible.
+% \fi
+% \ifGERMAN Eine Komponente für den allgemeinen, flexiblen Gebrauch
+% ähnlich zu \Lcomp{fiberdelayline}, aber deutlich variabler.
+% \fi
+% \end{ltxsyntax}
+%
+% \begin{optionlist}
+% \numitem[1.4]{arrowcompwidth}
+% \ifGERMAN Die Breite der Box.\fi
+% \ifENGLISH The width of the box.\fi
+%
+% \numitem[0.8]{arrowcompheight}
+% \ifGERMAN Die Höhe der Komponente.\fi
+% \ifENGLISH The height of the Komponente.\fi
+%
+% \optitem{arrowcompsize}{\prm{size} or \prm{width} \prm{height}}
+% \ifGERMAN Die Breite und Höhe der Komponente, äquivalent zum Aufruf von
+% \Lkeyword{arrowcompwidth} und \Lkeyword{arrowcompheight}.
+% \fi
+% \ifENGLISH The width and height of the component, is equivalent to calling both
+% \Lkeyword{arrowcompwidth} and \Lkeyword{arrowcompheight}.
+% \fi
+%
+% \numitem[70]{arrowcompangle}
+% \ifGERMAN Der Winkel des Pfeils bezüglich der $x$-Achse.\fi
+% \ifENGLISH The angle of the arrow with respect to the $x$-axis.\fi
+%
+% \choitem[rectangle]{arrowcompshape}{rectangle, circle}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]arrowcompshape}]
+\begin{pspicture}(3,1)
+ \optarrowcomp[arrowcompshape=circle, wire](0,0.5)(3,0.5)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{optionlist}
+% \begin{stylelist}
+% \styleitem[arrowinset=0, arrows=->]{ArrowCompStyle}
+% \ifGERMAN
+% Der Stil für den Pfeil. Das kann insbesonders nützlich sein um die
+% Länge und Ausrichtung des Pfeils zu verändern.
+% \fi
+% \ifENGLISH
+% The style of the arrow. This can be especially useful to
+% adapt the length and orientation of the arrow.
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]ArrowCompStyle}]
+\begin{pspicture}(3,1.5)
+ \addtopsstyle{ArrowCompStyle}{xunit=-1, arrowscale=2}
+ \optarrowcomp[fiber](0,1)(3,1){delay line}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{stylelist}
+%
+% \ifGERMAN\section{Balkenkomponente}\fi
+% \ifENGLISH\section{Bar component}\fi
+%
+% \begin{ltxsyntax}
+% \dipoledesc{optbarcomp}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,1.5)
+ \optbarcomp[fiber](0,1)(3,1){box}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \ifENGLISH A general purpose component, similar to \Lcomp{optfiberpolarizer},
+% but much more flexible.
+% \fi
+% \ifGERMAN Eine Komponente für den allgemeinen, flexiblen Gebrauch
+% ähnlich zu \Lcomp{optfiberpolarizer}, aber deutlich variabler.
+% \fi
+% \end{ltxsyntax}
+%
+% \begin{optionlist}
+% \numitem[1.4]{barcompwidth}
+% \ifGERMAN Die Breite der Box.\fi
+% \ifENGLISH The width of the box.\fi
+%
+% \numitem[0.8]{barcompheight}
+% \ifGERMAN Die Höhe der Box.\fi
+% \ifENGLISH The height of the box.\fi
+%
+% \optitem{barcompsize}{\prm{size} or \prm{width} \prm{height}}
+% \ifGERMAN Die Breite und Höhe der Box, äquivalent zum Aufruf von
+% \Lkeyword{barcompwidth} und \Lkeyword{barcompheight}.
+% \fi
+% \ifENGLISH The width and height of the box, is equivalent to calling both
+% \Lkeyword{barcompwidth} and \Lkeyword{barcompheight}.
+% \fi
+%
+% \numitem[70]{barcompangle}
+% \ifGERMAN Der Winkel des Balkens bezüglich der $x$-Achse.\fi
+% \ifENGLISH The angle of the bar with respect to the $x$-axis.\fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]barcompangle}]
+\begin{pspicture}(3,1)
+ \optbarcomp[barcompangle=90, fiber](0,0.5)(3,0.5)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \choitem[rectangle]{barcompshape}{rectangle, circle}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]barcompshape}]
+\begin{pspicture}(3,1)
+ \optbarcomp[barcompshape=circle, fiber](0,0.5)(3,0.5)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{optionlist}
+% \begin{stylelist}
+% \styleitem{BarCompStyle}
+% \ifENGLISH The style of the bar.\fi
+% \ifGERMAN Der Stil für den Balken.\fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]BarCompStyle}]
+\begin{pspicture}(3,1)
+ \newpsstyle{BarCompStyle}{unit=0.7, arrows=->}
+ \optbarcomp[barcompshape=circle, barcompangle=45, fiber](0,0.5)(3,0.5)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{stylelist}
+%
%
% \ifGERMAN\section{Kristall}\fi
% \ifENGLISH\section{Crystal}\fi
@@ -2980,90 +3253,6 @@
%</ignore>
% \fi
%
-% \ifGERMAN\section{Detektor}\fi
-% \ifENGLISH\section{Detector}\fi
-%
-% \begin{ltxsyntax}
-% \dipoledesc{optdetector}
-% \iffalse
-%<*ignore>
-% \fi
-\begin{LTXexample}
-\begin{pspicture}(3,1.2)
- \optdetector[beam](0,0)(1.5,1){detector}
-\end{pspicture}
-\end{LTXexample}
-% \iffalse
-%</ignore>
-% \fi
-% \end{ltxsyntax}
-%
-% \ifENGLISH The detector is always placed at the end of the reference line
-% (\Lkeyword{position}\opt{=end}). This setting cannot be changed.
-% \fi
-% \ifGERMAN Der Detektor wird immer ans Ende der Referenzlinie platziert
-% (\Lkeyword{position}\opt{=end}). Diese Einstellung kann nicht verändert
-% werden.
-% \fi
-%
-% \begin{optionlist}
-% \optitem[0.8]{detsize}{\prm{num} or \prm{width} \prm{height}}
-% \ifGERMAN
-% Wenn eine einzelne Zahl angegeben ist, dann ist das die Seitenlänge
-% (\opt{diode}) bzw. der Durchmesser (\opt{round}) des Detektors. Werden zwei
-% Zahlen angegeben, so sind das Breite und Höhe des Detektors. Beachten Sie,
-% dass \opt{detsize=1} und \opt{detsize=1 1} für \opt{dettype=round} nicht dasselbe ist.
-% \fi
-% \ifENGLISH
-% If a single number is given it is the side length (\opt{diode}) or the
-% diameter (\opt{round}) of the detector. Two numbers define the width and
-% height of the detector. Note, that \opt{detsize=1} and \opt{detsize=1 1} are
-% not equivalent for \opt{dettype=round}.
-% \fi
-%
-% \choitem[round]{dettype}{round, diode}
-% \ifGERMAN
-% Dieser Parameter bestimmt den Typ und damit das Aussehen des Detektors.
-% \fi
-% \ifENGLISH
-% This parameter selects between different types of detectors.
-% \fi
-% \iffalse
-%<*ignore>
-% \fi
-\begin{LTXexample}[morekeywords={[21]{dettype}}]
-\begin{pspicture}(3,1.5)
- \optdetector[beam, dettype=diode](0,0)(1.5,1){detector}
-\end{pspicture}
-\end{LTXexample}
-% \iffalse
-%</ignore>
-% \fi
-% \end{optionlist}
-%
-% \begin{stylelist}
-% \styleitem{DetectorStyle}
-% \ifGERMAN
-% Der Stil der Diode für \Lkeyword{dettype}\opt{=diode}.
-% \fi
-% \ifENGLISH
-% The style of the diode for \Lkeyword{dettype}\opt{=diode}.
-% \fi
-% \iffalse
-%<*ignore>
-% \fi
-\begin{LTXexample}
-\begin{pspicture}(3,1.5)
- \newpsstyle{OptComp}{linewidth=2\pslinewidth}
- \newpsstyle{DetectorStyle}{linewidth=0.5\pslinewidth}
- \optdetector[dettype=diode](0,1)(2,1)
-\end{pspicture}
-\end{LTXexample}
-% \iffalse
-%</ignore>
-% \fi
-% \end{stylelist}
-%
% \ifGERMAN\section{Optische Diode}\fi
% \ifENGLISH\section{Optical diode}\fi
%
@@ -3149,15 +3338,15 @@
%</ignore>
% \fi
%
-% \ifGERMAN\section{Glan--Thompson prism}\fi
-% \ifENGLISH\section{Glan-Thompson-Prisma}\fi
-%
+% \ifGERMAN\section{Glan-Thompson-Prisma}\fi
+% \ifENGLISH\section{Glan--Thompson prism}\fi
+%
% \begin{ltxsyntax}
% \dipoledesc{glanthompson}
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}[morekeywords={[21]{glanthompson}}]
+\begin{LTXexample}[morekeywords={[21]{glanthompson}}]
\begin{pspicture}(3,1.5)
\glanthompson[beam](0,1)(3,1){Glan-Thompson}
\end{pspicture}
@@ -3308,7 +3497,7 @@
% \end{optionlist}
%
% \begin{stylelist}
-% \styleitem[arrowscale=0.8, linewidth=\cs{pslinewidth}, dotsize=3\cs{pslinewidth}]{Polarization}
+% \styleitem[arrowscale=0.8, linewidth=0.7\cs{pslinewidth}, dotsize=3\cs{pslinewidth}]{Polarization}
% \ifGERMAN Bestimmt das Aussehen der Polarisationssymbole.\fi
% \ifENGLISH Affects the style of the polarisation symbols.\fi
% \end{stylelist}
@@ -3621,13 +3810,13 @@
% \ifGERMAN
% Wählt zwischen zwei Strahlteilertypen: einem Strahlteilerwürfel (\opt{cube})
% und einem halbdurchlässigen Spiegel (\opt{plate}). Dieser halbdurchlässige
-% Spiegel ist äquivalent zu \Lcs{mirror} mit
+% Spiegel ist äquivalent zu \Lcomp{mirror} mit
% \Lkeyword{mirrortype}\opt{=semitrans} für \Lkeyword{mirrordepth}\opt{=0}.
% \fi
% \ifENGLISH
% Selects between two types of beamsplitters: the beamsplitter cube (\opt{cube})
% and the semitransparent mirror (\opt{plate}). This semitransparent mirror ist
-% equivalent to \Lcs{mirror} with \Lkeyword{mirrortype}\opt{=semitrans} and
+% equivalent to \Lcomp{mirror} with \Lkeyword{mirrortype}\opt{=semitrans} and
% \Lkeyword{mirrordepth}\opt{=0}.
% \fi
% \iffalse
@@ -3653,7 +3842,7 @@
% \fi
\begin{LTXexample}
\begin{pspicture}(3,2)
- \optgrating[beam](0,2)(1.8,1.5)(0,0){grating}
+ \optgrating[beam](0,2)(1.8,1.5)(0,0){G}
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -3662,10 +3851,10 @@
% \end{ltxsyntax}
%
% \ifENGLISH Before package version 3.0 this component was called
-% \Lcs*{optgrid}. Since then this command name is deprecated and will be removed
+% \Lcomp*{optgrid}. Since then this command name is deprecated and will be removed
% in future versions.
% \fi
-% \ifGERMAN Vor Paketversion 3.0 hieß diese Komponente \Lcs*{optgrid}. Seitdem
+% \ifGERMAN Vor Paketversion 3.0 hieß diese Komponente \Lcomp*{optgrid}. Seitdem
% ist diese Benennung veraltet und wird in zukünftigen Versionen entfernt
% werden.
% \fi
@@ -3695,7 +3884,7 @@
\begin{LTXexample}[morekeywords={[21]{gratingdepth}}]
\begin{pspicture}(3,2)
\optgrating[gratingdepth=0.05,
- beam](0,2)(1.8,1.5)(0,0){grating}
+ beam](0,2)(1.8,1.5)(0,0){G}
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -3711,7 +3900,7 @@
\begin{LTXexample}[morekeywords={[21]{gratingcount}}]
\begin{pspicture}(3,2)
\optgrating[gratingcount=3,
- beam](0,2)(1.8,1.5)(0,0){grating}
+ beam](0,2)(1.8,1.5)(0,0){G}
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -3732,7 +3921,7 @@
\begin{LTXexample}[morekeywords={[21]{gratingtype}}]
\begin{pspicture}(3,2)
\optgrating[gratingtype=binary,
- beam](0,2)(1.8,1.5)(0,0){grating}
+ beam](0,2)(1.8,1.5)(0,0){G}
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -4007,21 +4196,21 @@
%
% Die meisten Komponenten benötigen nur zwei Referenzknoten und werden
% wie die Freistrahlzweipole behandelt. Manche spezielle Komponenten wie
-% Koppler (\ref{sec:coupler}) und Zirkulatoren (\ref{cmd:optcirculator})
+% Koppler (\ref{sec:coupler}) und Zirkulatoren (\compref{optcirculator})
% werden anders ausgerichtet.
% \fi
%
% \begin{optionlist}
% \boolitem{usefiberstyle}
% \ifGERMAN
-% Bei manchen Komponenten (z.B. \Lcs{optfilter} oder \Lcs{optmzm}) kann es
+% Bei manchen Komponenten (z.B. \Lcomp{optfilter} oder \Lcomp{optmzm}) kann es
% vorteilhaft sein interne Faserteile hervorzuheben. Mit diesem Parameter
% werden z.B. die durchlässigen Teile eines Filter angezeigt und mit dem
% \Lstyle{Fiber}-Stil gezeichnet. In der Dokumentation ist dieses Verhalten
% angeschaltet um die betroffenen Bereiche hervorzuheben.
% \fi
% \ifENGLISH
-% For some components (e.g. \Lcs{optfilter} or \Lcs{optmzm}) it can be nice
+% For some components (e.g. \Lcomp{optfilter} or \Lcomp{optmzm}) it can be nice
% to highlight some internals. For example, if this option is enabled the
% passing parts of the optical filter are drawn with the \Lstyle{Fiber}
% style. In the documentation this parameter is enabled to show the parts
@@ -4077,7 +4266,7 @@
%</ignore>
% \fi
%
-% \numitem[0.3]{fiberloopsep}
+% \numitem[0.2]{fiberloopsep}
% \ifGERMAN Abstand zwischen zwei aufeinanderfolgenden Faserschleifen.\fi
% \ifENGLISH Separation between two successive fiber loops.\fi
% \iffalse
@@ -4299,7 +4488,7 @@
% \end{optionlist}
%
% \ifGERMAN\section{Faserverzögerungstrecke}\fi
-% \ifENGLISH\section{Fiber delay line}\fi
+% \ifENGLISH\section{Fiber delay-line}\fi
%
% \begin{ltxsyntax}
% \fiberdipoledesc{fiberdelayline}
@@ -4331,26 +4520,10 @@
% \begin{stylelist}
% \styleitem[arrowinset=0, arrows=->]{FdlArrow}
% \ifGERMAN
-% Der Stil für den Pfeil. Das kann insbesonders nützlich sein um die
-% Länge des Pfeils zu verändern, die bei geänderter Größe nicht mehr
-% passend sein kann, oder um den Pfeil zu spiegeln.
+% Siehe \Lstyle{ArrowCompStyle}.
% \fi
% \ifENGLISH
-% The style of the arrow. This can be especially useful to
-% adapt the length of the arrow which may not be appropriate depending
-% on the \opt{fdlsize}, or to mirror the arrow.
-% \fi
-% \iffalse
-%<*ignore>
-% \fi
-\begin{LTXexample}[morekeywords={[21]FdlArrow}]
-\begin{pspicture}(3,1.5)
- \addtopsstyle{FdlArrow}{xunit=-1}
- \fiberdelayline(0,1)(3,1){delay line}
-\end{pspicture}
-\end{LTXexample}
-% \iffalse
-%</ignore>
+% See \Lstyle{ArrowCompStyle}.
% \fi
% \end{stylelist}
%
@@ -4387,10 +4560,11 @@
%
% \ifGERMAN\section{Optischer Zirkulator}\fi
% \ifENGLISH\section{Optical circulator}\fi
+%
% \label{sec:optcirculator}
% \begin{ltxsyntax}
% \xLfmultipole{optcirculator}%
-% \cmditem{optcirculator}(left)(right)(bottom){label}%
+% \compitem{optcirculator}(left)(right)(bottom){label}%
% \iffalse
%<*ignore>
% \fi
@@ -4515,7 +4689,7 @@
% \fi
% \begin{ltxsyntax}
% \xLfmultipole{optcoupler}%
-% \cmditem{optcoupler}(tl)(bl)(tr)(br){label}
+% \compitem{optcoupler}(tl)(bl)(tr)(br){label}
% \iffalse
%<*ignore>
% \fi
@@ -4529,7 +4703,7 @@
% \fi
%
% \xLfmultipole{wdmcoupler}%
-% \cmditem{wdmcoupler}(tl)(bl)(r){label}
+% \compitem{wdmcoupler}(tl)(bl)(r){label}
% \iffalse
%<*ignore>
% \fi
@@ -4543,7 +4717,7 @@
% \fi
%
% \xLfmultipole{wdmsplitter}%
-% \cmditem{wdmsplitter}(l)(tr)(br){label}
+% \compitem{wdmsplitter}(l)(tr)(br){label}
% \iffalse
%<*ignore>
% \fi
@@ -4568,7 +4742,7 @@
% this value. Two numbers define width and height directly.
% \fi
%
-% \numitem[0.1]{couplersep}
+% \numitem[0.05]{couplersep}
% \ifGERMAN Der vertikale Abstand zwischen zwei Faserports.\fi
% \ifENGLISH The vertical distance between two fiber ports.\fi
% \iffalse
@@ -4582,7 +4756,32 @@
% \iffalse
%</ignore>
% \fi
-%
+%
+% \ifENGLISH If this value is set to \{\}, the separation is calculated
+% automatically according to the \Lkeyword{couplertype} and
+% \Lkeyword{couplersize}.
+% \fi
+% \ifGERMAN Wird dieser Wert auf \{\} gesetzt, dann wird der Abstand
+% automatisch berechnet, abhängig von \Lkeyword{couplertype} und
+% \Lkeyword{couplersize}.
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{couplersep}}]
+\begin{pspicture}(3,4.5)
+ \psset{couplersep={}, couplersize=0.5, labeloffset=0.5}
+ \optcoupler[couplertype=none]%
+ (0,4.5)(0,3.5)(3,4.5)(3,3.5){none}
+ \optcoupler[couplertype=rectangle]%
+ (0,3)(0,2)(3,3)(3,2){rectangle}
+ \optcoupler[couplertype=ellipse]%
+ (0,1.5)(0,0.5)(3,1.5)(3,0.5){ellipse}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
% \choitem[ellipse]{couplertype}{none, ellipse, rectangle, cross}
% \ifGERMAN Wählt zwischen unterschiedlichen Kopplertypen.\fi
% \ifENGLISH Select between different coupler types.\fi
@@ -4664,16 +4863,16 @@
%
% \ifGERMAN
% Jeder Koppler hat eine Variante, die nur zwei Knoten benötigt, einen Eingangs-
-% und einen Ausgangsknoten. \Lcs{optcoupler} verwendet jeden dieser Knoten
-% zweimal, \Lcs{wdmsplitter} verwendet den Knoten \prm{out} zweimal und
-% \Lcs{wdmcoupler} verwendet \prm{in} zweimal. Das kann sehr praktisch sein,
+% und einen Ausgangsknoten. \Lcomp{optcoupler} verwendet jeden dieser Knoten
+% zweimal, \Lcomp{wdmsplitter} verwendet den Knoten \prm{out} zweimal und
+% \Lcomp{wdmcoupler} verwendet \prm{in} zweimal. Das kann sehr praktisch sein,
% wenn man für einen Koppler die automatischen Verbindungen nicht verwendet,
% sondern die Komponente manuell verbindet.
% \fi
% \ifENGLISH
% Every coupler has a variant which needs only two nodes, one input and one
-% output node. For \Lcs{optcoupler}, both nodes are used twice,
-% \Lcs{wdmsplitter} uses node \prm{out} twice, and \Lcs{wdmcoupler} uses node
+% output node. For \Lcomp{optcoupler}, both nodes are used twice,
+% \Lcomp{wdmsplitter} uses node \prm{out} twice, and \Lcomp{wdmcoupler} uses node
% \prm{in} twice. This can be very useful if you do not use the automatic
% connections but connect the components manually.
% \fi
@@ -4725,9 +4924,9 @@
% \psdot(\oenodeIfc{2}{})\uput[-90](\oenodeIfc{2}{}){2}
% \psdot(\oenodeIfc{3}{})\uput[90](\oenodeIfc{3}{}){3}
% \psdot(\oenodeIfc{N}{})\uput[-90](\oenodeIfc{N}{}){N}
-% \rput[b](1.5,0){\nxLcs{wdmsplitter}}
-% \rput[b](5.5,0){\nxLcs{wdmcoupler}}
-% \rput[b](9.5,0){\nxLcs{optcoupler}}
+% \rput[b](1.5,0){\nxLcomp{wdmsplitter}}
+% \rput[b](5.5,0){\nxLcomp{wdmcoupler}}
+% \rput[b](9.5,0){\nxLcomp{optcoupler}}
% \end{pspicture}
% \end{center}
%
@@ -4768,12 +4967,12 @@
%
% \begin{ltxsyntax}
% \xLfmultipole{fiberbox}%
-% \cmditem{fiberbox}(in)(out){label}
-% \cmditem*{fiberbox}(tl)(bl)(tr)(br){label}
+% \compitem{fiberbox}(in)(out){label}
+% \compitem*{fiberbox}(tl)(bl)(tr)(br){label}
% \end{ltxsyntax}
%
% \ifGERMAN
-% Eine \Lcs{fiberbox} kann entweder mit zwei, oder mit vier Knoten
+% Eine \Lcomp{fiberbox} kann entweder mit zwei, oder mit vier Knoten
% positioniert werden. Die Wahl beeinflusst die Position der Komponente
% und der Komponentenknoten und die automatischen Faserverbindungen.
%
@@ -4785,7 +4984,7 @@
% (siehe \Lkeyword{fiberboxcount} und das folgende Beispiel).
% \fi
% \ifENGLISH
-% A \Lcs{fiberbox} can be positioned either with two, or four nodes which
+% A \Lcomp{fiberbox} can be positioned either with two, or four nodes which
% affects the positioning of the component and the interface nodes, and the
% automatic fiber connections.
%
@@ -4904,11 +5103,11 @@
% \ifENGLISH Number of input (\prm{N}) and output nodes (\prm{M}).\fi
% \end{optionlist}
%
-% \ifGERMAN Für bestimmte Parameterkombinationen ist eine \Lcs{fiberbox}
-% äquivalent zu einer \Lcs{optbox}.
+% \ifGERMAN Für bestimmte Parameterkombinationen ist eine \Lcomp{fiberbox}
+% äquivalent zu einer \Lcomp{optbox}.
% \fi
-% \ifENGLISH For certain parameter configurations a \Lcs{fiberbox} is
-% equivalent to an \Lcs{optbox}.
+% \ifENGLISH For certain parameter configurations a \Lcomp{fiberbox} is
+% equivalent to an \Lcomp{optbox}.
% \fi
% \iffalse
%<*ignore>
@@ -4925,6 +5124,264 @@
% \fi
% \psset{usefiberstyle=false}
%
+%
+% \ifGERMAN\chapter{Elektrische Komponenten}\fi
+% \ifENGLISH\chapter{Electrical components}\fi
+% \label{chap:electrcomp}
+%
+% \ifGERMAN\section{Koppler}\fi
+% \ifENGLISH\section{Coupler}\fi
+%
+% \begin{ltxsyntax}
+% \xLemultipole{eleccoupler}%
+% \compitem{eleccoupler}(tl)(bl)(tr)(br){label}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,1.5)
+ \eleccoupler(0,1.5)(0,0)(3,1.5)(3,0)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{ltxsyntax}
+% \begin{optionlist}
+% \optitem[0.8]{eleccouplersize}{\prm{size} or \prm{width} \prm{height}}
+% \ifGERMAN Die Breite und Höhe des Kopplers, wird nur ein Wert
+% angegeben dann ist die Komponente quadratisch.
+% \fi
+% \ifENGLISH The width and height of the couplers, if only one value
+% is given the component is squared.
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]eleccouplersize}]
+\begin{pspicture}(3,1.5)
+ \eleccoupler[eleccouplersize=1 0.6](0,1.5)(0,0)(3,1.5)(3,0)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \numitem[\{\}]{eleccouplersep}
+% \ifGERMAN Der vertikale Abstand zwischen den beiden Eingangs-
+% bzw. Ausgangsanschlüssen. Ist der Wert leer, bzw. gleich \{\}, dann
+% wird der Abstand auf 75\% der Höhe gesetzt.
+% \fi
+% \ifENGLISH The vertical distance between the two input and output
+% ports. If the value is empty \{\}, then the separation is set to
+% 75\% of the height.
+% \fi
+%
+% \choitem[standard]{eleccouplertype}{standard, directional}
+% \ifGERMAN Wählt zwischen unterschiedlichen Kopplertypen.\fi
+% \ifENGLISH Select between different coupler types.\fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]eleccouplertype}]
+\begin{pspicture}(3,1.5)
+ \eleccoupler[eleccouplertype=directional](0,1.5)(0,0)(3,1.5)(3,0)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \choitem[left]{eleccouplerinput}{left, right}
+% \ifGERMAN Gibt beim direktionalen Koppler die Eingangsseite an.\fi
+% \ifENGLISH Selects the input side for the directional coupler.\fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]eleccouplerinput}]
+\begin{pspicture}(3,1.5)
+ \eleccoupler[eleccouplertype=directional, eleccouplerinput=right](0,1.5)(0,0)(3,1.5)(3,0)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{optionlist}
+%
+% \ifGERMAN Die automatischen Verbindungen des elektrischen Kopplers
+% sind, anders als beim optischen Koppler, alle auf die Komponente
+% gerichtet. Das ergibt ein symmetrisches Layout der automatischen
+% Verbindungen des elektrischen Kopplers bei Verwendung der Vorgabe
+% \Lkeyword{wirestyle}\opt{=angle}.
+% \fi
+% \ifENGLISH The automatic connections of the electrical coupler are all
+% directed towards the component, in contrast to the optical
+% coupler. This gives a symmetric layout of the automatic electrical coupler
+% connections when using the default of
+% \Lkeyword{wirestyle}\opt{=angle}.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,4)
+ \addtopsstyle{Wire}{arrows=->}
+ \addtopsstyle{Fiber}{arrows=->, fiberstyle=angle}
+ \eleccoupler(0,4)(0,2)(3,4)(3,2)
+ \optcoupler[couplersize=0.8 0.8, couplersep={}, couplertype=rectangle](0,1.5)(0,0)(3,1.5)(3,0)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN\section{Synthesizer}\fi
+% \ifENGLISH\section{Synthesizer}\fi
+%
+% \begin{ltxsyntax}
+% \xLemultipole{elecsynthesizer}%
+% \compitem{elecsynthesizer}(in)(out){label}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,1.5)
+ \elecsynthesizer(1,1)(3,1){SYN}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{ltxsyntax}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,1.5)
+ \elecsynthesizer[position=0.5](0,1)(3,1){SYN}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \begin{optionlist}
+% \optitem[0.8]{synthsize}{\prm{size} or \prm{width} \prm{height}}
+% \ifGERMAN Die Größe der Komponente, ist diese rund und wurden zwei
+% Werte angegeben, dann wird der kleinere als Durchmesser verwendet.
+% \fi
+% \ifENGLISH The size of the component, if this is of circular shape
+% and two values were given, the smaller one is used as diameter.
+% \fi
+%
+% \choitem[sine]{synthtype}{sine, pulse, sawtooth, rectangle, triangle, custom}
+% \ifGERMAN Wählt zwischen unterschiedlichen Typen.\fi
+% \ifENGLISH Select between different synthesizer types.\fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]synthtype}]
+\begin{pspicture}(0,0.6)(3,5.4)
+ \elecsynthesizer[synthtype=sine](1,5)(3,5)
+ \elecsynthesizer[synthtype=sawtooth](1,4)(3,4)
+ \elecsynthesizer[synthtype=triangle](1,3)(3,3)
+ \elecsynthesizer[synthtype=rectangle](1,2)(3,2)
+ \elecsynthesizer[synthtype=pulse](1,1)(3,1)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN Es kann auch eine frei wählbare Wellenform gewählt werden.\fi
+% \ifENGLISH You can also use a freely customizable waveform.\fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]synthtype}]
+\begin{pspicture}(0,0)(3,2)
+ \makeatletter
+ \def\elecsynthesizer@custom{%
+ \psline(-0.25,-0.1)(-0.1,-0.1)(-0.1,0)%
+ (0.1,0)(0.1,0.1)(0.25,0.1)}
+ \makeatother
+ \elecsynthesizer[synthtype=custom](1,1)(3,1)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \choitem[circle]{synthshape}{circle, rectangle}
+% \ifGERMAN Wählt zwischen kreisförmiger und rechteckiger Außenform.\fi
+% \ifENGLISH Select between circular and rectangular outer shape.\fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]synthshape}]
+\begin{pspicture}(3,1.5)
+ \elecsynthesizer[synthshape=rectangle](1,1)(3,1){SYN}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{optionlist}
+%
+% \begin{stylelist}
+% \styleitem{SynthStyle}
+% \ifGERMAN Beinflusst das Aussehen der internen Symbole.\fi
+% \ifENGLISH Change the style of the internal synthesizer symbol.\fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]SynthStyle}]
+\begin{pspicture}(3,1)
+ \newpsstyle{SynthStyle}{xunit=0.5, yunit=-1}
+ \elecsynthesizer(1,0.5)(3,0.5)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{stylelist}
+%
+% \ifGERMAN\section{Mixer}\fi
+% \ifENGLISH\section{Mixer}\fi
+%
+% \begin{ltxsyntax}
+% \xLemultipole{elecmixer}%
+% \compitem{elecmixer}(left)(right)(bottom){label}%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,2)
+ \newpsstyle{Wire}{arrowscale=1.5, arrowinset=0, arrows=->}
+ \addtopsstyle{WireOut1}{linecolor=blue}
+ \addtopsstyle{WireOut2}{linecolor=green!80!black}
+ \elecmixer(0,1)(3,1)(1.5,0){Mixer}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{ltxsyntax}
+%
+% \begin{optionlist}
+% \numitem[0.8]{elecmixersize}
+% \ifGERMAN Der Durchmesser des Mixers.\fi
+% \ifENGLISH The diameter of the mixer.\fi
+% \end{optionlist}
+%
+% \ifGERMAN Weitere Details bezüglich der Referenzknoten und
+% Positionierung finden Sie unter \Lcomp{optcirculator}.
+% \fi
+% \ifENGLISH For further details about the reference nodes and the
+% positioning, please refer to \Lcomp{optcirculator}.
+% \fi
+%
% \ifGERMAN\chapter{Hybridkomponenten}\fi
% \ifENGLISH\chapter{Hybrid components}\fi
% \label{sec:hybridcomp}
@@ -4932,25 +5389,29 @@
% \ifENGLISH This chapter describes the components which can be used both for
% free-ray and fiber optics but which differ from these two categories.
%
-% The optical filter (\Lcs{optfilter}) is connected by default with automatic
-% fiber connections, but can likewise be used with free-ray beams, in contrast
-% to the fiber components (\prettyref{chap:fibercomp}). The fiber collimator
-% (\Lcs{fibercollimator}) has one interface only, the other connection is a
-% fiber.
+% The \Lcomp{optfilter} is connected by default with automatic fiber
+% connections, but can likewise be used with free-ray beams, in contrast
+% to the fiber components (\prettyref{chap:fibercomp}). The
+% \Lcomp{fibercollimator} has one interface only, the other connection is
+% a fiber and the \Lcomp{optdetector} has one interface, the other
+% connection is a wire.
% \fi
% \ifGERMAN Dieses Kapitel beschreibt die Komponenten, die sowohl für
% Freistrahl- als auch Faseroptik zu verwenden sind, sich von diesen aber etwas
% abgrenzen.
%
-% Der optische Filter (\Lcs{optfilter}) wird mit den Voreinstellungen aber als
+% Der \Lcomp{optfilter} wird mit den Voreinstellungen zwar als
% Faserkomponente gehandhabt, kann jedoch im Gegensatz zu den reinen
-% Faserkomponenten (\prettyref{chap:fibercomp}) auch als Freistrahlkomponente
-% verwendet werden. Der Faserkollimator (\Lcs{fibercollimator}) hat nur eine
-% Faser, die andere Verbindung ist Freistrahl.
+% Faserkomponenten (\prettyref{chap:fibercomp}) auch als
+% Freistrahlkomponente verwendet werden. Der \Lcomp{fibercollimator} hat
+% nur eine Faser, die andere Verbindung ist Freistrahl und der
+% \Lcomp{optdetector} hat eine Freistrahl- und eine elektrische
+% Verbindung.
% \fi
%
% \ifGERMAN\section{Optischer Filter}\fi
% \ifENGLISH\section{Optical filter}\fi
+%
% \psset{usefiberstyle}
% \begin{ltxsyntax}
% \fiberdipoledesc{optfilter}
@@ -5006,7 +5467,7 @@
%
% \numitem[0]{filterangle}
% \ifGERMAN Dreht das «Innere» des Filters relativ zum seinem
-% Rahmen. Anstattdessen kann auch \Lkeyword{innercompalign} verwendet
+% Rahmen. Anstattdessn kann auch \Lkeyword{innercompalign} verwendet
% werden.
% \fi
% \ifENGLISH Rotates the «inner» part of the filter relativ to its
@@ -5072,7 +5533,7 @@
% \ifENGLISH\section{Fiber collimator}\fi
%
% \begin{ltxsyntax}
-% \xLdipole{fibercollimator}\cmditem{fibercollimator}(in)(A)(B)(out){label}%
+% \xLdipole{fibercollimator}\compitem{fibercollimator}(in)(A)(B)(out){label}%
% \iffalse
%<*ignore>
% \fi
@@ -5155,6 +5616,105 @@
% \fi
% \end{optionlist}
%
+% \ifGERMAN\section{Detektor}\fi
+% \ifENGLISH\section{Detector}\fi
+%
+% \begin{ltxsyntax}
+% \dipoledesc{optdetector}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,1.2)
+ \optdetector[beam](0,0)(1.5,1){detector}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{ltxsyntax}
+%
+% \ifENGLISH The detector is placed by default at the end of the
+% reference line (\Lkeyword{position}\opt{=end}). If this setting is
+% overwritten, the output connection is treated like that of an
+% electrical component.
+% \fi
+% \ifGERMAN Der Detektor wird in der Voreinstellung ans Ende der
+% Referenzlinie platziert (\Lkeyword{position}\opt{=end}). Wird dieser
+% Parameter überschrieben, dann wird die ausgehende Verbindung wie bei
+% einer elektrischen Komponente behandelt.
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,1.2)
+ \optdetector[position=0.5](0,0)(1.5,1){detector}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \begin{optionlist}
+% \optitem[0.8]{detsize}{\prm{num} or \prm{width} \prm{height}}
+% \ifGERMAN
+% Wenn eine einzelne Zahl angegeben ist, dann ist das die Seitenlänge
+% (\opt{diode}) bzw. der Durchmesser (\opt{round}) des Detektors. Werden zwei
+% Zahlen angegeben, so sind das Breite und Höhe des Detektors. Beachten Sie,
+% dass \opt{detsize=1} und \opt{detsize=1 1} für \opt{dettype=round} nicht dasselbe ist.
+% \fi
+% \ifENGLISH
+% If a single number is given it is the side length (\opt{diode}) or the
+% diameter (\opt{round}) of the detector. Two numbers define the width and
+% height of the detector. Note, that \opt{detsize=1} and \opt{detsize=1 1} are
+% not equivalent for \opt{dettype=round}.
+% \fi
+%
+% \choitem[round]{dettype}{round, diode}
+% \ifGERMAN
+% Dieser Parameter bestimmt den Typ und damit das Aussehen des Detektors.
+% \fi
+% \ifENGLISH
+% This parameter selects between different types of detectors.
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{dettype}}]
+\begin{pspicture}(3,1.5)
+ \optdetector[beam, dettype=diode](0,0)(1.5,1){detector}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{optionlist}
+%
+% \begin{stylelist}
+% \styleitem{DetectorStyle}
+% \ifGERMAN
+% Der Stil der Diode für \Lkeyword{dettype}\opt{=diode}.
+% \fi
+% \ifENGLISH
+% The style of the diode for \Lkeyword{dettype}\opt{=diode}.
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,1.5)
+ \newpsstyle{OptComp}{linewidth=3\pslinewidth}
+ \newpsstyle{DetectorStyle}{linewidth=0.333\pslinewidth}
+ \optdetector[dettype=diode](0,1)(2,1)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{stylelist}
+%
+%
% \ifGERMAN\chapter{Spezielle Knoten}\fi
% \ifENGLISH\chapter{Special nodes}\fi
% \label{sec:objnodes}
@@ -5323,7 +5883,7 @@
% Das sind die ursprünglichen Knoten, die für die Positionierung der Komponente
% benutzt wurden, \nxLcs{oenodeRefA} ist der erste und \nxLcs{oenodeRefB} der
% letzte Knoten. Diese Zuordnung ist nicht gültig für Faserkoppler
-% (\ref{sec:coupler-refnodes}) und Zirkulatoren (\ref{cmd:optcirculator}).
+% (\ref{sec:coupler-refnodes}) und Zirkulatoren (\compref{optcirculator}).
% \fi
% \ifENGLISH
% The input and output reference nodes.
@@ -5331,7 +5891,7 @@
% These are the original nodes which were used for the component positioning,
% \nxLcs{oenodeRefA} is the first and \nxLcs{oenodeRefB} the last node. This
% definition is not valid couplers (\ref{sec:coupler-refnodes}) and circulators
-% (\ref{cmd:optcirculator}).
+% (\compref{optcirculator}).
% \fi
% \iffalse
%<*ignore>
@@ -5393,12 +5953,12 @@
%
% \ifGERMAN
% Dieser Knoten liegt, bis auf wenige Ausnahmen, wie
-% z.B. \Lcs{optdetector} und \Lcs{optcoupler} (siehe unten), im
+% z.B. \Lcomp{optdetector} und \Lcomp{optcoupler} (siehe unten), im
% Mittelpunkt der Komponente.
% \fi
% \ifENGLISH
% This node lays, except for a few components like
-% e.g. \Lcs{optcirculator} and \Lcs{optcoupler} (see below), in the
+% e.g. \Lcomp{optcirculator} and \Lcomp{optcoupler} (see below), in the
% center of the component.
% \fi
% \iffalse
@@ -5418,10 +5978,10 @@
%</ignore>
% \fi
%
-% \ifGERMAN Bei \Lcs{optcoupler} hängt die Position der Komponentenmitte
+% \ifGERMAN Bei \Lcomp{optcoupler} hängt die Position der Komponentenmitte
% von den \Lkeyword{coupleralign} Einstellungen ab.
% \fi
-% \ifENGLISH For \Lcs{optcoupler} the position of the component center
+% \ifENGLISH For \Lcomp{optcoupler} the position of the component center
% depends on the \Lkeyword{coupleralign} settings.
% \fi
% \iffalse
@@ -5554,7 +6114,17 @@
\multido{\i=0+45}{8}{%
\optbox[innerlabel](0,0)(1;\i){\i}
\psdot(\oenodeExt{})
- }
+ }%
+\end{pspicture}
+\end{LTXexample}
+\begin{LTXexample}[morekeywords={[21]extnodealign}]
+\begin{pspicture}(-2.2,-2.2)(2.2,2.2)
+ \psset{dotscale=1.5, mirrortype=extended, mirrordepth=0.5, label=0.25 . . relative, extnodealign=abs, extnode=tr}
+ \newpsstyle{ExtendedMirror}{}
+ \multido{\i=0+45,\ii=-45+45}{8}{%
+ \mirror(0,0)(1.5;\i)(2.1212;\ii){\i}
+ \psdot(\oenodeExt{})
+ }%
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -5583,6 +6153,16 @@
}%
\end{pspicture}
\end{LTXexample}
+\begin{LTXexample}[morekeywords={[21]extnodealign}]
+\begin{pspicture}(-2.2,-2.2)(2.2,2.2)
+ \psset{dotscale=1.5, mirrortype=extended, mirrordepth=0.5, label=0.25 . . relative, extnodealign=abs, extnode=tr}
+ \newpsstyle{ExtendedMirror}{}
+ \multido{\i=0+45,\ii=-45+45}{8}{%
+ \mirror(0,0)(1.5;\i)(2.1212;\ii){\i}
+ \psdot(\oenodeExt{})
+ }%
+\end{pspicture}
+\end{LTXexample}
% \iffalse
%</ignore>
% \fi
@@ -5632,7 +6212,7 @@
% Lichtstrahl ausgehend vom Referenzknoten \Lcs{oenodeRefA} verläuft. Analog
% dazu ist die Definition ds Ausgangsknotens. Diese Bezeichnung kann nur für
% Faserkoppler (siehe \prettyref{sec:coupler-nodes}) und Strahlteiler
-% (\ref{cmd:beamsplitter}) nicht angewendet werden.
+% (\compref{beamsplitter}) nicht angewendet werden.
%
% \nxLcs{oenodeIn} ist äquivalent zu \nxLcs{oenodeIfc\{1\}} und
% \nxLcs{oenodeOut} ist äquivalent zu \nxLcs{oenodeIfc\{N\}}. Die Eingangs-
@@ -5645,7 +6225,7 @@
% is by definition the node to which a beam coming from the reference node
% \Lcs{oenodeRefA} is connected to. Correspondingly is the definition of the
% output node. This definition breaks down only for fiber couplers (see
-% \prettyref{sec:coupler-nodes}) and beamsplitter (\ref{cmd:beamsplitter}).
+% \prettyref{sec:coupler-nodes}) and beamsplitter (\compref{beamsplitter}).
%
% \nxLcs{oenodeIn} is equivalent to \nxLcs{oenodeIfc\{1\}} and
% \nxLcs{oenodeOut} is equivalent to \nxLcs{oenodeIfc\{N\}}. You should use
@@ -5927,8 +6507,9 @@
% \ifENGLISH\section{Beam vector}\fi
%
% \ifENGLISH In addition to the beam nodes (see
-% \prettyref{sec:beamnode}) also the vectors of the last saved beams
-% (see \Lkeyword{savebeam}) can be access on Postscript level.
+% \prettyref{sec:beamnode}) also the normalized vectors of the last
+% saved beams (see \Lkeyword{savebeam}) can be accessed at Postscript
+% level.
%
% These are again separated in single, upper and lower beams. \prm{num}
% has the same meaning as for \Lcs{oenodeBeam}.
@@ -5948,67 +6529,76 @@
% \cmditem{oeBeamVecLow}{num}
% \end{ltxsyntax}
%
-% \ifGERMAN Das kann dazu genutzt werden, um z.B. die Polarisation eines
-% Strahls zu kennzeichnen. Im folgenden Beispiel wird ein neuer Knoten
-% \prm{C} definiert, indem mit \Lcs*{nodexn} der Endpunkt des Strahls
-% entlang seiner Trajektorie verschoben wird.
-% \fi
-% \ifENGLISH A possible application is marking of the polarization of a
-% beam. In the following example we define a node \prm{C} which is
-% shifted with \Lcs*{nodexn} from the beam end point along the beam
-% trajectory.
+% \ifGERMAN Bei den gespeicherten Werten handelt es sich um den
+% normierten Richtungsvektor des letzten Strahlsegments. Dieser ist im
+% folgenden Beispiel in rot zu sehen. Im Gegensatz dazu wird mit
+% \Lkeyword{savebeam} der Richtungsvektor gespeichert, der nach der
+% letzten Grenzfläche gelten würde, also für einen nachfolgenden Strahl
+% verwendet würde. Dieser ist im Beispiel in blau eingezeichnet.
+% \fi
+% \ifENGLISH The saved values are those of the normalized direction
+% vector of the last beam segment and is drawn in red in the next
+% example. In contrast to this, the vector saved with
+% \Lkeyword{savebeam} is that behind the last interface and would be
+% used for a following beam. This is shown in blue in the following
+% example.
% \fi
-%
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}[linerange={1-7,9-9}]
-\begin{pspicture}(3,3)
- \pnode(0,1.5){A}\pnode(3,1.5){B}
- \lens[abspos=1, lens=5 5 3, n=2.1](A)(B)
- \optplane(B)
- \drawbeam[beampos=1](A){1-2}
- \nodexn{(\oenodeBeam{})-1.5(!\oeBeamVec{})}{C}
- \polarization(C)(\oenodeBeam{})
- \psdot(C)\uput[45](C){C}
+\begin{LTXexample}[morekeywords={[21]beaminsidelast}]
+\begin{pspicture}(4,2)
+ \optbox[optboxsize=2 1, angle=20, n=2](0,1)(4,1)
+ \drawbeam[beaminsidelast, beamalign=abs](0,1){1}
+ \pnode(\oenodeBeam{}){Out}
+ \nodexn{(Out)+(!\oeBeamVec{})}{C}
+ \drawbeam[linecolor=blue, arrows=->, loadbeam]{1}(C)
+ \drawbeam[linecolor=red, arrows=->](Out)(C)
\end{pspicture}
\end{LTXexample}
% \iffalse
%</ignore>
% \fi
%
-% \ifGERMAN Dieses Beispiel zeigt, dass wirklich der letzte eingehende
-% Strahlenvektor genommen wird, im Gegensatz zu \Lkeyword{loadbeam}, wo
-% der ausgehende Strahl weiterverwendet wird. Die Richtung des ausgehenden Strahl ist
-% rot angedeutet.
+% \ifGERMAN Das Verhalten ist unabhängig davon, ob der letzte Strahl nur
+% berechnet, oder auch gezeichnet wurde. Das nächste Beispiel verwendet
+% \Lkeyword{stopinside} anstelle vom Parameter \Lkeyword{beaminsidelast}
+% im vorangegangenen Beispiel; die Strahlvektoren bleiben davon
+% unbeeinflusst.
% \fi
-% \ifENGLISH This examples shows that the last incoming beam vector is
-% used, instead of \Lkeyword{loadbeam}, where the outgoing beam vector
-% is used. The direction of the outgoing beam is marked red.
+% \ifENGLISH This behaviour is independent of whether the last beam was
+% only calculated or also drawn. The next example uses
+% \Lkeyword{stopinside} instead of \Lkeyword{beaminsidelast} compared to
+% the previous example; the beam vectors are not affected by this.
% \fi
-%
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}[linerange={1-5,8-8}]
-\begin{pspicture}(3,2)
- \pnode(0,1){A}\pnode(3,1){B}
- \optbox[optboxsize=2 1, angle=20](A)(B)
- \drawbeam[beaminsidelast, beamalign=abs](A){1}
- \nodexn{(\oenodeBeam{})-(!\oeBeamVec{})}{C}
- \psdot(C)\uput[-90](C){C}
- \psline[linecolor=red, linestyle=dashed, dash=2pt 2pt, arrows=->, arrowscale=1.5](A|\oenodeBeam{})(B|\oenodeBeam{})
+\begin{LTXexample}[morekeywords={[21]stopinside}]
+\begin{pspicture}(4,2)
+ \optbox[optboxsize=2 1, angle=20, n=2](0,1)(4,1)
+ \drawbeam[stopinside, beamalign=abs](0,1){1}
+ \pnode(\oenodeBeam{}){Out}
+ \nodexn{(Out)+(!\oeBeamVec{})}{C}
+ \drawbeam[linecolor=blue, arrows=->, loadbeam]{1}(C)
+ \drawbeam[linecolor=red, arrows=->](Out)(C)
\end{pspicture}
\end{LTXexample}
% \iffalse
%</ignore>
% \fi
%
-% \ifENGLISH This can be applied to the upper and lower beams as well.\fi
-% \ifGERMAN Das kann ebenfalls auf den oberen und unteren
-% Strahl angewendet werden.
+% \ifGERMAN Das kann dazu genutzt werden, um z.B. die Polarisation eines
+% Strahls zu kennzeichnen. Im folgenden Beispiel werden die neuen Knoten
+% \prm{U} und \prm{L}definiert, indem mit \Lcs*{nodexn} die Endpunkte
+% des oberen bzw. unteren Strahls entlang ihrer Trajektorie zurück
+% verschoben werden.
+% \fi
+% \ifENGLISH A possible application is marking of the polarization of a
+% beam. In the following example we define the nodes \prm{U} and \prm{L}
+% which are shifted with \Lcs*{nodexn} from the end point of the upper
+% and lower beam along the respective beam trajectory.
% \fi
-%
% \iffalse
%<*ignore>
% \fi
@@ -6029,7 +6619,7 @@
%</ignore>
% \fi
%
-% \ifGERMAN Ein weiteres Beispiel finden Sie in \prettyref{ex:glan-thompson}.\fi
+% \ifGERMAN Ein weiteres Anwendungsbeispiel finden Sie in \prettyref{ex:glan-thompson}.\fi
% \ifENGLISH For another example see \prettyref{ex:glan-thompson}.\fi
%
%
@@ -6041,12 +6631,13 @@
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}[pos=t, linerange={2-4,16-16}]
+\begin{LTXexample}[pos=t, linerange={2-4,17-17}]
\psset{unit=2}
\begin{pspicture}(0.3,0.1)(4.8,1.6)
\pnode(0.5,0.5){A}\pnode(4.5,0.5){B}
\optbox[compshift=0.5, angle=10, rotateref=tr, extnode={-0.5,1}](A)(B)
\psline[style=Refline](\oenodeTrefA{})(\oenodeTrefB{})
+ \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{})
\psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
\psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
\psdot(\oenodeTrefA{})\uput[90](\oenodeTrefA{}){TrefA}
@@ -6068,31 +6659,52 @@
% \label{chap:connecting}
%
% \ifGERMAN
-% Das \nxLPack{pst-optexp}-Paket stellt unterschiedlichen Methoden bereit,
-% Komponenten vollautomatisch oder manuell, mit Fasern oder mit Lichtstrahlen zu
-% verbinden.
+% Das \nxLPack{pst-optexp}-Paket stellt unterschiedlichen Methoden
+% bereit, Komponenten vollautomatisch oder manuell, mit Lichtstrahlen,
+% Fasern oder Drähten zu verbinden.
% \begin{compactitem}
-% \item In \prettyref{sec:accessobj} wird beschrieben wie Komponenten und Knoten für Verbindungen angesprochen werden.
-% \item Strahlverbindungen im Allgemeinen und das Verhalten von Einzelstrahlen wir in \prettyref{sec:drawbeam} beschrieben.
-% \item \prettyref{sec:drawwidebeam} erweitert diese Beschreibung von Strahlverbindungen auf ausgedehnte Strahlen.
-% \item In \prettyref{sec:error-handling} wird gezeigt, wie fehlerhafte Strahlverbindungen (verfehlen von Grenzflächen) gehandhabt wird).
-% \item \prettyref{sec:custombeam} erläutert, wie stückweise definierte Strahlengänge einfach realisiert werden können.
-% \item Manuelle und automatische Faserverbindungen werden in \prettyref{sec:drawfiber} behandelt.
-% \item \prettyref{sec:layers} erklärt das Konzept der «front» und «back»-Ebene.
+% \item In \prettyref{sec:accessobj} wird beschrieben wie Komponenten
+% und Knoten für Verbindungen angesprochen werden.
+% \item Strahlverbindungen im Allgemeinen und das Verhalten von
+% Einzelstrahlen wird in \prettyref{sec:drawbeam} beschrieben.
+% \item \prettyref{sec:drawwidebeam} erweitert diese Beschreibung von
+% Strahlverbindungen auf ausgedehnte Strahlen und deren Eigenheiten.
+% \item In \prettyref{sec:error-handling} wird gezeigt, wie fehlerhafte
+% Strahlverbindungen (verfehlen von Grenzflächen) gehandhabt wird).
+% \item \prettyref{sec:custombeam} erläutert, wie bestimmte, stückweise
+% definierte Strahlengänge, wie z.B. bei eine Teleskop, einfach
+% realisiert werden können.
+% \item Manuelle Faserverbindungen werden in \prettyref{sec:drawfiber}
+% behandelt, manuelle elektrischen Verbindungen, die sehr ähnlich
+% funktionieren, in \prettyref{sec:drawwire}.
+% \item Automatische Verbindungen werden in
+% \prettyref{sec:drawconn-auto} erklärt.
+% \item \prettyref{sec:layers} erklärt das Konzept der «front» und
+% «back»-Ebene.
% \end{compactitem}
% \fi
% \ifENGLISH
-% The \LPack{pst-optexp} package provides several methods for automatic and
-% manual beam and fiber drawing.
-%
+% The \LPack{pst-optexp} package provides several methods for automatic
+% and manual connections of components with beams, fibers, or wires.
% \begin{compactitem}
-% \item \prettyref{sec:accessobj} describes how to access objects and nodes for use with connections.
-% \item Beam drawing in general and the behavior of single beams is explained in \prettyref{sec:drawbeam}.
-% \item \prettyref{sec:drawwidebeam} extends this description of beam drawing to wide beams.
-% \item \prettyref{sec:error-handling} shows how errors in beam connections (missed interfaces etc.) are handled.
-% \item \prettyref{sec:custombeam} explains how customized, piecewise defined beam paths are constructed.
-% \item Manual and automatic fiber connections are described in \prettyref{sec:drawfiber}.
-% \item \prettyref{sec:layers} introduces the concept of front and back layer for the drawings.
+% \item \prettyref{sec:accessobj} describes how to access objects and
+% nodes for use with the connection macros.
+% \item Beam drawing in general and the behavior of single beams is
+% explained in \prettyref{sec:drawbeam}.
+% \item \prettyref{sec:drawwidebeam} extends this description of beam
+% drawing to wide beams and their special properties.
+% \item \prettyref{sec:error-handling} shows how errors in beam
+% connections (missed interfaces etc.) are handled.
+% \item \prettyref{sec:custombeam} explains how customized, piecewise
+% defined beam paths, like e.g. in a telescope, can be easily
+% constructed.
+% \item Manual fiber connections are described in
+% \prettyref{sec:drawfiber}, manual wire connections, which show the
+% same behavior, are treated in \prettyref{sec:drawwire}.
+% \item Automatic connections are explained in
+% \prettyref{sec:drawconn-auto}.
+% \item \prettyref{sec:layers} introduces the concept of front and back
+% layer for the drawings.
% \end{compactitem}
% \fi
% \ifGERMAN\section{Zugriff auf Komponenten}\fi
@@ -6181,8 +6793,7 @@
%
% \item
% \ifGERMAN
-% Bei \Lcs{drawbeam} und \Lcs{drawwidebeam} können auch Zahlintervalle verwendet
-% werden. Gültige Intervallangaben sind
+% Es können auch Zahlintervalle verwendet werden, gültige Intervallangaben sind
% \begin{description}
% \item[\parbox{2em}{\texttt{x-y}}] Von \opt{x} bis \opt{y}, ist \opt{x}
% größer als \opt{y}, so wird heruntergezählt. Ist der gesamte
@@ -6194,8 +6805,7 @@
% \item[\parbox{2em}{\texttt{\hphantom{x}-}}] Verbinde alle Komponenten.
% \end{description}
% \fi
-% \ifENGLISH For \Lcs{drawbeam} and \Lcs{drawwidebeam} you can also specify a
-% number range. Valid range specifications are
+% \ifENGLISH You can also use number ranges, valid range specifications are
% \begin{description}
% \item[\parbox{2em}{\texttt{x-y}}] From \opt{x} to \opt{y}, if \opt{x}
% is greater than \opt{y}, the numbers are decremented. If the whole
@@ -6227,6 +6837,7 @@
% \ifENGLISH\section{Drawing beams}\fi
% \ifGERMAN\section{Strahlen zeichnen}\fi
% \label{sec:drawbeam}
+%
% \ifENGLISH
% The package provides several ways to connect components and nodes with beams,
% which can be either single rays or wide beams. Most parameters have the same
@@ -6247,9 +6858,10 @@
% \xLcs{drawwidebeam}\cmditem*{drawwidebeam}[options]{obj$_1$}{obj$_2$}\ldots
%
% \ifENGLISH
-% These are the two macros for beam connections; they can take a variable
-% number of arguments (minimum of two) which can be either an ID, a
-% \Lkeyword{compname}, or a PSTricks nodes. To distinguish between nodes and
+% These are the two macros for beam connections; they can take a
+% variable number of arguments (minimum of two) which can be either an
+% ID, an ID range, a \Lkeyword{compname}, or a PSTricks nodes (see
+% \prettyref{sec:accessobj}). To distinguish between nodes and
% components, nodes must be either enclosed in parenthesis within the
% brackets, or enclosed only in parenthesis:
% \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, or
@@ -6257,13 +6869,14 @@
% \fi
% \ifGERMAN
% Diese beiden Makros sind für die Strahlverbindungen zuständig, sie
-% akzeptieren eine variable Anzahl an Argumenten (mindestens zwei), die
-% entweder eine ID, ein \Lkeyword{compname}, oder ein PSTricks-Knoten sein
-% können. Um zwischen Knoten und Komponenten unterscheiden zu können, müssen
-% Knoten entweder in runde Klammern innerhalb der geschweiften Klammern
-% eingeschlossen werden oder dürfen nur runde Klammern haben:
+% akzeptieren eine variable Anzahl an Argumenten (mindestens zwei),
+% die entweder eine ID, ein ID-Intervall, ein \Lkeyword{compname} oder
+% ein PSTricks-Knoten sein können (siehe \prettyref{sec:accessobj}. Um
+% zwischen Knoten und Komponenten unterscheiden zu können, müssen
+% Knoten entweder in runde Klammern innerhalb der geschweiften
+% Klammern eingeschlossen werden oder dürfen nur runde Klammern haben:
% \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, oder
-% \Lcs{drawbeam}\opt{(node)\{comp\}}.
+% \Lcs{drawbeam}\opt{(node)\{comp\}}.
% \fi
% \end{ltxsyntax}
%
@@ -6307,7 +6920,7 @@
% component connection («connect» mode).
%
% In most cases, the «connect» mode is equivalent to «raytracing» with
-% \Lkeyword{n}\opt{=1}, except for \Lcs{optprism} and \Lcs{doveprism}, where
+% \Lkeyword{n}\opt{=1}, except for \Lcomp{optprism} and \Lcomp{doveprism}, where
% the interface nodes (\prettyref{sec:ifcnode}) are simply connected.
% See the following two example for the differences between the tracing modes
% using these two components. The interface nodes are highlighted for clarity.
@@ -6323,7 +6936,7 @@
% Komponente lediglich («connect» Variante).
%
% In vielen Fällen ist «connect» identisch mit «raytracing» für
-% \Lkeyword{n}\opt{=1}, außer für \Lcs{optprism} oder \Lcs{doveprism} bei
+% \Lkeyword{n}\opt{=1}, außer für \Lcomp{optprism} oder \Lcomp{doveprism} bei
% denen die Grenzflächenknoten (\prettyref{sec:ifcnode}) dann einfach nur
% verbunden werden. Die folgenden beiden Beispiele zeigen die Unterschiede
% der beiden Methoden für diese Komponenten. Die Grenzflächenknoten sind zum
@@ -6354,14 +6967,14 @@
%\fi
%
% \ifENGLISH
-% For the \Lcs{doveprism} the same applies as for the \Lcs{optprism}, but the
+% For the \Lcomp{doveprism} the same applies as for the \Lcomp{optprism}, but the
% raytraced beam with \Lkeyword{n}\opt{=1} (blue) misses the second interface
% because it is not refracted and stops therefore at the first interface (see
% \prettyref{sec:error-handling}). Again, the green «connect» ray passes through
% all interface nodes.
% \fi
% \ifGERMAN
-% Das \Lcs{doveprism} wird im Prinzip genauso behandelt wie das \Lcs{optprism},
+% Das \Lcomp{doveprism} wird im Prinzip genauso behandelt wie das \Lcomp{optprism},
% der «raytracing» Strahl mit \Lkeyword{n}\opt{=1} (blau) trifft wegen fehlender
% Brechung die zweite Grenzfläche gar nicht, und endet daher schon an der ersten
% Grenzflächen (siehe \prettyref{sec:error-handling}). Der grüne «connect»
@@ -6541,13 +7154,13 @@
% \begin{enumerate}
% \item
% \ifENGLISH Set a fixed refractive index for the component. Interestingly,
-% for the default shape of the \Lcs{doveprism} a refractive index of
+% for the default shape of the \Lcomp{doveprism} a refractive index of
% $\sqrt{5}$ gives the ideal output direction which is the same as the input
% direction.
% \fi
% \ifGERMAN
% Setze den Brechungsindex einer Komponente. Interessanterweise ist für die
-% Standardform des \Lcs{doveprism} ein Brechungsindex von $\sqrt{5}$ der
+% Standardform des \Lcomp{doveprism} ein Brechungsindex von $\sqrt{5}$ der
% ideale Wert so dass der Ausgangsstrahl parallel zum Eingangsstrahl verläuft.
% \fi
%
@@ -6835,6 +7448,7 @@
%</ignore>
% \fi
%
+%
% \numitem[0]{beampathskip}
% \ifGERMAN
% Überspringt \prm{num} Segmente am Anfang des Strahlengangs.
@@ -6968,14 +7582,14 @@
% \Lkeyword{beaminside}, \Lkeyword{beaminsidefirst} und
% \Lkeyword{beaminsidelast}. Damit kann der Strahlengang in einzelnen
% Komponenten unterdrückt werden, für die es keinen Sinn macht
-% (z.B. \Lcs{optfilter} und \Lcs{optdiode}, was sonst nicht möglich ist.
+% (z.B. \Lcomp{optfilter} und \Lcomp{optdiode}, was sonst nicht möglich ist.
% \fi
% \ifENGLISH
% Define whether a beam is drawn inside a component. The option affects
% components only and overwrites all settings of \Lkeyword{beaminside},
% \Lkeyword{beaminsidefirst}, and \Lkeyword{beaminsidelast} if set to
% \opt{false}. With this you can forbid any internal beams for components where
-% it does not make any sense (e.g. \Lcs{optfilter} and \Lcs{optdiode}).
+% it does not make any sense (e.g. \Lcomp{optfilter} and \Lcomp{optdiode}).
% \fi
% \iffalse
%<*ignore>
@@ -7079,11 +7693,11 @@
% Das ist in vielen Fällen sehr praktisch, kann aber wiederum unerwünschte
% Ergebnisse bei gedrehten und verschobenen Komponenten ergeben und die
% Ebenenausrichtung kann nicht beliebig gesetzt werden. Das kann mit einer
-% unsichtbaren Ebene erreicht werden, die mit \Lcs{optplane} definiert wird.
+% unsichtbaren Ebene erreicht werden, die mit \Lcomp{optplane} definiert wird.
% \fi
%
% \begin{ltxsyntax}
-% \xLcs{optplane}\cmditem{optplane}(center)
+% \xLcomp{optplane}\compitem{optplane}(center)
%
% \ifENGLISH
% The plane is defined by a single node only, the rotation around this node
@@ -7111,7 +7725,7 @@
% \fi
% \end{ltxsyntax}
%
-% \ifENGLISH\subsection{Automatic connection}\fi
+% \ifENGLISH\subsection{Automatic connections}\fi
% \ifGERMAN\subsection{Automatische Verbindungen}\fi
%
% \ifENGLISH
@@ -7140,16 +7754,6 @@
% \ifGERMAN womit ein Strahl vom ersten Referenzknoten über die Komponente zum
% zweiten Referenzknoten gezeichnet wird.
% \fi
-%
-% \valitem{conn}{string}
-% \ifGERMAN Diese Option wird nur aus Kompatibilitätsgründen bereitgestellt
-% und wird aus zukünftigen Versionen entfernt. Siehe
-% \prettyref{sec:bwd-comp-3.0} für weitere Informationen.
-% \fi
-% \ifENGLISH This option is maintained for backward compatibility only and will
-% be removed in future versions. See \prettyref{sec:bwd-comp-3.0} for further
-% information.
-%\fi
% \end{optionlist}
%
% \ifENGLISH\subsection{Beam appearance}\fi
@@ -7160,12 +7764,12 @@
% \styleitem[linecolor=green!90!black, linejoin=1]{Beam}
% \ifENGLISH
% The appearance of beams is controlled with this style. The optional argument
-% of \Lcs*{draw*beam} can also be used, these options can overwrite settings from
+% of \nxLcs{draw*beam} can also be used, these options can overwrite settings from
% the \Lstyle{Beam} style.
% \fi
% \ifGERMAN
% Das Aussehen der Lichtstrahlen kann mit diesem Stil gesteuert werden. Das
-% optionale Argument von \Lcs*{draw*beam} kann ebenfalls dafür verwendet
+% optionale Argument von \nxLcs{draw*beam} kann ebenfalls dafür verwendet
% werden und kann die Einstellungen des \Lstyle{Beam}-Stils überschreiben.
% \fi
% \end{stylelist}
@@ -7178,7 +7782,7 @@
%
% \psnumitem[0.2]{ArrowInsideMinLength}
% \ifGERMAN
-% \Lcs*{draw*beam} verwendet auch die Option \Lkeyword*{ArrowInside} aus
+% \nxLcs{draw*beam} verwendet auch die Option \Lkeyword*{ArrowInside} aus
% \LPack{pstricks-add}. In dem Fall wird für alle Strahlsegmente ein Pfeil
% gezeichnet, was häufig für die internen, kurzen Strahlengänge unerwünscht
% ist. Mit \Lkeyword{ArrowInsideMinLength} kann angegeben werden ab welcher
@@ -7187,7 +7791,7 @@
% Strahl einen Pfeil hat (siehe auch \prettyref{ex:czerny-turner}).
% \fi
% \ifENGLISH
-% \Lcs*{draw*beam} uses also the option \Lkeyword*{ArrowInside} from
+% \nxLcs{draw*beam} uses also the option \Lkeyword*{ArrowInside} from
% \LPack{pstricks-add}. In this case the arrows would be drawn for every beam
% segment, which is often undesired for the internal, short beam
% paths. \Lkeyword{ArrowInsideMinLength} sets a minimum segment length, below
@@ -7396,14 +8000,18 @@
% \label{sec:error-handling}
%
% \ifGERMAN
-% Da alle Strahlen direkt mit Postscript berechnet und gezeichnet werden, ist
-% eine umfassende Fehlerbehandlung zur Zeit der Kompilation nicht möglich. Um
-% jedoch trotzdem fehlerfreie Bilder zu bekommen, wird der Strahlengang
-% abgebrochen, sobald eine Situation eintritt, die nicht unterstützt wird. Das kann
-% eintreten, falls der Strahl eine Grenzfläche nicht trifft, oder
-% Totalreflektion auftritt.
-% \fi
-% \ifENGLISH All beam are calculated and drawn directly in Postscript, so that a
+% Alle Strahlen werden direkt mit Postscript berechnet und gezeichnet,
+% so dass eine umfassende Fehlerbehandlung zur Zeit der Kompilation
+% nicht möglich ist. Um jedoch trotzdem fehlerfreie Bilder zu bekommen,
+% wird der Strahlengang abgebrochen, sobald eine Situation eintritt, die
+% nicht unterstützt wird. Das kann eintreten, falls der Strahl eine
+% Grenzfläche nicht trifft, Totalreflektion auftritt oder wenn die
+% folgende Komponente keine Freistrahlverbindungen unterstützt. Die
+% folgenden Beispiele zeigen Situationen, in denen diese Fehler
+% auftreten:
+% \fi
+% \ifENGLISH
+% All beam are calculated and drawn directly in Postscript, so that a
% comprehensive error handling at compilation time is not possible. If a
% situation arises which is not supported by the drawing algorithm, the beam
% path is truncated at this point. This happens in the following cases:
@@ -7436,7 +8044,7 @@
% \fi
%
% \item
-% \ifENGLISH When total internal reflection occurs at an interface which is
+% \ifENGLISH Total internal reflection occurs at an interface which is
% not set up for this. The red beam in the following example would be
% reflected, but this is not supported and the beam is truncated at the
% interface where the total internal reflection occurs.
@@ -7462,7 +8070,6 @@
% \iffalse
%</ignore>
% \fi
-% \end{enumerate}
%
% \ifGERMAN Dasselbe gilt ebenfalls für aufgeweitete Strahlen (siehe
% \prettyref{sec:drawwidebeam}). Bei diesen wird der Strahlengang abgebrochen,
@@ -7472,17 +8079,63 @@
% well, the beam path is interrupted as soon as one of the marginal rays has an
% error.
% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,2.5)
+ \pnode(0,2){A}\pnode(3,0){B}
+ \optplane(A)
+ \optprism[n=1.8](A)([Xnodesep=1.5]A)(B)
+ \optplane(B)
+ \drawwidebeam[beamdiv=10, linecolor=red]{-}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \item
+% \ifGERMAN Eine Komponente soll verbunden werden, die jedoch keine
+% Freistrahlverbindungen unterstützt. In diesem Fall wird die falsche
+% Komponente und alle Folgenden ignoriert.
+% \fi
+% \ifENGLISH A component is to be connected, which does not support
+% free-ray connections. In this case, the wrong component and all
+% following ones are ignored.
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,2.7)
+ \pnode(0,1){A}\pnode(2,1){B}
+ \optplate[position=start](A)(B)
+ \lens[lens=4 4 2, abspos=0.5, n=2.5](A)(B)
+ \fiberdelayline[fdlsize=1 0.7, position=end, fiber=none](A)(B)
+ \drawbeam[beampos=0.2, linecolor=red]{-}
+ \drawbeam[beampos=-0.2, linecolor=blue, beaminsidelast]{-}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{enumerate}
%
% \begin{optionlist}
% \boolitem[false]{pswarning}
-% \ifENGLISH To simplify debugging, you can print a message to
-% standard output if a beam misses an interface or if total internal
-% reflection occured at some point.
+% \ifENGLISH To simplify debugging, you can have a message printed out
+% if any of these situations arises. The message will be printed to
+% standard output, when a Postscript interpreter reads the file,
+% e.g. when you view the file, or you convert it with \opt{ps2pdf} or
+% similar.
+% \fi
+% \ifGERMAN Um eine Fehlersuche zu vereinfachen kann ein Hinweis
+% ausgegeben werden sobald ein Strahlengang vorzeitig beendet. Die
+% Fehlermeldung wird auf die Standardausgabe geschrieben, wenn die
+% Datei mit einem Postscript-Interpreter gelesen wird, also mit einem
+% Betrachter geöffnet oder z.B. mit \opt{ps2pdf} konvertiert wird.
% \fi
-% \ifGERMAN Um eine Fehlersuche zu vereinfachen kann ein Hinweis ausgegeben
-% werden sobald ein Strahlengang vorzeitig beendet wird weil entweder eine
-% Grenzfläche verpasst wird, oder totale interne Reflektion auftritt.
-%\fi
% \end{optionlist}
%
% \ifGERMAN\section{Angepasste Strahlen}\fi
@@ -7498,26 +8151,31 @@
% Ausbreitungsrichtung definieren kann.
% \fi
% \ifENGLISH
-% With an appropriate choice of refractive index and component parameters
-% (e.g. lens curvature) all kind of beam paths could be realised although it
-% might be very cumbersome. To simplify this we provide the possibility to use
-% the end points of one beam path as starting points for the next beam which
-% allows piecewise definition of the beam divergence, angle, and direction.
+% In principal, all kind of beam paths can be realized with an
+% appropriate choice of refractive index and component parameters
+% (e.g. lens curvature). This can become very cumbersome, so that the
+% package provides the means to simplify this. The end points of one
+% beam path can be used as starting points for the next beam, which
+% allows piecewise definition of the beam divergence, angle, and
+% direction.
% \fi
%
% \begin{optionlist}
% \choitem[true]{savebeampoints}{true,false,\prm{int}}
% \ifGERMAN Speichert die Endpunkte eines \nxLcs{draw*beam} Makros,
% vorangegangene Punkte werden überschrieben. \Lcs{drawbeam} und
-% \Lcs{drawwidebeam} werden getrennt behandelt. Wird hier eine Zahl \prm{int}
-% $> 0$ angegeben, so können beliebig viele Endpunkte separat gespeichert
-% werden. In der Regel reicht an- und abschalten vollkommen aus.
+% \Lcs{drawwidebeam} werden getrennt behandelt. Wird hier eine Zahl
+% \prm{int} $> 0$ angegeben, so können beliebig viele Endpunkte
+% separat gespeichert werden, siehe z.B. \prettyref{ex:ratchet}. In
+% der Regel reicht an- und abschalten vollkommen aus, was den Zahlen 1
+% und 0 entspricht.
% \fi
-% \ifENGLISH Saves the end points of a \nxLcs{draw*beam} macro, previous
-% points are overwritten. \Lcs{drawbeam} and \Lcs{drawwidebeam} are treated
-% separately. If a number \prm{int} $> 0$ is given, you can save as many end
-% points as you like, but in most use cases enabling and disabling this option
-% is sufficient.
+% \ifENGLISH Saves the end points of a \nxLcs{draw*beam} macro,
+% previous points are overwritten. \Lcs{drawbeam} and
+% \Lcs{drawwidebeam} are treated separately. If a number \prm{int} $>
+% 0$ is given, you can save as many end points as you like, see
+% e.g. \prettyref{ex:ratchet}. But in most cases enabling (1) and
+% disabling (0) this option is sufficient.
% \fi
%
% \choitem[false]{loadbeampoints}{true,false,\prm{int}}
@@ -7536,9 +8194,9 @@
% einfach die drei Strahlenteile mit den gewünschten Divergenzen, und verwenden
% die Endpunkte des jeweils vorangegangenen Strahls als neue Ausgangspunkte.
% \fi
-% \ifENGLISH As example we consider a telescope which has zero divergence at the
+% \ifENGLISH As example we consider a telescope which has no divergence at the
% input and output. Usually we would need to tweak the refractive index and the
-% lens parameters to get an output beam with no divergence. Instead, we draw the
+% lens parameters to get an output beam without divergence. Instead, we draw the
% three beam parts separately using the end points of the previous beams as new
% starting points and specifying the divergence for each beam part
% explicitely.
@@ -7676,7 +8334,7 @@
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}[linerange={1-6,9-9}]
+\begin{LTXexample}[linerange={1-6,9-9}, morekeywords={[21]{savebeam, loadbeam}}]
\begin{pspicture}(3,1.5)
\pnode(0,0.5){A}\pnode(1.5,1.5){B}\pnode(3,0.5){C}
\beamsplitter(A)(1.5,0.5)(B)
@@ -7688,7 +8346,7 @@
\end{pspicture}
\end{LTXexample}
-\begin{LTXexample}[linerange={1-6,9-9}]
+\begin{LTXexample}[linerange={1-6,9-9}, morekeywords={[21]{savebeam, loadbeam}}]
\begin{pspicture}(3,1.5)
\pnode(0,0.5){A}\pnode(1.5,1.5){B}\pnode(3,0.5){C}
\mirror[mirrortype=semitrans](A)(1.5,0.5)(B)
@@ -7786,36 +8444,47 @@
%
% \ifENGLISH
% All available components can be connected with fiber connections, the
-% fiber components are connected automatically.
+% fiber components in \prettyref{chap:fibercomp} are connected automatically.
% \fi
% \ifGERMAN
% Alle Komponenten können mit Fasern verbunden werden, die Faserkomponenten
-% werden automatisch verbunden.
+% in \prettyref{chap:fibercomp} werden automatisch verbunden.
% \fi
%
% \begin{ltxsyntax}
% \xLcs{drawfiber}\cmditem{drawfiber}[options]{obj$_1$}{obj$_2$}\ldots
% \end{ltxsyntax}
-%
-% \ifENGLISH
-% The \Lcs{drawfiber} command takes ID, \Lkeyword{compname}, or nodes as
-% \prm{obj$_N$} arguments (see \prettyref{sec:accessobj}), but ID ranges like
-% with \Lcs{drawbeam} are not possible. If you specify more than two arguments,
-% you get connections $1\rightarrow 2$, $2\rightarrow 3$, and so on.
+% \ifENGLISH
+% This macro draws fiber connections and takes a variable number of
+% arguments (minimum of two) which can be either an ID, an ID range, a
+% \Lkeyword{compname}, or a PSTricks node (see
+% \prettyref{sec:accessobj}). To distinguish between nodes and
+% components, nodes must be either enclosed in parenthesis within the
+% brackets, or enclosed only in parenthesis:
+% \Lcs{drawfiber}\opt{\{(node)\}\{comp\}}, or
+% \Lcs{drawfiber}\opt{(node)\{comp\}}. If you specify more than two
+% arguments, it draws the connections $1\rightarrow 2$, $2\rightarrow
+% 3$, and so on.
%
-% The automatic fiber connections are drawn internally with \Lcs{drawfiber}
-% commands from each reference node to the component.
-% \fi
-% \ifGERMAN
-% Das \Lcs{drawfiber} Makro kann ID, \Lkeyword{compname} oder Knoten als
-% \prm{obj$_N$} Argumente verarbeiten (siehe \prettyref{sec:accessobj}), aber
-% ID-Intervalle wie bei \Lcs*{draw*beam} sind nicht möglich. Werden mehr als
-% zwei Argumente mitgegeben, werden die Verbindungen $1\rightarrow 2$,
-% $2\rightarrow 3$, usw. gezeichnet.
+% The automatic fiber connections are drawn internally with
+% \Lcs{drawfiber} commands from each reference node to the component.
+% \fi
+% \ifGERMAN
+% Dieses Makro zeichnet Faserverbindungen und akzeptiert eine variable
+% Anzahl an Argumenten (mindestens zwei), die entweder eine ID, ein
+% ID-Intervall, ein \Lkeyword{compname} oder ein PSTricks-Knoten sein
+% können (siehe \prettyref{sec:accessobj}. Um zwischen Knoten und
+% Komponenten unterscheiden zu können, müssen Knoten entweder in runde
+% Klammern innerhalb der geschweiften Klammern eingeschlossen werden
+% oder dürfen nur runde Klammern haben:
+% \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, oder
+% \Lcs{drawbeam}\opt{(node)\{comp\}}. Werden mehr als zwei Argumente
+% mitgegeben, werden die Verbindungen $1\rightarrow 2$, $2\rightarrow
+% 3$, usw. gezeichnet.
%
-% Die automatischen Faserverbindungen werden intern als \Lcs{drawfiber} von den
-% Referenzknoten zur Komponente gezeichnet.
-% \fi
+% Die automatischen Faserverbindungen werden intern als
+% \Lcs{drawfiber} von den Referenzknoten zur Komponente gezeichnet.
+% \fi
%
% \ifENGLISH\subsection{Fiber angles}\fi
% \ifGERMAN\subsection{Faserwinkel}\fi
@@ -7839,13 +8508,13 @@
%
% \ifENGLISH
% A connection of a component with a node is what is used for automatic
-% connections (see \prettyref{sec:drawfiber-auto}). Consider the following
+% connections (see \prettyref{sec:drawconn-auto}). Consider the following
% example for clarification of the curve alignment:
% \fi
% \ifGERMAN
% Eine Verbindung zwischen einer Komponente und einem Knoten ist das, was bei
% automatischen Verbindungen verwendet wird (siehe
-% \prettyref{sec:drawfiber-auto}). Folgendes Beispiel erläutert die Ausrichtung
+% \prettyref{sec:drawconn-auto}). Folgendes Beispiel erläutert die Ausrichtung
% der Kurve:
% \fi
%
@@ -7876,7 +8545,7 @@
% the component node.
%
% Considering the following example, this means that the start angles of the red
-% fibers are rotated by 180° with respect to the green fibers. The angles at the
+% fibers are rotated by 180° with respect to the blue fibers. The angles at the
% component do not change.
% \fi
% \ifGERMAN
@@ -7886,7 +8555,7 @@
% Richtung des entsprechenden Komponentenknotens orientiert.
%
% Das führt dazu, dass im folgenden Beispiel die Anfangswinkel der roten Fasern
-% um 180° gegenüber den grünen Fasern gedreht sind, die Winkel an der Komponente
+% um 180° gegenüber den blauen Fasern gedreht sind, die Winkel an der Komponente
% bleiben unverändert.
% \fi
%
@@ -7896,11 +8565,11 @@
\begin{LTXexample}[linerange={1-1,4-4,7-14}]
\begin{pspicture}(-2,-1.6)(2,2)
\psset[optexp]{optboxsize=1.6 0.8}
- \addtopsstyle{Fiber}{ArrowInside=->, arrowscale=1.5}
+ \addtopsstyle{Fiber}{ArrowInside=->, ArrowInsidePos=0.3, arrowscale=1.5}
\optbox[position=end](0,1)(0,0)
\psarc[fillstyle=solid,fillcolor=gray!20, linestyle=none](0,0){2}{0}{180}
\psline[linestyle=dashed]([Xnodesep=-2]\oenodeIn{})([Xnodesep=2]\oenodeIn{})
- \addtopsstyle{Fiber}{linecolor=green!90!black}
+ \addtopsstyle{Fiber}{linecolor=blue}
\multido{\i=10+40}{5}{%
\drawfiber(2;\i){}
}
@@ -7922,9 +8591,9 @@
% maybe in a loop or similar, see \prettyref{ex:nalm} and
% \prettyref{ex:recirc-loop}.
%
-% In this case, the curve angles are determined by the component which the
-% respective curve end is connected to. The fibers are always directed away from
-% the component center.
+% In this case, the curve angles are determined by the orientation of
+% the component which the respective curve end is connected to. The
+% fibers are always directed away from the component center.
% \fi
% \ifGERMAN
% Diese Variante ist sehr nützlich um glattere Verbindungen zwischen Komponenten
@@ -7990,8 +8659,8 @@
% \fi
\begin{LTXexample}[linerange={1-5,10-11}]
\begin{pspicture}(1,-1.7)(7,1.7)
- \pnode(0,0){A}\pnode(3,0){B}
- \pnode(4,0){C}\pnode(7,0){D}
+ \pnode(0,0){A}\pnode(4,0){B}
+ \pnode(3,0){C}\pnode(7,0){D}
\optbox[angle=30](A)(B)
\optbox[angle=-30](C)(D)
\psline[style=Refline, linestyle=dashed](\oenodeTrefA{1})(\oenodeTrefB{1})
@@ -8006,19 +8675,21 @@
% \fi
%
% \item[center]
-% \ifENGLISH The fiber angles both at the node and the component are relative
-% to the connection between the involved interface node and the center node of
-% the component. In most cases this is equivalent to \opt{relative}, but
-% necessary e.g. for \Lcs{optcirculator}. In the example, the green fiber
-% shows the correct alignment, while the red one is with \opt{relative}
-% alignment.
+% \ifENGLISH
+% The fiber angles both at the node and the component are relative to
+% the connection between the involved interface node and the center
+% node of the component. In most cases this is equivalent to
+% \opt{relative}, but necessary e.g. for \Lcomp{optcirculator} and
+% \Lcomp{elecmixer}. In the example, the green fiber shows the correct
+% alignment, while the red one is with \opt{relative} alignment.
% \fi
% \ifGERMAN
-% Die Winkel sowohl am Knoten als auch an der Komponente sind relativ zu der
-% Verbindung zwischen dem betroffenen Komponentenknoten und der
-% Komponentenmitte. Meistens ist das äquivalent zu \opt{relative}, wird aber
-% z.B. für \Lcs{optcirculator} benötigt. In dem Beispiel hat die grüne Faser
-% die korrekte Ausrichtung, während die rote \opt{relative} ausgerichtet wird.
+% Die Winkel sowohl am Knoten als auch an der Komponente sind relativ
+% zu der Verbindung zwischen dem betroffenen Komponentenknoten und der
+% Komponentenmitte. Meistens ist das äquivalent zu \opt{relative},
+% wird aber z.B. für \Lcomp{optcirculator} und \Lcomp{elecmixer}
+% benötigt. In dem Beispiel hat die grüne Faser die korrekte
+% Ausrichtung, während die rote \opt{relative} ausgerichtet wird.
% \fi
%
% \iffalse
@@ -8078,7 +8749,25 @@
% \numitem[0]{fiberangleB}
% \ifENGLISH Like \Lkeyword{fiberangleA}, but for the end angle.\fi
% \ifGERMAN Wie \Lkeyword{fiberangleB}, aber für den Endwinkel.\fi
-%
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]fiberangleA, fiberangleB}, linerange={1-3,7-9}]
+\begin{pspicture}(0,-1)(4,1)
+ \pnode(0,0){A}\pnode(4,0){B}
+ \optbox[angle=30](A)(B)
+ \psline[style=Refline, linestyle=dashed](\oenodeTrefA{})(\oenodeTrefB{})
+ \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{})
+ \psdot(\oenodeRefA{})\psdot(\oenodeRefB{})
+ \drawfiber[fiberangleA=-90](A){}
+ \drawfiber[fiberangleB=-90]{}(B)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
% \choitem[auto]{startnode}{auto, N, 1, 2, \ldots}
% \ifGERMAN Für die Verbindungen mit \Lcs{drawfiber} werden die Knoten
% genommen, die sich am nächsten sind. Das passt häufig, aber nicht
@@ -8114,10 +8803,10 @@
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}
+\begin{LTXexample}[linerange={1-1,3-6}]
\begin{pspicture}(3,2)
- \pnode(-0.5,1){A}\pnode(1.5,1){B}\pnode(3.5,1){C}
\psset{label=0, optboxwidth=1}
+ \pnode(-0.5,1){A}\pnode(1.5,1){B}\pnode(3.5,1){C}
\optbox(A)(B){Box1}\optbox(B)(C){Box2}
\drawfiber{1}{2}
\end{pspicture}
@@ -8138,11 +8827,11 @@
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}
-\begin{pspicture}(3,2)
- \pnode(0,0.5){A}\pnode(3,0.5){B}
- \pnode([offset=1]B){C}\pnode(A|C){D}
+\begin{LTXexample}[linerange={1-1,3-7}]
+\begin{pspicture}(2,2)
\psset{label=0}
+ \pnode(0,0.5){A}\pnode(2,0.5){B}
+ \pnode([offset=1]B){C}\pnode(A|C){D}
\optbox(A)(B){Box1}\optbox(C)(D){Box2}
\drawfiber{1}{2}
\end{pspicture}
@@ -8170,9 +8859,9 @@
% \fi
\begin{LTXexample}[morekeywords={[21]startnode}]
\begin{pspicture}(2,2)
+ \psset{label=0}
\pnode(0,0.5){A}\pnode(2,0.5){B}
\pnode([offset=1]B){C}\pnode(A|C){D}
- \psset{label=0}
\optbox(A)(B){Box1}\optbox(C)(D){Box2}
\drawfiber[startnode=1]{1}{2}
\drawfiber[startnode=N, linecolor=black]{1}{2}
@@ -8197,7 +8886,7 @@
\begin{pspicture}(2.1,3)
\pnode(0,0){A}\pnode(2,0){B}
\pnode(0.3,3){C}\pnode(1.7,3){D}
- \psset{fiber=none}
+ \psset{fiber=none, arrowscale=1.2, arrowinset=0}
\optcoupler[fiber=l,
addtoFiberIn1={angleA=0, ArrowInside=->},
addtoFiberIn2={angleA=180, arrows=<-},
@@ -8218,7 +8907,7 @@
% \ifGERMAN\subsection{Faseraussehen}\fi
% \label{sec:fiberappearance}
%
-% \begin{optionlist}
+% \begin{stylelist}
% \styleitem{Fiber}
% \ifENGLISH
% The appearance of fibers is controlled with this style. The optional
@@ -8231,9 +8920,12 @@
% entsprechenden Parameter können die Einstellungen von \Lstyle{Fiber}
% überschreiben.
% \fi
-%
+% \end{stylelist}
+% \begin{optionlist}
% \valitem{addtoFiber}{list}
% \addtostylemsg{Fiber}
+% \ifGERMAN Siehe z.B. \prettyref{ex:recirc-loop}.\fi
+% \ifENGLISH See for example \prettyref{ex:recirc-loop}.\fi
%
% \valitem{newFiber}{list}
% \newstylemsg{Fiber}
@@ -8287,37 +8979,137 @@
%</ignore>
% \fi
% \end{optionlist}
-%
%
-% \ifENGLISH\subsection{Automatic fiber connections}\fi
-% \ifGERMAN\subsection{Automatische Faserverbindungen}\fi
-% \label{sec:drawfiber-auto}
+% \ifGERMAN\section{Elektrische Verbindungen}\fi
+% \ifENGLISH\section{Drawing wires}\fi
+% \label{sec:drawwire}
+%
+% \ifENGLISH
+% All available components can be connected with wire connections, the
+% wire components in \prettyref{chap:electrcomp} are connected
+% automatically. The \Lkeyword*{wire*} parameters are equivalent to
+% their \Lkeyword*{fiber*} counterparts, see their respective
+% documentation for details.
+% \fi
+% \ifGERMAN
+% Alle Komponenten können mit Drähten verbunden werden, die elektrischen
+% Komponenten in \prettyref{chap:electrcomp} werden automatisch
+% verbunden. Die \Lkeyword*{wire*}-Parameter sind äquivalent zu den
+% entsprechenden \Lkeyword*{fiber*}-Parametern, die detailliertere
+% Informationen enthalten.
+% \fi
+%
+% \begin{ltxsyntax}
+% \xLcs{drawwire}\cmditem{drawwire}[options]{obj$_1$}{obj$_2$}\ldots
+% \end{ltxsyntax}
+% \ifENGLISH
+% This command can take a variable number of arguments (minimum of
+% two) which can be either an ID, an ID range, a \Lkeyword{compname},
+% or a PSTricks nodes (see \prettyref{sec:accessobj}). To distinguish
+% between nodes and components, nodes must be either enclosed in
+% parenthesis within the brackets, or enclosed only in parenthesis:
+% \Lcs{drawwire}\opt{\{(node)\}\{comp\}}, or
+% \Lcs{drawwire}\opt{(node)\{comp\}}. If you specify more than two
+% arguments, you get connections $1\rightarrow 2$, $2\rightarrow 3$,
+% and so on.
+%
+% The automatic connections are drawn internally with
+% \Lcs{drawwire} commands from each reference node to the component.
+% \fi
+% \ifGERMAN
+% Dieses Makro akzeptiert eine variable Anzahl an Argumenten
+% (mindestens zwei), die entweder eine ID, ein ID-Intervall, ein
+% \Lkeyword{compname} oder ein PSTricks-Knoten sein können (siehe
+% \prettyref{sec:accessobj}. Um zwischen Knoten und Komponenten
+% unterscheiden zu können, müssen Knoten entweder in runde Klammern
+% innerhalb der geschweiften Klammern eingeschlossen werden oder
+% dürfen nur runde Klammern haben:
+% \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, oder
+% \Lcs{drawbeam}\opt{(node)\{comp\}}. Werden mehr als zwei Argumente
+% mitgegeben, werden die Verbindungen $1\rightarrow 2$, $2\rightarrow
+% 3$, usw. gezeichnet.
+%
+% Die automatischen Verbindungen werden intern als
+% \Lcs{drawwire} von den Referenzknoten zur Komponente gezeichnet.
+% \fi
+%
+% \begin{optionlist}
+% \choitem[relative]{wirealign}{rel,relative,center,abs,absolute}
+% \ifGERMAN Siehe \Lkeyword{fiberalign}.\fi
+% \ifENGLISH See \Lkeyword{fiberalign}.\fi
+%
+% \numitem[0]{wireangleA}
+% \ifGERMAN Siehe \Lkeyword{fiberangleA}.\fi
+% \ifENGLISH See \Lkeyword{fiberangleA}.\fi
+%
+% \numitem[0]{wireangleB}
+% \ifGERMAN Siehe \Lkeyword{fiberangleB}.\fi
+% \ifENGLISH See \Lkeyword{fiberangleB}.\fi
+%
+% \valitem[angle]{wirestyle}{string}
+% \ifGERMAN Siehe \Lkeyword{fiberstyle}, der Vorgabewert ist jedoch \opt{angle}.\fi
+% \ifENGLISH See \Lkeyword{fiberstyle}, the default value is \opt{angle}.\fi
+%
+% \valitem{addtoWire}{list}
+% \addtostylemsg{Wire}
+%
+% \valitem{newWire}{list}
+% \newstylemsg{Wire}
+% \end{optionlist}
+% \begin{stylelist}
+% \styleitem{Wire}
+% \ifENGLISH
+% The appearance of wires is controlled with this style, compare with
+% \prettyref{sec:fiberappearance}. The optional argument of
+% \Lcs{drawwire} can be used as well, these options can overwrite
+% settings from the \Lstyle{Wire} style.
+% \fi
+% \ifGERMAN
+% Das Aussehen der elektrischen Verbindungen wird durch diesen Stil
+% vorgegeben, analog zu \prettyref{sec:fiberappearance}. Das optionale
+% Argument von \Lcs{drawwire} kann ebenfalls verwendet werden, die
+% entsprechenden Parameter können die Einstellungen von \Lstyle{Wire}
+% überschreiben.
+% \fi
+% \end{stylelist}
+%
+% \ifENGLISH\section{Automatic fiber and wire connections}\fi
+% \ifGERMAN\section{Automatische Faser- und Drahtverbindungen}\fi
+% \label{sec:drawconn-auto}
%
% \ifENGLISH
-% All fiber components described in \prettyref{chap:fibercomp} are connected
-% automatically to their reference nodes with \Lcs{drawfiber}, their behaviour
-% is descibed in \prettyref{sec:drawfiber-angles}. The fiber connections can be
-% controlled in a number of ways, without need to explicitely use
-% \Lcs{drawfiber}. The style of each fiber connection can be configure
-% independently, see \prettyref{sec:drawfiber-auto-styles}.
+% All fiber components described in \prettyref{chap:fibercomp} are
+% connected automatically to their reference nodes with \Lcs{drawfiber},
+% their behaviour is descibed in \prettyref{sec:drawfiber-angles}. The
+% electrical components (\prettyref{chap:electrcomp}) are accordingly
+% connected with \Lcs{drawwire}. The connections can also be controlled
+% in a number of ways, without explicitely using these macros. The style
+% of each connection can be configure independently, see
+% \prettyref{sec:drawconn-auto-styles}.
% \fi
% \ifGERMAN
-% Alle Faserkomponenten, die in \prettyref{chap:fibercomp} beschrieben werden,
-% werden automatisch mit \Lcs{drawfiber} mit ihren Referenzknoten verbunden, das
-% Verhalten ist in \prettyref{sec:drawfiber-angles} beschrieben. Die
-% automatischen Faserverbindungen können umfangreich kontrolliert werden, ohne
-% explizit \Lcs{drawfiber} zu benutzen. Das Aussehen jeder Verbindung kann
-% ebenfalls separat konfiguriert werden, siehe
-% \prettyref{sec:drawfiber-auto-styles}.
+% Alle Faserkomponenten, die in \prettyref{chap:fibercomp} beschrieben
+% werden, werden automatisch über \Lcs{drawfiber} mit ihren
+% Referenzknoten verbunden, das Verhalten ist in
+% \prettyref{sec:drawfiber-angles} beschrieben. Entsprechend dazu werden
+% die elektrischen Komponenten (\prettyref{chap:electrcomp}) mit
+% \Lcs{drawwire} mit Drähten verbunden. Die automatischen Verbindungen
+% können umfangreich kontrolliert werden, ohne diese Makros explizit zu
+% verwenden. Das Aussehen jeder Verbindung kann ebenfalls separat
+% konfiguriert werden, siehe \prettyref{sec:drawconn-auto-styles}.
% \fi
%
% \begin{optionlist}
% \choitem[all]{fiber}{[*+]none,all,i,o,\prm{refpoint}}
-% \ifENGLISH This parameter selects which fiber connections are drawn. The
-% value of this parameter can affect either only the fiber components
-% (if the value is prefixed with \opt{*}), only free-ray components (prefixed
-% with \opt{+}), or all components otherwise. Typical free-ray components
-% which are often used with fibers as well are \Lcs{optbox} and \Lcs{optdetector}.
+% \ifENGLISH This parameter selects which fiber connections are drawn.
+% The value of this parameter can affect either only the fiber
+% components (if the value is prefixed with \opt{*}), only free-ray
+% and electrical components (prefixed with \opt{+}), or all component types
+% otherwise. Typical free-ray components which are often used with
+% fibers as well are \Lcomp{optbox} and \Lcomp{optdetector}. Please
+% note, that electrical components cannot be connected automatically
+% with fibers, in these cases you must use \Lcs{drawfiber}
+% explicitely.
%
% You can select to connect \opt{all} nodes, \opt{none}, or select distinct
% connections to draw. Value \opt{i} (\opt{l} is equivalent) draws all input
@@ -8326,19 +9118,22 @@
% none.
%
% Components which have more than one input or output fiber
-% (\hyperref[sec:coupler]{couplers} and \Lcs{optcirculator}) allow also
+% (\hyperref[sec:coupler]{couplers} and \Lcomp{optcirculator}) allow also
% values \opt{t} and \opt{b}, possibly in combination with \opt{i}, \opt{o},
% \opt{r}, or \opt{l}.
%
% See the following examples for some variants.
% \fi
% \ifGERMAN
-% Dieser Parameter gibt an, welche Faserverbindungen gezeichnet werden. Der
-% Parameter kann nur die Faserkomponenten betreffen (falls ein \opt{*}
-% vorangestellt ist), nur die Freistrahlkomponenten (\opt{+} wird
-% vorangestellt), oder alle Komponenten. Typische Freistrahlkomponenten, die
-% häufig als Faserkomponenten verwendet werden, sind \Lcs{optbox} und
-% \Lcs{optdetector}.
+% Dieser Parameter gibt an, welche Faserverbindungen gezeichnet
+% werden. Der Parameter kann nur die Faserkomponenten betreffen (falls
+% ein \opt{*} vorangestellt ist), nur die elektrischen und
+% Freistrahlkomponenten (\opt{+} wird vorangestellt), oder alle
+% Komponententypen. Typische Freistrahlkomponenten, die häufig als
+% Faserkomponenten verwendet werden, sind \Lcomp{optbox} und
+% \Lcomp{optdetector}. Beachten Sie, dass elektrische Komponenten
+% nicht automatisch mit Fasern verbunden werden können, Sie müssen
+% dann explizit \Lcs{drawfiber} verwenden.
%
% Es können alle Verbindungen gezeichnet werden (\opt{all}), keine
% (\opt{none}), oder es können bestimmte ausgewählt werden. Die Werte \opt{i}
@@ -8347,7 +9142,7 @@
% d.h. mit \opt{io} werden gar keine Verbindungen gezeichnet.
%
% Komponenten, die über mehr als einen Eingang oder Ausgang verfügen
-% (\hyperref[sec:coupler]{Koppler} und \Lcs{optcirculator}) erlauben
+% (\hyperref[sec:coupler]{Koppler} und \Lcomp{optcirculator}) erlauben
% weitergehende Auswahl mit \opt{t} und \opt{b}, möglicherweise in Verbindung
% mit \opt{i}, \opt{o}, \opt{l} und \opt{r}.
%
@@ -8357,17 +9152,18 @@
%
% \begin{enumerate}
% \item
-% \ifENGLISH Enable all fiber connections for all components.\fi
+% \ifENGLISH Enable all fiber connections all components.\fi
% \ifGERMAN Zeichne alle Fasern für alle Komponenten.\fi
%
% \iffalse
%<*ignore>
% \fi
\begin{LTXexample}[morekeywords={[21]{fiber}}]
-\begin{pspicture}(3,2)
+\begin{pspicture}(3,3)
\psset{fiber}
- \optbox(0,1.5)(3,1.5)
- \optmzm(0,0.5)(3,0.5)
+ \optbox(0,2.5)(3,2.5)
+ \optmzm(0,1.5)(3,1.5)
+ \elecsynthesizer[position=0.5](1,0.5)(3,0.5)
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -8375,22 +9171,22 @@
% \fi
%
% \item
-% \ifENGLISH Draw only the input fiber of a fiber component (\Lcs{optmzm}),
-% the free-ray component (\Lcs{optbox}) is not affected.
+% \ifENGLISH Draw only the input fiber of a fiber component (\Lcomp{optmzm}),
+% the other components are not affected.
% \fi
-% \ifGERMAN Nur die Eingangsverbindung einer Faserkomponente (\Lcs{optmzm})
-% wird gezeichnet, die Freistrahlkomponente (\Lcs{optbox}) bleibt
-% unbeeinflusst.
+% \ifGERMAN Nur die Eingangsverbindung einer Faserkomponente (\Lcomp{optmzm})
+% wird gezeichnet, die anderen Komponenten bleiben unbeeinflusst.
% \fi
%
% \iffalse
%<*ignore>
% \fi
\begin{LTXexample}[morekeywords={[21]{fiber}}]
-\begin{pspicture}(3,2)
+\begin{pspicture}(3,3)
\psset{fiber=*i}
- \optbox(0,1.5)(3,1.5)
- \optmzm(0,0.5)(3,0.5)
+ \optbox(0,2.5)(3,2.5)
+ \optmzm(0,1.5)(3,1.5)
+ \elecsynthesizer[position=0.5](1,0.5)(3,0.5)
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -8398,21 +9194,23 @@
% \fi
%
% \item
-% \ifENGLISH Draw only the output fiber of a free-ray component
-% (\Lcs{optbox}), but all connections of the fiber component (\Lcs{optmzm}).
+% \ifENGLISH All connections of the fiber component are drawn, the
+% other components get only the output fiber.
% \fi
-% \ifGERMAN Von der Freistahlkomponente wird nur die Ausgangsverbindung
-% gezeichnet, die Faserkomponente erhält jedoch alle Verbindungen.
+% \ifGERMAN Von der Faserkomponente werden alle Verbindungen
+% gezeichnet, die anderen Komponenten erhalten nur eine
+% Ausgangsverbindung.
% \fi
%
% \iffalse
%<*ignore>
% \fi
\begin{LTXexample}[morekeywords={[21]{fiber}}]
-\begin{pspicture}(3,2)
+\begin{pspicture}(3,3)
\psset{fiber=+o}
- \optbox(0,1.5)(3,1.5)
- \optmzm(0,0.5)(3,0.5)
+ \optbox(0,2.5)(3,2.5)
+ \optmzm(0,1.5)(3,1.5)
+ \elecsynthesizer[position=0.5](1,0.5)(3,0.5)
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -8421,12 +9219,12 @@
%
% \item
% \ifENGLISH The values \opt{t} and \opt{b} affect only components which have
-% more than two fibers, i.e \Lcs{optcirculator} and the couplers
+% more than two fibers, i.e \Lcomp{optcirculator} and the couplers
% (\prettyref{sec:coupler}).
% \fi
% \ifGERMAN
% Die Werte \opt{t} und \opt{b} betreffen nur die Komponenten mit mehr als
-% zwei Verbindungen, also \Lcs{optcirculator} und die Koppler
+% zwei Verbindungen, also \Lcomp{optcirculator} und die Koppler
% (\prettyref{sec:coupler}).
% \fi
%
@@ -8453,10 +9251,120 @@
% \fi
% \end{enumerate}
%
+% \begin{optionlist}
+% \choitem[all]{wire}{[*+]none,all,i,o,\prm{refpoint}}
+% \ifENGLISH
+% This parameter selects which wire connections are drawn. The value
+% of this parameter can affect either only the electrical components
+% (if the value is prefixed with \opt{*}), only free-ray and fiber
+% components (prefixed with \opt{+}), or all components otherwise.
+% \fi
+% \ifGERMAN
+% Dieser Parameter gibt an, welche elektrische Verbindungen gezeichnet
+% werden. Der Parameter kann nur die elektrischen Komponenten
+% betreffen (falls ein \opt{*} vorangestellt ist), nur die Faser- und
+% Freistrahlkomponenten (\opt{+} wird vorangestellt), oder alle
+% Komponenten.
+% \fi
+% \end{optionlist}
+% \begin{enumerate}
+% \item
+% \ifENGLISH Enable all wire connections for all components.\fi
+% \ifGERMAN Zeichne alle Drähte aller Komponenten.\fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{wire}}]
+\begin{pspicture}(3,3)
+ \psset{wire}
+ \optbox(0,2.5)(3,2.5)
+ \optmzm(0,1.5)(3,1.5)
+ \elecsynthesizer[position=0.5](0,0.5)(3,0.5)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \item
+% \ifENGLISH Draw only the input wire of an electrical component
+% (\Lcomp{elecsynthesizer}), the other components are not affected.
+% \fi
+% \ifGERMAN Nur die Eingangsverbindung einer elektrischen Komponente
+% (\Lcomp{elecsynthesizer}) wird gezeichnet, die anderen Komponenten
+% bleiben unbeeinflusst.
+% \fi
%
-% \ifENGLISH\subsection{Appearance of automatic fiber connections}\fi
-% \ifGERMAN\subsection{Aussehen der automatischen Faserverbindungen}\fi
-% \label{sec:drawfiber-auto-styles}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{wire}}]
+\begin{pspicture}(3,3)
+ \psset{wire=*i}
+ \optbox(0,2.5)(3,2.5)
+ \optmzm(0,1.5)(3,1.5)
+ \elecsynthesizer[position=0.5](0,0.5)(3,0.5)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \item
+% \ifENGLISH Draw only the output wire of the free-ray and fiber
+% components, but all connections of the wire component.
+% \fi
+% \ifGERMAN Von der Freistrahl- und Faserkomponente wird nur die Ausgangsverbindung
+% gezeichnet, die elektrischen Komponente erhält jedoch alle Verbindungen.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{wire}}]
+\begin{pspicture}(3,3)
+ \psset{wire=+o}
+ \optbox(0,2.5)(3,2.5)
+ \optmzm(0,1.5)(3,1.5)
+ \elecsynthesizer[position=0.5](0,0.5)(3,0.5)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \item
+% \ifENGLISH The values \opt{t} and \opt{b} affect only components which have
+% more than two connections, i.e \Lcomp{elecmixer} and \Lcomp{eleccoupler}.
+% \fi
+% \ifGERMAN
+% Die Werte \opt{t} und \opt{b} betreffen nur die Komponenten mit mehr als
+% zwei Verbindungen, also \Lcomp{elecmixer} und \Lcomp{eleccoupler}.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{wire}}]
+\begin{pspicture}(3,1)
+ \eleccoupler[wire=t](0,1)(0,0)(3,1)(3,0)
+\end{pspicture}
+\end{LTXexample}
+\begin{LTXexample}[morekeywords={[21]{wire}}]
+\begin{pspicture}(3,1.5)
+ \elecmixer[wire=b](0,1)(3,1)(1,0)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{enumerate}
+%
+%
+% \ifENGLISH\subsection{Appearance of automatic connections}\fi
+% \ifGERMAN\subsection{Aussehen der automatischen Verbindungen}\fi
+% \label{sec:drawconn-auto-styles}
%
% \begin{figure}\centering
% \begin{pspicture}(0,-0.2)(12,4.4)
@@ -8510,13 +9418,14 @@
% \caption{Vererbungsdiagramm der PS-Stile für die automatischen
% Faserverbindungen. Sie sollten diese Stile mit \protect\Lcs*{addtopsstyle}
% oder den entsprechenden \opt{addto}\prm{style} Parametern ändern um die
-% Vererbungslinie beizubehalten.}%
-% \fi
-% \ifENGLISH
+% Vererbungslinie beizubehalten. Eine identisches Vererbungsdiagramm besteht
+% für die entsprechenden \opt{Wire\ldots} Stile.}%
+% \fi \ifENGLISH
% \caption{Inheritance diagram for the psstyles used for the automatic fiber
% connections. These styles should be changed with \protect\Lcs*{addtopsstyle}
% or the respective \opt{addto}\prm{style} options to preserve the
-% inheritance.}%
+% inheritance. An identical inheritance tree applies to the respective
+% \opt{Wire\ldots} styles.}%
% \fi
% \label{fig:fiberstyles}
% \end{figure}
@@ -8543,18 +9452,17 @@
% \opt{FiberOut2}
% \end{tabular}}%
% ]%
-% \xLstyle{FiberIn}\label{prm:FiberIn}%
-% \xLstyle{FiberIn1}\label{prm:FiberIn1}%
-% \xLstyle{FiberIn2}\label{prm:FiberIn2}%
-% \xLstyle{FiberOut}\label{prm:FiberOut}%
-% \xLstyle{FiberOut1}\label{prm:FiberOut1}%
-% \xLstyle{FiberOut2}\label{prm:FiberOut2}%
+% \xLstyle{FiberIn}\label{sty:FiberIn}%
+% \xLstyle{FiberIn1}\label{sty:FiberIn1}%
+% \xLstyle{FiberIn2}\label{sty:FiberIn2}%
+% \xLstyle{FiberOut}\label{sty:FiberOut}%
+% \xLstyle{FiberOut1}\label{sty:FiberOut1}%
+% \xLstyle{FiberOut2}\label{sty:FiberOut2}%
% \ifENGLISH
% Style \Lstyle{FiberIn} applies to all input fibers, it inherits from
-% \Lstyle{Fiber}. If the component has more than one input fiber they have the
+% \Lstyle{Fiber}. If the component has more than one input fiber they use the
% styles \Lstyle{FiberIn1} and \Lstyle{FiberIn2} which inherit from
-% \Lstyle{FiberIn}. All output fibers have the style \Lstyle{FiberOut}, two
-% output fibers have the styles \Lstyle{FiberOut1} and \Lstyle{FiberOut2} which
+% \Lstyle{FiberIn}. All output fibers use the style \Lstyle{FiberOut}, in case of two output fibers they use the styles \Lstyle{FiberOut1} and \Lstyle{FiberOut2} which
% inherit from \Lstyle{FiberOut}. See \prettyref{fig:fiberstyles} for an
% inheritance diagram of the styles. You must have in mind, that this
% inheritance is effective only if you use \Lcs*{addtopsstyle} to change the
@@ -8572,29 +9480,90 @@
% Stile nur mit \Lcs*{addtopsstyle} oder den entsprechenden
% \opt{addto}\prm{style} Parametern verändert werden.
% \fi
+% \item[\smash{%
+% \begin{tabular}[t]{@{}r@{}}%
+% \opt{WireIn}\\
+% \opt{WireIn1}\\
+% \opt{WireIn2}\\
+% \opt{WireOut}\\
+% \opt{WireOut1}\\
+% \opt{WireOut2}
+% \end{tabular}}%
+% ]%
+% \ifENGLISH
+% Style \Lstyle{WireIn} applies to all input wires, it inherits from
+% \Lstyle{Wire}. If the component has more than one input wire they use
+% the styles \Lstyle{WireIn1} and \Lstyle{WireIn2} which inherit from
+% \Lstyle{WireIn}. All output wires use the style \Lstyle{WireOut}, in
+% case of two output wires they use the styles \Lstyle{WireOut1} and
+% \Lstyle{WireOut2} which inherit from \Lstyle{WireOut}. See
+% \prettyref{fig:fiberstyles} for an inheritance diagram of the
+% styles. You must have in mind, that this inheritance is effective only
+% if you use \Lcs*{addtopsstyle} to change the styles (see also below).
+% \fi
+% \ifGERMAN
+% Der Stil \Lstyle{WireIn} bezieht sich auf alle eingehenden
+% elektrischen Verbindungen und erbt alle Eigenschaften von
+% \Lstyle{Wire}. Hat eine Komponente zwei davon, so können diese mit
+% \Lstyle{WireIn1} und \Lstyle{WireIn2} angesprochen werden, die alles
+% von \Lstyle{WireIn} übernehmen. Entsprechend bezieht sich
+% \Lstyle{WireOut} auf alle ausgehenden elektrischen Verbindungen, falls
+% es davon zwei gibt dann können diese mit \Lstyle{WireOut1} und
+% \Lstyle{WireOut2} geändert werden. Siehe \prettyref{fig:fiberstyles}
+% für ein Vererbungsdiagramm der Stile. Beachten Sie, dass diese
+% Vererbung nur erhalten bleibt, falls die Stile nur mit
+% \Lcs*{addtopsstyle} oder den entsprechenden \opt{addto}\prm{style}
+% Parametern verändert werden.
+% \fi
+% \xLstyle{WireIn}\label{sty:WireIn}%
+% \xLstyle{WireIn1}\label{sty:WireIn1}%
+% \xLstyle{WireIn2}\label{sty:WireIn2}%
+% \xLstyle{WireOut}\label{sty:WireOut}%
+% \xLstyle{WireOut1}\label{sty:WireOut1}%
+% \xLstyle{WireOut2}\label{sty:WireOut2}%
%
% \item[\smash{\begin{tabular}[t]{@{}r@{}}%
% \opt{new}\prm{style}\\
% \opt{addto}\prm{style}
% \end{tabular}}]
-% \xLkeyword{newFiberIn}\xLkeyword{addtoFiberIn}
+% \xLkeyword{newFiberIn}\xLkeyword{addtoFiberIn}%
+% \label{prm:newFiberIn}\label{prm:addtoFiberIn}
% \xLkeyword{newFiberIn1}\xLkeyword{addtoFiberIn1}
+% \label{prm:newFiberIn1}\label{prm:addtoFiberIn1}
% \xLkeyword{newFiberIn2}\xLkeyword{addtoFiberIn2}
+% \label{prm:newFiberIn2}\label{prm:addtoFiberIn2}
% \xLkeyword{newFiberOut}\xLkeyword{addtoFiberOut}
+% \label{prm:newFiberOut}\label{prm:addtoFiberOut}
% \xLkeyword{newFiberOut1}\xLkeyword{addtoFiberOut1}
+% \label{prm:newFiberOut1}\label{prm:addtoFiberOut1}
% \xLkeyword{newFiberOut2}\xLkeyword{addtoFiberOut2}
-% \ifENGLISH For every style two appropriate keys \opt{new}\prm{style} and
-% \opt{addto}\prm{style} are provided which can be used to change the styles
-% for single objects. This can be used to define own components
-% (\prettyref{sec:customcomp}) with respectively changed fiber connections or
-% to avoid explicit grouping.
+% \label{prm:newFiberOut2}\label{prm:addtoFiberOut2}
+% \xLkeyword{newWireIn}\xLkeyword{addtoWireIn}
+% \label{prm:newWireIn}\label{prm:addtoWireIn}
+% \xLkeyword{newWireIn1}\xLkeyword{addtoWireIn1}
+% \label{prm:newWireIn1}\label{prm:addtoWireIn1}
+% \xLkeyword{newWireIn2}\xLkeyword{addtoWireIn2}
+% \label{prm:newWireIn2}\label{prm:addtoWireIn2}
+% \xLkeyword{newWireOut}\xLkeyword{addtoWireOut}
+% \label{prm:newWireOut}\label{prm:addtoWireOut}
+% \xLkeyword{newWireOut1}\xLkeyword{addtoWireOut1}
+% \label{prm:newWireOut1}\label{prm:addtoWireOut1}
+% \xLkeyword{newWireOut2}\xLkeyword{addtoWireOut2}
+% \label{prm:newWireOut2}\label{prm:addtoWireOut2}
+% \ifENGLISH
+% For every style two appropriate keys \opt{new}\prm{style} and
+% \opt{addto}\prm{style} are provided which can be used to change the
+% styles for single objects. This can be used to define own components
+% (\prettyref{sec:customcomp}) with respectively changed connections
+% or to avoid explicit grouping.
% \fi
-% \ifGERMAN Für jeden Faserstil werden zwei Parameter \opt{new}\prm{style} und
-% \opt{addto}\prm{style} bereitgestellt, mit denen die Stile für einzelne
-% Komponenten verändert werden können. Damit können neuen Komponenten mit
-% anderen voreingestellten Faserverbindungen definiert werden
-% (\prettyref{sec:customcomp}), oder explizite Gruppierung kann vermieden
-% werden.
+% \ifGERMAN
+% Für jeden Faserstil werden zwei Parameter \opt{new}\prm{style} und
+% \opt{addto}\prm{style} bereitgestellt, mit denen die Stile für
+% einzelne Komponenten verändert werden können. Damit können neuen
+% Komponenten mit anderen voreingestellten Verbindungen definiert
+% werden (\prettyref{sec:customcomp}), oder explizite Gruppierung kann
+% vermieden werden.
% \fi
%
% \iffalse
@@ -8614,6 +9583,44 @@
% \end{stylelist}
%
%
+% \ifGERMAN\subsection{Bekannte Einschränkungen}\fi
+% \ifENGLISH\subsection{Known limitations}\fi
+%
+% \ifGERMAN Die Kombination von \Lkeyword{fiber} und \Lkeyword{wire}
+% erlaubt in der derzeitigen Implementierung (Version \fileversion)
+% nicht die beliebige Kombination aller Parametervarianten. Die meisten
+% funktionieren, aber das folgende Beispiel zeigt eine Variante, die
+% nicht korrekt funktioniert (der \Lcomp{elecsynthesizer} sollte eine
+% Eingangsfaser haben):
+% \fi
+% \ifENGLISH The combination of \Lkeyword{fiber} and \Lkeyword{wire}
+% does not allow any arbitrary combination of all parameter values in
+% the current implementation (version \fileversion). Most combinations
+% do work, but the following examples shows a variant, which does not
+% work correctly (the \Lcomp{elecsynthesizer} should have an input fiber):
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{fiber, wire}}]
+\begin{pspicture}(3,3)
+ \psset[optexp]{fiber=i, wire=+i}
+ \fiberdelayline(0,2.5)(3,2.5)
+ \optbox(0,1.5)(3,1.5)
+ \elecsynthesizer[position=0.5](0,0.5)(3,0.5)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN In solchen speziellen Fällen muss auf manuelle Verbindungen
+% zurückgegriffen werden.
+% \fi
+% \ifENGLISH In such special cases one must resort to manual
+% connections.
+% \fi
+%
% \ifGERMAN\section{Zeichenebenen}\fi
% \ifENGLISH\section{Layers}\fi
% \label{sec:layers}
@@ -8778,27 +9785,27 @@
%
% \ifENGLISH
% These components can also be connected with beams and fibers, but do
-% not provide full access to all options. \Lcs{opttripole} defines a
-% single reflective interface, whereas \Lcs{optdipole} can have two
+% not provide full access to all options. \Lcomp{opttripole} defines a
+% single reflective interface, whereas \Lcomp{optdipole} can have two
% transmittive interfaces:
% \fi
% \ifGERMAN
% Diese Komponenten können sowohl mit Fasern als auch mit Strahlen
% verbunden werden, können aber nicht deren volles Potential
-% ausschöpfen. \Lcs{opttripole} definiert eine einzelne reflektive
-% Grenzfläche, \Lcs{optdipole} kann zwei transmittive Grenzflächen haben:
+% ausschöpfen. \Lcomp{opttripole} definiert eine einzelne reflektive
+% Grenzfläche, \Lcomp{optdipole} kann zwei transmittive Grenzflächen haben:
% \fi
%
% \begin{optionlist}
% \optitem[0 0]{optdipolesize}{\prm{width}[ \prm{height}]}
% \ifGERMAN
% Hiermit können zwei transmittierende Grenzflächen für
-% \Lcs{optdipole} definiert werden, die sich bei
+% \Lcomp{optdipole} definiert werden, die sich bei
% $(\pm 0.5\text{\prm{width}}, 0)$ befinden.
% \fi
% \ifENGLISH
% With this option you can define two transmittive interfaces for
-% \Lcs{optdipole}, which are placed at $(\pm 0.5\text{\prm{width}}, 0)$.
+% \Lcomp{optdipole}, which are placed at $(\pm 0.5\text{\prm{width}}, 0)$.
% \fi
%
% \iffalse
@@ -8935,72 +9942,84 @@
% definition of your own custom components.
%
% Note, that this part of the documentation is not complete. It roughly
-% describes the steps to define own components as of version 3.0. Some parts may
+% describes the steps to define own components since version 3.0. Some parts may
% be subject to change which are not backward compatible.
-%
-% The old syntax of defining \Lcs*{mycomp@iii} is supported for backward
-% compatibility, but will be dropped soon. Please adapt your macros to the new
-% syntax.
% \fi
% \ifGERMAN
% \nxLPack{pst-optexp} stellt einige Benutzermakros zur Verfügung, mit denen
% sehr bequem neue, eigene Komponenten definiert werden können.
%
% Beachten Sie, dass dieser Teil der Dokumentation nicht vollständig ist. Die
-% notwendigen Schritte zur Definition neuer Komponenten in Version 3.0 werden
+% notwendigen Schritte zur Definition neuer Komponenten seit Version 3.0 werden
% grob beschrieben, können sich aber noch ändern und sind nicht zwangsläufig
% abwärtskompatibel.
-%
-% The alte Syntax mit \Lcs*{mycomp@iii} wird noch unterstützt, gilt aber als
-% veraltet und wird in zukünftigen Versionen entfernt werden. Bitte passen Sie
-% ihre vorhandenen Makros entsprechen an.
% \fi
%
% \begin{ltxsyntax}
% \xLcs{newOptexpDipole}\cmditem{newOptexpDipole}[fixopt]{name}{dftopt}
% \xLcs{newOptexpTripole}\cmditem{newOptexpTripole}[fixopt]{name}{dftopt}
% \xLcs{newOptexpFiberDipole}\cmditem{newOptexpFiberDipole}[fixopt]{name}{dftopt}
+% \xLcs{newOptexpElecDipole}\cmditem{newOptexpElecDipole}[fixopt]{name}{dftopt}
% \end{ltxsyntax}
%
-% \ifENGLISH
-% These macros generate all organizing code for the components which handle the
-% positioning, label placement, rotation and shifting, and the layering. In the
-% simplest case you only have to define the actual drawing of the component
-% outline.
-%
-% The macro \Lcs*{newOptexpDipoleNolabel} is superfluous because since version
-% 3.0 the label is optional for all components.
+% \ifENGLISH
+% These macros generate all organizing code for the component
+% \textbackslash\prm{name} which handle the positioning, label
+% placement, rotation and shifting, and the layering. In the simplest
+% case you only have to define the actual drawing of the component
+% outline.
+%
+% With the argument \prm{fixopt} you can specify argument settings which
+% will not be allowed to be overwritten, with \prm{dftopt} you can
+% specify a set of default arguments which may be overwritten with the
+% components optional argument. Both arguments \prm{fixopt} and
+% \prm{dftopt} are optional and may be omitted.
+%
+% The macros \Lcs{newOptexpFiberDipole} and \Lcs{newOptexpElecDipole}
+% only differ from the generic \Lcs{newOptexpDipole} in the connection
+% settings, like the components in \prettyref{chap:fibercomp} and
+% \prettyref{chap:electrcomp}, respectively.
%
% The actual process of creating a new component is split up in different parts,
% depending on the component complexity and user requirements:
% \begin{enumerate}
% \item The component drawing (see \prettyref{sec:newobj-comp}), this is the
% only required part.
-% \item Support for raytracing and layers (optional)
+% \item Support for raytracing (optional)
% \item Optional support for \Lkeyword{rotateref}, \Lkeyword{extnode} and
-% \Lkeyword{position}\opt{=start|end}.
+% \Lkeyword{position}\opt{=start|end} (optional).
% \end{enumerate}
% \fi
% \ifGERMAN
-% Diese Makros erzeugen den Code für die Positionierung, Drehung, Beschriftung
-% und die Ebenenverwaltung. Im einfachsten Fall müssen Sie lediglich die
+% Diese Makros erzeugen den Code für die Positionierung, Drehung,
+% Beschriftung und die Ebenenverwaltung der neuen Komponente
+% \textbackslash\prm{name}. Im einfachsten Fall müssen Sie lediglich die
% eigentliche Zeichnung der Komponente erstellen.
%
-% Seit Version 3.0 ist das Makro \Lcs*{newOptexpDipoleNolabel} überflüssig, da
-% seitdem die Beschriftung für alle Komponenten optional ist.
-%
+% Mit dem Argument \prm{fixopt} können Optionen voreingestellt werden,
+% die später über das optionale Argument der Komponente nicht verändert
+% werden können, \prm{dftopt} erlaubt Voreinstellungen zu machen, die
+% überschrieben werden können. Beide Argumente \prm{fixopt} und
+% \prm{dftopt} sind optional und können auch ganz weggelassen werden.
+%
% Die Definition der neuen Komponenten kann in unterschiedliche Schritte
% eingeteilt werden, je nach Komplexität und Anforderung des Benutzers:
-%
% \begin{enumerate}
% \item Die Zeichnung (siehe \prettyref{sec:newobj-comp}), das ist der einzige
% erforderliche Schritt.
-% \item Unterstützung von Raytracing und Ebenen (optional).
+% \item Unterstützung von Raytracing (optional).
% \item Unterstützung für \Lkeyword{rotateref}, \Lkeyword{extnode} und
-% \Lkeyword{position}\opt{=start|end}.
+% \Lkeyword{position}\opt{=start|end} (optional).
% \end{enumerate}
% \fi
%
+% \ifGERMAN Die folgenden Abschnitte enthalten die Entwicklung einer
+% einfachen Beispielkomponente \nxLcs{testcomp}.
+% \fi
+% \ifENGLISH The following section show the development of a simple
+% example component \nxLcs{testcomp}.
+% \fi
+%
% \ifENGLISH\subsection{The component drawing}\fi
% \ifGERMAN\subsection{Die Zeichnung der Komponente}\fi
% \label{sec:newobj-comp}
@@ -9019,9 +10038,9 @@
% \iffalse
%<*ignore>
% \fi
-\begin{LTXexample}[morekeywords={[21]{newOptexpDipole}}]
+\begin{LTXexample}
\begin{pspicture}(3.5,2.6)
-\newOptexpDipole{mydipole}{}
+\newOptexpDipole{mydipole}
\makeatletter
\def\mydipole@comp{%
\psaxes[arrows=->](0,0)(0,-1.1)(1.3,1.3)[$x$,90][$y$,0]
@@ -9031,7 +10050,7 @@
\drawbeam(0,1){}(3.5,1)
\end{pspicture}
\end{LTXexample}
-\begin{LTXexample}[morekeywords={[21]{newOptexpTripole}}]
+\begin{LTXexample}
\begin{pspicture}(3.5,3.7)
\newOptexpTripole{mytripole}{labelangle=-60}
\makeatletter
@@ -9047,6 +10066,184 @@
%</ignore>
% \fi
%
+% \ifGERMAN Unsere Beispielkomponente und ihre Zeichnung wird also wie
+% folgt definiert:
+% \fi
+% \ifENGLISH Our example component and its drawing are defined as
+% follows:
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{testcomp@comp}}]
+\begin{pspicture}(3, 2)
+\newOptexpDipole{testcomp}
+\makeatletter
+\def\testcomp@comp{%
+ \psframe[fillstyle=solid, fillcolor=black!30](-0.5,-0.5)(-0.3,0.5)
+ \psframe(-0.5,-0.5)(0.5,0.5)
+}%
+\makeatother
+\begin{optexp}
+\testcomp[position=0.6, labelalign=l](0,1)(3,1){label}
+\drawbeam[beaminside=false](0,1){}(3,1)
+\end{optexp}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN Die Positionierung der Komponente und der Beschriftung,
+% sowie die Ebenen funktioniert also schon.
+% \fi
+% \ifENGLISH The positioning of the component and the label, and the
+% layering is working already.
+% \fi
+%
+% \ifENGLISH\subsection{Support for raytracing}\fi
+% \ifGERMAN\subsection{Unterstützung von Raytracing}\fi
+%
+% \ifGERMAN Damit die Komponente Raytracing unterstützt, müssen die
+% Grenzflächen mit ihren Eigenschaften definiert werden. Die Definition
+% der Ebenen werden in einenm Makro \nxLcs{\prm{name}@nodes} definiert,
+% damit sie auch in den unterschiedlichen Ebenen verfügbar sind.
+%
+% Die Definition der Ebenen erfolgt dann über das Makro \Lcs*{newOptexpComp}
+%
+% \begin{lstlisting}[gobble=2]
+% \def\testcomp@nodes{%
+% \newOptexpComp{%
+% % Definition der ersten Grenzflaeche (GF)
+% {-0.5 0} % x- und y-Koordinate der GF-Mitte
+% {0 1} % Richtungsvektor der GF (x und y)
+% -0.5 0.5 % Grenzen fuer die NA, gesehen als Faktoren des GF-Vektor
+% trans % Verhalten der GF, kann 'trans', 'refl' oder 'abs' sein
+% {PlainIfc} % Art der GF
+% % Dasselbe fuer die rechte GF, nur die Mitte ist anders
+% {0.5 0} {0 1} -0.5 0.5 trans {PlainIfc}
+% \POE@key@n % Brechungsindex, koennte jede Zahl sein
+% }%
+% }%
+% \end{lstlisting}
+% \fi
+% \ifENGLISH To add support for ray-tracing, you must define the
+% interface with their properties. The definitions are nested in a macro
+% \nxLcs{\prm{name}@nodes} in order to be accessible in the different
+% layers.
+%
+% The definitions are done with the macro \Lcs*{newOptexpComp}
+%
+% \begin{lstlisting}[gobble=2]
+% \def\testcomp@nodes{%
+% \newOptexpComp{%
+% % definition of the first interface (IF)
+% {-0.5 0} % x- and y-coordinate of the IF center
+% {0 1} % direction vector of the IF (x and y)
+% -0.5 0.5 % limits use for the NA as factor for IF vector.
+% trans % behavior of the IF, can be 'trans', 'refl' or 'abs'
+% {PlainIfc} % type of IF
+% % the same for the right IF, only the center is different
+% {0.5 0} {0 1} -0.5 0.5 trans {PlainIfc}
+% \POE@key@n % refractive index, could be any number
+% }%
+% }%
+% \end{lstlisting}
+% \fi
+%
+% \ifENGLISH So, in condensed form, our example component looks like
+% this, and the beam is not drawn inside the component any more:
+% \fi
+% \ifGERMAN Unsere Komponent sieht also folgendermaßen aus, und der
+% Strahl verläuft nicht mehr innerhalb der Komponente:
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{testcomp@comp, testcomp@nodes}}]
+\begin{pspicture}(3, 2)
+\newOptexpDipole{testcomp}
+\makeatletter
+\def\testcomp@comp{%
+ \psframe[fillstyle=solid, fillcolor=black!30](-0.5,-0.5)(-0.3,0.5)
+ \psframe(-0.5,-0.5)(0.5,0.5)}%
+\def\testcomp@nodes{%
+ \newOptexpComp{%
+ {-0.5 0} {0 1} -0.5 0.5 trans {PlainIfc}
+ {0.5 0} {0 1} -0.5 0.5 trans {PlainIfc} \POE@key@n }}%
+\makeatother
+\begin{optexp}
+\testcomp[position=0.6, labelalign=l](0,1)(3,1){label}
+\drawbeam[beaminside=false](0,1){}(3,1)
+\end{optexp}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifENGLISH\subsection{Support for external nodes}\fi
+% \ifGERMAN\subsection{Unterstützung von externen Knoten}\fi
+%
+% \ifGERMAN Damit nun, als letzter Schritt auch externe Knoten mit \Lkeyword{extnode},
+% Positionierung an den Anfang oder das Ende mit
+% \Lkeyword{position}\opt{=start|end}, oder auch das Setzen eines
+% anderen Drehpunktes mit \Lkeyword{rotateref} möglich wird, müssen die
+% externen Dimensionen der Komponente bekannt gemacht werden. Dafür muss
+% ein weiteres Makro mit dem Name \nxLcs{\prm{name}@ref} definiert
+% werden, in dem auf Postscript-Ebene die Werte \opt{@@x} (halbe
+% Breite), \opt{@@y} (halbe Höhe), und optional auch \opt{@@x0} und
+% \opt{@@y0} (Verschiebung der Mitte) definiert werden müssen.
+% \fi
+% \ifENGLISH To enable, as last step, support for external nodes with
+% \Lkeyword{extnode}, positioning at the start or end with
+% \Lkeyword{position}\opt{=start|end}, and setting the rotation
+% reference node with \Lkeyword{rotateref}, we need to provide the
+% external dimensions of the component. For this we need to define a new
+% macro \nxLcs{\prm{name}@ref}, which defines at Postscript level the
+% values \opt{@@x} (half width), \opt{@@y} (half height), and optionally
+% \opt{@@x0} and \opt{@@y0} (offset of the center).
+% \fi
+% \begin{lstlisting}[gobble=2]
+% \def\testcomp@ref{%
+% \POE@setref{ /@@x 0.5 def /@@y 0.5 def }%
+% }%
+% \end{lstlisting}
+%
+% \ifGERMAN Der Code für unsere Beispielkomponente \nxLcs{testcomp} ist
+% damit vollständig, und sieht folgendermaßen aus:
+% \fi
+% \ifENGLISH This completes the code for our example component
+% \nxLcs{testcomp}, which now looks like this:
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{testcomp@comp, testcomp@nodes, testcomp@ref}}]
+\begin{pspicture}(3, 2)
+\newOptexpDipole{testcomp}
+\makeatletter
+\def\testcomp@comp{%
+ \psframe[fillstyle=solid, fillcolor=black!30](-0.5,-0.5)(-0.3,0.5)
+ \psframe(-0.5,-0.5)(0.5,0.5)}%
+\def\testcomp@nodes{%
+ \newOptexpComp{%
+ {-0.5 0} {0 1} -0.5 0.5 trans {PlainIfc}
+ {0.5 0} {0 1} -0.5 0.5 trans {PlainIfc} \POE@key@n }}%
+\def\testcomp@ref{%
+ \POE@setref{ /@@x 0.5 def /@@y 0.5 def }}%
+\makeatother
+\begin{optexp}
+\testcomp[position=0.6, labelalign=l, extnode=tl](0,1)(3,1){label}
+\drawbeam[beaminside=false](0,1){}(3,1)
+\psdot(\oenodeExt{})
+\end{optexp}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
% \ifGERMAN
% \chapter{Beispiele}
% \fi
@@ -9072,7 +10269,7 @@
\optbox[position=end, optboxsize=3.2 1, innerlabel, compshift=-0.2](M)(IRSpec){IR spectrometer}
\lens[abspos=1](M)(OSA)
\optplane[angle=90]([offset=-1.5]M)
- \optfiber[fiberloopradius=0.2, fiberloopsep=0.2, label=1, newFiber={linewidth=1.5\pslinewidth}]([offset=-1.5]M)(OSA){MM fiber}
+ \optfiber[fiberloopradius=0.2, label=1, newFiber={linewidth=1.5\pslinewidth}]([offset=-1.5]M)(OSA){MM fiber}
\optbox[position=end, innerlabel, optboxwidth=1.1](M)(OSA){OSA}
\newpsstyle{Beam}{linestyle=none, fillcolor=red, fillstyle=solid, raytrace=false}
\drawwidebeam[beamwidth=0.2, stopinside]{1-2}
@@ -9210,13 +10407,13 @@
\optbox[label=0, compname=EAM, extnode=b, abspos=1.5](Lin)(Det){EAM}
\optfiber[labeloffset=0.3, abspos=3.2](Lin)(Det){fibre}
\optdetector(Lin)(Det){OSA}
-\pnode([Xnodesep=-1,offset=-1]\oenodeExt{L}){Osc}
-\pnode(\oenodeExt{L}|Osc){PSin}\pnode(\oenodeExt{EAM}|Osc){PSout}
-\oscillator[output=right](Osc){10\,GHz}{}
-\phaseshifter[arrowscale=1.5, inputarrow, labeloffset=-0.7](PSin)(PSout){$\tau$}
-\drawfiber{1}{2}{3}{4}
-\psset{arrows=->, arrowinset=0, arrowscale=1.5}
-\wire(PSin)(\oenodeExt{L})\wire(PSout)(\oenodeExt{EAM})
+\pnode([Xnodesep=-0.5,offset=-1]\oenodeExt{L}){Osc}
+\elecsynthesizer[wire=none](Osc)(\oenodeExt{EAM}|Osc){10\,GHz}
+\optarrowcomp[arrowcompsize=0.8 0.6, arrowscale=1.5](Osc)(\oenodeExt{EAM}|Osc){$\tau$}
+\drawfiber{1-4}
+\addtopsstyle{Wire}{arrows=->, arrowinset=0, arrowscale=1.5}
+\drawwire{5}{6}\psset[optexp]{wireangleB=90}
+\drawwire{6}(\oenodeExt{EAM})\drawwire{5}(\oenodeExt{L})
\end{pspicture}
\end{LTXexample}
@@ -9355,7 +10552,7 @@
\psset{unit=0.9}
\begin{LTXexample}[pos=t, caption={caption}, label=ex:transmission-loop]
\begin{pspicture}(13,5.5)
-\psset{usefiberstyle, optboxwidth=1, labelstyle=\footnotesize, fiber=none}
+\psset{optboxwidth=1, labelstyle=\footnotesize, fiber=none}
\pnode(1,5){LD}\pnode([Xnodesep=5.5]LD){CPLin1}
\pnode([offset=-2]CPLin1){CPLin2}\pnode([Xnodesep=2.5]CPLin1){CPLout1}
\pnode([Xnodesep=2.5]CPLin2){CPLout2}\pnode([Xnodesep=3]CPLout1){RX}
@@ -9365,12 +10562,12 @@
\optfilter[abspos=3](LD)(CPLin1){BPF}
\optswitch[abspos=4](LD)(CPLin1){SW}
\polcontrol[abspos=5, fiber=out](LD)(CPLin1)
-\drawfiber{1}{2}{3}{4}{5}{6}
+\drawfiber{1-6}
\optcoupler[couplertype=none, fiber](CPLin1)(CPLin2)(CPLout1)(CPLout2)
\optamp[abspos=0.8, fiber=in](CPLout1)(RX){EDFA}
\optfilter[abspos=2](CPLout1)(RX){BPF}
\optbox[position=end](CPLout1)(RX){RX}
-\drawfiber{8}{9}{10}
+\drawfiber{8-10}
\pnode([Xnodesep=-0.5]LD|CPLin2){TL}\pnode(RX|TL){TR}
\pnode([offset=-2.5]TR){BR}\pnode(TL|BR){BL}
\optamp[fiber=i](CPLout2)(TR){EDFA}
@@ -9383,7 +10580,7 @@
\optfilter[position=0.2](TL)(CPLin2){BPF}
\optswitch(TL)(CPLin2){SW}
\polcontrol[position=0.8, fiber=out](TL)(CPLin2)
-\drawfiber{12}{13}{14}{15}{16}\drawfiber{17}{18}{19}
+\drawfiber{12-16}\drawfiber{17-19}
\drawfiber[fiberstyle=angle, arm=0.5, linearc=0.5, stopnode=1]{16}{17}
\end{pspicture}
\end{LTXexample}
@@ -9417,8 +10614,7 @@
\begin{LTXexample}[caption={caption}]
\begin{pspicture}(0.5,0)(2.2,4)
\pnode(0,1){A}\pnode(1,1){BS}\pnode(2,1){G}\pnode(1,4){B}
- \beamsplitter(G)(BS)(B)
- \optgrating(BS)(G)(BS)
+ \beamsplitter(G)(BS)(B) \optgrating(BS)(G)(BS)
\lens[lens=2 2 1.5, compshift=0.1, n=2.25](BS)(B)
\pinhole[phwidth=0.05, innerheight=0.05, position=0.8, compshift=0.18](BS)(B)
\optplane[angle=90](B)
@@ -9476,15 +10672,16 @@
\end{LTXexample}
\begin{LTXexample}[caption={caption}]
-\begin{pspicture}(0,1)(3.2,4.2)
+\psset{unit=1.5}
+\begin{pspicture}(0,1)(2.2,4.2)
\pnode(0,2){In}\pnode(1,2){G}\pnode(1,4){M1}
- \pnode(3,2){M2}\pnode(1,1){S}
+ \pnode(2,2){M2}\pnode(1,1){S}
\mirror[mirrortype=semitrans](In)(G)(M1)
\optbox[optboxwidth=0.15, angle=45, style=SemitransMirror](G)(M1)
\mirror[mirrortype=extended](G)(M1)(G)
\mirror[mirrortype=extended](G)(M2)(G)
\optplate[position=end](G)(S)
- \newpsstyle{Beam}{linecolor=red, ArrowInside=->, ArrowInsidePos=0.4, arrowscale=1.3}
+ \newpsstyle{Beam}{linecolor=red, ArrowInside=->, ArrowInsidePos=0.4, arrowscale=1.5}
\drawbeam(In){1}{4}{1}{5}
\drawbeam(In){1-3}{2}{1}{5}
\end{pspicture}
@@ -9502,7 +10699,7 @@
\optbox[abspos=2.5](Laser)(Ref){Raumfilter}
\lens[fillstyle=solid, fillcolor={[rgb]{0.87,0.91,0.93}}](Laser)(Ref){Linse}
\mirror[label=1 30]([offset=0.2]Laser)([offset=0.2]Ref)(Film){%
- \begin{tabular}{l}Spiegel\\(fest)\end{tabular}}
+ \begin{tabular}{c}Spiegel\\(fest)\end{tabular}}
\opttripole[label=0.4](Ref)(Film)(Ref){%
\psframe(0.5,1\pslinewidth)(-0.5,5\pslinewidth)
\psline[linewidth=2\pslinewidth](0.5,0)(-0.5,0)
@@ -9531,7 +10728,7 @@
\optbox[optboxsize=0.2 0.6, n=1, label=-1.2](\oenodeOut{6})(Det){%
\begin{tabular}{@{}c@{}}nonlinear\\ crystal\end{tabular}}
\optplate[linestyle=none](\oenodeOut{7})(Det)
- \optdetector[detsize=0.6 0.6, fillstyle=solid,fillcolor=blue](\oenodeOut{6})(Det)
+ \optdetector[detsize=0.6 0.6, fillstyle=solid, fillcolor=blue](\oenodeOut{6})(Det)
\newpsstyle{Beam}{linewidth=1.5\pslinewidth}
\drawbeam[linecolor=blue]{7-9}
\addtopsstyle{Beam}{linecolor=red}
@@ -9544,19 +10741,38 @@
\begin{LTXexample}[pos=t, caption={caption}, label={ex:glan-thompson}]
\begin{pspicture}(-1,-0.5)(8,1.5)
- \newpsobject{perppol}{polarization}{poltype=perp, linecolor=green!90!black, polsize=1}
- \newpsobject{parallelpol}{polarization}{poltype=parallel, linecolor=red, polsize=0.8}
+ \newpsobject{perppol}{polarization}{poltype=perp, linecolor=green, polsize=1}
+ \newpsobject{parpol}{polarization}{poltype=parallel, linecolor=red, polsize=0.8}
\newpsstyle{Polarization}{arrowinset=0, arrowscale=1.2}
\pnode(0,1){A}\pnode(8,1){B}\pnode(4,-0.5){C}
\glanthompson[glanthompsongap=0.2, glanthompsonsize=2 1](A)(B)
\optplane(B)\optplane[angle=90](C)
\drawbeam(A){1-2}
- \drawbeam[linestyle=dashed, dash=2pt 2pt, linecolor=red, arrowscale=1.5, arrows=->](A){1}{3}
- \parallelpol[abspos=1](A)(B)
- \perppol[abspos=1](A)(B)
+ \drawbeam[linestyle=dashed, dash=2pt 2pt, linecolor=red, arrows=->](A){1}{3}
+ \parpol[abspos=1](A)(B)\perppol[abspos=1](A)(B)
\nodexn{(\oenodeBeam{})-1.5(!\oeBeamVec{})}{D}
- \perppol[abspos=7](A)(B)
- \parallelpol(D)(\oenodeBeam{})
+ \perppol[abspos=7](A)(B)\parpol(D)(\oenodeBeam{})
+\end{pspicture}
+\end{LTXexample}
+\enlargethispage{1cm}
+\begin{LTXexample}[pos=t, caption={caption}]
+\begin{pspicture}(13.7,2.9)
+\newpsstyle{Wire}{arm=0.1, arrows=->}
+\psset[optexp]{optboxsize=1.2 0.8, optmzmsize=1.2 0.8, fiber=none, label=0.7}
+\pnode(2,1){L}\pnode([Xnodesep=11]L){A}
+\optbox[position=start, optboxwidth=2, label=0](L)(A){DFB-Laser}
+\optbox[abspos=1, label=0, compname=Eam, extnode=t](L)(A){EAM}
+\optmzm[abspos=4.5, compname=Mzm1, extnode=t](L)(A){MZM}
+\optmzm[abspos=6, compname=Mzm2, extnode=t](L)(A){MZM}
+\optamp[abspos=9](L)(A){EDFA}
+\drawfiber{1-5}\drawfiber[arrows=->]{}(A)
+\pnode([offset=1.5]\oenodeExt{Eam}){Osci}
+\elecsynthesizer[compname=Syn, position=0.5, wire=o, label=0.5 . r](Osci)(\oenodeExt{Eam}){10\,GHz}
+\psset[optexp]{label=0, wire, optboxsize=0.8 1.2}
+\optbox[compname=Ppg1](\oenodeExt{Mzm1}|Osci)(\oenodeExt{Mzm1}){PPG}
+\optbox[compname=Ppg2](\oenodeExt{Mzm2}|Osci)(\oenodeExt{Mzm2}){PPG}
+\drawwire[arrows=-, wireangleB=-90]{Syn}(\oenodeExt{Mzm2}|Osci)
+\rput([offset=0.5, Xnodesep=-0.3]A){Faserschleife}
\end{pspicture}
\end{LTXexample}
@@ -9565,43 +10781,41 @@
\captionsetup[lstlisting]{format=poecaption}%
\begin{LTXexample}[pos=t, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1364/OL.37.000930}}]
\begin{pspicture}(0,0.2)(13.5,4.7)
-\psset[optexp]{optboxsize=1 0.8, usefiberstyle}
+\psset[optexp]{optboxsize=1 0.8, label=0, fiber=none}
\pnode(1,3.2){Scan}\pnode([offset=-1.6]Scan){Sat}
\pnode([Xnodesep=5]Scan){ScanCpl}\pnode(ScanCpl|Sat){SatCpl}
\pnode([Xnodesep=1.5,offset=-0.8]ScanCpl){Cpl}\pnode([Xnodesep=5]Cpl){PD}
-\pnode([Xnodesep=2.5, offset=-1.4]Cpl){Pump}\psset[optexp]{fiber=none}
-\optbox[position=start, label=0](Scan)(ScanCpl){Scan}
+\pnode([Xnodesep=2.5, offset=-1.4]Cpl){Pump}
+\optbox[position=start](Scan)(ScanCpl){Scan}
\optmzm[abspos=1, compname=M1, extnode=t](Scan)(ScanCpl)
\optmzm[abspos=2.5, compname=M2, extnode=t](Scan)(ScanCpl)
\optamp[abspos=3.7](Scan)(ScanCpl)
\polcontrol[abspos=4.5, fiber=o](Scan)(ScanCpl)
-\drawfiber{1}{2}{3}{4}{5}
-\optbox[position=start, compname=S, extnode=b, label=0](Sat)(SatCpl){Sat}
+\drawfiber{1-5}
+\optbox[position=start, compname=S, extnode=b](Sat)(SatCpl){Sat}
\optmzm[abspos=1.75, compname=M3, extnode=b](Sat)(SatCpl)
\optamp[abspos=3.7](Sat)(SatCpl)
\polcontrol[abspos=4.5, fiber=o](Sat)(SatCpl)
-\drawfiber{6}{7}{8}{9}
+\drawfiber{6-9}
\wdmcoupler[fiber=i](ScanCpl)(SatCpl)(Cpl)
\optisolator[position=0.1](Cpl)(Pump|Cpl)
\optfiber[position=0.6](Cpl)(Pump|Cpl)
\addtopsstyle{OptCircArrow}{arrows=<-}
\optcirculator[optcircangle=0 -90](Cpl)(PD)(Pump)
\wdmsplitter[position=0.8, coupleralign=t](Cpl)(PD)
-\optbox[position=end, label=0, compname=Pd, extnode=t](Cpl)(PD){PD}
-\optbox[position=end, label=0, compshift=-1.5](Cpl)(PD){OSA}
+\optbox[position=end, compname=Pd, extnode=t](Cpl)(PD){PD}
+\optbox[position=end, compshift=-1.5](Cpl)(PD){OSA}
\optamp[fiber](Pump)(\oenodeIfc{2}{13})
-\optbox[position=start, optboxsize=0.6 1.2, label=0 . . absolute](Pump)(Pump|Cpl){Pump}
-\drawfiber{10}{11}{12}{13}{14}{15}\drawfiber{14}{16}
-% electrical stuff
-\newpsstyle{Fiber}{}\psset[optexp]{label=0}
+\optbox[position=start, optboxsize=0.6 1.2](Pump)(Pump|Cpl){Pump}
+\drawfiber{10-15}\drawfiber{14}{16}
\optbox[compshift=0.7, optboxsize=2.5 0.8](\oenodeExt{M2})(\oenodeExt{Pd}|\oenodeExt{M2}){Lock-In Amp}
-\ncangle[angleA=90, angleB=180, linearc=0.3]{\oenodeExt{M2}}{\oenodeIn{}}
-\ncangle[angleB=90, linearc=0.3]{\oenodeOut{}}{\oenodeExt{Pd}}
-\psset[optexp]{fiber=all, optboxsize=0.8 1, position=start}
-\optbox(\oenodeExt{S}|Pump)(\oenodeExt{S}){\psline(-0.3,-0.2)(0.3,0.2)(0.3,-0.2)}
-\optbox(\oenodeExt{M3}|Pump)(\oenodeExt{M3}){\psline(-0.3,-0.2)(0,0.2)(0.3,-0.2)}
-\oscillator[output=none, unit=0.75, linewidth=0.666\pslinewidth]([offset=1]\oenodeExt{M1}){}{}
-\psline(\oenodeExt{M1})([offset=0.4]\oenodeExt{M1})
+\addtopsstyle{Wire}{arm=0.1}
+\drawwire[wireangleA=90, linearc=0.3](\oenodeExt{M2}){}
+\drawwire[wireangleB=90, linearc=0.3]{}(\oenodeExt{Pd})
+\elecsynthesizer([offset=0.2]\oenodeExt{M1})(\oenodeExt{M1})
+\psset[optexp]{synthshape=rectangle}
+\elecsynthesizer[synthtype=sawtooth](\oenodeExt{S}|Pump)(\oenodeExt{S})
+\elecsynthesizer[synthtype=triangle](\oenodeExt{M3}|Pump)(\oenodeExt{M3})
\end{pspicture}
\end{LTXexample}
\endgroup
@@ -9678,17 +10892,50 @@
\end{LTXexample}
\endgroup
+\begin{LTXexample}[pos=t, caption={caption}]
+\begin{pspicture}(13.8,3.8)
+ \pnode(2.3,2){Signal}
+ \pnode([Xnodesep=1.5,offset=0.8]Signal){UpIn}
+ \pnode([Xnodesep=1.5, offset=-0.8]Signal){LowIn}
+ \pnode([Xnodesep=3.5]UpIn){UpOut}
+ \pnode(UpOut|LowIn){LowOut}
+ \pnode([Xnodesep=1.5]UpOut){UpIn2}
+ \pnode([Xnodesep=3]UpIn2){UpOut2}
+ \pnode([Xnodesep=1.5]LowOut){LowIn2}
+ \pnode(UpOut2|LowIn2){LowOut2}
+ \psset{labelstyle=\footnotesize}
+ \psset{fiber=none}\addtopsstyle{Fiber}{linecolor=red}
+ \psset{wire=none}\addtopsstyle{Wire}{arm=0.1, arrows=->}
+ \optbox[position=start, label=0, optboxsize=2.3 0.8](Signal)([Xnodesep=0.1]Signal){2.5\,ps, 10\,GHz}
+ \wdmsplitter[label=0.4](Signal)(UpIn)(LowIn){50\%}
+ \optfiber[fiberloops=4, label=0.4, position=0.3](LowIn)(LowOut){L$_2$}
+ \optswitch[position=0.7](LowIn)(LowOut){AOM}
+ \optfiber[fiberloops=2, label=0.4, position=0.2](UpIn)(UpOut){L$_1$}
+ \optswitch[position=0.7](UpIn)(UpOut)
+ \optcoupler[label=0.4, position=0.3](UpOut)(LowOut)(UpIn2)(LowIn2){50\%}
+ \optbox[optboxsize=2 0.8, position=end, label=0, extnode=t](LowIn2)(LowOut2){Messsystem}
+ \drawfiber{1-4}{7}(LowIn2)\drawfiber[arrows=->](LowIn2){8}
+ \optdetector[abspos=0.4, detsize=0.6 0.8](UpIn2)(UpOut2){PD}
+ \optbox[optboxsize=0.8 0.8, label=0, position=0.44](UpIn2)(UpOut2){$\div 8$}
+ \optamp[position=0.8](UpIn2)(UpOut2)
+ \optbox[position=end, extnode=b, label=0, optboxsize=2 0.8](UpIn2)(UpOut2){Faserkamm}
+ \drawfiber{2}{5-7}(UpIn2)\drawfiber[arrows=->](UpIn2){9}
+ \drawwire{9-12}
+ \drawfiber[arrows=->](\oenodeExt{12})(\oenodeExt{8})
+\end{pspicture}
+\end{LTXexample}
+
\begin{LTXexample}[pos=t, linerange={1-1}, caption={caption}]
-\psset{unit=1.1}
-\begin{pspicture}(9.3,5.8)
+\psset{unit=1.1, usefiberstyle=false}
+\begin{pspicture}(9.3,6.1)
\psset{labeloffset=0.5, optboxsize=1 0.8, arrowscale=1.2, arrowinset=0}
\newpsstyle{Fiber}{linecolor=red!70!black, linewidth=1.5\pslinewidth}
- \pnode(1, 3.4){LD}\pnode([Xnodesep=3.2]LD){LoopIn}\pnode([offset=-1]LoopIn){LoopInsIn}
- \pnode([offset=-1,Xnodesep=2]LoopIn){LoopInsOut}\pnode(LoopInsOut|LoopIn){LoopOut}
+ \pnode(1, 3.7){LD}\pnode([Xnodesep=3.2]LD){LoopIn}\pnode([offset=-1.2]LoopIn){LoopInsIn}
+ \pnode([Xnodesep=2]LoopInsIn){LoopInsOut}\pnode(LoopInsOut|LoopIn){LoopOut}
\optswitch[compname=LSw, label=. 180 b, abspos=2.7, fiber=o](LD)(LoopIn){load switch}
\optcoupler[addtoFiber={ArrowInside=->, ArrowInsidePos=0.7}](LoopIn)(LoopInsIn)(LoopOut)(LoopInsOut){50/50}
- \optbox[labelstyle=\footnotesize, position=end, fiber, label=0, optboxsize=1.4 1.2](LoopOut)([Xnodesep=0.1]LoopOut){\parbox{1.4\psxunit}{\centering Linear\\Optical\\Sampling}}%
+ \optbox[labelstyle=\footnotesize, position=end, fiber, label=0, optboxsize=1.6 1.2](LoopOut)([Xnodesep=0.1]LoopOut){\parbox{1.4\psxunit}{\centering Linear\\Optical\\Sampling}}%
\pnode([Xnodesep=2.8]LoopInsOut){TR}
\pnode([offset=-2]TR){BR}
\pnode([Xnodesep=-1.5]LoopInsIn){TL}
@@ -9701,24 +10948,21 @@
\drawfiber[fiberstyle=bar, angleA=0, startnode=N, linearc=0.5, armA=0.6]{5}{6}
\optamp[labelalign=b, abspos=3.8](BR)(BL){EDFA}
\optfilter[label=. 180 b, usefiberstyle, abspos=1](BL)(BR){OBPF}
- \drawfiber{6}{7}{8}
+ \drawfiber{6-8}
\optswitch[labelalign=t, abspos=1, fiber=o](TL)(LoopInsIn){unload switch}
\drawfiber[angleA=180, linearc=0.5, armA=1, startnode=1, fiberstyle=bar]{8}{9}
\optbox[extnode=t, compname=Mod, innerlabel, abspos=0.7](LD)(LoopIn){MOD}
\optbox[position=start, innerlabel](LD)(LoopIn){LD}
\drawfiber{}{Mod}
\drawfiber[arrows=->]{Mod}{LSw}
- \psline[arrows=->]([offset=1]\oenodeExt{PM})(\oenodeExt{PM})
- \pnode([offset=1.2, Xnodesep=-1]\oenodeExt{Mod}){Osci}
- \oscillator[output=none, unit=0.8, linewidth=0.666\pslinewidth](Osci){}{}
- \uput{0.5}[90](Osci){SYN}
- \newpsstyle{Fiber}{}
- \optbox[compname=PG, extnode=b, abspos=0.6, fiber=i, label=0.5 180 b]([Xnodesep=0.4]Osci)(\oenodeExt{PM}|Osci){PG}
- \rput(\oenodeCenter{}){\psplot[plotpoints=200]{-0.3}{0.3}{2.7182818 x 0.05 div 2 exp neg exp 0.3 mul 0.15 sub}}
- \optfilter[label=0.5 180 b, abspos=1, fiber=i](\oenodeOut{PG})(\oenodeExt{PM}|Osci){BPF}
- \rput[r]([offset=0.4, Xnodesep=0.2]\oenodeOut{}){\psplot[plotpoints=200]{0}{1}{360 3.14159 div x 6 mul mul sin 2 exp 0.3 mul 0.15 sub}}
- \ncangle[angleA=-90, angleB=90, arrows=->, armB=0.5]{\oenodeExt{PG}}{\oenodeExt{Mod}}
- \ncangle[angleB=90, arrows=->]{\oenodeOut{}}{\oenodeExt{PM}}
+ \pnode([offset=1.2, Xnodesep=-0.7]\oenodeExt{Mod}){Osci}\pnode(\oenodeExt{PM}|Osci){Tmp}
+ \psset{wire=none, fiber=none, label=0.5 180 b}
+ \elecsynthesizer(Osci)(Tmp){SYN}
+ \elecsynthesizer[synthshape=rectangle, synthtype=pulse, abspos=0.7, compname=Pg, extnode=b](Osci)(Tmp){PG}
+ \optfilter[abspos=2](Osci)(Tmp){BPF}
+\rput[r]([offset=0.4, Xnodesep=0.2]\oenodeOut{}){\psplot[plotpoints=200]{0}{1}{360 3.14159 div x 6 mul mul sin 2 exp 0.3 mul 0.15 sub}}
+ \drawwire[arm=0]{12-14}\drawwire[wireangleB=-90, arrows=->]{14}(\oenodeExt{PM})
+ \psline[style=Wire, arrows=->](\oenodeExt{Pg})(\oenodeExt{Mod})
\rput([Xnodesep=0.1, offset=0.2]\oenodeOut{Mod}){%
\psplot[plotpoints=200, unit=0.7]{0}{1}{2.7182818 x 0.5 sub 0.08 div 2 exp neg exp 0.5 mul}%
}%
@@ -9727,7 +10971,7 @@
\begingroup
\captionsetup[lstlisting]{format=poecaption}
-\begin{LTXexample}[pos=t, linerange={1-1}, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1364/OL.37.000797}}]
+\begin{LTXexample}[pos=t, linerange={1-1}, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1364/OL.37.000797}}, label={ex:ratchet}]
\begin{pspicture}(12.3,8.8)
\newpsobject{laser}{optbox}{position=start, innerlabel}
@@ -9880,14 +11124,14 @@
% Every component consists internally of interfaces which are defined by a node
% on the optical axis, a plane vector or a curvature radius, and by its optical
% characteristics (reflective or transmittive, or both e.g. for
-% \Lcs{beamsplitter}). The interface nodes can be visualized for each component
+% \Lcomp{beamsplitter}). The interface nodes can be visualized for each component
% with the \Lkeyword{showifcnodes} parameter.
% \fi
% \ifGERMAN
% Jede Komponente besteht aus Grenzflächen, die über einen Knoten auf der
% optischen Achse, einen Ebenevektor bzw. einen Krümmungsradius, und ihre
% optische Eigenschaft (reflektiv oder transmittiv, oder beides für
-% z.B. \Lcs{beamsplitter}) definiert ist. Die Grenzflächenknoten können mit
+% z.B. \Lcomp{beamsplitter}) definiert ist. Die Grenzflächenknoten können mit
% \Lkeyword{showifcnodes} angezeigt werden.
% \fi
%
@@ -9961,14 +11205,14 @@
% reference nodes (\prettyref{sec:rotrefnode}) for all components. Displayed are
% all possible combinations of \opt{t}, \opt{c}, or \opt{b} with \opt{l},
% \opt{c}, or \opt{r}. Not all components support all combinations, e.g. a plain
-% \Lcs{mirror} ignores \opt{t} and \opt{b} and an \Lcs{optplate} ignores \opt{l}
+% \Lcomp{mirror} ignores \opt{t} and \opt{b} and an \Lcomp{optplate} ignores \opt{l}
% and \opt{r}.
%
-% Instead of these values also fractional parts can be used: \opt{t} corresponds
-% to $+1\cdot\Delta y$, \opt{b} corresponds to $-1\cdot\Delta y$, \opt{l}
-% corresponds to $-1\cdot\Delta x$, and \opt{r} corresponds to $+1\cdot\Delta
-% x$. In the following example the point $(0.5\Delta x, 1.2\Delta y)$ is
-% provided as external node.
+% Instead of these values also fractional parts can be used: \opt{t}
+% corresponds to $+1\cdot\Delta y$, \opt{b} corresponds to
+% $-1\cdot\Delta y$, \opt{l} corresponds to $-1\cdot\Delta x$, and
+% \opt{r} corresponds to $+1\cdot\Delta x$. This can be especially
+% useful for round outer shapes, as the following examples shows.
% \fi
% \ifGERMAN
% Hier finden Sie eine Übersicht über alle möglichen externen Knoten
@@ -9976,21 +11220,21 @@
% aller Komponenten. Angezeigt werden die Positionen für alle möglichen
% Kombinationen von \opt{t}, \opt{c} oder \opt{b} mit \opt{l}, \opt{c} oder
% \opt{r}. Es sind nicht immer alle Möglichkeiten vorhanden, so können \opt{t}
-% und \opt{b} ignoriert werden (z.B. bei \Lcs{mirror}), oder auch \opt{r} und
-% \opt{l} (z.B. bei \Lcs{optplate}).
+% und \opt{b} ignoriert werden (z.B. bei \Lcomp{mirror}), oder auch \opt{r} und
+% \opt{l} (z.B. bei \Lcomp{optplate}).
%
-% Anstelle dieser Werte können auch Bruchteile davon verwendet werden: \opt{t}
-% entspricht $+1\cdot\Delta y$, \opt{b} entspricht $-1\cdot\Delta y$, \opt{l}
-% entspricht $-1\cdot\Delta x$ und \opt{r} entspricht $+1\cdot\Delta x$. Im
-% folgenden Beispiel wird der Punkt $(0.5\Delta x, 1.2\Delta y)$ als externer
-% Knoten bereitgestellt.
+% Anstelle dieser Werte können auch Bruchteile davon verwendet werden:
+% \opt{t} entspricht $+1\cdot\Delta y$, \opt{b} entspricht
+% $-1\cdot\Delta y$, \opt{l} entspricht $-1\cdot\Delta x$ und \opt{r}
+% entspricht $+1\cdot\Delta x$. Das kann gerade im Fall einer runden
+% Außenform sehr hilfreich sein, wie das folgende Beispiel zeigt.
% \fi
% \iffalse
%<*ignore>
% \fi
\begin{LTXexample}[morekeywords={[21]extnode}]
-\begin{pspicture}(3,1)
- \optbox[extnode={0.5,1.2}, beam](0,0.5)(3,0.5)
+\begin{pspicture}(2,1)
+ \elecsynthesizer[extnode={-0.707,0.707}](1,0.5)(2,0.5)
\psdot(\oenodeExt{})
\end{pspicture}
\end{LTXexample}
@@ -10001,7 +11245,7 @@
% \newpsstyle{ExtNodeStyle}{dotstyle=B+, dotangle=45, linewidth=2\pslinewidth, linecolor=DOrange}
% \makeatletter
% \newcommand{\testextnodes}[3][]{%
-% \begin{pspicture}(3,2)
+% \begin{pspicture}(3,2.2)
% \@nameuse{#2}[#1]#3
% \rput[t](1.5,0.9){\ttfamily\small
% \ifx\\#1\\\relax
@@ -10042,6 +11286,16 @@
% \testextnodes[bsstyle=plate]{beamsplitter}{(0,1.5)(2,1.5)(2,0)}
% \testextnodes{rightangleprism}{(0,1.5)(2.5,1)(0,0.5)}
% \testextnodes{pentaprism}{(0,1.3)(2,1.3)(2,0)}
+% \testextnodes{optarrowcomp}{(0,1.5)(3,1.5)}
+% \testextnodes{optbarcomp}{(0,1.5)(3,1.5)}
+% \begin{pspicture}(3,2)
+% \optdipole[optdipolesize=1](0,1.5)(3,1.5){}
+% \rput[t](1.5,0.9){\ttfamily\small
+% \begin{tabular}{@{}c@{}}\textbackslash optdipole\end{tabular}}
+% \makeatletter
+% \POE@extnodes[style=ExtNodeStyle, optdipolesize=1]{optdipole}
+% \makeatother
+% \end{pspicture}
%
% \ifENGLISH\subsubsection*{Fiber components}\fi
% \ifGERMAN\subsubsection*{Faserkomponenten}\fi
@@ -10060,6 +11314,13 @@
% \testextnodes[couplersize=0.5 0.3]{optcoupler}{(0,2)(0,1)(3,2)(3,1)}
% \testextnodes{fiberbox}{(0,1.75)(0,1.25)(3,1.75)(3,1.25)}
%
+% \ifENGLISH\subsubsection*{Electrical components}\fi
+% \ifGERMAN\subsubsection*{Elektrische Komponenten}\fi
+%
+% \testextnodes{eleccoupler}{(0,2)(0,1)(3,2)(3,1)}
+% \testextnodes{elecmixer}{(0,1.6)(3,1.6)(1.5,0.9)}
+% \testextnodes{elecsynthesizer}{(1,1.5)(3,1.5)}
+%
%
% \ifENGLISH\subsection{Interface nodes}\fi
% \ifGERMAN\subsection{Grenzflächenknoten}\fi
@@ -10110,10 +11371,11 @@
%
% \noindent
% \begin{pspicture}(0, -0.5)(3,1)
-% \pnode(0,0.5){A}\pnode(2.5,0.5){B}
+% \pnode(0,0.5){A}\pnode(2,0.5){B}
% \optdetector(A)(B)
% \drawbeam(A){}
-% \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1, N}
+% \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1}
+% \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
% \rput[bl](0,-0.4){\ttfamily\textbackslash optdetector}
% \end{pspicture}%
% \hspace{\fill}%
@@ -10168,8 +11430,20 @@
% \rput[bl](0,-0.4){\ttfamily\textbackslash glanthompson}
% \end{pspicture}%
% \hspace{\fill}%
+% \showdipoleifc{optarrowcomp}\hspace{\fill}%
+% \showdipoleifc{optbarcomp}
%
-% \begin{pspicture}(3,2.5)
+% \noindent\begin{pspicture}(0,-0.5)(3,1.7)
+% \pnode(0,0.7){A}\pnode(3,0.7){B}
+% \optdipole[optdipolesize=1](A)(B){}
+% \drawbeam(A){}(B)
+% \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
+% \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N}
+% \rput[bl](0,-0.4){\ttfamily\textbackslash optdipole}
+% \end{pspicture}%
+% \hspace{\fill}%
+%
+% \noindent\begin{pspicture}(3,2.5)
% \pnode(0,1.5){A}\pnode(2.5,1.5){B}\pnode(2.5,0.4){C}
% \beamsplitter[bssize=1.2](A)(B)(C)
% \drawbeam(A){}(C)
@@ -10216,6 +11490,7 @@
% \rput[bl](0,-0.4){\ttfamily\textbackslash #1}
% \end{pspicture}%
% }%
+% \begingroup
% \addtopsstyle{Fiber}{ArrowInside=->, ArrowInsidePos=0.6, arrowscale=1.5, arrowinset=0}
% \vspace*{5mm}%
% \showfdipoleifc{optfiber}\hspace{\fill}%
@@ -10283,7 +11558,38 @@
% \psdot(\oenodeOut{})\uput[-90](\oenodeOut{}){N}
% \rput[bl](0,-0.4){\ttfamily\textbackslash optcoupler}
% \end{pspicture}%
+% \endgroup
%
+%
+% \ifENGLISH\subsubsection*{Electrical components}\fi
+% \ifGERMAN\subsubsection*{Elektrische Komponenten}\fi
+% \begingroup
+% \addtopsstyle{Wire}{arrows=->, arrowscale=1.5, arrowinset=0, arm=0.6}
+% \noindent\begin{pspicture}(0, -0.5)(3,1.7)
+% \pnode(2,1.2){A}\pnode(3,1.2){B}
+% \elecsynthesizer(A)(B)
+% \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
+% \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N}
+% \rput[bl](0,-0.4){\ttfamily\textbackslash elecsynthesizer}
+% \end{pspicture}\hspace{\fill}%
+% \begin{pspicture}(0,-0.5)(3,1.7)
+% \pnode(0,1.2){A}\pnode(3,1.2){B}\pnode(1.2,0.1){C}
+% \elecmixer(A)(B)(C)
+% \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1}
+% \psdot(\oenodeIfc{2}{})\uput[-45](\oenodeIfc{2}{}){2}
+% \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
+% \rput[bl](0,-0.4){\ttfamily\textbackslash elecmixer}
+% \end{pspicture}\hspace{\fill}%
+% \begin{pspicture}(0,-0.5)(3,1.7)
+% \pnode(0,1.7){A}\pnode(0,0.2){B}\pnode(3,1.7){C}\pnode(3,0.2){D}
+% \eleccoupler(A)(B)(C)(D)
+% \psdot(\oenodeIn{})\uput[120](\oenodeIn{}){1}
+% \psdot(\oenodeIfc{2}{})\uput[-120](\oenodeIfc{2}{}){2}
+% \psdot(\oenodeIfc{3}{})\uput[60](\oenodeIfc{3}{}){3}
+% \psdot(\oenodeOut{})\uput[-60](\oenodeOut{}){N}
+% \rput[bl](0,-0.4){\ttfamily\textbackslash eleccoupler}
+% \end{pspicture}%
+% \endgroup
%
% \ifGERMAN
% \section{Abwärtskompatibilität}
@@ -10305,17 +11611,95 @@
% Version beachten müssen, und was sie bei älteren Dokumenten gegebenenfalls
% ändern müssen um mit der neuen Version korrekt zu funktionieren. \fi
%
+% \subsection{Version 4.0}\label{sec:bwd-comp-4.0}
+%
+% \ifGERMAN Die Option \Lkeyword*{conn} und das alte, fehlerhafte
+% Verfahren Strahlverbindungen zu zeichnen, wurde nun entfernt. Zur
+% Migration älterer Dokumente siehe
+% \prettyref{sec:bwd-comp-3.0-conn}. Damit wurde auch die Option
+% \Lkeyword*{connjoin} überflüssig und wurde entfernt.
+% \fi
+% \ifENGLISH The option \Lkeyword*{conn} and the old, buggy code for beam
+% connections was finally removed. To update older documents, see
+% \prettyref{sec:bwd-comp-3.0-conn}. With this change also option
+% \Lkeyword*{connjoin} became useless.
+% \fi
+%
+% \ifENGLISH
+% The appearance of \Lcomp{optfiber} changed slightly, because the old
+% implementation was buggy and the separation between the loops depended
+% on the number of loops (see example below). Note, that to achieve a
+% similar default look, the default value for \Lkeyword{fiberloopsep}
+% was changed from 0.3 to 0.2. Therefore, the interface nodes are a bit
+% closer together.
+% \fi
+% \ifGERMAN
+% Das Aussehen von \Lcomp{optfiber} hat sich etwas geändert, da in der
+% vorherigen Implementierung der Abstand zwischen zwei Schleifen von der
+% Anzahl der Schleifen abhing (siehe das Beispiel unten). Beachten Sie,
+% dass die Voreinstellung für \Lkeyword{fiberloopsep} von 0.3 auf 0.2
+% geändert wurde um ein ähnliches Aussehen bei Verwendung der
+% Voreinstellungen zu erhalten. Dadurch sitzen die Eingangs- und
+% Ausgangsknoten jedoch etwas näher zusammen (siehe unten).
+% \fi
+%
+% \makeatletter
+% \begin{pspicture}[showgrid](0,-0.3)(6,1.4)
+% \newOptexpFiberDipole{optfiber@old}
+% \def\optfiber@old@ref{%
+% \POE@setref{/@@x 0.3 \POE@key@fiberloops\space 1 sub mul 0.5 mul def }%
+% }%
+% \def\optfiber@old@nodes{%
+% \newOptexpFiberComp{{@@x neg 0} {@@x 0}}%
+% \ignorespaces}%
+% \def\optfiber@old@comp{%
+% \edef\@f@cnt{\POE@key@fiberloops\space}%
+% \edef\@f@r{0.4 }%
+% \edef\@f@sep{0.3 }%
+% \parametricplot[plotpoints=200, style=Fiber]{0}{1}{%
+% t 360 mul \@f@cnt mul sin \@f@r mul \@f@sep
+% \@f@cnt 1 sub mul t 0.5 sub mul add
+% 1 t 360 mul \@f@cnt mul cos sub \@f@r mul
+% }%
+% \ignorespaces}%
+% \psset[optexp]{label=0.5 . b, showifcnodes}
+% \optfiber@old[fiberloops=2](0,0.5)(2,0.5)
+% \optfiber@old[fiberloops=3](2,0.5)(4,0.5){old}
+% \optfiber@old[fiberloops=4](4,0.5)(6,0.5)
+% \end{pspicture}
+% \makeatother
+% \hspace{\fill}
+% \begin{pspicture}[showgrid](0,-0.3)(6,1.4)
+% \psset[optexp]{label=0.5 . b, showifcnodes}
+% \optfiber[fiberloops=2](0,0.5)(2,0.5)
+% \optfiber[fiberloops=3](2,0.5)(4,0.5){new}
+% \optfiber[fiberloops=4](4,0.5)(6,0.5)
+% \end{pspicture}
+%
+% \ifGERMAN Das Makro \Lcs*{newOptexpDipoleNolabel} wurde entfernt und
+% kann ohne weitere Änderungen durch \Lcs{newOptexpDipole} ersetzt werden.
+% \fi
+% \ifENGLISH The macro \Lcs*{newOptexpDipoleNolabel} was removed and can
+% be replaced by \Lcs{newOptexpDipole} without any further changes.
+% \fi
+%
+% \ifGERMAN The alte Syntax mit \nxLcs{mycomp@iii} zur Definition eigener
+% Komponenten wird nicht mehr unterstützt.
+% \fi
+% \ifENGLISH The old syntax of defining own components with
+% \nxLcs{mycomp@iii} is not supported anymore.
+% \fi
%
% \subsection{Version 3.3}\label{sec:bwd-comp-3.3}
%
% \begin{optionlist}
% \poeitem{\textbackslash opttripole}
% \ifGERMAN Der Ausgangswinkel für die Beschriftung des
-% \Lcs{opttripole} wurde um 180° geändert um konsistent zu den anderen
+% \Lcomp{opttripole} wurde um 180° geändert um konsistent zu den anderen
% Dreipolen zu sein.
% \fi
% \ifENGLISH Changed the reference angle for the label of the
-% \Lcs{opttripole} to be consistent with the other tripoles.
+% \Lcomp{opttripole} to be consistent with the other tripoles.
% \fi
% \end{optionlist}
%
@@ -10428,37 +11812,37 @@
% \poeitem{extnode}
% \ifENGLISH
% Some components now provide more possible positions for
-% \Lkeyword{extnode}. \Lcs{optdetector} had only one possible external node,
+% \Lkeyword{extnode}. \Lcomp{optdetector} had only one possible external node,
% which was accessible for any value of \Lkeyword{extnode}, now this node can
% be accessed only with \Lkeyword{extnode}\opt{=r}. All other values give
% different node positions.
% \fi
% \ifGERMAN
% Einigen Komponenten stellen nun mehr mögliche Positionen für
-% \Lkeyword{extnode} zur Verfügung. So muss war z.B. für \Lcs{optdetector} nur
+% \Lkeyword{extnode} zur Verfügung. So muss war z.B. für \Lcomp{optdetector} nur
% ein Knoten möglich, der für jeden Wert von \Lkeyword{extnode} zugänglich
% war, jetzt aber nur mit \Lkeyword{extnode}\opt{=r}. Alle anderen Werte
% setzen den Knoten an andere Stellen.
% \fi
%
% \poeitem{\textbackslash optbox}
-% \ifENGLISH An \Lcs{optbox} does always have the input and output
+% \ifENGLISH An \Lcomp{optbox} does always have the input and output
% nodes at the respective interfaces, whereas in version 2.1 the input
% and output nodes where at the same position for
% \Lkeyword{endbox}\opt{=true}.
% \fi
-% \ifGERMAN Eine \Lcs{optbox} hat immer einen Eingangs- und
+% \ifGERMAN Eine \Lcomp{optbox} hat immer einen Eingangs- und
% Ausgangsknoten an den entsprechenden Grenzflächen. In Version 2.1
% fielen Eingangs- und Ausgangsknoten zusammen falls \Lkeyword{endbox}
% auf \opt{true} gesetzt war.
% \fi
%
% \poeitem{\textbackslash fibercollimator}
-% \ifENGLISH The \Lcs{fibercollimator} has only a fiber connection by
+% \ifENGLISH The \Lcomp{fibercollimator} has only a fiber connection by
% default, the beam must be drawn manually or with \Lkeyword{beam}
% option.
% \fi
-% \ifGERMAN Der \Lcs{fibercollimator} hat in den Voreinstellungen nur
+% \ifGERMAN Der \Lcomp{fibercollimator} hat in den Voreinstellungen nur
% eine Faserverbindung, der Strahl muss manuell oder durch Angabe des
% \Lkeyword{beam} Parameters gezeichnet werden.
% \fi
@@ -10466,11 +11850,12 @@
%
% \ifENGLISH\subsubsection{Beam connections}\fi
% \ifGERMAN\subsubsection{Strahlverbindungen}\fi
+% \label{sec:bwd-comp-3.0-conn}
%
% \ifENGLISH
% In version 2.1, beam connections could be internal, that is the connections
% were specified together with the compent (\Lkeyword{beam} or
-% \Lkeyword{conn}), or external with an additional call of \Lcs{drawbeam}. The
+% \Lkeyword*{conn}), or external with an additional call of \Lcs{drawbeam}. The
% main reason for internal connections was the aesthetic aspect of drawing the
% beam behind the component, but also convenience played a role. Drawing the
% beam behind the component is possible with layering (\prettyref{sec:layers})
@@ -10481,7 +11866,7 @@
% \ifGERMAN
% In Version 2.1 konnten Strahlverbindungen intern sein, d.h. die Verbindung
% wurde zusammen mit der Komponenten definiert (z.B. mit \Lkeyword{beam}, oder
-% \Lkeyword{conn}) oder extern über einen separaten Aufruf von \Lcs{drawbeam}.
+% \Lkeyword*{conn}) oder extern über einen separaten Aufruf von \Lcs{drawbeam}.
% Der Hauptgrund für die internen Verbindungen war der ästhetische Aspekt,
% zuerst die Verbindung und dann die Komponente darüber zu zeichnen, aber
% Bequemlichkeit spielte auch eine Rolle. Seit Version 3.0 kann die Reihenfolge
@@ -10579,17 +11964,10 @@
% \let\index@preamble=\relax
% \renewcommand{\setindexpreamble}[1]{\def\index@preamble{#1}}
% \renewcommand*{\idx@heading}{%
-% \twocolumn[\idx@@heading{\indexname}]%
+% \addchap{\indexname}%
% \@mkboth{\indexname}{\indexname}%
% }
% \renewenvironment{theindex}{%
-% \if@twocolumn
-% \@restonecolfalse
-% \else
-% \@restonecoltrue
-% \fi
-% \columnseprule \z@
-% \columnsep 35\p@
% \idx@heading%
% \index@preamble\par\nobreak
% \thispagestyle{\indexpagestyle}\parindent\z@
@@ -10597,7 +11975,7 @@
% \setlength{\parfillskip}{\z@ \@plus 1fil}%
% \let\item\@idxitem
% }{%
-% \if@restonecol\onecolumn\else\clearpage\fi
+% \clearpage
% }
% \renewcommand*\@idxitem{\par\hangindent 40\p@}
% \renewcommand*\subitem{\@idxitem \hspace*{20\p@}}
@@ -10633,22 +12011,41 @@
% \chapter{Revision history}
%
% This revision history is a list of changes relevant to users of this
-% package. Changes of a more technical nature which do not affect the user
-% interface or the behavior of the package are not included in the list. If an
-% entry in the revision history states that a feature has been \emph{improved}
-% or \emph{extended}, this indicates a modification which either does not affect
-% the syntax and behavior of the package or is syntactically backwards
-% compatible (such as the addition of an optional argument to an existing
-% command). Entries stating that a feature has been \emph{deprecated},
-% \emph{modified}, \emph{renamed}, or \emph{removed} demand attention. They
-% indicate a modification which may require changes to existing documents. The
-% numbers on the right indicate the relevant section of this manual, more
-% information regarding backward compatibility can be found in
-% \prettyref{sec:bwd-comp}.
-% \fi
+% package. Changes of a more technical nature which do not affect the
+% user interface or the behavior of the package are not included in the
+% list. If an entry in the revision history states that a feature has
+% been \emph{improved} or \emph{extended}, this indicates a modification
+% which either does not affect the syntax and behavior of the package or
+% is syntactically backwards compatible (such as the addition of an
+% optional argument to an existing command). Entries stating that a
+% feature has been \emph{deprecated}, \emph{modified}, \emph{fixed},
+% \emph{renamed}, or \emph{removed} demand attention. They indicate a
+% modification which may require changes to existing documents. The
+% numbers on the right indicate the relevant section of this manual,
+% more information regarding backward compatibility can be found in
+% \prettyref{sec:bwd-comp}. \fi
%
% \begin{changelog}
%\patchcmd{\release}{\setlength{\itemsep}{0pt}}{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}}{}{}
+% \begin{release}{4.0}{2013-04-15}
+% \item Added electrical components\see{chap:electrcomp}
+% \item Added wire connections with \cs{drawwire}\see{sec:drawwire}
+% \item Added component \cs{optarrowcomp}\see{comp:optarrowcomp}
+% \item Added component \cs{optbarcomp}\see{comp:optbarcomp}
+% \item Improved \cs{optdetector}\see{comp:optdetector}
+% \item Extended \cs{drawfiber} to support component
+% ranges\see{cs:drawfiber}
+% \item Extended \opt{couplersep} to support automatic
+% calculation\see{prm:couplersep}
+% \item Fixed appearance of \cs{optfiber}\see{sec:bwd-comp-4.0}
+% \item Fixed \opt{extnodealign} to affect also
+% multipoles\see{prm:extnodealign}
+% \item Fixed \opt{pswarning}.
+% \item Removed old, buggy beam connection code\see{sec:bwd-comp-4.0}
+% \item Removed option \opt{conn}\see{sec:bwd-comp-4.0}
+% \item Removed option \opt{connjoin}\see{sec:bwd-comp-4.0}
+% \item Removed \cs{newOptexpDipoleNolabel}\see{sec:bwd-comp-4.0}
+% \end{release}
% \begin{release}{3.6}{2013-03-20}
% \item Added option \opt{compoffset}\see{prm:compoffset}
% \item Added option \opt{beampathskip}\see{prm:beampathskip}
@@ -10662,20 +12059,20 @@
% interpreters.
% \end{release}
% \begin{release}{3.4}{2013-02-03}
-% \item Fixed bugs when using \opt{fillstyle} for some components
-% \item Extended option \opt{switchsize}\see{cmd:optswitch}
+% \item Fixed bugs when using \opt{fillstyle} for some components.
+% \item Extended option \opt{switchsize}\see{comp:optswitch}
% \item Modified coupler center node to be on the base
% line\see{sec:centernode}
% \item Extended error checking for \cs{drawbeam} and
% \cs{drawfiber}\see{sec:accessobj}
-% \item Fixed some bugs in the connection code
+% \item Fixed some bugs in the connection code.
% \end{release}
% \begin{release}{3.3a}{2012-09-18}
% \item Fixed bug which was exposed by an update of pst-node.
% \item Fixed trailing spaces.
% \end{release}
% \begin{release}{3.3}{2012-08-17}
-% \item Extended \cs{opttripole} and \cs{optdipole}\see{cmd:optdipole}
+% \item Extended \cs{opttripole} and \cs{optdipole}\see{comp:optdipole}
% \item Modified reference angle for label of
% \cs{opttripole}\see{sec:bwd-comp-3.3}
% \item Added option \opt{optdipolesize} to support two interfaces for
@@ -10686,16 +12083,16 @@
% \item Improved \cs{drawbeam} and \cs{drawwidebeam} to be able to use
% \opt{ArrowInside} without linestyle\see{prm:ArrowInsideMaxLength}
% \item Fixed orientation of \cs{oenodeBeamUp} and
-% \cs{oenodeBeamLow}\see{cmd:oenodeBeamUp}
+% \cs{oenodeBeamLow}\see{cs:oenodeBeamUp}
% \item Fixed a bug related to \opt{beaminside} and ambiguous
% components.
-% \item Fixed some trailing spaces
+% \item Fixed some trailing spaces.
% \item Added more examples\see{sec:examples}
% \end{release}
% \begin{release}{3.2}{2012-07-26}
-% \item Added component \cs{glanthompson}\see{cmd:glanthompson}
+% \item Added component \cs{glanthompson}\see{comp:glanthompson}
% \item Added access to beam vectors with \cs{oeBeamVec},
-% \cs{oeBeamVecUp} and \cs{oeBeamVecLow}\see{cmd:oeBeamVec}
+% \cs{oeBeamVecUp} and \cs{oeBeamVecLow}\see{cs:oeBeamVec}
% \item Fixed wrong computation of node distance in \cs{fiberbox}
% \item Fixed bug in \cs{wdmsplitter} for \opt{coupleralign=b} and
% \opt{couplertype=none}
@@ -10706,23 +12103,23 @@
% \item Added examples\see{sec:examples}
% \end{release}
% \begin{release}{3.1}{2012-07-17}
-% \item Added component \cs{fiberbox}\see{cmd:fiberbox}
+% \item Added component \cs{fiberbox}\see{comp:fiberbox}
% \item Extended connection macros to not required curly braces around
% node parenthesis any more\see{sec:namingobj}
% \item Modified \cs{fibercollimator} to have
-% \opt{allowbeaminside=false} by default\see{cmd:fibercollimator}
+% \opt{allowbeaminside=false} by default\see{comp:fibercollimator}
% \item Extended fiber couplers to allow using only two
% nodes\see{sec:coupler}
% \item Fixed a bug concerning node expressions with \cs{drawfiber}
% \end{release}
% \begin{release}{3.0}{2012-07-09}
% \item Modified beam connections with \cs{drawbeam} to support
-% raytracing\see{cmd:drawbeam}
-% \item Added wide beams with \cs{drawwidebeam}\see{cmd:drawwidebeam}
-% \item Added \cs{drawfiber} for fiber connections\see{cmd:drawfiber}
+% raytracing\see{cs:drawbeam}
+% \item Added wide beams with \cs{drawwidebeam}\see{cs:drawwidebeam}
+% \item Added \cs{drawfiber} for fiber connections\see{cs:drawfiber}
% \item Added \opt{optexp} environment for layering of components and
% connections\see{sec:layers}
-% \item Added german documentation
+% \item Added german documentation.
% \item Modified naming of component nodes\see{sec:objnodes}
% \item Modified \opt{extnode} to work with more
% components\see{prm:extnode}
@@ -10735,61 +12132,61 @@
% \item Extended \opt{abspos} by values \opt{start} and
% \opt{end}\see{sec:positioning}
% \item Removed deprecated lens code which used \opt{lenswidth} and
-% \opt{lensheight} for construction\see{cmd:lens}
+% \opt{lensheight} for construction\see{comp:lens}
% \item Added option \opt{platesize}\see{prm:platesize}
-% \item Added option \opt{phwidth}\see{cmd:pinhole}
-% \item Modified option \opt{caxislength}\see{cmd:crystal}
-% \item Deprecated option \opt{lampscale}\see{cmd:crystal}
-% \item Added style \opt{CrystalCaxis}\see{cmd:crystal}
-% \item Added style \opt{CrystalLamp}\see{cmd:crystal}
-% \item Added option \opt{optboxsize}\see{cmd:optbox}
-% \item Extended option \opt{detsize}\see{cmd:optdetector}
-% \item Added style \opt{DetectorStyle}\see{cmd:optdetector}
+% \item Added option \opt{phwidth}\see{comp:pinhole}
+% \item Modified option \opt{caxislength}\see{comp:crystal}
+% \item Deprecated option \opt{lampscale}\see{comp:crystal}
+% \item Added style \opt{CrystalCaxis}\see{comp:crystal}
+% \item Added style \opt{CrystalLamp}\see{comp:crystal}
+% \item Added option \opt{optboxsize}\see{comp:optbox}
+% \item Extended option \opt{detsize}\see{comp:optdetector}
+% \item Added style \opt{DetectorStyle}\see{comp:optdetector}
% \item Removed deprecated \cs{detector}, use
-% \cs{optdetector}\see{cmd:optdetector}
-% \item Extended option \opt{doveprismsize}\see{cmd:doveprism}
-% \item Added style \opt{Polarization}\see{cmd:polarization}
-% \item Deprecated option \opt{pollinewidth}\see{cmd:polarization}
-% \item Removed option \opt{polwidth}\see{cmd:polarization}
-% \item Removed option \opt{pol}\see{cmd:polarization}
-% \item Added style \opt{VariableStyle}\see{cmd:mirror}
+% \cs{optdetector}\see{comp:optdetector}
+% \item Extended option \opt{doveprismsize}\see{comp:doveprism}
+% \item Added style \opt{Polarization}\see{comp:polarization}
+% \item Deprecated option \opt{pollinewidth}\see{comp:polarization}
+% \item Removed option \opt{polwidth}\see{comp:polarization}
+% \item Removed option \opt{pol}\see{comp:polarization}
+% \item Added style \opt{VariableStyle}\see{comp:mirror}
% \item Added mirror type \opt{semitrans}\see{prm:mirrortype}
-% \item Renamed \cs{optgrid} to \cs{optgrating}\see{cmd:optgrating}
+% \item Renamed \cs{optgrid} to \cs{optgrating}\see{comp:optgrating}
% \item Renamed \opt{optgridwidth} to
-% \opt{gratingwidth}\see{cmd:optgrating}
+% \opt{gratingwidth}\see{comp:optgrating}
% \item Renamed \opt{optgridheight} to
-% \opt{gratingheight}\see{cmd:optgrating}
+% \opt{gratingheight}\see{comp:optgrating}
% \item Renamed \opt{optgriddepth} to
-% \opt{gratingdepth}\see{cmd:optgrating}
+% \opt{gratingdepth}\see{comp:optgrating}
% \item Renamed \opt{optgridcount} to
-% \opt{gratingcount}\see{cmd:optgrating}
+% \opt{gratingcount}\see{comp:optgrating}
% \item Renamed \opt{optgridtype} to
-% \opt{gratingtype}\see{cmd:optgrating}
+% \opt{gratingtype}\see{comp:optgrating}
% \item Renamed \opt{optgridlinewidth} to
-% \opt{gratinglinewidth}\see{cmd:optgrating}
-% \item Added option \opt{prismalign}\see{cmd:optprism}
+% \opt{gratinglinewidth}\see{comp:optgrating}
+% \item Added option \opt{prismalign}\see{comp:optprism}
% \item Modified faulty alignment of
-% \cs{rightangleprism}\see{cmd:rightangleprism}
-% \item Extended option \opt{optampsize}\see{cmd:optamp}
-% \item Extended option \opt{optmzmsize}\see{cmd:optmzm}
-% \item Added option \opt{polcontroltype}\see{cmd:polcontrol}
-% \item Extended option \opt{isolatorsize}\see{cmd:optisolator}
-% \item Added style \opt{IsolatorArrow}\see{cmd:optisolator}
-% \item Extended option \opt{fdlsize}\see{cmd:fiberdelayline}
-% \item Added style \opt{FdlArrow}\see{cmd:fiberdelayline}
-% \item Extended option \opt{fiberpolsize}\see{cmd:optfiberpolarizer}
-% \item Added component \cs{optcirculator}\see{cmd:optcirculator}
-% \item Extended option \opt{couplersize}\see{cmd:optcoupler}
-% \item Extended option \opt{couplertype}\see{cmd:optcoupler}
+% \cs{rightangleprism}\see{comp:rightangleprism}
+% \item Extended option \opt{optampsize}\see{comp:optamp}
+% \item Extended option \opt{optmzmsize}\see{comp:optmzm}
+% \item Added option \opt{polcontroltype}\see{comp:polcontrol}
+% \item Extended option \opt{isolatorsize}\see{comp:optisolator}
+% \item Added style \opt{IsolatorArrow}\see{comp:optisolator}
+% \item Extended option \opt{fdlsize}\see{comp:fiberdelayline}
+% \item Added style \opt{FdlArrow}\see{comp:fiberdelayline}
+% \item Extended option \opt{fiberpolsize}\see{comp:optfiberpolarizer}
+% \item Added component \cs{optcirculator}\see{comp:optcirculator}
+% \item Extended option \opt{couplersize}\see{comp:optcoupler}
+% \item Extended option \opt{couplertype}\see{comp:optcoupler}
% \item Renamed option \opt{align} to
-% \opt{coupleralign}\see{cmd:optcoupler}
-% \item Added style \opt{VariableCoupler}\see{cmd:optcoupler}
-% \item Added style \opt{FilterStyle}\see{cmd:optfilter}
-% \item Extended option \opt{fibercolsize}\see{cmd:fibercollimator}
+% \opt{coupleralign}\see{comp:optcoupler}
+% \item Added style \opt{VariableCoupler}\see{comp:optcoupler}
+% \item Added style \opt{FilterStyle}\see{comp:optfilter}
+% \item Extended option \opt{fibercolsize}\see{comp:fibercollimator}
% \item Removed deprecated option \opt{labelrelative}\see{sec:labels}
-% \item Removed deprecated option \opt{iwidth}\see{cmd:pinhole}
-% \item Removed deprecated option \opt{owidth}\see{cmd:pinhole}
-% \item Removed deprecated option \opt{bswidth}\see{cmd:beamsplitter}
+% \item Removed deprecated option \opt{iwidth}\see{comp:pinhole}
+% \item Removed deprecated option \opt{owidth}\see{comp:pinhole}
+% \item Removed deprecated option \opt{bswidth}\see{comp:beamsplitter}
% \item Deprecated \cs{newOptexpDipoleNolabel}, use
% \cs{newOptexpDipole}\see{sec:newobj}
% \item Deprecated option
@@ -10799,7 +12196,7 @@
% \end{release}
% \begin{release}{2.1}{2009-11-05}
% \item Added component
-% \cs{optfiberpolarizer}\see{cmd:optfiberpolarizer}
+% \cs{optfiberpolarizer}\see{comp:optfiberpolarizer}
% \item Added option \opt{compshift}\see{prm:compshift}
% \item Added option \opt{label}\see{prm:label}
% \item Added option \opt{connjoin}
@@ -10807,38 +12204,40 @@
% \opt{newBeam}\see{sec:drawbeam}
% \item Added style \opt{OptComp} and related options
% \opt{addtoOptComp} and \opt{newOptComp}\see{sec:appearance}
-% \item Added option \opt{bsstyle}\see{cmd:beamsplitter}
+% \item Added option \opt{bsstyle}\see{comp:beamsplitter}
% \item Extended \cs{fibercollimator} to use up to four reference
-% nodes\see{cmd:fibercollimator}
+% nodes\see{comp:fibercollimator}
% \item Improved \opt{thicklens} to work also with plain
% lenses\see{prm:thicklens}
-% \item Use pst-doc class for the documentation
+% \item Use pst-doc class for the documentation.
% \end{release}
%
% \begin{release}{2.0}{2008-07-27}
-% \item Added fiber-optical components\see{chap:fibercomp}
-% \item Added component \cs{optdiode}\see{cmd:optdiode}
-% \item Added component \cs{pentaprism}\see{cmd:pentaprism}
-% \item Added component \cs{rightangleprism}\see{cmd:rightangleprism}
-% \item Added component \cs{doveprism}\see{cmd:doveprism}
-% \item Added component \cs{optprism}\see{cmd:optprism}
-% \item Added \cs{drawbeam}\see{sec:drawbeam}
-% \item Added component connections (options \opt{fiber}, \opt{conn}
-% and \opt{beam})\see{chap:connecting}
-% \item Added option \opt{compname}\see{prm:compname}
-% \item Added option \opt{extnode}\see{prm:extnode}
-% \item Renamed \cs{detector} to \cs{optdetector}\see{cmd:optdetector}
+% \item Added fiber-optical components\see{chap:fibercomp}
+% \item Added component \cs{optdiode}\see{comp:optdiode}
+% \item Added component \cs{pentaprism}\see{comp:pentaprism}
+% \item Added component
+% \cs{rightangleprism}\see{comp:rightangleprism}
+% \item Added component \cs{doveprism}\see{comp:doveprism}
+% \item Added component \cs{optprism}\see{comp:optprism}
+% \item Added \cs{drawbeam}\see{sec:drawbeam}
+% \item Added component connections (options \opt{fiber}, \opt{conn}
+% and \opt{beam})\see{chap:connecting}
+% \item Added option \opt{compname}\see{prm:compname}
+% \item Added option \opt{extnode}\see{prm:extnode}
+% \item Renamed \cs{detector} to
+% \cs{optdetector}\see{comp:optdetector}
% \end{release}
% \begin{release}{1.2}{2008-06-17}
-% \item Modified lens design to use interface curvatures\see{cmd:lens}
+% \item Modified lens design to use interface curvatures\see{comp:lens}
% \item Added options \opt{lensradiusleft} and
-% \opt{lensradiusright}\see{cmd:lens}
-% \item Added option \opt{thicklens}\see{cmd:lens}
-% \item Added option \opt{lenstype}\see{cmd:lens}
+% \opt{lensradiusright}\see{comp:lens}
+% \item Added option \opt{thicklens}\see{comp:lens}
+% \item Added option \opt{lenstype}\see{comp:lens}
% \item Added option \opt{mirrorradius} (curved
-% mirrors)\see{cmd:mirror}
+% mirrors)\see{comp:mirror}
% \item Added option \opt{optgridtype} (binary
-% gratings)\see{cmd:optgrating}
+% gratings)\see{comp:optgrating}
% \item Added \cs{newOptexpDipole}\see{sec:newobj}
% \item Added \cs{newOptexpDipoleNolabel}\see{sec:newobj}
% \item Added \cs{newOptexpTripole}\see{sec:newobj}
@@ -10851,12 +12250,12 @@
% \item Replaced \opt{labelrelative} by
% \opt{labelref=relative}\see{sec:labels}
% \item Renamed \cs{polarisation} to
-% \cs{polarization}\see{cmd:polarization}
-% \item Renamed \opt{polwidth} to \opt{polsize}\see{cmd:polarization}
-% \item Renamed \opt{pol} to \opt{poltype}\see{cmd:polarization}
-% \item Renamed \opt{bswidth} to \opt{bssize}\see{cmd:beamsplitter}
-% \item Renamed \opt{iwidth} to \opt{innerheight}\see{cmd:pinhole}
-% \item Renamed \opt{owidth} to \opt{outerheight}\see{cmd:pinhole}
+% \cs{polarization}\see{comp:polarization}
+% \item Renamed \opt{polwidth} to \opt{polsize}\see{comp:polarization}
+% \item Renamed \opt{pol} to \opt{poltype}\see{comp:polarization}
+% \item Renamed \opt{bswidth} to \opt{bssize}\see{comp:beamsplitter}
+% \item Renamed \opt{iwidth} to \opt{innerheight}\see{comp:pinhole}
+% \item Renamed \opt{owidth} to \opt{outerheight}\see{comp:pinhole}
% \item Added support for fillstyle for all components
% \end{release}
%
@@ -10875,6 +12274,7 @@
%<*stylefile>
% \section{Requirements}
% \begin{macrocode}
+\RequirePackage{ifthen}
\RequirePackage{pstricks}
\RequirePackage{pst-xkey}
\RequirePackage{pst-node}
@@ -10890,15 +12290,21 @@
\pst@addfams{optexp}
\pstheader{pst-optexp.pro}
% \end{macrocode}
-% This holds a comma-separated list of all component names which are defined in
-% a \nxLenv{pspicture} environment. This list is cleared when leaving the
-% \nxLenv{pspicture}.
+% This holds a comma-separated list of all component names which are
+% defined in a \nxLenv{pspicture} environment. The list is cleared when
+% leaving the \nxLenv{pspicture} environment.
% \begin{macrocode}
\gdef\POE@complist{}%
+% \end{macrocode}
+% This hold a comma-separated list of the numbers of all saved beam end
+% points in a \nxLenv{pspicture} environment. The list is used to delete
+% all remaining Postscript information about the saved beams when
+% leaving the current \nxLenv{pspicture}, as they may cause problems
+% inside any following optexp-drawing.
+% \begin{macrocode}
\gdef\POE@beamlist{1}%
\g@addto@macro{\endpspicture}{%
% \end{macrocode}
-%
% Undefine all beam nodes at the end of the \nxLenv{pspicture}.
% \begin{macrocode}
\expandafter\XKV@for@n\expandafter{\POE@beamlist}\POE@temp{%
@@ -10914,9 +12320,7 @@
}%
}%
% \end{macrocode}
-%
% Reset the component list.
-%
% \begin{macrocode}
\gdef\POE@complist{}\gdef\POE@beamlist{1}\global\POE@cnt=0\relax
}%
@@ -10925,14 +12329,14 @@
% \begin{macrocode}
\def\pst@optexpdict{tx@OptexpDict begin }
\def\POE@dict#1{\pst@optexpdict #1 end}
+\def\POE@Verb#1{\pst@Verb{\pst@optexpdict #1 end }}%
\SpecialCoor
% \end{macrocode}
-% \section{Basic definitions}
%
+% \section{Basic definitions}
% \subsection{Switches for the boolean keys}
% See respective key definitions for explanation.
% \begin{macrocode}
-\newif\ifPOE@connjoin
\newif\ifPOE@backlayer
\newif\ifPOE@frontlayer
\newif\ifPOE@optexpenv
@@ -10948,22 +12352,30 @@
\newif\ifPOE@startbox
\newif\ifPOE@thicklens
\newif\ifPOE@usefiberstyle
-\newif\ifPOE@fiber@
-\newif\ifPOE@nofiber@
\newif\ifPOE@fiberin@
\newif\ifPOE@fiberin@top
\newif\ifPOE@fiberin@bottom
\newif\ifPOE@fiberout@
\newif\ifPOE@fiberout@top
\newif\ifPOE@fiberout@bottom
-\newif\ifPOE@fiberpreset@
-\newif\ifPOE@nofiberpreset@
\newif\ifPOE@fiberpresetin@
\newif\ifPOE@fiberpresetin@top
\newif\ifPOE@fiberpresetin@bottom
\newif\ifPOE@fiberpresetout@
\newif\ifPOE@fiberpresetout@top
\newif\ifPOE@fiberpresetout@bottom
+\newif\ifPOE@wirein@
+\newif\ifPOE@wirein@top
+\newif\ifPOE@wirein@bottom
+\newif\ifPOE@wireout@
+\newif\ifPOE@wireout@top
+\newif\ifPOE@wireout@bottom
+\newif\ifPOE@wirepresetin@
+\newif\ifPOE@wirepresetin@top
+\newif\ifPOE@wirepresetin@bottom
+\newif\ifPOE@wirepresetout@
+\newif\ifPOE@wirepresetout@top
+\newif\ifPOE@wirepresetout@bottom
\newif\ifPOE@beam
\newif\ifPOE@startinside
\newif\ifPOE@stopinside
@@ -10980,63 +12392,75 @@
% \begin{macrocode}
\newif\ifPOE@insideobj\POE@insideobjfalse
% \end{macrocode}
+%
% \subsection{Counters}
% Count the components in one \nxLenv{pspicture} environment.
% \begin{macrocode}
\newcount\POE@cnt
+% \end{macrocode}
+% Save the current count at the end of the optexp-environment, before
+% the second pass.
+% \begin{macrocode}
\newcount\POE@oldcnt
% \end{macrocode}
% Count the temporal planes which are created for connections to nodes.
% \begin{macrocode}
\newcount\POE@nodecnt
% \end{macrocode}
-% \begin{macrocode}
-\newdimen\POE@dim
-% \end{macrocode}
+%
% \subsection{Fixed strings}
% These are all the fixed strings which are used as possible values for
% choicekeys.
% \begin{macrocode}
-\def\POE@str@pol@polperp{perp}
-\def\POE@str@pol@polparallel{parallel}
-\def\POE@str@pol@polmisc{misc}
-\def\POE@str@pol@polrcirc{rcirc}
-\def\POE@str@pol@pollcirc{lcirc}
-\def\POE@str@mirrortype@piezo{piezo}
-\def\POE@str@mirrortype@plain{plain}
-\def\POE@str@mirrortype@extended{extended}
-\def\POE@str@mirrortype@semitrans{semitrans}
-\def\POE@str@gratingtype@blazed{blazed}
-\def\POE@str@gratingtype@binary{binary}
-\def\POE@str@relative{relative}
\def\POE@str@absolute{absolute}
-\def\POE@str@labelref@relgrav{relgrav}
-\def\POE@str@labelref@global{global}
-\def\POE@str@filtertype@bandpass{bandpass}
-\def\POE@str@filtertype@bandstop{bandstop}
-\def\POE@str@filtertype@lowpass{lowpass}
-\def\POE@str@filtertype@highpass{highpass}
-\def\POE@str@couplertype@none{none}
-\def\POE@str@couplertype@ellipse{ellipse}
-\def\POE@str@couplertype@elliptic{elliptic}
-\def\POE@str@couplertype@rectangle{rectangle}
-\def\POE@str@couplertype@cross{cross}
-\def\POE@str@polcontroltype@linear{linear}
-\def\POE@str@polcontroltype@triangle{triangle}
-\def\POE@str@top{top}
+\def\POE@str@auto{auto}
+\def\POE@str@bandpass{bandpass}
+\def\POE@str@bandstop{bandstop}
+\def\POE@str@binary{binary}
+\def\POE@str@blazed{blazed}
\def\POE@str@bottom{bottom}
\def\POE@str@center{center}
+\def\POE@str@circle{circle}
\def\POE@str@closed{closed}
+\def\POE@str@cross{cross}
+\def\POE@str@cube{cube}
+\def\POE@str@custom{custom}
+\def\POE@str@diode{diode}
+\def\POE@str@directional{directional}
+\def\POE@str@ellipse{ellipse}
+\def\POE@str@elliptic{elliptic}
+\def\POE@str@extended{extended}
+\def\POE@str@global{global}
+\def\POE@str@highpass{highpass}
+\def\POE@str@lcirc{lcirc}
+\def\POE@str@left{left}
+\def\POE@str@linear{linear}
+\def\POE@str@lowpass{lowpass}
+\def\POE@str@misc{misc}
+\def\POE@str@none{none}
\def\POE@str@opened{opened}
-\def\POE@str@dettype@round{round}
-\def\POE@str@dettype@diode{diode}
-\def\POE@str@bsstyle@cube{cube}
-\def\POE@str@bsstyle@plate{plate}
-\def\POE@str@auto{auto}
-\def\POE@str@center{center}
-\def\POE@str@verbose{verbose}
+\def\POE@str@parallel{parallel}
+\def\POE@str@perp{perp}
+\def\POE@str@piezo{piezo}
+\def\POE@str@plain{plain}
+\def\POE@str@plate{plate}
+\def\POE@str@pulse{pulse}
\def\POE@str@quiet{quiet}
-\def\POE@Verb#1{\pst@Verb{\pst@optexpdict #1 end }}%
+\def\POE@str@rcirc{rcirc}
+\def\POE@str@rectangle{rectangle}
+\def\POE@str@reflective{reflective}
+\def\POE@str@relative{relative}
+\def\POE@str@relgrav{relgrav}
+\def\POE@str@right{right}
+\def\POE@str@round{round}
+\def\POE@str@sawtooth{sawtooth}
+\def\POE@str@semitrans{semitrans}
+\def\POE@str@sine{sine}
+\def\POE@str@standard{standard}
+\def\POE@str@top{top}
+\def\POE@str@transmittive{transmittive}
+\def\POE@str@triangle{triangle}
+\def\POE@str@verbose{verbose}
% \end{macrocode}
%
% \section{Parameter and style definitions}
@@ -11112,6 +12536,60 @@
\addtopsstyle{FiberOut2}{#1}%
}
% \end{macrocode}
+%
+% Electrical connection stuff
+% \begin{macrocode}
+\newpsstyle{Wire}{}
+\define@key[psset]{optexp}{newWire}{%
+ \newpsstyle{Wire}{#1}%
+}
+\define@key[psset]{optexp}{addtoWire}{%
+ \addtopsstyle{Wire}{#1}%
+}
+\newpsstyle{WireIn}{style=Wire}
+\define@key[psset]{optexp}{newWireIn}{%
+ \newpsstyle{WireIn}{#1}%
+}
+\define@key[psset]{optexp}{addtoWireIn}{%
+ \addtopsstyle{WireIn}{#1}%
+}
+\newpsstyle{WireIn1}{style=WireIn}
+\define@key[psset]{optexp}{newWireIn1}{%
+ \newpsstyle{WireIn1}{#1}%
+}
+\define@key[psset]{optexp}{addtoWireIn1}{%
+ \addtopsstyle{WireIn1}{#1}%
+}
+\newpsstyle{WireIn2}{style=WireIn}
+\define@key[psset]{optexp}{newWireIn2}{%
+ \newpsstyle{WireIn2}{#1}%
+}
+\define@key[psset]{optexp}{addtoWireIn2}{%
+ \addtopsstyle{WireIn2}{#1}%
+}
+\newpsstyle{WireOut}{style=Wire}
+\define@key[psset]{optexp}{newWireOut}{%
+ \newpsstyle{WireOut}{#1}%
+}
+\define@key[psset]{optexp}{addtoWireOut}{%
+ \addtopsstyle{WireOut}{#1}%
+}
+\newpsstyle{WireOut1}{style=WireOut}
+\define@key[psset]{optexp}{newWireOut1}{%
+ \newpsstyle{WireOut1}{#1}%
+}
+\define@key[psset]{optexp}{addtoWireOut1}{%
+ \addtopsstyle{WireOut1}{#1}%
+}
+\newpsstyle{WireOut2}{style=WireOut}
+\define@key[psset]{optexp}{newWireOut2}{%
+ \newpsstyle{WireOut2}{#1}%
+}
+\define@key[psset]{optexp}{addtoWireOut2}{%
+ \addtopsstyle{WireOut2}{#1}%
+}
+\newpsstyle{ElecComp}{}
+% \end{macrocode}
% Special styles to change only a part of some devices.
% \begin{macrocode}
\newpsstyle{ExtendedMirror}{%
@@ -11220,7 +12698,7 @@
[\val\nr]{absolute,relative,relgrav,global}%
{%
\ifcase\nr\relax
- \let\POE@key@labelref\POE@str@labelref@global
+ \let\POE@key@labelref\POE@str@global
\else
\def\POE@key@labelref{#1}%
\fi
@@ -11321,7 +12799,7 @@
\def\POE@getref@r{\def\POE@key@extnode@xref{1}}%
\psset[optexp]{%
extnode=\@empty,
- extnodealign=abs
+ extnodealign=absolute
}%
% \end{macrocode}
% Set the rotation reference point. For this to work properly, the components
@@ -11563,11 +13041,73 @@
\fi
\psset[optexp]{optboxwidth=#1, optboxheight=#2}%
}%
+\psset[optexp]{optboxsize=1.4 0.8}%
+% \end{macrocode}
+% arrowbox
+% \begin{macrocode}
+\define@key[psset]{optexp}{arrowcompwidth}{%
+ \pst@checknum{#1}\POE@key@arrowcompwidth
+}
+\define@key[psset]{optexp}{arrowcompheight}{%
+ \pst@checknum{#1}\POE@key@arrowcompheight
+}
+\define@key[psset]{optexp}{arrowcompsize}{%
+ \pst@expandafter\POE@psset@@arrowcompsize{#1} {} {} {}\@nil
+}%
+\def\POE@psset@@arrowcompsize#1 #2 #3\@nil{%
+ \ifx\\#2\\%
+ \psset[optexp]{arrowcompwidth=#1, arrowcompheight=#1}%
+ \else
+ \psset[optexp]{arrowcompwidth=#1, arrowcompheight=#2}%
+ \fi
+}%
+\define@key[psset]{optexp}{arrowcompangle}{%
+ \pst@checknum{#1}\POE@key@arrowcompangle
+}%
+\define@choicekey+[psset]{optexp}{arrowcompshape}%
+ [\val\nr]{circle, rectangle}%
+ {\edef\POE@key@arrowcompshape{#1}}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for arrowcompshape}}
\psset[optexp]{%
- optboxwidth=1.4,
- optboxheight=0.8
+ arrowcompsize=1.4 0.8,
+ arrowcompangle=70,
+ arrowcompshape=rectangle
}%
+\newpsstyle{ArrowCompStyle}{arrowinset=0, arrows=->}%
% \end{macrocode}
+% BarBox
+% \begin{macrocode}
+\define@key[psset]{optexp}{barcompwidth}{%
+ \pst@checknum{#1}\POE@key@barcompwidth
+}
+\define@key[psset]{optexp}{barcompheight}{%
+ \pst@checknum{#1}\POE@key@barcompheight
+}
+\define@key[psset]{optexp}{barcompsize}{%
+ \pst@expandafter\POE@psset@@barcompsize{#1} {} {} {}\@nil
+}%
+\def\POE@psset@@barcompsize#1 #2 #3\@nil{%
+ \ifx\\#2\\%
+ \psset[optexp]{barcompwidth=#1, barcompheight=#1}%
+ \else
+ \psset[optexp]{barcompwidth=#1, barcompheight=#2}%
+ \fi
+}%
+\define@key[psset]{optexp}{barcompangle}{%
+ \pst@checknum{#1}\POE@key@barcompangle
+}%
+\define@choicekey+[psset]{optexp}{barcompshape}%
+ [\val\nr]{circle, rectangle}%
+ {\edef\POE@key@barcompshape{#1}}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for barcompshape}}
+\psset[optexp]{%
+ barcompsize=1.4 0.8,
+ barcompangle=70,
+ barcompshape=rectangle
+}%
+\newpsstyle{BarCompStyle}{}%
+% \end{macrocode}
+%
% Plate
% \begin{macrocode}
\define@key[psset]{optexp}{platelinewidth}{%
@@ -11861,10 +13401,15 @@
{auto,center}%
{\def\POE@key@prismalign{#1}}%
{\PackageError{pst-optexp}{Unknown value '\val' for prismalign}}%
+\define@choicekey+[psset]{optexp}{prismtype}[\val\nr]%
+ {transmission, coupling}%
+ {\def\POE@key@prismtype{#1}}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for prismtype}}%
\psset[optexp]{%
prismsize=1,
prismangle=60,
- prismalign=auto
+ prismalign=auto,
+ prismtype=transmission
}%
% \end{macrocode}
%
@@ -11897,7 +13442,7 @@
\psset[optexp]{%
fiberloops=3,
fiberloopradius=0.4,
- fiberloopsep=0.3
+ fiberloopsep=0.2
}%
% \end{macrocode}
% \subsubsection{optfilter}
@@ -12097,14 +13642,14 @@
\fi
}%
\define@key[psset]{optexp}{couplersep}{%
- \pst@checknum{#1}\POE@key@couplersep
+ \edef\POE@key@couplersep{#1}%
}
\define@choicekey+[psset]{optexp}{couplertype}%
[\val\nr]{none,elliptic,ellipse,cross,rectangle}%
{%
\edef\POE@key@couplertype{#1}
- \ifx\POE@key@couplertype\POE@str@couplertype@elliptic
- \let\POE@key@couplertype\POE@str@couplertype@ellipse
+ \ifx\POE@key@couplertype\POE@str@elliptic
+ \let\POE@key@couplertype\POE@str@ellipse
\fi
}%
{\PackageError{pst-optexp}{Unknown value '\val' for couplertype}}
@@ -12182,6 +13727,95 @@
fiberboxsepout=0.2,
fiberboxcount=2x2}
% \end{macrocode}
+%
+% \subsection{Electrical components}
+%
+% \subsubsection{elecmixer}
+% \begin{macrocode}
+\define@key[psset]{optexp}{elecmixersize}{%
+ \pst@checknum{#1}\POE@key@elecmixersize
+}%
+\psset[optexp]{elecmixersize=0.8}%
+% \end{macrocode}
+%
+% \subsubsection{eleccoupler}
+% \begin{macrocode}
+\define@key[psset]{optexp}{eleccouplersize}{%
+ \pst@expandafter\POE@psset@@eleccouplersize{#1} {} {} {}\@nil
+}%
+\def\POE@psset@@eleccouplersize#1 #2 #3\@nil{%
+ \pst@checknum{#1}\POE@key@eleccouplerwidth
+ \ifx\\#2\\%
+ \pst@checknum{#1}\POE@key@eleccouplerheight
+ \else
+ \pst@checknum{#2}\POE@key@eleccouplerheight
+ \fi
+}%
+\define@key[psset]{optexp}{eleccouplersep}{%
+ \edef\POE@key@eleccouplersep{#1}%
+}
+\define@choicekey+[psset]{optexp}{eleccouplertype}%
+ [\val\nr]{standard, directional}%
+ {\edef\POE@key@eleccouplertype{#1}}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for eleccouplertype}}%
+\define@choicekey+[psset]{optexp}{eleccouplerinput}%
+ [\val\nr]{left, right}%
+ {\edef\POE@key@eleccouplerinput{#1}}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for eleccouplerinput}}%
+\define@choicekey+[psset]{optexp}{eleccoupleralign}%
+ [\val\nr]{t,b,c,top,bottom,center}%
+ {%
+ \ifcase\nr\relax
+ \let\POE@key@eleccoupleralign\POE@str@top
+ \or
+ \let\POE@key@eleccoupleralign\POE@str@bottom
+ \or
+ \let\POE@key@eleccoupleralign\POE@str@center
+ \else
+ \def\POE@key@eleccoupleralign{#1}%
+ \fi}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for eleccoupleralign}}
+\psset[optexp]{%
+ eleccouplersize=0.8,
+ eleccouplersep={},
+ eleccoupleralign=center,
+ eleccouplertype=standard,
+ eleccouplerinput=left
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\define@key[psset]{optexp}{synthsize}{%
+ \pst@expandafter\POE@psset@@synthsize{#1} {} {} {}\@nil
+}%
+\def\POE@psset@@synthsize#1 #2 #3\@nil{%
+ \pst@checknum{#1}\POE@key@synthwidth
+ \ifx\\#2\\%
+ \pst@checknum{#1}\POE@key@synthheight
+ \else
+ \pst@checknum{#2}\POE@key@synthheight
+ \fi
+}%
+\define@key[psset]{optexp}{synthrectwidth}{%
+ \pst@checknum{#1}\POE@key@synthrectwidth
+}%
+\define@choicekey+[psset]{optexp}{synthshape}%
+ [\val\nr]{circle, rectangle}%
+ {\edef\POE@key@synthshape{#1}}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for synthshape}}
+\define@choicekey+[psset]{optexp}{synthtype}%
+ [\val\nr]{sine, pulse, rectangle, triangle, sawtooth, custom}%
+ {\edef\POE@key@synthtype{#1}}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for synthtype}}
+\newpsstyle{SynthStyle}{}
+\psset[optexp]{%
+ synthsize=0.8,
+ synthshape=circle,
+ synthtype=sine,
+ synthrectwidth=0.2
+}%
+% \end{macrocode}
+%
% \subsection{Beam-connection parameters}
% The keys related to the \cs{draw*} macros.
%
@@ -12271,7 +13905,7 @@
\fi
}%
\define@key[psset]{optexp}{loadbeam}[true]{%
- \setkeys+[psset]{optexp}{loadbeampoints=#1}%
+ \setkeys[psset]{optexp}{loadbeampoints=#1}%
\ifdim\POE@key@loadbeampoints pt>0pt
\POE@loadbeamtrue
\else
@@ -12279,7 +13913,7 @@
\fi
}%
\define@key[psset]{optexp}{savebeam}[true]{%
- \setkeys+[psset]{optexp}{savebeampoints=#1}%
+ \setkeys[psset]{optexp}{savebeampoints=#1}%
\ifdim\POE@key@savebeampoints pt>0pt
\POE@savebeamtrue
\else
@@ -12339,33 +13973,59 @@
% \end{macrocode}
%
% \subsection{Fiber-connection parameters}
-% Select which fibers are drawn automatically. The parameters \opt{fiber},
-% \opt{fiberin} and \opt{fiberout} do not only select which fibers are drawn,
-% but do also enable fiber connecting for the free-ray components. So you should
-% use these switches only locally, or they must be followed by a
-% \opt{fiber@=false}. (Need to rethink this part\ldots).
+% Select which fibers are drawn automatically.
% \begin{macrocode}
\define@key[psset]{optexp}{fiber}[all]{%
\POE@psset@fibercheck#1\@nil
}
+% \end{macrocode}
+% Check which components are affected by the fiber parameter. * is only for
+% fiber-optical components, + refers to all components but the fiber-optical
+% ones, otherwise all components are affected.
+% \begin{macrocode}
\def\POE@psset@fibercheck#1#2\@nil{%
\ifx#1*\relax
\ifx\\#2\\%
- \psset[optexp]{fiber@preset=all}%
+ \setkeys[psset]{optexp}{fiber@preset=all}%
\else
- \psset[optexp]{fiber@preset=#2}%
+ \setkeys[psset]{optexp}{fiber@preset=#2}%
\fi
\else\ifx#1+\relax
\ifx\\#2\\%
- \psset[optexp]{fiber@all=all}%
+ \setkeys[psset]{optexp}{fiber@all=all}%
\else
- \psset[optexp]{fiber@all=#2}%
+ \setkeys[psset]{optexp}{fiber@all=#2}%
\fi
+ \POE@unset@wire
\else
- \psset[optexp]{fiber@all=#1#2}%
- \psset[optexp]{fiber@preset=#1#2}%
+ \setkeys[psset]{optexp}{fiber@all=#1#2}%
+ \setkeys[psset]{optexp}{fiber@preset=#1#2}%
+ \POE@unset@wire
\fi\fi
}%
+\def\POE@unset@wire{%
+ \ifPOE@fiberin@
+ \setkeys[psset]{optexp}{wirepresetin@=false}%
+ \fi
+ \ifPOE@fiberout@
+ \setkeys[psset]{optexp}{wirepresetout@=false}%
+ \fi
+ \ifPOE@fiberin@top
+ \setkeys[psset]{optexp}{wirepresetin@top=false}%
+ \fi
+ \ifPOE@fiberin@bottom
+ \setkeys[psset]{optexp}{wirepresetin@bottom=false}%
+ \fi
+ \ifPOE@fiberout@top
+ \setkeys[psset]{optexp}{wirepresetout@top=false}%
+ \fi
+ \ifPOE@fiberout@bottom
+ \setkeys[psset]{optexp}{wirepresetout@bottom=false}%
+ \fi
+}%
+% \end{macrocode}
+% Set the fiber parameters for fiber-optical components only (use fiber=*...).
+% \begin{macrocode}
\define@choicekey*+[psset]{optexp}{fiber@preset}%
[\val\nr]{false,none,true,all}[all]{%
\ifcase\nr\relax
@@ -12392,20 +14052,37 @@
\fi
}%
\def\POE@getfiberpreset@none{%
- \psset[optexp]{fiberpreset@=false}%
+ \setkeys[psset]{optexp}{%
+ fiberpresetin@=false, fiberpresetout@=false,
+ fiberpresetin@top=false, fiberpresetin@bottom=false,
+ fiberpresetout@top=false, fiberpresetout@bottom=false}%
}%
\def\POE@getfiberpreset@all{%
- \psset[optexp]{%
- fiberpreset@, fiberpresetin@, fiberpresetout@,
+ \setkeys[psset]{optexp}{%
+ fiberpresetin@, fiberpresetout@,
fiberpresetin@top, fiberpresetin@bottom,
fiberpresetout@top, fiberpresetout@bottom}%
}%
\def\POE@getfiberpreset@t{%
- \psset[optexp]{fiberpresetin@bottom=false, fiberpresetout@bottom=false}}%
+ \setkeys[psset]{optexp}{%
+ fiberpresetin@bottom=false, fiberpresetout@bottom=false}%
+}%
\def\POE@getfiberpreset@b{%
- \psset[optexp]{fiberpresetin@top=false, fiberpresetout@top=false}}%
-\def\POE@getfiberpreset@l{\psset[optexp]{fiberpresetout@=false}}%
-\def\POE@getfiberpreset@r{\psset[optexp]{fiberpresetin@=false}}%
+ \setkeys[psset]{optexp}{%
+ fiberpresetin@top=false, fiberpresetout@top=false}%
+}%
+\def\POE@getfiberpreset@l{%
+ \setkeys[psset]{optexp}{%
+ fiberpresetout@=false,
+ fiberpresetout@top=false,
+ fiberpresetout@bottom=false}%
+}%
+\def\POE@getfiberpreset@r{%
+ \setkeys[psset]{optexp}{%
+ fiberpresetin@=false,
+ fiberpresetin@top=false,
+ fiberpresetin@bottom=false}%
+}%
\let\POE@getfiberpreset@i\POE@getfiberpreset@l
\let\POE@getfiberpreset@o\POE@getfiberpreset@r
% \end{macrocode}
@@ -12438,36 +14115,45 @@
\fi
}%
\def\POE@getfiber@none{%
- \psset[optexp]{fiber@=false}%
+ \setkeys[psset]{optexp}{%
+ fiberin@=false, fiberout@=false,
+ fiberin@top=false, fiberin@bottom=false,
+ fiberout@top=false, fiberout@bottom=false}%
}%
\def\POE@getfiber@all{%
- \psset[optexp]{%
- fiber@, fiberin@, fiberout@,
+ \setkeys[psset]{optexp}{%
+ fiberin@, fiberout@,
fiberin@top, fiberin@bottom,
fiberout@top, fiberout@bottom}%
}%
\def\POE@getfiber@t{%
- \psset[optexp]{fiberin@bottom=false, fiberout@bottom=false}}%
+ \setkeys[psset]{optexp}{%
+ fiberin@bottom=false, fiberout@bottom=false}%
+}%
\def\POE@getfiber@b{%
- \psset[optexp]{fiberin@top=false, fiberout@top=false}}%
-\def\POE@getfiber@l{\psset[optexp]{fiberout@=false}}%
-\def\POE@getfiber@r{\psset[optexp]{fiberin@=false}}%
+ \setkeys[psset]{optexp}{%
+ fiberin@top=false, fiberout@top=false}%
+}%
+\def\POE@getfiber@l{%
+ \setkeys[psset]{optexp}{%
+ fiberout@=false, fiberout@top=false, fiberout@bottom=false}%
+}%
+\def\POE@getfiber@r{%
+ \setkeys[psset]{optexp}{%
+ fiberin@=false, fiberin@top=false, fiberin@bottom=false}%
+}%
\let\POE@getfiber@i\POE@getfiber@l
\let\POE@getfiber@o\POE@getfiber@r
% \end{macrocode}
% These are the internal boolkeys for the fiber choices done with \opt{fiberin},
% \opt{fiberout} and \opt{fiber}. Do not use them directly.
% \begin{macrocode}
-\define@boolkey[psset]{optexp}[POE@]{fiber@}[true]{}
-\define@boolkey[psset]{optexp}[POE@]{nofiber@}[true]{}
\define@boolkey[psset]{optexp}[POE@]{fiberin@}[true]{}
\define@boolkey[psset]{optexp}[POE@]{fiberin@top}[true]{}
\define@boolkey[psset]{optexp}[POE@]{fiberin@bottom}[true]{}
\define@boolkey[psset]{optexp}[POE@]{fiberout@}[true]{}
\define@boolkey[psset]{optexp}[POE@]{fiberout@top}[true]{}
\define@boolkey[psset]{optexp}[POE@]{fiberout@bottom}[true]{}
-\define@boolkey[psset]{optexp}[POE@]{fiberpreset@}[true]{}
-\define@boolkey[psset]{optexp}[POE@]{nofiberpreset@}[true]{}
\define@boolkey[psset]{optexp}[POE@]{fiberpresetin@}[true]{}
\define@boolkey[psset]{optexp}[POE@]{fiberpresetin@top}[true]{}
\define@boolkey[psset]{optexp}[POE@]{fiberpresetin@bottom}[true]{}
@@ -12503,8 +14189,228 @@
fiberalign=relative,
fiberstyle=curve
}%
+
+% \subsection{Wire connection parameters}
+% Select which wires are drawn automatically.
+% Note, this part is equivalent to the fiber connection parameters, only 'fiber' is replace by 'wire'.
+% \begin{macrocode}
+\define@key[psset]{optexp}{wire}[all]{%
+ \POE@psset@wirecheck#1\@nil
+}
+% \end{macrocode}
+% Check which components are affected by the wire parameter:
+% * is only for electrical components
+% + refers to all components but the electrical ones,
+% otherwise all components are affected.
+% \begin{macrocode}
+\def\POE@psset@wirecheck#1#2\@nil{%
+ \ifx#1*\relax
+ \ifx\\#2\\%
+ \setkeys[psset]{optexp}{wire@preset=all}%
+ \else
+ \setkeys[psset]{optexp}{wire@preset=#2}%
+ \fi
+ \else\ifx#1+\relax
+ \ifx\\#2\\%
+ \setkeys[psset]{optexp}{wire@all=all}%
+ \else
+ \setkeys[psset]{optexp}{wire@all=#2}%
+ \fi
+ \POE@unset@fiber
+ \else
+ \setkeys[psset]{optexp}{wire@all=#1#2, wire@preset=#1#2}%
+ \POE@unset@fiber
+ \fi\fi
+}%
+\def\POE@unset@fiber{%
+ \ifPOE@wirein@
+ \setkeys[psset]{optexp}{fiberpresetin@=false, fiberin@=false}%
+ \fi
+ \ifPOE@wireout@
+ \setkeys[psset]{optexp}{fiberpresetout@=false, fiberout@=false}%
+ \fi
+ \ifPOE@wirein@top
+ \setkeys[psset]{optexp}{fiberpresetin@top=false, fiberin@top=false}%
+ \fi
+ \ifPOE@wirein@bottom
+ \setkeys[psset]{optexp}{fiberpresetin@bottom=false, fiberin@bottom=false}%
+ \fi
+ \ifPOE@wireout@top
+ \setkeys[psset]{optexp}{fiberpresetout@top=false, fiberout@top=false}%
+ \fi
+ \ifPOE@wireout@bottom
+ \setkeys[psset]{optexp}{fiberpresetout@bottom=false, fiberout@bottom=false}%
+ \fi
+}%
+% \end{macrocode}
+% Set the fiber parameters for fiber-optical components only (use fiber=*...).
+% \begin{macrocode}
+\define@choicekey*+[psset]{optexp}{wire@preset}%
+ [\val\nr]{false,none,true,all}[all]{%
+ \ifcase\nr\relax
+ \POE@getwirepreset@none
+ \or
+ \POE@getwirepreset@none
+ \or
+ \POE@getwirepreset@all
+ \or
+ \POE@getwirepreset@all
+ \fi
+}{%
+ \ifx\@empty\val
+ \POE@getwirepreset@none
+ \else
+ \pst@expandafter\POE@psset@@wirepreset{#1}\@empty,,\@nil
+ \fi
+}%
+\def\POE@psset@@wirepreset#1#2,#3,#4\@nil{%
+ \POE@getwirepreset@all
+ \ifx\\#3\\%
+ \@nameuse{POE@getwirepreset@#1}%
+ \@nameuse{POE@getwirepreset@#2}%
+ \fi
+}%
+\def\POE@getwirepreset@none{%
+ \setkeys[psset]{optexp}{%
+ wirepresetin@=false, wirepresetout@=false,
+ wirepresetin@top=false, wirepresetin@bottom=false,
+ wirepresetout@top=false, wirepresetout@bottom=false}%
+}%
+
+\def\POE@getwirepreset@all{%
+ \setkeys[psset]{optexp}{%
+ wirepresetin@, wirepresetout@,
+ wirepresetin@top, wirepresetin@bottom,
+ wirepresetout@top, wirepresetout@bottom}%
+}%
+\def\POE@getwirepreset@t{%
+ \setkeys[psset]{optexp}{%
+ wirepresetin@bottom=false, wirepresetout@bottom=false}%
+}%
+\def\POE@getwirepreset@b{%
+ \setkeys[psset]{optexp}{%
+ wirepresetin@top=false, wirepresetout@top=false}%
+}%
+\def\POE@getwirepreset@l{%
+ \setkeys[psset]{optexp}{%
+ wirepresetout@=false,
+ wirepresetout@top=false,
+ wirepresetout@bottom=false}%
+}%
+\def\POE@getwirepreset@r{%
+ \setkeys[psset]{optexp}{%
+ wirepresetin@=false,
+ wirepresetin@top=false,
+ wirepresetin@bottom=false}%
+}%
+\let\POE@getwirepreset@i\POE@getwirepreset@l
+\let\POE@getwirepreset@o\POE@getwirepreset@r
+% \end{macrocode}
+%
+% This code is for all components, fiber-optical and free-ray.
+% \begin{macrocode}
+\define@choicekey*+[psset]{optexp}{wire@all}%
+ [\val\nr]{false,none,true,all}[all]{%
+ \ifcase\nr\relax
+ \POE@getwire@none
+ \or
+ \POE@getwire@none
+ \or
+ \POE@getwire@all
+ \or
+ \POE@getwire@all
+ \fi
+}{%
+ \ifx\@empty\val
+ \POE@getwire@none
+ \else
+ \pst@expandafter\POE@psset@@wire{#1}\@empty,,\@nil
+ \fi
+}%
+\def\POE@psset@@wire#1#2,#3,#4\@nil{%
+ \POE@getwire@all
+ \ifx\@empty#3\@empty
+ \@nameuse{POE@getwire@#1}%
+ \@nameuse{POE@getwire@#2}%
+ \fi
+}%
+\def\POE@getwire@none{%
+ \setkeys[psset]{optexp}{%
+ wirein@=false, wireout@=false,
+ wirein@top=false, wirein@bottom=false,
+ wireout@top=false, wireout@bottom=false}%
+}%
+\def\POE@getwire@all{%
+ \setkeys[psset]{optexp}{%
+ wirein@, wireout@,
+ wirein@top, wirein@bottom,
+ wireout@top, wireout@bottom}%
+}%
+\def\POE@getwire@t{%
+ \setkeys[psset]{optexp}{%
+ wirein@bottom=false, wireout@bottom=false}%
+}%
+\def\POE@getwire@b{%
+ \setkeys[psset]{optexp}{%
+ wirein@top=false, wireout@top=false}%
+}%
+\def\POE@getwire@l{%
+ \setkeys[psset]{optexp}{%
+ wireout@=false, wireout@top=false, wireout@bottom=false}%
+}%
+\def\POE@getwire@r{%
+ \setkeys[psset]{optexp}{%
+ wirein@=false, wirein@top=false, wirein@bottom=false}%
+}%
+\let\POE@getwire@i\POE@getwire@l
+\let\POE@getwire@o\POE@getwire@r
+% \end{macrocode}
+% These are the internal boolkeys for the wire choices done with \opt{wirein},
+% \opt{wireout} and \opt{wire}. Do not use them directly.
+% \begin{macrocode}
+\define@boolkey[psset]{optexp}[POE@]{wirein@}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wirein@top}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wirein@bottom}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wireout@}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wireout@top}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wireout@bottom}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wirepresetin@}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wirepresetin@top}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wirepresetin@bottom}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wirepresetout@}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wirepresetout@top}[true]{}
+\define@boolkey[psset]{optexp}[POE@]{wirepresetout@bottom}[true]{}
+\psset[optexp]{wire=*all}%
+\define@key[psset]{optexp}{wireangleA}{%
+ \pst@checknum{#1}\POE@key@wireangleA
+}%
+\define@key[psset]{optexp}{wireangleB}{%
+ \pst@checknum{#1}\POE@key@wireangleB
+}%
+\define@choicekey+[psset]{optexp}{wirealign}%
+ [\val\nr]{rel,abs,relative,center,absolute}%
+ {%
+ \ifcase\nr\relax
+ \let\POE@key@wirealign\POE@str@relative
+ \or
+ \let\POE@key@wirealign\POE@str@absolute
+ \else
+ \def\POE@key@wirealign{#1}%
+ \fi
+ }%
+ {\PackageError{pst-optexp}{Unknown value '\val' for wirealign}}%
+\define@key[psset]{optexp}{wirestyle}{%
+ \@ifundefined{nc#1}%
+ {\PackageError{pst-optexp}{Unknown value '#1' for wirestyle}}%
+ {\def\POE@key@wirestyle{#1}}}
+\psset[optexp]{%
+ wireangleA=0,
+ wireangleB=0,
+ wirealign=relative,
+ wirestyle=angle
+}%
% \end{macrocode}
-% Which nodes to take for the automatic fiber connections.
+% Which nodes to take for the automatic fiber and wire connections.
% \begin{macrocode}
\define@choicekey+[psset]{optexp}{startnode}%
[\val\nr]{auto,1,2,3,4,N}%
@@ -12567,40 +14473,67 @@
% \begin{macro}{\drawfiber}
% \begin{macrocode}
\def\drawfiber{\drawfiber@{Fiber}}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\drawwire}
+% \begin{macrocode}
+\def\drawwire{\drawwire@{Wire}}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\drawwire@}
+% \begin{macrocode}
+\def\drawwire@#1{%
+ \def\POE@setconnparam{%
+ \let\POE@key@connangleA\POE@key@wireangleA
+ \let\POE@key@connangleB\POE@key@wireangleB
+ \let\POE@key@connalign\POE@key@wirealign
+ \let\POE@key@connstyle\POE@key@wirestyle
+ }%
+ \drawconn@{#1}
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\drawfiber@}
+% \begin{macrocode}
\def\drawfiber@#1{%
+ \def\POE@setconnparam{%
+ \let\POE@key@connangleA\POE@key@fiberangleA
+ \let\POE@key@connangleB\POE@key@fiberangleB
+ \let\POE@key@connalign\POE@key@fiberalign
+ \let\POE@key@connstyle\POE@key@fiberstyle
+ }%
+ \drawconn@{#1}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\drawconn@}
+% \begin{macrocode}
+\def\drawconn@#1{%
\ifPst@custom\else
\def\pst@par{style=#1}%
\fi
\@ifnextchar[%]
- {\drawfiber@i}{\drawfiber@i[]}%
-}%
-\def\drawfiber@i[#1]{%
+ {\drawconn@i}{\drawconn@i[]}}%
+\def\drawconn@i[#1]{%
\addafter@par{#1}%
- \drawfiber@ii}
-
-\def\drawfiber@ii{%
- \@ifnextchar(%)
- {\drawfiber@iii}%
- {\@ifnextchar\bgroup{\drawfiber@iv}{}}%
-}%
-\def\drawfiber@iii(#1){\drawfiber@iv{(#1)}}%
-\def\drawfiber@iv#1{%
- \def\POE@tempe{#1}\drawfiber@ii@
-}%
-\def\drawfiber@ii@{%
- \@ifnextchar(%)
- {\drawfiber@iii@}%
- {\@ifnextchar\bgroup{\drawfiber@iv@}{}}%
-}%
-\def\drawfiber@iii@(#1){\drawfiber@iv@{(#1)}}%
-\def\drawfiber@iv@#1{%
- \expandafter\drawfiber@v\expandafter{\POE@tempe}{#1}%
- \def\POE@tempe{#1}\drawfiber@ii@}%
-\def\drawfiber@v#1#2{%
+ \POE@normalizecomps\drawconn@ii}
+\def\drawconn@ii{%
+ \@ifnextchar\bgroup
+ {\drawconn@iii}%
+ {}}%
+\def\drawconn@iii#1{%
+ \def\POE@tempe{#1}\drawconn@iv}%
+\def\drawconn@iv{%
+ \@ifnextchar\bgroup{\drawconn@v}{}}%
+\def\drawconn@v#1{%
+ \expandafter\drawconn@vi\expandafter{\POE@tempe}{#1}%
+ \def\POE@tempe{#1}\drawconn@iv}%
+\def\drawconn@vi#1#2{%
\begingroup
\let\psk@angleA\relax
\let\psk@angleB\relax
\use@par
+ \POE@setconnparam
\let\POE@angleA\psk@angleA
\let\POE@angleB\psk@angleB
\ifx\psk@angleA\relax
@@ -12652,28 +14585,28 @@
\pst@getcoor{@@A}\POE@tempa
\pst@getcoor{@@B}\POE@tempb
\ifx\POE@angleA\relax
- \ifx\POE@key@fiberalign\POE@str@absolute
- \psset{angleA=\POE@key@fiberangleA}%
+ \ifx\POE@key@connalign\POE@str@absolute
+ \psset{angleA=\POE@key@connangleA}%
\else
\psset{angleA=! \POE@dict{%
\POE@tempb \POE@tempa \POE@comps exch
- \POE@key@fiberalign\space RelFiberAngle
- \POE@key@fiberangleA\space add }
+ \POE@key@connalign\space RelConnAngle
+ \POE@key@connangleA\space add }
}%
\fi
\fi
\ifx\POE@angleB\relax
- \ifx\POE@key@fiberalign\POE@str@absolute
- \psset{angleB=\POE@key@fiberangleB}%
+ \ifx\POE@key@connalign\POE@str@absolute
+ \psset{angleB=\POE@key@connangleB}%
\else
\psset{angleB=! \POE@dict{%
\POE@tempa \POE@tempb \POE@comps
- \POE@key@fiberalign\space RelFiberAngle
- \POE@key@fiberangleB\space add}
+ \POE@key@connalign\space RelConnAngle
+ \POE@key@connangleB\space add}
}%
\fi
\fi
- \@nameuse{nc\POE@key@fiberstyle}{@@A}{@@B}
+ \@nameuse{nc\POE@key@connstyle}{@@A}{@@B}
\fi
\endgroup
}%
@@ -12757,7 +14690,6 @@
% \begin{macrocode}
\def\drawbeam{\pst@object{drawbeam}}%
\def\drawbeam@i{%
- \def\POE@conntable{,a-a,b-b,A-A,B-B}%
\begin@SingleBeamObj
\POE@getcomps[\drawbeam@ii%
}%
@@ -12820,17 +14752,6 @@
% \begin{macro}{\drawbeam@ii}
% \begin{macrocode}
\def\drawbeam@ii{%
- \ifx\POE@key@conn\@empty
- \drawbeam@iii
- \else
- \drawbeam@compat
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\drawbeam@iii}
-% \begin{macrocode}
-\def\drawbeam@iii{%
\ifodd
% \end{macrocode}
% Do not draw anything only if both linestyle and ArrowInside are not set.
@@ -13170,68 +15091,68 @@
% \end{macrocode}
% empty option, use the current component ID
% \begin{macrocode}
- \edef\POE@firstcomp{\the\POE@cnt}%
- \edef\POE@lastcomp{\the\POE@cnt}%
+ \@tempcnta=\POE@cnt
+ \@tempcntb=\POE@cnt
\else
% \end{macrocode}
% A single number was given
% \begin{macrocode}
- \edef\POE@firstcomp{#1}%
- \edef\POE@lastcomp{#1}%
+ \@tempcnta=#1
+ \@tempcntb=#1
% \end{macrocode}
% Check if the number is valid, otherwise quit with an error.
% \begin{macrocode}
\ifodd
- \ifnum 0<\POE@firstcomp\ifnum\POE@lastcomp>\the\POE@cnt \@ne\else\z@\fi\else\@ne\fi
+ \ifnum 0<\@tempcnta\ifnum\@tempcntb>\the\POE@cnt \@ne\else\z@\fi\else\@ne\fi
\PackageError{pst-optexp}%
- {Component ID \POE@firstcomp\space is not valid,
+ {Component ID \the\@tempcnta\space is not valid,
\ifnum\the\POE@cnt=0 no components have been defined\else
valid range is from 1 to \the\POE@cnt\fi}
\fi
\fi
\else
\ifx\\#1\\%
- \edef\POE@firstcomp{1}%
+ \@tempcnta=\@ne
\else
- \edef\POE@firstcomp{#1}%
+ \@tempcnta=#1
\fi
\POE@getlastcomp#2%
- \ifnum\POE@firstcomp>\the\POE@cnt
- \ifnum\POE@lastcomp>\the\POE@cnt\relax
+ \ifnum\@tempcnta>\POE@cnt
+ \ifnum\@tempcntb>\POE@cnt
\PackageError{pst-optexp}%
- {All components \POE@firstcomp-\POE@lastcomp\space out of range}%
+ {All components \the\@tempcnta-\the\@tempcntb\space out of range}%
\fi
\fi
- \ifnum\POE@firstcomp<1
+ \ifnum\@tempcnta<\@ne
\PackageWarning{pst-optexp}%
- {Component ID \POE@firstcomp\space is not valid, setting to 1.}%
- \def\POE@firstcomp{1}%
- \else\ifnum\POE@firstcomp>\the\POE@cnt
+ {Component ID \the\@tempcnta\space is not valid, setting to 1.}%
+ \@tempcnta=\@ne
+ \else\ifnum\@tempcnta>\POE@cnt
\PackageWarning{pst-optexp}%
- {Component ID \POE@firstcomp\space is not valid, setting to \MessageBreak
+ {Component ID \the\@tempcnta\space is not valid, setting to \MessageBreak
the last defined value (\the\POE@cnt).}%
- \edef\POE@firstcomp{\the\POE@cnt}%
+ \@tempcnta=\POE@cnt%
\fi\fi
- \ifnum\POE@lastcomp>\the\POE@cnt
+ \ifnum\@tempcntb>\POE@cnt
\PackageWarning{pst-optexp}%
- {Component ID \POE@lastcomp\space is not valid, setting to \MessageBreak
+ {Component ID \the\@tempcntb\space is not valid, setting to \MessageBreak
the last defined value (\the\POE@cnt).}%
- \edef\POE@lastcomp{\the\POE@cnt}%
- \else\ifnum\POE@lastcomp<1
+ \@tempcntb=\POE@cnt%
+ \else\ifnum\@tempcntb<\@ne
\PackageWarning{pst-optexp}%
- {Component ID \POE@lastcomp\space is not valid, setting to 1.}%
- \def\POE@lastcomp{1}%
+ {Component ID \the\@tempcntb\space is not valid, setting to 1.}%
+ \@tempcntb=\@ne
\fi\fi
\fi
}%
\def\POE@getlastcomp#1-{%
\ifx\@empty#1\relax
- \ifnum\POE@firstcomp>\the\POE@cnt\relax
- \PackageError{pst-optexp}{All components \POE@firstcomp- out of range.}%
+ \ifnum\@tempcnta>\POE@cnt
+ \PackageError{pst-optexp}{All components \the\@tempcnta- out of range.}%
\fi
- \edef\POE@lastcomp{\the\POE@cnt}%
+ \@tempcntb=\POE@cnt
\else
- \edef\POE@lastcomp{#1}%
+ \@tempcntb=#1
\fi
}%
% \end{macrocode}
@@ -13239,11 +15160,7 @@
% \begin{macro}{\POE@getcomps}
% \begin{macrocode}
\def\POE@getcomps#1#2{%
- \ifx\POE@key@conn\@empty
- \def\POE@aftercomps{\addto@pscode{#1 \POE@comps }#2}%
- \else
- \def\POE@aftercomps{#2}%
- \fi
+ \def\POE@aftercomps{\addto@pscode{#1 \POE@comps }#2}%
\def\POE@comps{}%
\POE@getcomps@i%
}%
@@ -13269,13 +15186,13 @@
\POE@getcomprange#1#2-\@nil
\POE@getcomp{%
(\POE@str@basicname@prefix\POE@str@basicname@default)
- \POE@firstcomp\space\POE@lastcomp\space GetCompRange %
+ \the\@tempcnta\space\the\@tempcntb\space GetCompRange %
}%
\else\ifx-#1\relax
\POE@getcomprange#1#2-\@nil
\POE@getcomp{%
(\POE@str@basicname@prefix\POE@str@basicname@default)
- \POE@firstcomp\space\POE@lastcomp\space GetCompRange %
+ \the\@tempcnta\space\the\@tempcntb\space GetCompRange %
}%
\else
\POE@checkcompname{#1#2}%
@@ -13290,17 +15207,13 @@
% \begin{macrocode}
\def\POE@getplanenode(#1){%
\pst@@getcoor{#1}%
- \ifx\POE@key@conn\@empty
- \advance\POE@nodecnt by 1
- \POE@getcomp{%
- {\pst@coor} {0 1}
- (\POE@str@basicname@default N@\the\POE@nodecnt)
- {\tx@UserCoor} NewTempNodeComp
- (\POE@str@basicname@default N@\the\POE@nodecnt)
- }%
- \else
- \POE@getcomp{{\pst@coor} }%
- \fi
+ \advance\POE@nodecnt by 1
+ \POE@getcomp{%
+ {\pst@coor} {0 1}
+ (\POE@str@basicname@default N@\the\POE@nodecnt)
+ {\tx@UserCoor} NewTempNodeComp
+ (\POE@str@basicname@default N@\the\POE@nodecnt)
+ }%
}%
\def\POE@getplanenode@i(#1){\POE@getplanenode(#1)\POE@getcomps@i}%
% \end{macrocode}
@@ -13318,275 +15231,137 @@
}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\POE@normalizecomps}
+% Expands all component parameters by resolving the ranges, i.e. {1-3}
+% becomes {1}{2}{3}, and wrapping nodes with brackets, if necessary
+% (1,1) becomes {(1,1)}.
+% \begin{macrocode}
+\def\POE@normalizecomps#1{%
+ \def\POE@aftercomps{\expandafter#1\POE@comps}%
+ \def\POE@comps{}%
+ \POE@normalizecomps@i%
+}%
+\def\POE@normalizecomps@i{%
+ \@ifnextchar(%)
+ {\POE@normalizecomps@ii}%
+ {\POE@normalizecomps@iii}
+}%
+\def\POE@normalizecomps@ii(#1){%
+ \edef\POE@comps{\POE@comps{(#1)}}%
+ \POE@normalizecomps@i
+}%
+\def\POE@normalizecomps@iii{%
+ \@ifnextchar\bgroup{\POE@normalizecomps@iv}{\POE@aftercomps}%
+}%
+\def\POE@normalizecomps@iv#1{%
+ \def\POE@temp{#1\@empty}%
+ \expandafter\POE@normalizecomps@v\POE@temp\@nil
+}%
+\def\POE@normalizecomps@v#1#2\@nil{%
+ \edef\POE@temp{#1}%
+ \ifnum9<1#1\relax
+ \def\POE@tempa{1}
+ \else\ifx-#1\relax
+ \def\POE@tempa{1}
+ \else
+ \def\POE@tempa{0}
+ \fi\fi
+ \ifodd\POE@tempa
+ \POE@getcomprange#1#2-\@nil
+ \ifnum\@tempcnta<\@tempcntb \def\POE@rel{<}\def\POE@inc{\@ne}%
+ \else \def\POE@rel{>}\def\POE@inc{\m@ne}\fi
+ \advance\@tempcntb\POE@inc
+ \whiledo{\@tempcnta\POE@rel\@tempcntb}{%
+ \edef\POE@comps{\POE@comps{\the\@tempcnta}}%
+ \advance\@tempcnta\POE@inc
+ }%
+ \else
+ \edef\POE@comps{\POE@comps{#1#2}}%
+ \fi
+ \POE@normalizecomps@i%
+}%
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Automatic connections}
%
-% \begin{macro}{\POE@drawInternalConnections}
+% \begin{macro}{\POE@PresetWireConn}
+% Draw automatic wires for electrical components.
% \begin{macrocode}
-\def\POE@drawInternalConnections{%
- \ifx\POE@key@conn\@empty
- \POE@drawInternalConnectionsNew
- \else
- \POE@drawInternalConnectionsOld
+\def\POE@PresetWireConn{%
+ \ifPOE@startbox\else
+ \ifPOE@wirepresetin@
+ \drawwire@{WireIn}(\oenodeRefA{}){}
+ \else\ifPOE@fiberin@
+ \drawfiber@{FiberIn}(\oenodeRefA{}){}
+ \fi\fi
+ \fi
+ \ifPOE@endbox\else
+ \ifPOE@wirepresetout@
+ \drawwire@{WireOut}{}(\oenodeRefB{})
+ \else\ifPOE@fiberout@
+ \drawfiber@{FiberOut}{}(\oenodeRefB{})
+ \fi\fi
\fi
}%
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\POE@drawPresetFibers}
+% \begin{macro}{\POE@PresetFiberConn}
+% Draw automatic fiber or wires for fiber components.
% \begin{macrocode}
-\def\POE@drawPresetFibers{%
- \ifPOE@endbox
+\def\POE@PresetFiberConn{%
+ \ifPOE@startbox\else
\ifPOE@fiberpresetin@
- \drawfiber@{FiberIn}{(\oenodeRefA{})}{}
- \fi
- \else\ifPOE@startbox
- \ifPOE@fiberpresetout@
- \drawfiber@{FiberOut}{}{(\oenodeRefB{})}
- \fi
- \else
- \ifPOE@fiberpresetin@
- \drawfiber@{FiberIn}{(\oenodeRefA{})}{}
- \fi
+ \drawfiber@{FiberIn}(\oenodeRefA{}){}
+ \else\ifPOE@wirein@
+ \drawwire@{WireIn}(\oenodeRefA{}){}
+ \fi\fi
+ \fi
+ \ifPOE@endbox\else
\ifPOE@fiberpresetout@
- \drawfiber@{FiberOut}{}{(\oenodeRefB{})}
- \fi
- \fi\fi
+ \drawfiber@{FiberOut}{}(\oenodeRefB{})
+ \else\ifPOE@wireout@
+ \drawwire@{WireOut}{}(\oenodeRefB{})
+ \fi\fi
+ \fi
}%
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\POE@drawInternalConnectionsNew}
+%
+% \begin{macro}{\POE@InternalConn}
% \begin{macrocode}
-\def\POE@drawInternalConnectionsNew{%
+\def\POE@InternalConn{%
\ifPOE@beam
\ifPOE@endbox
- \drawbeam[raytrace=false]{(\oenodeRefA{})}{}
+ \drawbeam[raytrace=false](\oenodeRefA{}){}
\else\ifPOE@startbox
- \drawbeam[raytrace=false]{}{(\oenodeRefB{})}
+ \drawbeam[raytrace=false]{}(\oenodeRefB{})
\else
- \drawbeam[raytrace=false]{(\oenodeRefA{})}{}{(\oenodeRefB{})}
+ \drawbeam[raytrace=false](\oenodeRefA{}){}(\oenodeRefB{})
\fi\fi
- \else\ifPOE@fiber@
-% \end{macrocode}
-% This is equivalent to the code in \cs{POE@drawPresetFibers}.
-% \begin{macrocode}
- \ifPOE@endbox
- \ifPOE@fiberin@
- \drawfiber@{FiberIn}{(\oenodeRefA{})}{}
- \fi
- \else\ifPOE@startbox
- \ifPOE@fiberout@
- \drawfiber@{FiberOut}{}{(\oenodeRefB{})}
- \fi
- \else
- \ifPOE@fiberin@
- \drawfiber@{FiberIn}{(\oenodeRefA{})}{}
- \fi
- \ifPOE@fiberout@
- \drawfiber@{FiberOut}{}{(\oenodeRefB{})}
- \fi
- \fi\fi
- \fi\fi
-}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\POE@drawInternalConnectionsOld}
-% \begin{macrocode}
-\def\POE@drawInternalConnectionsOld{%
- \ifPOE@endbox
- \@nameuse{\POE@connIn}
\else
- \ifPOE@fiber@
+ \ifPOE@startbox\else
\ifPOE@fiberin@
- \@nameuse{\POE@connIn}
- \fi
+ \drawfiber@{FiberIn}(\oenodeRefA{}){}
+ \else\ifPOE@wirein@
+ \drawwire@{WireIn}(\oenodeRefA{}){}
+ \fi\fi
+ \fi
+ \ifPOE@endbox\else
\ifPOE@fiberout@
- \@nameuse{\POE@connOut}
- \fi
- \else
- \ifPOE@connjoin
- \def\POE@tempa{POE@conn@in@i}%
- \ifx\POE@tempa\POE@connIn
- \def\POE@tempb{POE@conn@out@o}
- \ifx\POE@tempb\POE@connOut
- \pscustom[style=Beam, linejoin=\POE@key@connjoin]{%
- \@nameuse{\POE@connIn}\@nameuse{\POE@connOut}}%
- \else\ifx\@empty\POE@connOut
- \pscustom[style=Beam, linejoin=\POE@key@connjoin]{%
- \@nameuse{\POE@connIn}\@nameuse{\POE@connOut}}%
- \else
- \@nameuse{\POE@connIn}\@nameuse{\POE@connOut}%
- \fi\fi
- \else
- \def\POE@tempa{POE@conn@in@o}%
- \ifx\POE@tempa\POE@connIn
- \def\POE@tempb{POE@conn@out@o}
- \ifx\POE@tempb\POE@connOut
- \@nameuse{\POE@connIn}\@nameuse{\POE@connOut}%
- \else\ifx\@empty\POE@connOut
- \pscustom[style=Beam, linejoin=\POE@key@connjoin]{%
- \@nameuse{\POE@connIn}\@nameuse{\POE@connOut}}%
- \else
- \pscustom[style=Beam, linejoin=\POE@key@connjoin]{%
- \@nameuse{\POE@connIn}\@nameuse{\POE@connOut}}%
- \fi\fi
- \else
- \@nameuse{\POE@connIn}\@nameuse{\POE@connOut}%
- \fi
- \fi
- \else
- \@nameuse{\POE@connIn}\@nameuse{\POE@connOut}%
- \fi
+ \drawfiber@{FiberOut}{}(\oenodeRefB{})
+ \else\ifPOE@wireout@
+ \drawwire@{WireOut}{}(\oenodeRefB{})
+ \fi\fi
\fi
\fi
}%
% \end{macrocode}
% \end{macro}
%
-% \subsection{Old connection code}
-%
-% The old connection code for backward compatibility to version 2.x. As this is
-% obsolete and was broken by design, there is no need to comment on this.
-% \begin{macrocode}
-\def\optexp@nodeA{\oenodeIn{}}%
-\def\optexp@nodeB{\oenodeOut{}}%
-\define@key[psset]{optexp}{connjoin}{%
- \edef\POE@temp{#1}%
- \ifnum\POE@temp<0
- \POE@connjoinfalse
- \else\ifnum\POE@temp>2
- \POE@connjoinfalse
- \else
- \POE@connjointrue
- \edef\POE@key@connjoin{\POE@temp}
- \fi\fi
-}%
-\def\POE@key@conn{}%
-\define@key[psset]{optexp}{conn}{%
- \edef\POE@key@conn{#1}%
- \expandafter\POE@psset@@conn\POE@key@conn\@empty-\@empty\@nil
- \if@pst\else
- \PackageError{pst-optexp}{Bad connection specification: #1}%
- \fi
-}%
-\def\POE@psset@@conn#1-#2\@empty#3\@nil{%
- \@psttrue
- \def\POE@next##1,#1-##2,##3\@nil{\def\POE@temp{##2}}%
- \expandafter\POE@next\POE@conntable,#1-#1,\@nil
- \@ifundefined{POE@conn@in@\POE@temp}%
- {\@pstfalse\def\POE@connIn{}}%
- {\edef\POE@connIn{POE@conn@in@\POE@temp}}%
- \@ifundefined{POE@conn@out@#2}%
- {\@pstfalse\def\POE@connOut{}}%
- {\def\POE@connOut{POE@conn@out@#2}}%
-}%
-\def\POE@connIn{}%
-\def\POE@connOut{}%
-\def\POE@conntable{,o-o,i-i,f-f}%
-\def\POE@conn@out@{\ifPOE@insideobj\else\POE@conn@out@a\fi}%
-\def\POE@conn@in@{\ifPOE@insideobj\else\POE@conn@in@a\fi}%
-\def\POE@conn@in@o{%
- \psline[style=Beam](\oenodeRefA{})(\optexp@nodeA)%
-}%
-\def\POE@conn@out@o{%
- \psline[style=Beam](\optexp@nodeB)(\oenodeRefB{})%
-}%
-\def\POE@conn@in@f{%
- \pccurve[%
- angleA=!\POE@dict{/N@\oenodeRefA{} /N@\oenodeRefB{} SlopeAngle},
- angleB=!\POE@dict{/N@\oenodeRefB{} /N@\oenodeRefA{} SlopeAngle},
- style=FiberIn](\oenodeRefA{})(\optexp@nodeA)%
-}%
-\def\POE@conn@out@f{%
- \pccurve[%
- angleA=!\POE@dict{/N@\oenodeRefA{} /N@\oenodeRefB{} SlopeAngle},
- angleB=!\POE@dict{/N@\oenodeRefB{} /N@\oenodeRefA{} SlopeAngle},
- style=FiberOut](\optexp@nodeB)(\oenodeRefB{})%
-}%
-\def\POE@conn@in@i{%
- \def\pst@par{style=Beam}
- \begin@OpenObj
- \addto@pscode{%
- [%]
- \pst@optexpdict
- (\oenode{}{}) true GetInternalBeamNodesCompat
- /N@\oenodeRefA{} @GetCenter
- end
- }%
- \psline@ii
-}%
-\def\POE@conn@out@i{%
- \def\pst@par{style=Beam}
- \begin@OpenObj
- \addto@pscode{%
- [%]
- \pst@optexpdict
- /N@\oenodeRefB{} @GetCenter
- (\oenode{}{}) true GetInternalBeamNodesCompat
- end
- }%
- \psline@ii
-}%
-\def\POE@conn@in@a{%
- dup xcheck not {
- \POE@dict{1 GetInternalBeamNodeCompat}
- } if
- exec
-}%
-\def\POE@conn@in@A{%
- dup xcheck not {
- false \POE@dict{GetInternalBeamNodesCompat} %
- } if
- exec
-}%
-\def\POE@conn@in@b{%
- dup xcheck not {
- \POE@dict{(N) GetInternalBeamNodeCompat}
- } if
- exec
-}%
-\def\POE@conn@in@B{%
- dup xcheck not {
- true \POE@dict{GetInternalBeamNodesCompat} %
- } if
- exec
-}%
-\let\POE@conn@out@a\POE@conn@in@a
-\let\POE@conn@out@A\POE@conn@in@B
-\let\POE@conn@out@b\POE@conn@in@b
-\let\POE@conn@out@B\POE@conn@in@A
-\def\drawbeam@compat{%
- \ifPOE@connjoin
- \setkeys+[psset]{optexp}{linejoin=\POE@key@connjoin}%
- \fi
- \addto@pscode{[% ]
- \POE@tempd\space
- \@nameuse{\POE@connOut}
- \POE@tempc\space
- \@nameuse{\POE@connIn}}%
- \psline@ii
-\ignorespaces}%
-%
-% \end{macrocode}
-%
-% \section{General purpose macros}
-%
-% \begin{macro}{\defShiftedNode}
-% This is provided only for backward compatibility, and should be replaced by
-% \cs{nodexn}.
-% \begin{macrocode}
-\def\defShiftedNode(#1)(#2)#3{%
- \PackageWarning{pst-optexp}{%
- \string\defShiftedNode\space is deprecated,\MessageBreak
- use \string\nodexn\space(pst-node) instead.}%
- \pst@getcoor{#1}\pst@tempa%
- \pst@getcoor{#2}\pst@tempb%
- \pnode(! \pst@tempb \pst@tempa \POE@dict{VecAdd} \tx@UserCoor){#3}%
-}%
-% \end{macrocode}
-% \end{macro}
-%
% \section{Accessing component nodes}
% \begin{macro}{\POE@checkcompname}
+% Check if a component with name \#1 was already defined.
% \begin{macrocode}
\def\POE@checkcompname#1{%
\@expandtwoargs\in@{,#1,}{,\POE@complist,}%
@@ -13598,6 +15373,7 @@
% \end{macro}
%
% \begin{macro}{\POE@getlastcompname}
+% Get the last component name which was defined.
% \begin{macrocode}
\def\POE@getlastcompname{%
\expandafter\POE@getlastcompname@i \POE@complist,\relax,\@nil
@@ -13607,6 +15383,7 @@
% \end{macro}
%
% \begin{macro}{\oenode}
+% Get the full node name of the node \#1 defined in component \#2.
% \begin{macrocode}
\def\oenode#1#2{%
\POE@str@basicname@prefix%
@@ -13631,79 +15408,100 @@
% \end{macrocode}
% \end{macro}
%
+% Define some special nodes, which should be accessed always via these macros.
+%
% \begin{macro}{\oenodeExt}
-% The external node which is set with \opt{extnode}.
+% The external node which is set with \opt{extnode}.
% \begin{macrocode}
\def\oenodeExt#1{\oenode{\POE@str@extnode@postfix}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeIn}
-% The first (input) node of the component.
+% The first (input) node of the component.
% \begin{macrocode}
\def\oenodeIn#1{\oenode{1}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeOut}
+% The last (output) node of the component
% \begin{macrocode}
\def\oenodeOut#1{\oenode{N}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeCenter}
+% The center node of the component.
% \begin{macrocode}
\def\oenodeCenter#1{\oenode{Center}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeLabel}
+% The transformed label node of the component
% \begin{macrocode}
\def\oenodeLabel#1{\oenode{Label}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeRefA}
+% The first reference node which is used for positioning of the
+% component. For dipoles it is equivalent to the (\#1) node.
% \begin{macrocode}
\def\oenodeRefA#1{\oenode{A}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeRefB}
+% The second reference node, for dipoles it is equivalent to the (\#2)
+% node.
% \begin{macrocode}
\def\oenodeRefB#1{\oenode{B}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeRotref}
+% The rotation reference node.
% \begin{macrocode}
\def\oenodeRotref#1{\oenode{Rotref}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeTrefA}
+% The transformed first reference node, after applying parameters
+% \opt{compshift}, \opt{compoffset} and \opt{angle}.
% \begin{macrocode}
\def\oenodeTrefA#1{\oenode{TrefA}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeTrefB}
+% The transformed second reference node.
% \begin{macrocode}
\def\oenodeTrefB#1{\oenode{TrefB}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenode@RefA}
+% The first reference node, after it was projected on the reflection
+% plane of a tripole, at distance 1 from the center.
% \begin{macrocode}
\def\oenode@RefA#1{\oenode{@A}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenode@RefB}
+% The second referencen node, projected on the reflection plane.
% \begin{macrocode}
\def\oenode@RefB#1{\oenode{@B}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenode@TrefA}
+% The transformed, projected first reference node.
% \begin{macrocode}
\def\oenode@TrefA#1{\oenode{@TrefA}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenode@TrefB}
+% The transformed, projected second reference node.
% \begin{macrocode}
\def\oenode@TrefB#1{\oenode{@TrefB}{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeIfc}
+% The node of the interface no. \#1 of component \#2. Only integer
+% number, N or C are allowed. You should always use this e.g. to
+% access coupler nodes.
% \begin{macrocode}
\def\oenodeIfc#1#2{%
\ifnum9<1#1 %
@@ -13721,6 +15519,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeBeam}
+% The end point of the last beam path which was saved with number \#1
+% (default is 1).
% \begin{macrocode}
\def\oenodeBeam#1{%
\POE@str@basicname@prefix\POE@str@basicname@default Beam%
@@ -13729,6 +15529,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeBeamUp}
+% The upper end point of the last wide beam path saved with number \#1
+% (default is 1).
% \begin{macrocode}
\def\oenodeBeamUp#1{%
\POE@str@basicname@prefix\POE@str@basicname@default BeamUp%
@@ -13737,6 +15539,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\oenodeBeamLow}
+% The lower end point of the last wide beam path saved with number \#1
+% (default is 1).
% \begin{macrocode}
\def\oenodeBeamLow#1{%
\POE@str@basicname@prefix\POE@str@basicname@default BeamLow%
@@ -13745,6 +15549,10 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\POE@beamvec}
+% Generic macro to load the Postscript coordinates of the direction
+% vector of the last beam segment (upper, lower, single, specified
+% with \#1) saved with number \#2.
% \begin{macrocode}
\def\POE@beamvec#1#2{%
\POE@dict{%
@@ -13756,8 +15564,12 @@
\def\oeBeamVecUp#1{\POE@beamvec{Up}{#1}}%
\def\oeBeamVecLow#1{\POE@beamvec{Low}{#1}}%
% \end{macrocode}
+% \end{macro}
+%
% \section{Components}
%
+% \begin{macro}{\POE@useifccode}
+% \begin{macro}{\begin@CompIfc}
% \begin{macrocode}
\def\POE@useifccode{%
\POE@Verb{%
@@ -13785,6 +15597,8 @@
\ignorespaces
}%
% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\newOptexpComp@}
% \begin{macrocode}
\def\newOptexpComp@#1#2{%
@@ -13816,7 +15630,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\newOptexpComp@}
+% \begin{macro}{\newOptexpFiberComp}
% \begin{macrocode}
\def\newOptexpFiberComp#1{%
\POE@Verb{%
@@ -13828,6 +15642,13 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{newOptexpElecComp}
+% This may change at later times.
+% \begin{macrocode}
+\let\newOptexpElecComp\newOptexpFiberComp
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\POE@compalias}
% Components which have a \opt{compname} assigned, must also be available by
% their component number. Here, all necessary informations (nodes, component
@@ -13930,11 +15751,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\begin@OptexpFiberObj}
-% \begin{macrocode}
-\let\begin@OptexpFiberObj\begin@OptexpObj
-% \end{macrocode}
-% \end{macro}
% \begin{macro}{\begin@OptexpTripole}
% \begin{macrocode}
\let\POE@disablepos\relax
@@ -14032,16 +15848,7 @@
}%
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\newOptexpDipoleNolabel}
-% \begin{macrocode}
-\def\newOptexpDipoleNolabel{%
- \PackageWarning{pst-optexp}{%
- \string\newOptexpDipoleNolabel\space is deprecated,\MessageBreak
- use \string\newOptexpDipole\space instead.}%
- \newOptexpDipole
-}%
-% \end{macrocode}
-% \end{macro}
+%
% \begin{macro}{\newOptexpTripole}
% \begin{macrocode}
\def\newOptexpTripole{%
@@ -14058,33 +15865,40 @@
}%
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\POE@newdipole}
% \begin{macrocode}
-\def\POE@newdipole[#1]#2#3{%
+\def\POE@newdipole[#1]#2{%
+ \@ifnextchar\bgroup
+ {\POE@newdipole@i[#1]{#2}}{\POE@newdipole@i[#1]{#2}{}}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\POE@newdipole@i}
+% \begin{macrocode}
+\def\POE@newdipole@i[#1]#2#3{%
\@ifundefined{#2@i}{%
\@namedef{#2}{\pst@object{#2}}%
\expandafter\def\csname #2@i\endcsname(##1)(##2){%
\@ifnextchar\bgroup%
- {\@nameuse{#2@i@}(##1)(##2)}%
- {\@nameuse{#2@i@}(##1)(##2){}}%
+ {\@nameuse{#2@ii}(##1)(##2)}%
+ {\@nameuse{#2@ii}(##1)(##2){}}%
}%
- \expandafter\def\csname #2@i@\endcsname(##1)(##2)##3{%
+ \expandafter\def\csname #2@ii\endcsname(##1)(##2)##3{%
\addbefore@par{#3}%
\addafter@par{#1}%
\begin@OptexpObj
\ifPOE@backlayer
\POE@regNodes{##1}{##2}
- \POE@extnodealign
\fi
- \POE@drawcomponent[#2]{##3}{\@nameuse{#2@ii}}
+ \POE@drawcomponent{#2}{##3}
\ifPOE@backlayer
\POE@Verb{ (1) (N) (\oenode{}{}) CorrectDipoleIfc }%
- \POE@drawInternalConnections
+ \@ifundefined{#2@conn}{\POE@InternalConn}{\@nameuse{#2@conn}}%
\fi
\end@OptexpDipole
}%
- \dipole@iimacro{#2}%
+ \@ifundefined{#2@nodes}{\expandafter\def\csname #2@nodes\endcsname{\POE@dipole@nodes}}{}%
}{%
\PackageError{pst-optexp}{%
dipole component '#2' already defined}%
@@ -14095,32 +15909,37 @@
%
% \begin{macro}{\POE@newfiberdipole}
% \begin{macrocode}
-\def\POE@newfiberdipole[#1]#2#3{%
+\def\POE@newfiberdipole[#1]#2{%
+ \@ifnextchar\bgroup
+ {\POE@newfiberdipole@i[#1]{#2}}{\POE@newfiberdipole@i[#1]{#2}{}}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\POE@newfiberdipole@i}
+% \begin{macrocode}
+\def\POE@newfiberdipole@i[#1]#2#3{%
\@ifundefined{#2@i}{%
\@namedef{#2}{\pst@object{#2}}%
\expandafter\def\csname #2@i\endcsname(##1)(##2){%
\@ifnextchar\bgroup%
- {\@nameuse{#2@i@}(##1)(##2)}%
- {\@nameuse{#2@i@}(##1)(##2){}}%
+ {\@nameuse{#2@ii}(##1)(##2)}%
+ {\@nameuse{#2@ii}(##1)(##2){}}%
}%
- \expandafter\def\csname #2@i@\endcsname(##1)(##2)##3{%
+ \expandafter\def\csname #2@ii\endcsname(##1)(##2)##3{%
\addbefore@par{#3}%
\addafter@par{#1}%
- \begin@OptexpFiberObj
+ \begin@OptexpObj
\ifPOE@backlayer
\POE@regNodes{##1}{##2}
- \POE@extnodealign
\fi
- \POE@drawcomponent[#2]{##3}{\@nameuse{#2@ii}}
+ \POE@drawcomponent{#2}{##3}
\ifPOE@backlayer
\POE@Verb{ (1) (N) (\oenode{}{}) CorrectDipoleIfc }%
- \ifPOE@fiberpreset@
- \POE@drawPresetFibers
- \fi
+ \POE@PresetFiberConn
\fi
\end@OptexpDipole
}%
- \fiberdipole@iimacro{#2}%
+ \@ifundefined{#2@nodes}{\expandafter\def\csname #2@nodes\endcsname{\POE@fiberdipole@nodes}}{}%
}{%
\PackageError{pst-optexp}{%
fiber dipole object '#2' already defined}%
@@ -14128,18 +15947,25 @@
\ignorespaces}%
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\POE@newtripole}
-% Equivalent to \cs{POE@newdipole} for tripole objects.
% \begin{macrocode}
-\def\POE@newtripole[#1]#2#3{%
+\def\POE@newtripole[#1]#2{%
+ \@ifnextchar\bgroup
+ {\POE@newtripole@i[#1]{#2}}{\POE@newtripole@i[#1]{#2}{}}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\POE@newtripole@i}
+% \begin{macrocode}
+\def\POE@newtripole@i[#1]#2#3{%
\@ifundefined{#2@i}{%
\@namedef{#2}{\pst@object{#2}}%
\expandafter\def\csname #2@i\endcsname(##1)(##2)(##3){%
- \@ifnextchar\bgroup{\@nameuse{#2@i@}(##1)(##2)(##3)}%
- {\@nameuse{#2@i@}(##1)(##2)(##3){}}%
+ \@ifnextchar\bgroup{\@nameuse{#2@ii}(##1)(##2)(##3)}%
+ {\@nameuse{#2@ii}(##1)(##2)(##3){}}%
}%
- \expandafter\def\csname #2@i@\endcsname(##1)(##2)(##3)##4{%
+ \expandafter\def\csname #2@ii\endcsname(##1)(##2)(##3)##4{%
\addbefore@par{#3}%
\addafter@par{ref@angle=180,#1}%
\begin@OptexpTripole
@@ -14147,13 +15973,13 @@
\POE@calcNodes{##1}{##2}{##3}%
\POE@regNodes{##1}{##3}%
\fi
- \POE@drawcomponent[#2]{##4}{\@nameuse{#2@ii}}
+ \POE@drawcomponent{#2}{##4}
\ifPOE@backlayer
- \POE@drawInternalConnections
+ \POE@InternalConn
\fi
\end@OptexpTripole
}%
- \tripole@iimacro{#2}%
+ \@ifundefined{#2@nodes}{\expandafter\def\csname #2@nodes\endcsname{\POE@tripole@nodes}}{}%
}{%
\PackageError{pst-optexp}{%
tripole object '#2' already defined}%
@@ -14161,70 +15987,22 @@
\ignorespaces}%
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\dipole@iimacro}
-% \begin{macrocode}
-\def\dipole@iimacro#1{%
- \POE@iimacro{#1}{\dipole@nodes}%
-\ignorespaces}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\fiberdipole@iimacro}
-% \begin{macrocode}
-\def\fiberdipole@iimacro#1{%
- \POE@iimacro{#1}{\fiberdipole@nodes}%
-\ignorespaces}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\tripole@iimacro}
-% \begin{macrocode}
-\def\tripole@iimacro#1{%
- \POE@iimacro{#1}{\tripole@nodes}%
-\ignorespaces}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\POE@iimacro}
-% \begin{macrocode}
-\def\POE@iimacro#1#2{%
- \@namedef{#1@ii}{%
- \ifPOE@backlayer
- \pnode(0,0){\oenodeCenter{}}%
- \fi
- \@ifundefined{#1@iii}{%
- \ifPOE@backlayer
- \@ifundefined{#1@nodes}{#2}{\@nameuse{#1@nodes}}%
- \fi
- \ifPOE@frontlayer
- \@nameuse{#1@comp}%
- \fi
- }{%
- \ifPOE@backlayer
- \PackageWarning{pst-optexp}{%
- Using #1@iii, please switch to the new\MessageBreak
- interface system.}%
- \@nameuse{#1@iii}%
- \fi
- }%
- }%
-\ignorespaces}%
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\POE@newfiberquadrupole}
+% \begin{macro}{\optcoupler}
% \begin{macrocode}
\def\optcoupler{\pst@object{optcoupler}}%
\def\optcoupler@i(#1)(#2){%
\@ifnextchar(%)
- {\optcoupler@@i@(#1)(#2)}%
- {\optcoupler@@i@(#1)(#1)(#2)(#2)}%
+ {\optcoupler@ii(#1)(#2)}%
+ {\optcoupler@ii(#1)(#1)(#2)(#2)}%
}%
-\def\optcoupler@@i@(#1)(#2)(#3)(#4){%
+\def\optcoupler@ii(#1)(#2)(#3)(#4){%
\@ifnextchar\bgroup%
- {\optcoupler@i@(#1)(#2)(#3)(#4)}%
- {\optcoupler@i@(#1)(#2)(#3)(#4){}}%
+ {\optcoupler@iii(#1)(#2)(#3)(#4)}%
+ {\optcoupler@iii(#1)(#2)(#3)(#4){}}%
}%
-\def\optcoupler@i@(#1)(#2)(#3)(#4)#5{%
- \begin@OptexpFiberObj
+\def\optcoupler@iii(#1)(#2)(#3)(#4)#5{%
+ \begin@OptexpObj
\ifPOE@backlayer
\ifx\POE@key@coupleralign\POE@str@top
\pnode(#1){\oenodeRefA{}}
@@ -14245,38 +16023,31 @@
\tx@UserCoor){\oenodeRefB{}}
\fi\fi
\fi
- \POE@drawcomponent[optcoupler]{#5}{\@nameuse{optcoupler@ii}}
+ \POE@drawcomponent{optcoupler}{#5}
\ifPOE@backlayer
\POE@Verb{%
(1) (3) (\oenode{}{}) CorrectDipoleIfc
(2) (N) (\oenode{}{}) CorrectDipoleIfc
}%
- \ifPOE@fiberpreset@
- \ifPOE@fiberpresetin@
- \ifPOE@fiberpresetin@top
- \drawfiber@{FiberIn1}[stopnode=1]{(#1)}%
- {\POE@key@compname}
- \fi
- \ifPOE@fiberpresetin@bottom
- \drawfiber@{FiberIn2}[stopnode=2]{(#2)}%
- {\POE@key@compname}
- \fi
+ \ifPOE@fiberpresetin@
+ \ifPOE@fiberpresetin@top
+ \drawfiber@{FiberIn1}[stopnode=1](#1){}
\fi
- \ifPOE@fiberpresetout@
- \ifPOE@fiberpresetout@top
- \drawfiber@{FiberOut1}[startnode=3]{\POE@key@compname}%
- {(#3)}
- \fi
- \ifPOE@fiberpresetout@bottom
- \drawfiber@{FiberOut2}[startnode=N]{\POE@key@compname}%
- {(#4)}
- \fi
+ \ifPOE@fiberpresetin@bottom
+ \drawfiber@{FiberIn2}[stopnode=2](#2){}
+ \fi
+ \fi
+ \ifPOE@fiberpresetout@
+ \ifPOE@fiberpresetout@top
+ \drawfiber@{FiberOut1}[startnode=3]{}(#3)
+ \fi
+ \ifPOE@fiberpresetout@bottom
+ \drawfiber@{FiberOut2}[startnode=N]{}(#4)
\fi
\fi
\fi
\end@OptexpObj
}%
-\fiberdipole@iimacro{optcoupler}%
% \end{macrocode}
% \end{macro}
%
@@ -14286,16 +16057,16 @@
\def\wdmsplitter{\pst@object{wdmsplitter}}%
\def\wdmsplitter@i(#1)(#2){%
\@ifnextchar(%)
- {\wdmsplitter@@i@(#1)(#2)}%
- {\wdmsplitter@@i@(#1)(#2)(#2)}%
+ {\wdmsplitter@ii(#1)(#2)}%
+ {\wdmsplitter@ii(#1)(#2)(#2)}%
}%
-\def\wdmsplitter@@i@(#1)(#2)(#3){%
+\def\wdmsplitter@ii(#1)(#2)(#3){%
\@ifnextchar\bgroup%
- {\wdmsplitter@i@(#1)(#2)(#3)}%
- {\wdmsplitter@i@(#1)(#2)(#3){}}%
+ {\wdmsplitter@iii(#1)(#2)(#3)}%
+ {\wdmsplitter@iii(#1)(#2)(#3){}}%
}%
-\def\wdmsplitter@i@(#1)(#2)(#3)#4{%
- \begin@OptexpFiberObj
+\def\wdmsplitter@iii(#1)(#2)(#3)#4{%
+ \begin@OptexpObj
\ifPOE@backlayer
\pnode(#1){\oenodeRefA{}}
\ifx\POE@key@coupleralign\POE@str@top
@@ -14310,31 +16081,26 @@
\tx@UserCoor){\oenodeRefB{}}
\fi\fi
\fi
- \POE@drawcomponent[wdmsplitter]{#4}\wdmsplitter@ii
+ \POE@drawcomponent{wdmsplitter}{#4}
\ifPOE@backlayer
\POE@Verb{%
(1) (2) (\oenode{}{}) CorrectDipoleIfc
(1) (N) (\oenode{}{}) CorrectDipoleIfc
}%
- \ifPOE@fiberpreset@
- \ifPOE@fiberpresetin@
- \drawfiber@{FiberIn}[stopnode=1]{(#1)}{\POE@key@compname}
+ \ifPOE@fiberpresetin@
+ \drawfiber@{FiberIn}[stopnode=1](#1){}
+ \fi
+ \ifPOE@fiberpresetout@
+ \ifPOE@fiberpresetout@top
+ \drawfiber@{FiberOut1}[startnode=2]{}(#2)
\fi
- \ifPOE@fiberpresetout@
- \ifPOE@fiberpresetout@top
- \drawfiber@{FiberOut1}[startnode=2]%
- {\POE@key@compname}{(#2)}
- \fi
- \ifPOE@fiberpresetout@bottom
- \drawfiber@{FiberOut2}[startnode=N]%
- {\POE@key@compname}{(#3)}
- \fi
+ \ifPOE@fiberpresetout@bottom
+ \drawfiber@{FiberOut2}[startnode=N]{}(#3)
\fi
\fi
\fi
\end@OptexpObj
}%
-\fiberdipole@iimacro{wdmsplitter}%
% \end{macrocode}
% \end{macro}
%
@@ -14343,16 +16109,16 @@
\def\wdmcoupler{\pst@object{wdmcoupler}}%
\def\wdmcoupler@i(#1)(#2){%
\@ifnextchar(%)
- {\wdmcoupler@@i@(#1)(#2)}%
- {\wdmcoupler@@i@(#1)(#1)(#2)}%
+ {\wdmcoupler@ii(#1)(#2)}%
+ {\wdmcoupler@ii(#1)(#1)(#2)}%
}%
-\def\wdmcoupler@@i@(#1)(#2)(#3){%
+\def\wdmcoupler@ii(#1)(#2)(#3){%
\@ifnextchar\bgroup%
- {\wdmcoupler@i@(#1)(#2)(#3)}%
- {\wdmcoupler@i@(#1)(#2)(#3){}}%
+ {\wdmcoupler@iii(#1)(#2)(#3)}%
+ {\wdmcoupler@iii(#1)(#2)(#3){}}%
}%
-\def\wdmcoupler@i@(#1)(#2)(#3)#4{%
- \begin@OptexpFiberObj
+\def\wdmcoupler@iii(#1)(#2)(#3)#4{%
+ \begin@OptexpObj
\ifPOE@backlayer
\pnode(#3){\oenodeRefB{}}
\ifx\POE@key@coupleralign\POE@str@top
@@ -14367,29 +16133,26 @@
\tx@UserCoor){\oenodeRefA{}}
\fi\fi
\fi
- \POE@drawcomponent[wdmcoupler]{#4}\wdmcoupler@ii
+ \POE@drawcomponent{wdmcoupler}{#4}
\ifPOE@backlayer
\POE@Verb{%
(1) (N) (\oenode{}{}) CorrectDipoleIfc
(2) (N) (\oenode{}{}) CorrectDipoleIfc
}%
- \ifPOE@fiberpreset@
- \ifPOE@fiberpresetout@
- \drawfiber@{FiberOut}[startnode=N]{\POE@key@compname}{(#3)}
- \fi
- \ifPOE@fiberpresetin@
- \ifPOE@fiberpresetin@top
- \drawfiber@{FiberIn1}[stopnode=1]{(#1)}{\POE@key@compname}
- \fi
- \ifPOE@fiberpresetin@bottom
- \drawfiber@{FiberIn2}[stopnode=2]{(#2)}{\POE@key@compname}
- \fi
+ \ifPOE@fiberpresetout@
+ \drawfiber@{FiberOut}[startnode=N]{}(#3)
+ \fi
+ \ifPOE@fiberpresetin@
+ \ifPOE@fiberpresetin@top
+ \drawfiber@{FiberIn1}[stopnode=1](#1){}
+ \fi
+ \ifPOE@fiberpresetin@bottom
+ \drawfiber@{FiberIn2}[stopnode=2](#2){}
\fi
\fi
\fi
\end@OptexpObj
}%
-\fiberdipole@iimacro{wdmcoupler}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\optcirculator}
@@ -14397,72 +16160,70 @@
\def\optcirculator{\pst@object{optcirculator}}%
\def\optcirculator@i(#1)(#2)(#3){%
\@ifnextchar\bgroup%
- {\optcirculator@i@(#1)(#2)(#3)}%
- {\optcirculator@i@(#1)(#2)(#3){}}%
+ {\optcirculator@ii(#1)(#2)(#3)}%
+ {\optcirculator@ii(#1)(#2)(#3){}}%
}%
-\def\optcirculator@i@(#1)(#2)(#3)#4{%
- \addafter@par{ref@angle=180}%
- \begin@OptexpFiberObj
- \ifPOE@backlayer
- \POE@regNodes{#1}{#2}
- \ifx\POE@key@position\@empty
- \ifx\POE@key@abspos\@empty
- \POE@positionrefnodes
- \pst@getcoor{#1}\POE@tempa%
- \pst@getcoor{#2}\POE@tempc%
- \pst@getcoor{#3}\POE@tempb%
- \pnode(! \POE@dict{%
- \POE@tempa \tx@UserCoor 2 copy 2 copy
- \POE@tempc \tx@UserCoor 4 2 roll @ABVect
- 2 copy 2 copy 10 4 roll
- \POE@tempb \tx@UserCoor 6 -2 roll @ABVect
- 4 2 roll tx@EcldDict begin Project end VecAdd
- 2 copy 6 -2 roll -0.5 VecScale VecAdd
- }){\oenode@RefA{}}%
- \pnode(! \POE@dict{4 2 roll 0.5 VecScale VecAdd})%
- {\oenode@RefB{}}%
- \fi
+\def\POE@calcCircRefNodes#1#2#3{%
+\ifPOE@backlayer
+ \POE@regNodes{#1}{#2}
+ \ifx\POE@key@position\@empty
+ \ifx\POE@key@abspos\@empty
+ \POE@positionrefnodes
+ \pst@getcoor{#1}\POE@tempa%
+ \pst@getcoor{#2}\POE@tempc%
+ \pst@getcoor{#3}\POE@tempb%
+ \pnode(! \POE@dict{%
+ \POE@tempa \tx@UserCoor 2 copy 2 copy
+ \POE@tempc \tx@UserCoor 4 2 roll @ABVect
+ 2 copy 2 copy 10 4 roll
+ \POE@tempb \tx@UserCoor 6 -2 roll @ABVect
+ 4 2 roll tx@EcldDict begin Project end VecAdd
+ 2 copy 6 -2 roll -0.5 VecScale VecAdd
+ }){\oenode@RefA{}}%
+ \pnode(! \POE@dict{4 2 roll 0.5 VecScale VecAdd})%
+ {\oenode@RefB{}}%
\fi
\fi
- \POE@drawcomponent[optcirculator]{#4}\optcirculator@ii
+ \fi
+}%
+\def\optcirculator@ii(#1)(#2)(#3)#4{%
+ \addafter@par{ref@angle=180}%
+ \begin@OptexpObj
+ \POE@calcCircRefNodes{#1}{#2}{#3}%
+ \POE@drawcomponent{optcirculator}{#4}
\ifPOE@backlayer
- \ifPOE@fiberpreset@
- \ifPOE@fiberpresetin@top
- \drawfiber@{FiberIn}[stopnode=1]{(#1)}{\POE@key@compname}
+ \ifPOE@fiberpresetin@top
+ \drawfiber@{FiberIn}[stopnode=1](#1){}
+ \fi
+ \ifPOE@fiberpresetout@
+ \ifPOE@fiberpresetout@top
+ \drawfiber@{FiberOut1}[startnode=N]{}(#2)
\fi
- \ifPOE@fiberpresetout@
- \ifPOE@fiberpresetout@top
- \drawfiber@{FiberOut1}[startnode=N]%
- {\POE@key@compname}{(#2)}
- \fi
- \ifPOE@fiberpresetout@bottom
- \drawfiber@{FiberOut2}[startnode=2, fiberalign=center]%
- {\POE@key@compname}{(#3)}
- \fi
+ \ifPOE@fiberpresetout@bottom
+ \drawfiber@{FiberOut2}[startnode=2, fiberalign=center]{}(#3)
\fi
\fi
\fi
\end@OptexpObj
}%
-\fiberdipole@iimacro{optcirculator}%
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\optcirculator}
+% \begin{macro}{\fiberbox}
% \begin{macrocode}
\def\fiberbox{\pst@object{fiberbox}}%
\def\fiberbox@i(#1)(#2){%
\@ifnextchar(%)
- {\fiberbox@@i@(#1)(#2)}%
- {\fiberbox@@i@(#1)(#2)()()}%
+ {\fiberbox@ii(#1)(#2)}%
+ {\fiberbox@ii(#1)(#2)()()}%
}%
-\def\fiberbox@@i@(#1)(#2)(#3)(#4){%
+\def\fiberbox@ii(#1)(#2)(#3)(#4){%
\@ifnextchar\bgroup%
- {\fiberbox@i@(#1)(#2)(#3)(#4)}%
- {\fiberbox@i@(#1)(#2)(#3)(#4){}}%
+ {\fiberbox@iii(#1)(#2)(#3)(#4)}%
+ {\fiberbox@iii(#1)(#2)(#3)(#4){}}%
}%
-\def\fiberbox@i@(#1)(#2)(#3)(#4)#5{%
- \begin@OptexpFiberObj
+\def\fiberbox@iii(#1)(#2)(#3)(#4)#5{%
+ \begin@OptexpObj
\ifnum\POE@key@fiberboxcountin=1
\ifnum\POE@key@fiberboxcountout=1
\ifdim\POE@key@fiberboxheight pt=0pt
@@ -14502,52 +16263,55 @@
}%
\fi
\fi
- \POE@drawcomponent[fiberbox]{#5}\fiberbox@ii
+ \POE@drawcomponent{fiberbox}{#5}
\ifPOE@backlayer
\ifx\\#3#4\\%
% \end{macrocode}
% Connect only, if the fiberbox has a single related interface node.
% \begin{macrocode}
- \ifPOE@fiberpreset@
- \ifnum\POE@key@fiberboxcountin=1
- \ifPOE@fiberpresetin@
- \drawfiber@{FiberIn}{(#1)}{\POE@key@compname}
- \fi
- \fi
- \ifnum\POE@key@fiberboxcountout=1
- \ifPOE@fiberpresetout@
- \drawfiber@{FiberOut}{\POE@key@compname}{(#2)}
- \fi
- \fi
+ \ifnum\POE@key@fiberboxcountin=1
+ \ifPOE@fiberpresetin@
+ \drawfiber@{FiberIn}(#1){}
+ \else\ifPOE@wirein@
+ \drawwire@{WireIn}(#1){}
+ \fi\fi
+ \fi
+ \ifnum\POE@key@fiberboxcountout=1
+ \ifPOE@fiberpresetout@
+ \drawfiber@{FiberOut}{}(#2)
+ \else\ifPOE@wireout@
+ \drawwire@{WireOut}{}(#2)
+ \fi\fi
\fi
\else
% \end{macrocode}
-% If four nodes are specified, connect all of them with the respective interface
+% If four reference nodes are specified, connect all of them with the respective interface
% nodes they are aligned to.
% \begin{macrocode}
- \ifPOE@fiberpreset@
- \ifPOE@fiberpresetin@
- \ifPOE@fiberpresetin@top
- \drawfiber@{FiberIn1}{(#1)}{\POE@key@compname}
- \fi
- \ifPOE@fiberpresetin@bottom
- \drawfiber@{FiberIn2}{(#2)}{\POE@key@compname}
- \fi
- \fi
- \ifPOE@fiberpresetout@
- \ifPOE@fiberpresetout@top
- \drawfiber@{FiberOut1}{\POE@key@compname}{(#3)}
- \fi
- \ifPOE@fiberpresetout@bottom
- \drawfiber@{FiberOut2}{\POE@key@compname}{(#4)}
- \fi
- \fi
- \fi
+ \ifPOE@fiberpresetin@top
+ \drawfiber@{FiberIn1}(#1){}
+ \else\ifPOE@wirein@top
+ \drawwire@{WireIn1}(#1){}
+ \fi\fi
+ \ifPOE@fiberpresetin@bottom
+ \drawfiber@{FiberIn2}(#2){}
+ \else\ifPOE@wirein@bottom
+ \drawwire@{WireIn2}(#2){}
+ \fi\fi
+ \ifPOE@fiberpresetout@top
+ \drawfiber@{FiberOut1}{}(#3)
+ \else\ifPOE@wireout@top
+ \drawwire@{WireOut1}{}(#3)
+ \fi\fi
+ \ifPOE@fiberpresetout@bottom
+ \drawfiber@{FiberOut2}{}(#4)
+ \else\ifPOE@wireout@bottom
+ \drawwire@{WireOut2}{}(#4)
+ \fi\fi
\fi
\fi
\end@OptexpObj
}%
-\fiberdipole@iimacro{fiberbox}%
% \end{macrocode}
% \end{macro}
%
@@ -14593,17 +16357,16 @@
\POE@Verb{%
/@xref \POE@key@extnode@xref\space def
/@yref \POE@key@extnode@yref\space def
+ /@@ang
+ \ifx\POE@key@innercompalign\POE@str@absolute
+ /N@\POE@refnodeA\space /N@\POE@refnodeB\space SlopeAngle
+ \else
+ 0
+ \fi def
}%
-\ignorespaces}%
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\POE@extnodealign}
-% \begin{macrocode}
-\def\POE@extnodealign{%
\ifx\POE@key@extnodealign\POE@str@absolute
\POE@Verb{%
- /N@\oenodeRefA{} @GetCenter /N@\oenodeRefB{} @GetCenter
+ /N@\POE@refnodeA\space @GetCenter /N@\POE@refnodeB\space @GetCenter
@ABVect exch
dup 0 gt 3 1 roll 0 eq exch 0 lt and or
{ /RefFac -1 def } if
@@ -14728,7 +16491,7 @@
% \end{macrocode}
% Place the correct 'global' label node when the label is empty.
% \begin{macrocode}
- \ifx\POE@key@labelref\POE@str@labelref@global
+ \ifx\POE@key@labelref\POE@str@global
\nput[labelsep=\POE@key@labeloffset]%
{\POE@key@labelangle}%
{\oenodeCenter{}}%
@@ -14739,7 +16502,7 @@
% For \opt{global} positioning, the label is placed in global coordinate system
% with respect to the center node.
% \begin{macrocode}
- \ifx\POE@key@labelref\POE@str@labelref@global
+ \ifx\POE@key@labelref\POE@str@global
\nput[labelsep=\POE@key@labeloffset]%
{\POE@key@labelangle}%
{\oenodeCenter{}}%
@@ -14749,7 +16512,7 @@
% Rotate the label node together with the component, but do not rotate the label
% text itself.
% \begin{macrocode}
- \else\ifx\POE@key@labelref\POE@str@labelref@relgrav
+ \else\ifx\POE@key@labelref\POE@str@relgrav
\rput[\POE@key@labelalign](\oenodeLabel{}){%
\POE@key@labelstyle\oelabel{#1}}%
% \end{macrocode}
@@ -14799,33 +16562,33 @@
%
% Define all free-ray dipoles
% \begin{macrocode}
-\newOptexpDipole{lens}{}%
-\newOptexpDipole{pinhole}{}%
-\newOptexpDipole{crystal}{}%
-\newOptexpDipole{polarization}{}%
-\newOptexpDipole{optbox}{}%
-\newOptexpDipole{optplate}{}%
-\newOptexpDipole{optretplate}{}%
-\newOptexpDipole[endbox]{optdetector}{}%
-\newOptexpDipole{optdiode}{allowbeaminside=false}%
-\newOptexpDipole{doveprism}{}%
-\newOptexpDipole{glanthompson}{}%
+\newOptexpDipole{lens}
+\newOptexpDipole{pinhole}
+\newOptexpDipole{crystal}
+\newOptexpDipole{polarization}
+\newOptexpDipole{optbox}
+\newOptexpDipole{optplate}
+\newOptexpDipole{optretplate}
+\newOptexpDipole{optdetector}{position=end}
+\newOptexpDipole{optdiode}{allowbeaminside=false}
+\newOptexpDipole{doveprism}
+\newOptexpDipole{glanthompson}
% \end{macrocode}
%
% Define all free-ray tripoles
% \begin{macrocode}
-\newOptexpTripole{mirror}{}%
-\newOptexpTripole[ref@angle=-135]{beamsplitter}{}%
-\newOptexpTripole{optgrating}{}%
+\newOptexpTripole{mirror}
+\newOptexpTripole[ref@angle=-135]{beamsplitter}
+\newOptexpTripole{optgrating}
\def\optgrid{%
\PackageWarning{pst-optexp}{%
\string\optgrid\space is deprecated,\MessageBreak
use \string\optgrating\space instead.}%
\optgrating%
}%
-\newOptexpTripole[ref@angle=-135]{pentaprism}{}%
-\newOptexpTripole[ref@angle=-135]{rightangleprism}{}%
-\newOptexpTripole[ref@angle=-135]{optprism}{}%
+\newOptexpTripole[ref@angle=-135]{pentaprism}
+\newOptexpTripole[ref@angle=-135]{rightangleprism}
+\newOptexpTripole[ref@angle=-135]{optprism}
% \end{macrocode}
%
% \begin{macro}{\optdipole}
@@ -14833,29 +16596,23 @@
\def\optdipole{\pst@object{optdipole}}
\def\optdipole@i(#1)(#2)#3{%
\@ifnextchar\bgroup%
- {\optdipole@i@(#1)(#2){#3}}%
- {\optdipole@i@(#1)(#2){#3}{}}%
+ {\optdipole@ii(#1)(#2){#3}}%
+ {\optdipole@ii(#1)(#2){#3}{}}%
}%
-\def\optdipole@i@(#1)(#2)#3#4{%
+\def\optdipole@ii(#1)(#2)#3#4{%
+ \addbefore@par{innercompalign=relative}%
\begin@OptexpObj
\ifPOE@backlayer
\POE@regNodes{#1}{#2}
- \POE@extnodealign
\fi
- \POE@drawcomponent[optdipole]{#4}{%
- \ifPOE@backlayer
- \pnode(!\POE@dict{@@x0 @@y0}){\oenodeCenter{}}%
- \dipole@nodes
- \fi
- \ifPOE@frontlayer
- #3
- \fi
- }%
+ \def\optdipole@comp{\psrotate(0,0){!\POE@dict{@@ang}}{#3}}%
+ \POE@drawcomponent{optdipole}{#4}
\ifPOE@backlayer
- \POE@drawInternalConnections
+ \POE@InternalConn
\fi
\end@OptexpObj
}%
+\def\optdipole@nodes{\POE@dipole@nodes}
% \end{macrocode}
% \end{macro}
%
@@ -14875,29 +16632,24 @@
\def\opttripole{\pst@object{opttripole}}
\def\opttripole@i(#1)(#2)(#3)#4{%
\@ifnextchar\bgroup%
- {\opttripole@i@(#1)(#2)(#3){#4}}%
- {\opttripole@i@(#1)(#2)(#3){#4}{}}%
+ {\opttripole@ii(#1)(#2)(#3){#4}}%
+ {\opttripole@ii(#1)(#2)(#3){#4}{}}%
}%
-\def\opttripole@i@(#1)(#2)(#3)#4#5{%
+\def\opttripole@ii(#1)(#2)(#3)#4#5{%
\addafter@par{ref@angle=180}
\begin@OptexpTripole
\ifPOE@backlayer
\POE@calcNodes{#1}{#2}{#3}%
\POE@regNodes{#1}{#3}%
\fi
- \POE@drawcomponent{#5}{%
- \ifPOE@backlayer
- \tripole@nodes
- \fi
- \ifPOE@frontlayer
- #4
- \fi
- }%
+ \def\opttripole@comp{#4}%
+ \POE@drawcomponent{opttripole}{#5}
\ifPOE@backlayer
- \POE@drawInternalConnections
+ \POE@InternalConn
\fi
\end@OptexpTripole
}%
+\def\opttripole@nodes{\POE@tripole@nodes}
% \end{macrocode}
% \end{macro}
%
@@ -14926,36 +16678,25 @@
}%
\def\fibercollimator@v#1{%
\addbefore@par{allowbeaminside=false}%
- \begin@OptexpFiberObj
+ \begin@OptexpObj
\ifPOE@backlayer
\POE@regNodes{\POE@tempa}{\POE@tempb}%
- \POE@extnodealign
\fi
- \POE@drawcomponent[fibercollimator]{#1}{%
- \pnode(0,0){\oenodeCenter{}}%
- \ifPOE@backlayer
- \fibercollimator@nodes
- \fi
- \ifPOE@frontlayer
- \fibercollimator@comp
- \fi
- }%
+ \POE@drawcomponent{fibercollimator}{#1}
\ifPOE@backlayer
\ifPOE@beam
- \drawbeam{(\oenodeRefA{})}{\POE@key@compname}
+ \drawbeam(\oenodeRefA{}){}
\fi
- \ifPOE@fiberpreset@
- \ifPOE@fiberpresetout@
- \ifx\@empty\POE@tempc
- \drawfiber{\POE@key@compname}{(\oenodeRefB{})}
- \else\ifx\@empty\POE@tempd
- \psbezier[style=FiberOut](\oenodeOut{})(\POE@tempb)%
- (\POE@tempb)(\POE@tempc)%
- \else
- \psbezier[style=FiberOut](\oenodeOut{})(\POE@tempb)%
- (\POE@tempc)(\POE@tempd)%
- \fi\fi
- \fi
+ \ifPOE@fiberpresetout@
+ \ifx\@empty\POE@tempc
+ \drawfiber{}(\oenodeRefB{})
+ \else\ifx\@empty\POE@tempd
+ \psbezier[style=FiberOut](\oenodeOut{})(\POE@tempb)%
+ (\POE@tempb)(\POE@tempc)%
+ \else
+ \psbezier[style=FiberOut](\oenodeOut{})(\POE@tempb)%
+ (\POE@tempc)(\POE@tempd)%
+ \fi\fi
\fi
\fi
\end@OptexpObj
@@ -14966,27 +16707,29 @@
% Define all fiber dipoles
% \begin{macrocode}
\newOptexpFiberDipole{optfiber}{newOptComp={}}
-\newOptexpFiberDipole{optamp}{}
-\newOptexpFiberDipole{optmzm}{}
+\newOptexpFiberDipole{optamp}
+\newOptexpFiberDipole{optmzm}
\newOptexpFiberDipole{optfilter}{allowbeaminside=false}
-\newOptexpFiberDipole{polcontrol}{}
-\newOptexpFiberDipole{optisolator}{}
-\newOptexpFiberDipole{optfiberpolarizer}{}
-\newOptexpFiberDipole{optswitch}{}
-\newOptexpFiberDipole{fiberdelayline}{}
+\newOptexpFiberDipole{polcontrol}
+\newOptexpFiberDipole{optisolator}
+\newOptexpFiberDipole{optfiberpolarizer}
+\newOptexpFiberDipole{optswitch}
+\newOptexpFiberDipole{fiberdelayline}
% \end{macrocode}
%
% \begin{macro}{\POE@drawcomponent}
% This macro is called by every unit
% The first parameter contains the label, the second one the drawing code
% \begin{macrocode}
-\def\POE@drawcomponent{%
- \@ifnextchar[%]
- {\POE@drawcomponent@i}{\POE@drawcomponent@i[]}%
-}%
-\def\POE@drawcomponent@i[#1]#2#3{%
+\def\POE@drawcomponent#1#2{%
\def\POE@comp{%
- #3%
+ \ifPOE@backlayer
+ \pnode(!\POE@dict{@@x0 @@y0}){\oenodeCenter{}}
+ \@nameuse{#1@nodes}
+ \fi
+ \ifPOE@frontlayer
+ \@nameuse{#1@comp}
+ \fi
\ifx\POE@key@extnode\@empty\else
\ifPOE@backlayer
\pnode(! \POE@dict{
@@ -15005,9 +16748,7 @@
\fi
\fi
}%
- \ifx\\#1\\\else
- \@ifundefined{#1@ref}{}{\@nameuse{#1@ref}}%
- \fi
+ \@ifundefined{#1@ref}{}{\@nameuse{#1@ref}}%
\begingroup
\ifPOE@endbox
\psset[optexp]{abspos={%
@@ -15153,41 +16894,51 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\tripole@nodes}
+% \begin{macro}{\POE@tripole@nodes}
% \begin{macrocode}
-\def\tripole@nodes{%
+\def\POE@tripole@nodes{%
\newOptexpComp{{0 0} {1 0} @@x neg @@x refl {PlainIfc} 1}%
- \pnode(! \POE@dict{@@y0 @@x0}){\oenodeCenter{}}
\ignorespaces}%
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\dipole@nodes}
+% \begin{macro}{\POE@dipole@nodes}
% \begin{macrocode}
-\def\dipole@nodes{%
+\def\POE@dipole@nodes{%
\newOptexpComp{%
{@@x0 @@x sub 0} {0 1} @@y0 @@y sub @@y0 @@y add trans {PlainIfc}
@@x 0 eq not {
{@@x0 @@x add 0} {0 1} @@y0 @@y sub @@y0 @@y add trans {PlainIfc}
} if \POE@key@n }%
- \pnode(! \POE@dict{@@x0 @@y0}){\oenodeCenter{}}
\ignorespaces}%
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{fiberdipole@nodes}
+% \begin{macro}{POE@fiberdipole@nodes}
% \begin{macrocode}
-\def\fiberdipole@nodes{%
+\def\POE@fiberdipole@nodes{%
\newOptexpFiberComp{%
{@@x0 @@x sub 0}
@@x 0 eq not {
{@@x0 @@x add 0}
} if }%
- \pnode(! \POE@dict{@@x0 @@y0}){\oenodeCenter{}}
\ignorespaces}%
% \end{macrocode}
% \end{macro}
-%
+%
+% \begin{macrocode}
+\let\POE@elecdipole@nodes\POE@fiberdipole@nodes
+% \end{macrocode}
+%
+% \begin{macro}{POE@comp@rectangle}
+% \begin{macrocode}
+\def\POE@comp@rectangle{%
+ \psframe[dimen=outer](!\POE@dict{@@x neg @@y0 @@y sub})%
+ (!\POE@dict{@@x @@y0 @@y add})%
+}%
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Free-ray components}
%
% \subsubsection{mirror}
@@ -15196,7 +16947,7 @@
% \begin{macrocode}
\def\mirror@ref{%
\ifdim\POE@key@mirrorradius pt=0pt
- \ifx\POE@key@mirrortype\POE@str@mirrortype@piezo
+ \ifx\POE@key@mirrortype\POE@str@piezo
\POE@setref{/@@y0 \pst@number\psyunit def}%
\bgroup
\psset{style=PiezoMirror}%
@@ -15207,13 +16958,13 @@
\egroup
\else
\POE@setref{/@@x \POE@key@mirrorwidth\space 0.5 mul def}%
- \ifx\POE@key@mirrortype\POE@str@mirrortype@plain\else
+ \ifx\POE@key@mirrortype\POE@str@plain\else
\POE@setref{\POE@key@mirrordepth\space 0.5 mul dup /@@y0 ED /@@y ED}%
\fi
\fi
\else
\POE@setref{/@@x \POE@key@mirrorwidth\space 0.5 mul def}%
- \ifx\POE@key@mirrortype\POE@str@mirrortype@plain\else
+ \ifx\POE@key@mirrortype\POE@str@plain\else
\POE@setref{\POE@key@mirrordepth\space 0.5 mul dup /@@y0 ED /@@y ED}%
\fi
\fi
@@ -15242,7 +16993,7 @@
% \end{macrocode}
% A second interface exists only for semitrans mirrors
% \begin{macrocode}
- \ifx\POE@key@mirrortype\POE@str@mirrortype@semitrans
+ \ifx\POE@key@mirrortype\POE@str@semitrans
% \end{macrocode}
% if no second mirror radius was specified, use the same curvature of the first interface.
% \begin{macrocode}
@@ -15288,6 +17039,7 @@
\addto@pscode{1 }%
\end@CompIfc
\fi
+ \pnode(0,0){\oenodeCenter{}}
}%
% \end{macrocode}
% \end{macro}
@@ -15311,7 +17063,7 @@
% plain mirror
% \begin{macrocode}
\edef\@ht{\POE@key@mirrorwidth\space 0.5 mul }%
- \ifx\POE@key@mirrortype\POE@str@mirrortype@piezo
+ \ifx\POE@key@mirrortype\POE@str@piezo
\psframe[style=PiezoMirror,
dimen=outer](! \@ht 4 div 0)%
(! \@ht -4 div \@ht 2.5 div)
@@ -15321,16 +17073,16 @@
(! \@ht 2 div \@ht 2 div)%
(! \@ht 4 div \@ht)
\fi
- \else\ifx\POE@key@mirrortype\POE@str@mirrortype@extended
+ \else\ifx\POE@key@mirrortype\POE@str@extended
\psframe[style=ExtendedMirror]%
(! \@ht neg \POE@key@mirrordepth\space )%
(! \@ht 0)
- \else\ifx\POE@key@mirrortype\POE@str@mirrortype@semitrans
+ \else\ifx\POE@key@mirrortype\POE@str@semitrans
\psframe[style=SemitransMirror]%
(! \@ht neg \POE@key@mirrordepth\space )%
(! \@ht 0)
\fi\fi\fi
- \ifx\POE@key@mirrortype\POE@str@mirrortype@semitrans
+ \ifx\POE@key@mirrortype\POE@str@semitrans
\psline[linewidth=\POE@key@mirrorlinewidth]%
(! \@ht neg 0)(! \@ht 0)
\else
@@ -15347,17 +17099,17 @@
\def\POE@temparc{arcn }
\fi
\ifodd
- \ifx\POE@key@mirrortype\POE@str@mirrortype@extended 1
- \else\ifx\POE@key@mirrortype\POE@str@mirrortype@semitrans 1
+ \ifx\POE@key@mirrortype\POE@str@extended 1
+ \else\ifx\POE@key@mirrortype\POE@str@semitrans 1
\else 0
\fi\fi
% \end{macrocode}
% extended or semitrans mirrortype
% \begin{macrocode}
\bgroup
- \ifx\POE@key@mirrortype\POE@str@mirrortype@extended
+ \ifx\POE@key@mirrortype\POE@str@extended
\psset{style=ExtendedMirror}
- \else\ifx\POE@key@mirrortype\POE@str@mirrortype@semitrans
+ \else\ifx\POE@key@mirrortype\POE@str@semitrans
\psset{style=SemitransMirror}
\fi\fi
\begin@ClosedObj
@@ -15613,7 +17365,7 @@
% \begin{macrocode}
\def\beamsplitter@nodes{%
\edef\@bs@wd{\POE@key@bssize\space 0.5 mul }%
- \ifx\POE@key@bsstyle\POE@str@bsstyle@cube
+ \ifx\POE@key@bsstyle\POE@str@cube
\newOptexpCompAmb{%
{\@bs@wd 2 sqrt div neg dup} {-1 1} \@bs@wd neg \@bs@wd
trans {PlainIfc}
@@ -15627,7 +17379,7 @@
trans {PlainIfc}
3 \POE@key@n
}%
- \else\ifx\POE@key@bsstyle\POE@str@bsstyle@plate
+ \else\ifx\POE@key@bsstyle\POE@str@plate
\newOptexpCompAmb{%
{0 0} {1 0} \@bs@wd neg \@bs@wd trans {PlainIfc} 1 1 }%
\fi\fi
@@ -15639,13 +17391,13 @@
% \begin{macrocode}
\def\beamsplitter@comp{%
\edef\@bs@wd{\POE@key@bssize\space 2.0 div }%
- \ifx\POE@key@bsstyle\POE@str@bsstyle@cube
+ \ifx\POE@key@bsstyle\POE@str@cube
\psline[arrows=cc-cc](! \@bs@wd neg 2 sqrt mul 0)
(! \@bs@wd 2 sqrt mul 0)
\rput[c]{45}(0,0){%
\psframe(! \@bs@wd neg \@bs@wd neg)(! \@bs@wd \@bs@wd)
}
- \else\ifx\POE@key@bsstyle\POE@str@bsstyle@plate
+ \else\ifx\POE@key@bsstyle\POE@str@plate
\psline(! \@bs@wd neg 2 sqrt mul 0)(! \@bs@wd 2 sqrt mul 0)
\fi\fi
\ignorespaces}%
@@ -15720,23 +17472,23 @@
\def\polarization@comp{%
\edef\@sz{\POE@key@polsize\space 0.5 mul }%
\psset{style=Polarization}%
- \ifx\POE@key@poltype\POE@str@pol@polparallel
+ \ifx\POE@key@poltype\POE@str@parallel
\psline[arrows=<->](! 0 \@sz neg)(! 0 \@sz)
\fi
- \ifx\POE@key@poltype\POE@str@pol@polperp
+ \ifx\POE@key@poltype\POE@str@perp
\psdot(0,0)
\pscircle[fillstyle=none](0,0){0.12}
\fi
- \ifx\POE@key@poltype\POE@str@pol@polmisc
+ \ifx\POE@key@poltype\POE@str@misc
\psline[arrows=<->](! 0 \@sz neg)(! 0 \@sz)
\psdot(0,0)
\pscircle[fillstyle=none](0,0){0.12}
\fi
- \ifx\POE@key@poltype\POE@str@pol@polrcirc
+ \ifx\POE@key@poltype\POE@str@rcirc
\psellipticarc[fillstyle=none, arrows=->]%
(0,0)(! \@sz 2 div \@sz){20}{-20}
\fi
- \ifx\POE@key@poltype\POE@str@pol@pollcirc
+ \ifx\POE@key@poltype\POE@str@lcirc
\psellipticarc[fillstyle=none, arrows=<-]%
(0,0)(! \@sz 2 div \@sz){20}{-20}
\fi
@@ -15776,7 +17528,7 @@
\edef\@ht{\@ht \POE@key@gratingdepth\space sub }%
\fi
\edef\@step{\POE@key@gratingwidth\space\@cnt div }%
- \ifx\POE@key@gratingtype\POE@str@gratingtype@blazed
+ \ifx\POE@key@gratingtype\POE@str@blazed
\pscustom[linewidth=\POE@key@gratinglinewidth, linejoin=1]{%
\psline[liftpen=1](! \@wd \@dp)(! \@wd \@ht)%
(! \@wd neg \@ht)(! \@wd neg \@dp)%
@@ -15789,7 +17541,7 @@
}%
\closepath
}%
- \else\ifx\POE@key@gratingtype\POE@str@gratingtype@binary
+ \else\ifx\POE@key@gratingtype\POE@str@binary
\pscustom[linewidth=\POE@key@gratinglinewidth, linejoin=1]{%
\psline[liftpen=1](! \@wd \@dp)(! \@wd \@ht)%
(! \@wd neg \@ht)(! \@wd neg \@dp)%
@@ -15831,11 +17583,7 @@
%
% \begin{macro}{\optbox@comp}
% \begin{macrocode}
-\def\optbox@comp{%
- \edef\@wd{\POE@key@optboxwidth\space 0.5 mul }
- \edef\@ht{\POE@key@optboxheight\space 0.5 mul }
- \psframe[dimen=outer](! \@wd neg \@ht neg)(! \@wd \@ht)
-\ignorespaces}%
+\let\optbox@comp\POE@comp@rectangle
% \end{macrocode}
% \end{macro}
%
@@ -15872,7 +17620,7 @@
\POE@setref{%
/@@y \POE@key@detsize\space 0.5 mul def
/@@x \POE@key@detsize\space 0.5 mul
- \ifx\POE@key@dettype\POE@str@dettype@round 0.5 mul\fi
+ \ifx\POE@key@dettype\POE@str@round 0.5 mul\fi
\space def
}%
\fi
@@ -15883,8 +17631,8 @@
% \begin{macro}{\optdetector@nodes}
% \begin{macrocode}
\def\optdetector@nodes{%
- \dipole@nodes
- \ifx\POE@key@dettype\POE@str@dettype@round
+ \POE@dipole@nodes
+ \ifx\POE@key@dettype\POE@str@round
\pnode(! \POE@dict{@@x0 @@x -0.2 mul add} 0){\oenodeCenter{}}%
\fi
}%
@@ -15894,10 +17642,10 @@
% \begin{macro}{\optdetector@comp}
% \begin{macrocode}
\def\optdetector@comp{%
- \ifx\POE@key@dettype\POE@str@dettype@round
+ \ifx\POE@key@dettype\POE@str@round
\psellipticwedge(!\POE@dict{@@x0 @@x sub @@y0})%
(!\POE@dict{@@x 2 mul @@y}){-90}{90}%
- \else\ifx\POE@key@dettype\POE@str@dettype@diode
+ \else\ifx\POE@key@dettype\POE@str@diode
\ifx\POE@key@detsize\@empty
\ifdim\POE@key@detwidth pt<\POE@key@detheight pt
\def\@sz{\POE@key@detwidth\space 0.5 mul }%
@@ -15907,8 +17655,7 @@
\else
\def\@sz{\POE@key@detsize\space 0.5 mul }%
\fi
- \psframe[dimen=outer](! \POE@dict{@@x neg @@y neg})%
- (! \POE@dict{@@x @@y})%
+ \POE@comp@rectangle
\bgroup
\psset{style=DetectorStyle}
\pspolygon(! \@sz -0.2 mul \@sz -0.4 mul)%
@@ -15926,6 +17673,28 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{optdetector@conn}
+% \begin{macrocode}
+\def\optdetector@conn{%
+ \ifPOE@startbox\else
+ \ifPOE@beam
+ \drawbeam[raytrace=false](\oenodeRefA{}){}
+ \else\ifPOE@fiberin@
+ \drawfiber@{FiberIn}(\oenodeRefA{}){}
+ \else\ifPOE@wirein@
+ \drawwire@{WireIn}(\oenodeRefA{}){}
+ \fi\fi\fi
+ \fi
+ \ifPOE@endbox\else
+ \ifPOE@wirepresetout@
+ \drawwire@{WireOut}{}(\oenodeRefB{})
+ \else\ifPOE@fiberout@
+ \drawfiber@{FiberOut}{}(\oenodeRefB{})
+ \fi\fi
+ \fi
+}%
+% \end{macrocode}
+% \end{macro}
% \subsubsection{optretplate}
%
% \begin{macro}{\optretplate@ref}
@@ -15956,7 +17725,8 @@
% \begin{macrocode}
\def\optdiode@ref{%
\POE@setref{%
- \POE@key@optdiodesize\space 0.5 mul dup /@@y ED /@@x ED
+ \POE@key@optdiodesize\space 0.5 mul dup dup /@@y ED /@@x ED
+ 0.4 mul /@@sz ED
}%
}%
% \end{macrocode}
@@ -15965,13 +17735,12 @@
% \begin{macro}{\optdiode@comp}
% \begin{macrocode}
\def\optdiode@comp{%
- \edef\@sz{\POE@key@optdiodesize\space}%
- \psframe[dimen=outer](! \@sz -0.5 mul dup)(!\@sz 0.5 mul dup)
- \pspolygon(! \@sz -0.2 mul \@sz -0.2 mul)
- (! \@sz -0.2 mul \@sz 0.2 mul)
- (! \@sz 0.2 mul 0)
- \psline(! \@sz 0.2 mul \POE@clwh add \@sz 0.2 mul)%
- (! \@sz 0.2 mul \POE@clwh add \@sz -0.2 mul)
+ \POE@comp@rectangle
+ \pspolygon(!\POE@dict{@@sz neg dup})
+ (!\POE@dict{@@sz neg @@sz})
+ (!\POE@dict{@@sz 0})
+ \psline(!\POE@dict{@@sz \POE@clwh add @@sz})%
+ (!\POE@dict{@@sz \POE@clwh add @@sz neg})
\ignorespaces}%
% \end{macrocode}
% \end{macro}
@@ -16007,12 +17776,10 @@
% \begin{macro}{\doveprism@comp}
% \begin{macrocode}
\def\doveprism@comp{%
- \edef\@ht{\POE@key@doveprismheight\space 0.5 mul }%
- \edef\@wd{\POE@key@doveprismwidth\space 0.5 mul }%
- \pspolygon(! \@wd neg \@ht neg)%
- (! \@wd \@ht neg)%
- (! \@wd \@ht 2 mul sub \@ht)%
- (! \@ht 2 mul \@wd sub \@ht)%
+ \pspolygon(!\POE@dict{@@x neg @@y neg})%
+ (!\POE@dict{@@x @@y neg})%
+ (!\POE@dict{@@x @@y 2 mul sub @@y})%
+ (!\POE@dict{@@y 2 mul @@x sub @@y})
\ignorespaces}%
% \end{macrocode}
% \end{macro}
@@ -16022,7 +17789,8 @@
% \begin{macro}{\glanthompson@ref}
% \begin{macrocode}
\def\glanthompson@ref{%
- \POE@setref{/@@x \POE@key@glanthompsonwidth\space 0.5 mul def
+ \POE@setref{%
+ /@@x \POE@key@glanthompsonwidth\space 0.5 mul def
/@@y \POE@key@glanthompsonheight\space 0.5 mul def
}%
}%
@@ -16122,14 +17890,28 @@
0
\fi
}%
- \newOptexpComp{%
- {\@sz -0.6 mul \@ang tan mul \@hshift neg}
- {90 \@ang sub dup cos exch sin}
- \@sz \@ang cos div dup -0.4 mul exch 0.6 mul trans {PlainIfc}
- {\@sz 0.6 mul \@ang tan mul \@hshift neg}
- {90 \@ang add dup cos exch sin}
- \@sz \@ang cos div dup -0.4 mul exch 0.6 mul trans {PlainIfc}
- \POE@key@n true }%
+ \def\POE@tempA{transmission}%
+ \ifx\POE@key@prismtype\POE@tempA
+ \newOptexpComp{%
+ {\@sz -0.6 mul \@ang tan mul \@hshift neg}
+ {90 \@ang sub dup cos exch sin}
+ \@sz \@ang cos div dup -0.4 mul exch 0.6 mul trans {PlainIfc}
+ {\@sz 0.6 mul \@ang tan mul \@hshift neg}
+ {90 \@ang add dup cos exch sin}
+ \@sz \@ang cos div dup -0.4 mul exch 0.6 mul trans {PlainIfc}
+ \POE@key@n true }%
+ \else
+ \newOptexpCompAmb{%
+ {\@sz -0.6 mul \@ang tan mul \@hshift neg}
+ {90 \@ang sub dup cos exch sin}
+ \@sz \@ang cos div dup -0.4 mul exch 0.6 mul trans {PlainIfc}
+ {0 \@sz -0.4 mul \@hshift sub } {1 0} \@ang tan \@sz mul dup neg exch
+ trans {PlainIfc}
+ {\@sz 0.6 mul \@ang tan mul \@hshift neg}
+ {90 \@ang add dup cos exch sin}
+ \@sz \@ang cos div dup -0.4 mul exch 0.6 mul trans {PlainIfc}
+ 2 \POE@key@n true }%
+ \fi
\pnode(! 0 \@hshift neg){\oenodeCenter{}}
}%
% \end{macrocode}
@@ -16215,8 +17997,10 @@
% \begin{macro}{optfiber@ref}
% \begin{macrocode}
\def\optfiber@ref{%
- \POE@setref{/@@x \POE@key@fiberloopsep\space\POE@key@fiberloops\space
- 1 sub mul 0.5 mul def }%
+ \POE@setref{%
+ /@@x \POE@key@fiberloopsep\space\POE@key@fiberloops\space
+ 1 sub mul 0.5 mul def
+ }%
}%
% \end{macrocode}
% \end{macro}
@@ -16231,13 +18015,15 @@
% \begin{macro}{\optfiber@comp}
% \begin{macrocode}
\def\optfiber@comp{%
- \edef\@f@cnt{\POE@key@fiberloops\space}%
- \edef\@f@r{\POE@key@fiberloopradius\space}%
- \edef\@f@sep{\POE@key@fiberloopsep\space}%
- \parametricplot[plotpoints=200, style=Fiber]{0}{1}{%
- t 360 mul \@f@cnt mul sin \@f@r mul \@f@sep
- \@f@cnt 1 sub mul t 0.5 sub mul add
- 1 t 360 mul \@f@cnt mul cos sub \@f@r mul
+ \pscustom[style=Fiber, arrows=-]{%
+ \multido{\i=0+1}{\POE@key@fiberloops}{%
+ \parametricplot[liftpen=1, plotpoints=100]{0}{1}{%
+ t 360 mul sin 1 t 360 mul cos sub
+ \POE@key@fiberloopradius\space dup 3 1 roll mul 3 1 roll mul
+ \POE@key@fiberloops\space 1 sub -2 div \i\space add
+ \POE@key@fiberloopsep\space mul add exch
+ }%
+ }%
}%
\ignorespaces}%
% \end{macrocode}
@@ -16259,9 +18045,8 @@
% \begin{macro}{\optmzm@comp}
% \begin{macrocode}
\def\optmzm@comp{%
- \psframe[dimen=outer](! \POE@dict{@@x neg @@y neg})%
- (!\POE@dict{@@x @@y})
- \bgroup
+ \POE@comp@rectangle
+ \begingroup
\ifPOE@usefiberstyle
\psset{style=Fiber, arrows=-, ArrowInside=-}
\fi
@@ -16273,7 +18058,7 @@
(! \POE@dict{@@x 0.4 mul @@y -0.6 mul})%
(! \POE@dict{@@x -0.4 mul @@y -0.6 mul})%
(! \POE@dict{@@x} -0.7 mul 0)%
- \egroup
+ \endgroup
\ignorespaces}%
% \end{macrocode}
% \end{macro}
@@ -16282,83 +18067,66 @@
%
% \begin{macro}{\optfilter@ref}
% \begin{macrocode}
- \def\optfilter@ref{%
+\def\optfilter@ref{%
\POE@setref{%
\POE@key@filtersize\space 0.5 mul dup /@@y ED /@@x ED
- /@@ang
- \ifx\POE@key@innercompalign\POE@str@absolute
- /N@\oenodeRefA{} /N@\oenodeRefB{} SlopeAngle \POE@key@angle sub
- \else
- \POE@key@filterangle
- \fi def
+ \ifx\POE@key@innercompalign\POE@str@absolute\else
+ /@@ang \POE@key@filterangle\space def
+ \fi
}%
- }%
-\let\optfilter@nodes\dipole@nodes
+}%
+\let\optfilter@nodes\POE@dipole@nodes
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\optfilter@comp}
% \begin{macrocode}
\def\optfilter@comp{%
- \edef\@sz{\POE@key@filtersize\space 0.5 mul }%
- \def\filter@curve{%
+ \def\POE@filter@curve{%
\parametricplot[plotstyle=curve,arrows=-]{-1}{1}{%
- t \@sz mul 0.7 mul t Pi mul RadtoDeg
- 90 add cos 0.2 \@sz mul mul}%
+ \POE@dict{@@x} dup t mul 0.7 mul exch t Pi mul RadtoDeg
+ 90 add cos 0.2 mul mul}%
}%
- \psframe[dimen=outer](! \@sz neg dup)(! \@sz dup)
+ \def\POE@strike@line{%
+ \psline(!\POE@dict{@@x -0.3 mul @@y -0.15 mul})%
+ (!\POE@dict{@@x 0.3 mul @@y 0.15 mul})
+ }%
+ \POE@comp@rectangle
\psrotate(\oenodeCenter{}){!\POE@dict{@@ang}}{%
\psset{style=FilterStyle}%
- \ifx\POE@key@filtertype\POE@str@filtertype@bandpass
- \psline(! -0.3 \@sz mul -0.65 \@sz mul)%
- (! 0.3 \@sz mul -0.35 \@sz mul)%
- \psline(! -0.3 \@sz mul 0.35 \@sz mul)%
- (! 0.3 \@sz mul 0.65 \@sz mul)%
- \rput(! 0 -0.5 \@sz mul){\filter@curve}
+ \ifx\POE@key@filtertype\POE@str@bandpass
+ \rput(!\POE@dict{0 @@x -0.5 mul}){\POE@strike@line\POE@filter@curve}
\rput(0, 0){%
\ifPOE@usefiberstyle
\psset{style=Fiber}
\fi
- \filter@curve}
- \rput(! 0 0.5 \@sz mul){\filter@curve}
- \else\ifx\POE@key@filtertype\POE@str@filtertype@bandstop
- \psline(! -0.3 \@sz mul -0.15 \@sz mul)%
- (! 0.3 \@sz mul 0.15 \@sz mul)%
- \rput(! 0 -0.5 \@sz mul){%
+ \POE@filter@curve}
+ \rput(!\POE@dict{0 @@x 0.5 mul}){\POE@strike@line\POE@filter@curve}
+ \else\ifx\POE@key@filtertype\POE@str@bandstop
+ \begingroup
\ifPOE@usefiberstyle
\psset{style=Fiber}
\fi
- \filter@curve}
- \rput(0, 0){\filter@curve}
- \rput(! 0 0.5 \@sz mul){%
- \ifPOE@usefiberstyle
- \psset{style=Fiber}
- \fi
- \filter@curve}
- \else\ifx\POE@key@filtertype\POE@str@filtertype@lowpass
- \psline(! -0.3 \@sz mul -0.15 \@sz mul)%
- (! 0.3 \@sz mul 0.15 \@sz mul)%
- \psline(! -0.3 \@sz mul 0.35 \@sz mul)%
- (! 0.3 \@sz mul 0.65 \@sz mul)%
- \rput(! 0 -0.5 \@sz mul){%
+ \rput(!\POE@dict{0 @@x -0.5 mul}){\POE@filter@curve}
+ \rput(!\POE@dict{0 @@x 0.5 mul}){\POE@filter@curve}
+ \endgroup
+ \rput(0,0){\POE@strike@line\POE@filter@curve}
+ \else\ifx\POE@key@filtertype\POE@str@lowpass
+ \rput(!\POE@dict{0 @@x -0.5 mul}){%
\ifPOE@usefiberstyle
\psset{style=Fiber}
\fi
- \filter@curve}
- \rput(0, 0){\filter@curve}
- \rput(! 0 0.5 \@sz mul){\filter@curve}
- \else\ifx\POE@key@filtertype\POE@str@filtertype@highpass
- \psline(! -0.3 \@sz mul -0.15 \@sz mul)%
- (! 0.3 \@sz mul 0.15 \@sz mul)%
- \psline(! -0.3 \@sz mul -0.65 \@sz mul)%
- (! 0.3 \@sz mul -0.35 \@sz mul)%
- \rput(! 0 0.5 \@sz mul){%
+ \POE@filter@curve}
+ \rput(0, 0){\POE@strike@line\POE@filter@curve}
+ \rput(!\POE@dict{0 @@x 0.5 mul}){\POE@strike@line\POE@filter@curve}
+ \else\ifx\POE@key@filtertype\POE@str@highpass
+ \rput(!\POE@dict{0 @@x 0.5 mul}){%
\ifPOE@usefiberstyle
\psset{style=Fiber}
\fi
- \filter@curve}
- \rput(0, 0){\filter@curve}
- \rput(! 0 -0.5 \@sz mul){\filter@curve}
+ \POE@filter@curve}
+ \rput(0, 0){\POE@strike@line\POE@filter@curve}
+ \rput(!\POE@dict{0 @@x -0.5 mul}){\POE@strike@line\POE@filter@curve}
\fi\fi\fi\fi
}%
\ignorespaces}%
@@ -16370,9 +18138,10 @@
% \begin{macro}{optamp@ref}
% \begin{macrocode}
\def\optamp@ref{%
- \POE@setref{/@@x \POE@key@optampwidth\space 0.5 mul def
- /@@y \POE@key@optampheight\space 0.5 mul def
- }%
+ \POE@setref{%
+ /@@x \POE@key@optampwidth\space 0.5 mul def
+ /@@y \POE@key@optampheight\space 0.5 mul def
+ }%
}%
% \end{macrocode}
% \end{macro}
@@ -16387,10 +18156,10 @@
% \begin{macro}{\optamp@comp}
% \begin{macrocode}
\def\optamp@comp{%
- \def\@wd{\POE@key@optampwidth\space 0.5 mul }%
- \def\@ht{\POE@key@optampheight\space 0.5 mul }%
- \pspolygon(! \@wd 0)(! \@wd neg \@ht)(! \@wd neg \@ht neg)
-\ignorespaces}%
+ \pspolygon(!\POE@dict{@@x 0})%
+ (!\POE@dict{@@x neg @@y})%
+ (!\POE@dict{@@x neg @@y neg})
+}%
% \end{macrocode}
% \end{macro}
%
@@ -16399,7 +18168,7 @@
% \begin{macro}{polcontrol@ref}
% \begin{macrocode}
\def\polcontrol@ref{%
- \ifx\POE@key@polcontroltype\POE@str@polcontroltype@linear
+ \ifx\POE@key@polcontroltype\POE@str@linear
\POE@setref{/@@x \POE@key@polcontrolsize\space 2 mul def}%
\else
\POE@setref{/@@x \POE@key@polcontrolsize\space 1.5 mul def}%
@@ -16426,7 +18195,7 @@
\ifPOE@usefiberstyle
\psset{style=Fiber, arrows=-, ArrowInside=-}%
\fi
- \ifx\POE@key@polcontroltype\POE@str@polcontroltype@linear
+ \ifx\POE@key@polcontroltype\POE@str@linear
\multips(! -2 \@sz mul \@sz)(! 2 \@sz mul 0){3}{%
\pscircle(0,0){\POE@key@polcontrolsize}%
}%
@@ -16459,11 +18228,10 @@
% \begin{macro}{\optisolator@comp}
% \begin{macrocode}
\def\optisolator@comp{%
- \edef\@ht{\POE@key@isolatorheight\space 0.5 mul }%
- \edef\@wd{\POE@key@isolatorwidth\space 0.5 mul }%
- \psframe[dimen=outer](! \@wd neg \@ht neg)(! \@wd \@ht)
- \psline[style=IsolatorArrow,
- arrows=->](! \@wd neg 0.6 mul 0)(!\@wd 0.6 mul 0)
+ \POE@comp@rectangle
+ \psline[style=IsolatorArrow, arrows=->]%
+ (!\POE@dict{@@x neg 0.6 mul 0})%
+ (!\POE@dict{@@x 0.6 mul 0})
\ignorespaces}%
% \end{macrocode}
% \end{macro}
@@ -16483,10 +18251,8 @@
% \begin{macro}{\optfiberpolarizer@comp}
% \begin{macrocode}
\def\optfiberpolarizer@comp{%
- \edef\@ht{\POE@key@fiberpolheight\space 0.5 mul }%
- \edef\@wd{\POE@key@fiberpolwidth\space 0.5 mul }%
- \psframe[dimen=outer](! \@wd neg \@ht neg)(! \@wd \@ht)
- \psline(! \@wd neg 0.2 mul \@ht neg)(!\@wd 0.2 mul \@ht)
+ \POE@comp@rectangle
+ \psline(!\POE@dict{@@x -0.2 mul @@y neg})(!\POE@dict{@@x 0.2 mul @@y})
\ignorespaces}%
% \end{macrocode}
% \end{macro}
@@ -16507,8 +18273,7 @@
% \begin{macro}{\optswitch@comp}
% \begin{macrocode}
\def\optswitch@comp{%
- \psframe[dimen=outer](! \POE@dict{@@x neg @@y neg})%
- (! \POE@dict{@@x @@y})%
+ \POE@comp@rectangle
% \end{macrocode}
% storing the linewidth of the object allows for some aesthetic fine tuning
% \begin{macrocode}
@@ -16562,17 +18327,16 @@
% \begin{macro}{\fiberdelayline@comp}
% \begin{macrocode}
\def\fiberdelayline@comp{%
- \psframe[dimen=outer](! \POE@dict{@@x neg @@y neg})%
- (! \POE@dict{@@x @@y})
+ \POE@comp@rectangle
\begingroup
\psset{style=FdlArrow}
\use@par
\pst@expandafter\POE@get@yarrowscale{\psk@arrowscale}\@nil
\def\@arrowshift{%
\psk@arrowlength\space \psk@arrowsize\space
- \pst@number\pslinewidth\space mul add mul
- \POE@tempA mul
- @@y 2.9 mul @@x 0.6 mul atan 2 copy cos mul 3 1 roll sin mul
+ \pst@number\pslinewidth\space mul add mul
+ \POE@tempA mul
+ @@y 2.9 mul @@x 0.6 mul atan 2 copy cos mul 3 1 roll sin mul
\tx@UserCoor abs exch abs exch\space
}%
\psline(! \POE@dict{@@x -0.4 mul @@y -1.6 mul})%
@@ -16582,6 +18346,103 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+\newOptexpDipole{optarrowcomp}{}
+\def\optarrowcomp@ref{%
+ \POE@setref{%
+ \ifx\POE@key@arrowcompshape\POE@str@rectangle
+ /@@x \POE@key@arrowcompwidth\space 0.5 mul def
+ /@@y \POE@key@arrowcompheight\space 0.5 mul def
+ \else
+ \POE@key@arrowcompwidth\space\POE@key@arrowcompheight\space
+ min 0.5 mul dup /@@x ED /@@y ED
+ \fi
+ \POE@key@arrowcompangle\space dup 0 gt {
+ { dup 180 ge { 180 sub } { exit } ifelse } loop
+ } {
+ { dup 0 lt { 180 add } { exit } ifelse } loop
+ } ifelse dup /@arrowangle ED dup dup
+ @@y @@x atan gt exch @@y @@x neg atan lt and {
+ /@@dy @@y def
+ tan @@y exch div /@@dx ED
+ }{
+ /@@dx @@x def
+ tan @@x mul /@@dy ED
+ } ifelse
+ }%
+}%
+\def\optarrowcomp@comp{%
+ \ifx\POE@key@arrowcompshape\POE@str@rectangle
+ \POE@comp@rectangle
+ \else
+ \pscircle(!\POE@dict{@@x0 @@y0}){!\POE@dict{@@x}}
+ \fi
+ \begingroup
+% \end{macrocode}
+% Set the style and execute the options directly, so we can use the correct
+% arrowscale and linewidth for the calculations.
+% \begin{macrocode}
+ \psset{style=ArrowCompStyle}
+ \use@par
+ \pst@expandafter\POE@get@yarrowscale{\psk@arrowscale}\@nil
+ \def\@arrowshift{%
+ \psk@arrowlength\space \psk@arrowsize\space
+ \pst@number\pslinewidth\space mul add mul
+ \POE@tempA mul
+ @arrowangle 2 copy cos mul 3 1 roll sin mul
+ \tx@UserCoor\space
+ }%
+ \ifx\POE@key@arrowcompshape\POE@str@rectangle
+ \psline(!\POE@dict{@@dx -1.5 mul @@dy -1.5 mul})%
+ (!\POE@dict{@@dx 1.3 mul @@dy 1.3 mul \@arrowshift VecAdd})
+ \else
+ \psline(!\POE@dict{@arrowangle dup cos @@x -1.5 mul mul exch sin @@x -1.5 mul mul})
+ (!\POE@dict{@arrowangle dup cos @@x 1.3 mul mul exch sin @@x 1.3 mul mul \@arrowshift VecAdd})
+ \fi
+ \endgroup
+\ignorespaces}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newOptexpDipole{optbarcomp}{}
+\def\optbarcomp@ref{%
+ \POE@setref{%
+ \ifx\POE@key@barcompshape\POE@str@rectangle
+ /@@x \POE@key@barcompwidth\space 0.5 mul def
+ /@@y \POE@key@barcompheight\space 0.5 mul def
+ \else
+ \POE@key@barcompwidth\space\POE@key@barcompheight\space
+ min 0.5 mul dup /@@x ED /@@y ED
+ \fi
+ \POE@key@barcompangle\space dup 0 gt {
+ { dup 180 ge { 180 sub } { exit } ifelse } loop
+ } {
+ { dup 0 lt { 180 add } { exit } ifelse } loop
+ } ifelse dup /@barangle ED dup dup
+ @@y @@x atan gt exch @@y @@x neg atan lt and {
+ /@@dy @@y def
+ tan @@y exch div /@@dx ED
+ }{
+ /@@dx @@x def
+ tan @@x mul /@@dy ED
+ } ifelse
+ }%
+}%
+\def\optbarcomp@comp{%
+ \ifx\POE@key@barcompshape\POE@str@rectangle
+ \POE@comp@rectangle
+ \psline[style=BarCompStyle](!\POE@dict{ @@dx neg @@dy neg })%
+ (!\POE@dict{@@dx @@dy})
+ \else
+ \pscircle(!\POE@dict{@@x0 @@y0}){!\POE@dict{@@x}}
+ \psline[style=BarCompStyle]%
+ (!\POE@dict{@barangle dup cos @@x neg mul exch sin @@x neg mul})
+ (!\POE@dict{@barangle dup cos @@x mul exch sin @@x mul})
+ \fi
+\ignorespaces}%
+% \end{macrocode}
+%
+%
% \subsubsection{fiberbox}
% \begin{macro}{fiberbox@ref}
% \begin{macrocode}
@@ -16622,9 +18483,7 @@
} for
}
}%
-\def\fiberbox@comp{%
- \psframe[dimen=outer](!\POE@dict{@@x neg @@y neg})(!\POE@dict{@@x @@y})
-}%
+\let\fiberbox@comp\POE@comp@rectangle
% \end{macrocode}
% \end{macro}
%
@@ -16633,12 +18492,11 @@
% \begin{macro}{\optcoupler@nodes}
% \begin{macrocode}
\def\optcoupler@nodes{%
- \edef\@sep{\POE@key@couplersep\space 0.5 mul }%
\newOptexpFiberComp{%
- {@@x neg @@y0 \@sep add}
- {@@x neg @@y0 \@sep sub}
- {@@x @@y0 \@sep add}
- {@@x @@y0 \@sep sub} }%
+ {@@x neg @@y0 @@sep add}
+ {@@x neg @@y0 @@sep sub}
+ {@@x @@y0 @@sep add}
+ {@@x @@y0 @@sep sub} }%
\pnode(0,0){\oenodeCenter{}}
}%
% \end{macrocode}
@@ -16648,22 +18506,34 @@
% \begin{macrocode}
\def\POE@coupler@ref{%
\POE@setref{%
- /@@y0
- \ifx\POE@key@coupleralign\POE@str@top
- \POE@key@couplersep\space -0.5 mul
- \else\ifx\POE@key@coupleralign\POE@str@bottom
- \POE@key@couplersep\space 0.5 mul
- \else
- 0
- \fi\fi
- def
/@@x \POE@key@couplerwidth\space 0.5 mul def
- \ifx\POE@key@couplertype\POE@str@couplertype@none
- \POE@key@couplersep
+ \ifx\POE@key@couplertype\POE@str@none
+ \ifx\POE@key@couplersep\@empty
+ /@@y \POE@key@couplerheight\space 0.5 mul 0.05 0.2 0.8 mul div mul def
+ \else
+ /@@y \POE@key@couplersep\space 0.5 mul def
+ \fi
+ /@@sep @@y def
\else
- \POE@key@couplerheight\space 0.5 mul
+ /@@y \POE@key@couplerheight\space 0.5 mul def
+ \ifx\POE@key@couplersep\@empty
+ \ifx\POE@key@couplertype\POE@str@ellipse
+ /@@sep @@y 0.05 0.2 0.8 mul div mul def
+ \else
+ /@@sep @@y 0.5 mul def
+ \fi
+ \else
+ /@@sep \POE@key@couplersep\space 0.5 mul def
+ \fi
\fi
- \space /@@y ED
+ /@@y0 @@sep
+ \ifx\POE@key@coupleralign\POE@str@bottom
+ \else\ifx\POE@key@coupleralign\POE@str@top
+ neg
+ \else
+ pop 0
+ \fi\fi
+ def
}%
}%
% \end{macrocode}
@@ -16678,7 +18548,7 @@
% \begin{macrocode}
\def\wdmcoupler@ref{%
\POE@coupler@ref
- \ifx\POE@key@couplertype\POE@str@couplertype@none
+ \ifx\POE@key@couplertype\POE@str@none
\ifx\POE@key@coupleralign\POE@str@center
\POE@setref{/@@y 0 def }%
\fi
@@ -16691,7 +18561,7 @@
% \begin{macro}{\optcoupler@comp}
% \begin{macrocode}
\def\optcoupler@comp{%
- \ifx\POE@key@couplertype\POE@str@couplertype@none
+ \ifx\POE@key@couplertype\POE@str@none
\psline[style=Fiber](\oenode{1}{})(\oenode{3}{})
\psline[style=Fiber](\oenode{2}{})(\oenode{N}{})
\fi
@@ -16703,20 +18573,19 @@
% \begin{macro}{\POE@coupler@comp}
% \begin{macrocode}
\def\POE@coupler@comp{%
- \ifx\POE@key@couplertype\POE@str@couplertype@none
- \else\ifx\POE@key@couplertype\POE@str@couplertype@ellipse
+ \ifx\POE@key@couplertype\POE@str@none
+ \else\ifx\POE@key@couplertype\POE@str@ellipse
\psellipse(! 0 \POE@dict{@@y0})(! \POE@dict{@@x @@y})
\else
- \psframe[dimen=outer](!\POE@dict{@@x neg @@y0 @@y sub})%
- (!\POE@dict{@@x @@y0 @@y add})%
- \ifx\POE@key@couplertype\POE@str@couplertype@cross
+ \POE@comp@rectangle
+ \ifx\POE@key@couplertype\POE@str@cross
\psline(! \POE@dict{@@x -0.5 mul @@y0 @@y 0.5 mul sub})%
(! \POE@dict{@@x 0.5 mul @@y0 @@y 0.5 mul add})%
\psline(! \POE@dict{@@x -0.5 mul @@y0 @@y 0.5 mul add})%
(! \POE@dict{@@x 0.5 mul @@y0 @@y 0.5 mul sub})%
\fi
\fi\fi
- \ifx\POE@key@couplertype\POE@str@couplertype@cross\else
+ \ifx\POE@key@couplertype\POE@str@cross\else
\ifPOE@variable
\begingroup
% \end{macrocode}
@@ -16748,7 +18617,7 @@
% \begin{macrocode}
\def\wdmcoupler@nodes{%
\edef\@sep{\POE@key@couplersep\space 0.5 mul }%
- \ifx\POE@key@couplertype\POE@str@couplertype@none
+ \ifx\POE@key@couplertype\POE@str@none
\ifx\POE@key@coupleralign\POE@str@center
\edef\@sep{0 }%
\fi
@@ -16765,7 +18634,7 @@
% \begin{macro}{\wdmcoupler@comp}
% \begin{macrocode}
\def\wdmcoupler@comp{%
- \ifx\POE@key@couplertype\POE@str@couplertype@none
+ \ifx\POE@key@couplertype\POE@str@none
\ifx\POE@key@coupleralign\POE@str@top
\psline[style=Fiber](\oenode{1}{})(\oenodeOut{})
\psline[style=Fiber]%
@@ -16790,7 +18659,7 @@
% \begin{macrocode}
\def\wdmsplitter@nodes{%
\edef\@sep{\POE@key@couplersep\space 0.5 mul }%
- \ifx\POE@key@couplertype\POE@str@couplertype@none
+ \ifx\POE@key@couplertype\POE@str@none
\ifx\POE@key@coupleralign\POE@str@center
\edef\@sep{0 }%
\fi
@@ -16807,7 +18676,7 @@
% \begin{macro}{\wdmsplitter@comp}
% \begin{macrocode}
\def\wdmsplitter@comp{%
- \ifx\POE@key@couplertype\POE@str@couplertype@none
+ \ifx\POE@key@couplertype\POE@str@none
\ifx\POE@key@coupleralign\POE@str@top
\psline[style=Fiber](\oenodeIn{})(\oenode{2}{})
\psline[style=Fiber](! \POE@dict{/N@\oenodeIn{} @GetCenter}
@@ -16879,14 +18748,353 @@
% \begin{macro}{\fibercollimator@comp}
% \begin{macrocode}
\def\fibercollimator@comp{%
- \def\@wd{\POE@key@fibercolwidth\space 0.5 mul }%
- \def\@ht{\POE@key@fibercolheight\space 0.5 mul }%
- \pspolygon(!\@wd neg \POE@clwh add \@ht neg)%
- (!\@wd 0)(!\@wd neg \POE@clwh add \@ht)
+ \pspolygon(!\POE@dict{@@x neg \POE@clwh add @@y neg})%
+ (!\POE@dict{@@x 0})%
+ (!\POE@dict{@@x neg \POE@clwh add @@y})
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Electrical components}
+%
+% \subsubsection{elecsynthesizer}
+%
+% \subsubsection{elecmixer}
+%
+% \begin{macro}{\elecmixer}
+% \begin{macrocode}
+\def\elecmixer{\pst@object{elecmixer}}%
+\def\elecmixer@i(#1)(#2)(#3){%
+ \@ifnextchar\bgroup%
+ {\elecmixer@ii(#1)(#2)(#3)}%
+ {\elecmixer@ii(#1)(#2)(#3){}}%
+}%
+\def\elecmixer@ii(#1)(#2)(#3)#4{%
+ \addafter@par{ref@angle=180}%
+ \begin@OptexpObj
+ \POE@calcCircRefNodes{#1}{#2}{#3}%
+ \POE@drawcomponent{elecmixer}{#4}
+ \ifPOE@backlayer
+ \ifPOE@wirepresetin@top
+ \drawwire@{WireIn}[stopnode=1](#1){}
+ \else\ifPOE@fiberin@top
+ \drawfiber@{FiberIn}[stopnode=1](#1){}
+ \fi\fi
+ \ifPOE@wirepresetout@top
+ \drawwire@{WireOut1}[startnode=N]{}(#2)
+ \else\ifPOE@fiberout@top
+ \drawfiber@{FiberOut1}[startnode=N]{}(#2)
+ \fi\fi
+ \ifPOE@wirepresetout@bottom
+ \drawwire@{WireOut2}[startnode=2, wirealign=center]{}(#3)
+ \else\ifPOE@fiberout@bottom
+ \drawfiber@{FiberOut2}[starnode=2, fiberalign=center]{}(#3)
+ \fi\fi
+ \fi
+ \end@OptexpObj
}%
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{elecmixer@ref}
+% \begin{macrocode}
+\def\elecmixer@ref{%
+ \POE@setref{\POE@key@elecmixersize\space 0.5 mul dup /@@x ED /@@y ED }%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\elecmixer@nodes}
+% \begin{macrocode}
+\def\elecmixer@nodes{%
+ \newOptexpElecComp{{@@x neg 0} {0 @@y neg} {@@x 0}}%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\elecmixer@comp}
+% \begin{macrocode}
+\def\elecmixer@comp{%
+ \edef\@sz{\POE@key@elecmixersize\space 0.5 mul }%
+ \pscircle(0,0){! \@sz}
+ \psline(!\@sz 2 sqrt div neg dup)(!\@sz 2 sqrt div dup)
+ \psline(!\@sz 2 sqrt div dup neg exch)(!\@sz 2 sqrt div dup neg)
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Electrical coupler}
+%
+% \begin{macro}{\eleccoupler}
+% \begin{macrocode}
+\def\eleccoupler{\pst@object{eleccoupler}}%
+\def\eleccoupler@i(#1)(#2){%
+ \@ifnextchar(%)
+ {\eleccoupler@ii(#1)(#2)}%
+ {\eleccoupler@ii(#1)(#1)(#2)(#2)}%
+}%
+\def\eleccoupler@ii(#1)(#2)(#3)(#4){%
+ \@ifnextchar\bgroup%
+ {\eleccoupler@iii(#1)(#2)(#3)(#4)}%
+ {\eleccoupler@iii(#1)(#2)(#3)(#4){}}%
+}%
+\def\eleccoupler@iii(#1)(#2)(#3)(#4)#5{%
+ \begin@OptexpObj
+ \ifPOE@backlayer
+ \ifx\POE@key@eleccoupleralign\POE@str@top
+ \pnode(#1){\oenodeRefA{}}
+ \pnode(#3){\oenodeRefB{}}
+ \else\ifx\POE@key@eleccoupleralign\POE@str@bottom
+ \pnode(#2){\oenodeRefA{}}
+ \pnode(#4){\oenodeRefB{}}
+ \else
+ \pst@getcoor{#1}\POE@tempa%
+ \pst@getcoor{#2}\POE@tempb%
+ \pnode(!\POE@tempa \POE@tempb
+ \POE@dict{VecAdd 0.5 VecScale}
+ \tx@UserCoor){\oenodeRefA{}}
+ \pst@getcoor{#3}\POE@tempa%
+ \pst@getcoor{#4}\POE@tempb%
+ \pnode(!\POE@tempa \POE@tempb
+ \POE@dict{VecAdd 0.5 VecScale}
+ \tx@UserCoor){\oenodeRefB{}}
+ \fi\fi
+ \fi
+ \POE@drawcomponent{eleccoupler}{#5}
+ \ifPOE@backlayer
+ \POE@Verb{%
+ (1) (3) (\oenode{}{}) CorrectDipoleIfc
+ (2) (N) (\oenode{}{}) CorrectDipoleIfc
+ }%
+ \ifPOE@wirepresetin@top
+ \drawwire@{WireIn1}[stopnode=1](#1){}
+ \else\ifPOE@fiberin@top
+ \drawfiber@{FiberIn1}[stopnode=1](#1){}
+ \fi\fi
+ \ifPOE@wirepresetout@top
+ \drawwire@{WireOut1}[startnode=3](#3){}
+ \else\ifPOE@fiberout@top
+ \drawfiber@{FiberOut1}[startnode=3](#3){}
+ \fi\fi
+ \ifx\POE@key@eleccouplertype\POE@str@directional
+ \ifx\POE@key@eleccouplerinput\POE@str@left
+ \ifPOE@wirepresetout@bottom
+ \drawwire@{WireOut2}[startnode=N](#4){}
+ \else\ifPOE@fiberout@bottom
+ \drawfiber@{FiberOut2}[startnode=N](#4){}
+ \fi\fi
+ \else
+ \ifPOE@wirepresetin@bottom
+ \drawwire@{WireIn2}[stopnode=2](#2){}
+ \else\ifPOE@fiberin@bottom
+ \drawfiber@{FiberIn2}[stopnode=2](#2){}
+ \fi\fi
+ \fi
+ \else
+ \ifPOE@wirepresetout@bottom
+ \drawwire@{WireOut2}[startnode=N](#4){}
+ \else\ifPOE@fiberout@bottom
+ \drawfiber@{FiberOut2}[startnode=N](#4){}
+ \fi\fi
+ \ifPOE@wirepresetin@bottom
+ \drawwire@{WireIn2}[stopnode=2](#2){}
+ \else\ifPOE@fiberin@bottom
+ \drawfiber@{FiberIn2}[stopnode=2](#2){}
+ \fi\fi
+ \fi
+ \fi
+ \end@OptexpObj
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\eleccoupler@ref}
+% \begin{macrocode}
+\def\eleccoupler@ref{%
+ \POE@setref{%
+ /@@x \POE@key@eleccouplerwidth\space 0.5 mul def
+ /@@y \POE@key@eleccouplerheight\space 0.5 mul def
+ \ifx\POE@key@eleccouplersep\@empty
+ /@@sep @@y 0.75 mul def
+ \else
+ /@@sep \POE@key@eleccouplersep\space 0.5 mul def
+ \fi
+ /@@y0 @@sep
+ \ifx\POE@key@eleccoupleralign\POE@str@bottom
+ \else\ifx\POE@key@eleccoupleralign\POE@str@top
+ neg
+ \else
+ pop 0
+ \fi\fi
+ def
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\eleccoupler@nodes}
+% \begin{macrocode}
+\def\eleccoupler@nodes{%
+ \newOptexpElecComp{%
+ {@@x neg @@y0 @@sep add}
+ {@@x neg @@y0 @@sep sub}
+ {@@x @@y0 @@sep add}
+ {@@x @@y0 @@sep sub} }%
+ \pnode(0,0){\oenodeCenter{}}
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\eleccoupler@comp}
+% \begin{macrocode}
+\def\eleccoupler@comp{%
+ \POE@comp@rectangle
+ \psline(!\POE@dict{@@x -0.7 mul @@y0 @@sep sub @@y 0.15 mul add})%
+ (!\POE@dict{@@x 0.7 mul @@y0 @@sep add @@y 0.15 mul sub})%
+ \psline(!\POE@dict{@@x 0.7 mul @@y0 @@sep sub @@y 0.15 mul add})%
+ (!\POE@dict{@@x -0.7 mul @@y0 @@sep add @@y 0.15 mul sub})%
+ \psline[style=Wire, arrows=-, ArrowInside=-](\oenodeIfc{1}{})(\oenodeIfc{3}{})
+ \ifx\POE@key@eleccouplertype\POE@str@directional
+ \ifx\POE@key@eleccouplerinput\POE@str@left
+ \psline[style=Wire, arrows=-, ArrowInside=-]([Xnodesep=-0.1]\oenodeIfc{2}{})(\oenodeIfc{N}{})
+ \else
+ \psline[style=Wire, arrows=-, ArrowInside=-](\oenodeIfc{2}{})([Xnodesep=0.1]\oenodeIfc{N}{})
+ \fi
+ \pscustom[style=OptComp]{%
+ \moveto(!\POE@dict{@@x 0.15 add
+ \ifx\POE@key@eleccouplerinput\POE@str@left neg \fi
+ @@y0 @@sep sub 0.14 add})
+ \rlineto(0,-0.04)
+ \multido{\rx=0.12+-0.08}{4}{%
+ \rlineto(0.05,-0.02)
+ \rlineto(-0.1,-0.04)
+ \rlineto(0.05,-0.02)
+ }%
+ \rlineto(0,-0.04)
+ }%
+ \else
+ \psline[style=Wire, arrows=-, ArrowInside=-](\oenodeIfc{2}{})(\oenodeIfc{N}{})
+ \fi
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newOptexpElecDipole}
+% \begin{macrocode}
+\def\newOptexpElecDipole{%
+ \@ifnextchar[%]
+ {\POE@newelecdipole}{\POE@newelecdipole[]}%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\POE@newfiberdipole}
+% \begin{macrocode}
+\def\POE@newelecdipole[#1]#2{%
+ \@ifnextchar\bgroup
+ {\POE@newelecdipole@i[#1]{#2}}{\POE@newelecdipole@i[#1]{#2}{}}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\POE@newelecdipole@i}
+% \begin{macrocode}
+\def\POE@newelecdipole@i[#1]#2#3{%
+ \@ifundefined{#2@i}{%
+ \@namedef{#2}{\pst@object{#2}}%
+ \expandafter\def\csname #2@i\endcsname(##1)(##2){%
+ \@ifnextchar\bgroup%
+ {\@nameuse{#2@ii}(##1)(##2)}%
+ {\@nameuse{#2@ii}(##1)(##2){}}%
+ }%
+ \expandafter\def\csname #2@ii\endcsname(##1)(##2)##3{%
+ \addbefore@par{#3}%
+ \addafter@par{#1}%
+ \begin@OptexpObj
+ \ifPOE@backlayer
+ \POE@regNodes{##1}{##2}
+ \fi
+ \POE@drawcomponent{#2}{##3}
+ \ifPOE@backlayer
+ \POE@Verb{ (1) (N) (\oenode{}{}) CorrectDipoleIfc }%
+ \POE@PresetWireConn
+ \fi
+ \end@OptexpDipole
+ }%
+ \@ifundefined{#2@nodes}{\expandafter\def\csname #2@nodes\endcsname{\POE@elecdipole@nodes}}{}%
+ }{%
+ \PackageError{pst-optexp}{%
+ elecdipole component '#2' already defined}%
+ }%
+\ignorespaces}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\elecsynthesizer@ref}
+% \begin{macrocode}
+\newOptexpElecDipole{elecsynthesizer}{position=start, innercompalign=absolute}
+\def\elecsynthesizer@ref{%
+ \POE@setref{%
+ \POE@key@synthwidth\space 0.5 mul
+ \POE@key@synthheight\space 0.5 mul
+ 2 copy min /@@sz ED
+ \ifx\POE@key@synthshape\POE@str@circle
+ pop pop @@sz dup
+ \fi
+ /@@y ED /@@x ED
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\elecsynthesizer@comp}
+% \begin{macrocode}
+\def\elecsynthesizer@comp{%
+ \ifx\POE@key@synthshape\POE@str@circle
+ \pscircle(!\POE@dict{@@x0 @@y0}){!\POE@dict{@@x}}
+ \else
+ \POE@comp@rectangle
+ \fi
+ \psrotate(\oenodeCenter{}){!\POE@dict{@@ang}}{%
+ \psset{style=SynthStyle}%
+ \begingroup
+% \end{macrocode}
+% Negative units are not possible with parametric or function plots.
+% \begin{macrocode}
+ \let\POE@tempA\@empty
+ \let\POE@tempB\@empty
+ \ifdim\psxunit<0pt
+ \psset{xunit=-\psxunit}
+ \def\POE@tempA{-1 mul\space}%
+ \fi
+ \ifdim\psyunit<0pt
+ \psset{yunit=-\psyunit}
+ \def\POE@tempB{-1 mul\space}%
+ \fi
+ \ifx\POE@key@synthtype\POE@str@sine
+ \parametricplot[plotpoints=100]{-1}{1}{%
+ \POE@dict{@@sz 0.7 mul t mul t 180 mul \POE@tempA sin @@y -0.35 mul mul \POE@tempB }}%
+ \else\ifx\POE@key@synthtype\POE@str@pulse
+ \psplot[plotpoints=100]{-0.25}{0.25}{2.7182818 x 0.04 div dup mul neg exp 0.3 mul 0.13 sub \POE@tempB}%
+ \fi\fi
+ \endgroup
+ \ifx\POE@key@synthtype\POE@str@rectangle
+ \psline(!\POE@dict{@@sz -0.7 mul @@sz -0.35 mul})%
+ (!\POE@dict{@@sz 0.7 mul -1 1 \POE@key@synthrectwidth\space sub 2 mul add mul @@sz -0.35 mul})%
+ (!\POE@dict{@@sz 0.7 mul -1 1 \POE@key@synthrectwidth\space sub 2 mul add mul @@sz 0.35 mul})%
+ (!\POE@dict{@@sz 0.7 mul @@sz 0.35 mul})%
+ (!\POE@dict{@@sz 0.7 mul @@sz -0.35 mul})
+ \else\ifx\POE@key@synthtype\POE@str@sawtooth
+ \psline(!\POE@dict{@@sz -0.6 mul @@sz -0.4 mul})%
+ (!\POE@dict{@@sz 0.6 mul @@sz 0.4 mul})%
+ (!\POE@dict{@@sz 0.6 mul @@sz -0.4 mul})
+ \else\ifx\POE@key@synthtype\POE@str@triangle
+ \psline(!\POE@dict{@@sz -0.6 mul @@sz -0.4 mul})%
+ (!\POE@dict{0 @@sz 0.4 mul})%
+ (!\POE@dict{@@sz 0.6 mul @@sz -0.4 mul})
+ \else
+ \@ifundefined{elecsynthesizer@custom}{}{\elecsynthesizer@custom}%
+ \fi\fi\fi}%
+}%
+% \end{macrocode}
+% \end{macro}
%</stylefile>
%
% \chapter{The Postscript header file}
@@ -17002,13 +19210,13 @@ tx@OptexpDict begin
(Warning pst-optexp: ) exch strcat ==
} bind def
/CompUnknownWarning {
- (Component ') exch strcat (' unknown) strcat PrintWarning
+ (Component ') exch strcat (' unknown) strcat Warning
} bind def
/OneFiberCompWarning {
- (Found only one fiber component in beam path, drawing no beam) PrintWarning
+ (Found only one unsupported component in beam path, drawing no beam) Warning
} bind def
/FiberCompWarning {
- (Found a fiber component in beam path, stopping beam path) PrintWarning
+ (Found an unsupported component in beam path, stopping beam path) Warning
} bind def
% \end{macrocode}
% \end{macro}
@@ -17251,30 +19459,6 @@ tx@OptexpDict begin
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{GetInternalBeamNodesCompat}
-% Equivalent to \PSvar{GetInternalBeamNodes} only that it checks if the
-% component is ambiguous (i.e. it is a beamsplitter), in which case it returns
-% only the center node. Used only for the deprecated \opt{conn} parameter.
-% \begin{macrocode}
-/GetInternalBeamNodesCompat {
- exch dup 3 1 roll (C) NodeName dup tx@NodeDict exch known {
- @GetCenter ToVec
- 3 1 roll pop pop
- } {
- pop GetInternalBeamNodes
- } ifelse
-} bind def
-/GetInternalBeamNodeCompat {
- exch dup 3 1 roll (C) NodeName dup tx@NodeDict exch known {
- @GetCenter ToVec
- 3 1 roll pop pop
- } {
- pop NodeName @GetCenter ToVec
- } ifelse
-} bind def
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{InitOptexpComp}
% Initialize some global variables for positioning of external
% nodes. This is called at the beginning of every component.
@@ -17423,7 +19607,7 @@ tx@OptexpDict begin
% Define some constants.
% \begin{macrocode}
/relative 0 def /absolute 1 def /center 2 def
-/refl 0 def /trans 1 def /absorb 2 def
+/refl 0 def /trans 1 def /absorb 2 def /undefined -1 def
/desc 0 def /asc 1 def /amb 2 def
/ok 0 def /tir 1 def /missed 2 def
/bgRefIndex 0 def
@@ -17957,6 +20141,7 @@ tx@OptexpDict begin
Vec DotProd dup sprod lt 5 2 roll
GetIfcCenter 3 -1 roll exec GetIfcCenter @ABDist
centerDist lt and
+ centerDist -1 eq { pop dup 0 gt } if
{ /sprod ED /nextPlane ED } { pop pop } ifelse
} {
pop
@@ -19372,15 +21557,15 @@ tx@OptexpDict begin
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{RelFiberAngle}
+% \begin{macro}{RelConnAngle}
% Calculate start angle of \cs{nccurve} from CompA to CompB
%
% \begin{pssyntax}
-% \PSvar{Xb Yb Xa Ya A B} \PSvar{fiberalign} \PSop{RelFiberAngle} \PSvar{angle}
+% \PSvar{Xb Yb Xa Ya A B} \PSvar{fiberalign} \PSop{RelConnAngle} \PSvar{angle}
% \end{pssyntax}
% \begin{macrocode}
-/RelFiberAngle {
- (RelFiberAngle) DebugBegin
+/RelConnAngle {
+ (RelConnAngle) DebugBegin
/fiberalign ED
dup xcheck not { nametostr } if /CompB ED
dup xcheck not { nametostr } if /CompA ED
@@ -19405,10 +21590,10 @@ tx@OptexpDict begin
4 2 roll @ABVect 4 2 roll
CompB
fiberalign center eq {
- RelFiberAngle@center
+ RelConnAngle@center
}{
3 1 roll pop pop
- RelFiberAngle@ref
+ RelConnAngle@ref
} ifelse
2 copy exch atan
7 3 roll 2 copy 9 -2 roll
@@ -19427,10 +21612,10 @@ tx@OptexpDict begin
% on stack: Xac-Xa Yac-Xa Xa Ya
% \begin{macrocode}
CompA fiberalign center eq {
- RelFiberAngle@center
+ RelConnAngle@center
}{
3 1 roll pop pop
- RelFiberAngle@tref
+ RelConnAngle@tref
} ifelse
2 copy exch atan
% \end{macrocode}
@@ -19443,40 +21628,40 @@ tx@OptexpDict begin
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{/RelFiberAngle@ref}
+% \begin{macro}{/RelConnAngle@ref}
% Calculate the vector of the reference line of \PSvar{CompA}.
% \begin{pssyntax}
-% \PSstring{CompA} \PSop{RelFiberAngle@ref} \PSvar{dX dY}
+% \PSstring{CompA} \PSop{RelConnAngle@ref} \PSvar{dX dY}
% \end{pssyntax}
% \begin{macrocode}
-/RelFiberAngle@ref {
+/RelConnAngle@ref {
dup (A) NodeName exch (B) NodeName
@GetCenter 3 -1 roll @GetCenter @ABVect
} bind def
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{/RelFiberAngle@tref}
-% Same as \PSname{RelFiberAngle@ref} but uses the transformed reference nodes.
+% \begin{macro}{/RelConnAngle@tref}
+% Same as \PSname{RelConnAngle@ref} but uses the transformed reference nodes.
% \begin{pssyntax}
-% \PSvar{CompA} \PSop{RelFiberAngle@ref} \PSvar{dX dY}
+% \PSvar{CompA} \PSop{RelConnAngle@ref} \PSvar{dX dY}
% \end{pssyntax}
% \begin{macrocode}
-/RelFiberAngle@tref {
+/RelConnAngle@tref {
dup (TrefA) NodeName exch (TrefB) NodeName
@GetCenter 3 -1 roll @GetCenter @ABVect
} bind def
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{/RelFiberAngle@center}
+% \begin{macro}{/RelConnAngle@center}
% Calculate the vector from the center node of \PSvar{CompA} to the
% node \PSstring{Xa, Ya}.
% \begin{pssyntax}
-% \PSvar{Xa Ya CompA} \PSop{RelFiberAngle@center} \PSvar{dX dY}
+% \PSvar{Xa Ya CompA} \PSop{RelConnAngle@center} \PSvar{dX dY}
% \end{pssyntax}
% \begin{macrocode}
-/RelFiberAngle@center {
+/RelConnAngle@center {
(Center) NodeName @GetCenter 4 2 roll @ABVect
} bind def
% \end{macrocode}
@@ -19657,7 +21842,7 @@ end % tx@OptexpDict
% \Finale
% \endinput
%
-%<*indexstyle>
+%<*indexstyle>font-size
headings_flag 1
heading_prefix "\\textbf{"
heading_suffix "}\n"
@@ -19667,15 +21852,15 @@ actual '='
preamble
"\\begin{theindex}\n"
item_1
- "\\par\\leavevmode\\hangindent10pt\\makebox[15pt][l]{ -- }"
+ "\\par\\leavevmode\\hangindent10pt\\makebox[25pt][r]{ -- }"
item_01
- "\\par\\leavevmode\\hangindent10pt\\makebox[15pt][l]{ -- }"
+ "\\par\\leavevmode\\hangindent10pt\\makebox[25pt][r]{ -- }"
item_x1
- "\\par\\leavevmode\\hangindent10pt\\makebox[15pt][l]{ -- }"
+ "\\par\\leavevmode\\hangindent10pt\\makebox[25pt][r]{ -- }"
item_2
- "\\par\\leavevmode\\hangindent20pt\\makebox[30pt][l]{ -- -- }"
+ "\\par\\leavevmode\\hangindent20pt\\makebox[50pt][r]{ -- -- }"
item_12
- "\\par\\leavevmode\\hangindent20pt\\makebox[30pt][l]{ -- -- }"
+ "\\par\\leavevmode\\hangindent20pt\\makebox[50pt][r]{ -- -- }"
item_x2
- "\\par\\leavevmode\\hangindent20pt\\makebox[30pt][l]{ -- -- }"
+ "\\par\\leavevmode\\hangindent20pt\\makebox[50pt][r]{ -- -- }"
%</indexstyle>
diff --git a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins
index db441875f62..4553e8a9124 100644
--- a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins
+++ b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins
@@ -53,7 +53,7 @@
This is a generated file.
Project: pst-optexp
-Version: 3.6 (2013/03/20)
+Version: 4.0 (2013/04/15)
Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net>