From 7ca4a6a3feb7f041867bbc46e876888b3379234b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 1 Dec 2013 23:02:12 +0000 Subject: pst-optexp (1dec13) git-svn-id: svn://tug.org/texlive/trunk@32294 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/pst-optexp/pst-optexp.sty | 171 ++++++++++++++++----- 1 file changed, 136 insertions(+), 35 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty b/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty index c8b7a378dbd..9602efcbc19 100644 --- a/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty +++ b/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pst-optexp -%% Version: 4.5 (2013/07/21) +%% Version: 4.6 (2013/11/27) %% %% Copyright (C) 2007-2013 by Christoph Bersch %% @@ -31,7 +31,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{pst-optexp} - [2013/07/21 v4.5 Optical experimental setups with PSTricks] + [2013/11/27 v4.6 Optical experimental setups with PSTricks] \RequirePackage{ifthen} \RequirePackage{pstricks} \RequirePackage{pst-xkey} @@ -136,6 +136,7 @@ \def\POE@str@cross{cross} \def\POE@str@cube{cube} \def\POE@str@custom{custom} +\def\POE@str@default{default} \def\POE@str@diode{diode} \def\POE@str@directional{directional} \def\POE@str@ellipse{ellipse} @@ -168,6 +169,7 @@ \def\POE@str@semitrans{semitrans} \def\POE@str@sine{sine} \def\POE@str@standard{standard} +\def\POE@str@symmetric{symmetric} \def\POE@str@top{top} \def\POE@str@transmittive{transmittive} \def\POE@str@transparency{transparency} @@ -457,11 +459,38 @@ \fi }% {\PackageError{pst-optexp}{Unknown value '\val' for extnodealign}} +\define@key[psset]{optexp}{extnodes}{% + \edef\POE@key@extnode{#1}% + \ifx\@empty\POE@key@extnode + \edef\POE@key@extnode@cnt{1}% + \edef\POE@key@extnode@xrefs{0 }% + \edef\POE@key@extnode@yrefs{0 }% + \else + \def\POE@key@extnode@xrefs{}% + \def\POE@key@extnode@yrefs{}% + \psForeach{\POE@tempD}{#1,}{% + \ifx\POE@tempD\@empty + \advance\psLoopIndex by -1 + \else + \pst@expandafter\POE@psset@@extnode{\POE@tempD}\@empty,,\@nil + \edef\POE@key@extnode@xrefs{\POE@key@extnode@xrefs\POE@key@extnode@xref\space}% + \edef\POE@key@extnode@yrefs{\POE@key@extnode@yrefs\POE@key@extnode@yref\space}% + \fi + }% + \edef\POE@key@extnode@cnt{\the\psLoopIndex}% + \fi +}% \define@key[psset]{optexp}{extnode}{% - \edef\POE@key@extnode{#1}% - \ifx\@empty\POE@key@extnode\else - \pst@expandafter\POE@psset@@extnode{#1}\@empty,,\@nil - \fi + \edef\POE@key@extnode{#1}% + \edef\POE@key@extnode@cnt{1}% + \ifx\@empty\POE@key@extnode + \edef\POE@key@extnode@xrefs{0 }% + \edef\POE@key@extnode@yrefs{0 }% + \else + \pst@expandafter\POE@psset@@extnode{#1}\@empty,,\@nil + \edef\POE@key@extnode@xrefs{\POE@key@extnode@xref}% + \edef\POE@key@extnode@yrefs{\POE@key@extnode@yref}% + \fi }% \def\POE@key@extnode@xref{0}% \def\POE@key@extnode@yref{0}% @@ -1024,7 +1053,17 @@ \fi \pst@checknum{#1}\POE@key@optdipolewidth }% -\psset[optexp]{optdipolesize=0 0}% +\define@key[psset]{optexp}{optdipolecomp}{% + \def\POE@key@optdipolecomp{#1}% +} +\define@key[psset]{optexp}{opttripolecomp}{% + \def\POE@key@opttripolecomp{#1}% +} +\psset[optexp]{% + optdipolesize=0 0, + optdipolecomp=, + opttripolecomp=% +}% \define@key[psset]{optexp}{fiberloops}{% \pst@checknum{#1}\POE@key@fiberloops } @@ -3292,6 +3331,7 @@ \pnode(!\POE@tempc \POE@tempd \POE@dict{VecAdd 0.5 VecScale} \tx@UserCoor){\oenodeRefB{}} + \POE@regNodes@ \POE@Verb{% gsave STV CP T @@ -3394,9 +3434,12 @@ \def\POE@regNodes#1#2{% \pnode(#1){\oenodeRefA{}} \pnode(#2){\oenodeRefB{}} + \POE@regNodes@ +\ignorespaces}% +\def\POE@regNodes@{% \POE@Verb{% - /@xref \POE@key@extnode@xref\space def - /@yref \POE@key@extnode@yref\space def + /@xref [\POE@key@extnode@xrefs] def + /@yref [\POE@key@extnode@yrefs] def /@@ang \ifx\POE@key@innercompalign\POE@str@absolute /N@\POE@refnodeA\space /N@\POE@refnodeB\space SlopeAngle @@ -3546,19 +3589,45 @@ \newOptexpTripole[ref@angle=45]{rightangleprism} \newOptexpTripole[ref@angle=45]{optprism} \def\optdipole{\pst@object{optdipole}} -\def\optdipole@i(#1)(#2)#3{% +\def\optdipole@i(#1)(#2){% \@ifnextchar\bgroup% - {\optdipole@ii(#1)(#2){#3}}% - {\optdipole@ii(#1)(#2){#3}{}}% + {\optdipole@iii(#1)(#2)}% + {\optdipole@ii(#1)(#2)}% }% -\def\optdipole@ii(#1)(#2)#3#4{% +\def\optdipole@ii(#1)(#2){% + \optdipole@v(#1)(#2){}{}% +}% +\def\optdipole@iii(#1)(#2)#3{% + \@ifnextchar\bgroup% + {\optdipole@iv(#1)(#2){#3}}% + {\optdipole@v(#1)(#2){#3}}% +}% +\def\optdipole@iv(#1)(#2)#3#4{% \addbefore@par{innercompalign=relative}% \begin@OptexpObj \ifPOE@backlayer - \POE@regNodes{#1}{#2} + \POE@regNodes{#1}{#2}% \fi \def\optdipole@comp{\psrotate(0,0){!\POE@dict{@@ang}}{#3}}% - \POE@drawcomponent{optdipole}{#4} + \POE@drawcomponent{optdipole}{#4}% + \ifPOE@backlayer + \POE@InternalConn + \fi + \end@OptexpObj +}% +\def\optdipole@v(#1)(#2)#3{% + \addbefore@par{innercompalign=relative}% + \begin@OptexpObj + \ifPOE@backlayer + \POE@regNodes{#1}{#2} + \fi + \ifx\POE@key@optdipolecomp\@empty + \def\optdipole@comp{\psrotate(0,0){!\POE@dict{@@ang}}{#3}}% + \POE@drawcomponent{optdipole}{} + \else + \def\optdipole@comp{\psrotate(0,0){!\POE@dict{@@ang}}{\POE@key@optdipolecomp}}% + \POE@drawcomponent{optdipole}{#3} + \fi \ifPOE@backlayer \POE@InternalConn \fi @@ -3572,12 +3641,20 @@ }% }% \def\opttripole{\pst@object{opttripole}} -\def\opttripole@i(#1)(#2)(#3)#4{% - \@ifnextchar\bgroup% - {\opttripole@ii(#1)(#2)(#3){#4}}% - {\opttripole@ii(#1)(#2)(#3){#4}{}}% +\def\opttripole@i(#1)(#2)(#3){% + \@ifnextchar\bgroup + {\opttripole@iii(#1)(#2)(#3)}% + {\opttripole@ii(#1)(#2)(#3)}% +}% +\def\opttripole@ii(#1)(#2)(#3){% + \opttripole@v(#1)(#2)(#3){}{}% +}% +\def\opttripole@iii(#1)(#2)(#3)#4{% + \@ifnextchar\bgroup + {\opttripole@iv(#1)(#2)(#3){#4}}% + {\opttripole@v(#1)(#2)(#3){#4}}% }% -\def\opttripole@ii(#1)(#2)(#3)#4#5{% +\def\opttripole@iv(#1)(#2)(#3)#4#5{% \addafter@par{ref@angle=0} \begin@OptexpTripole \ifPOE@backlayer @@ -3591,6 +3668,25 @@ \fi \end@OptexpTripole }% +\def\opttripole@v(#1)(#2)(#3)#4{% + \addafter@par{ref@angle=0} + \begin@OptexpTripole + \ifPOE@backlayer + \POE@calcNodes{#1}{#2}{#3}% + \POE@regNodes{#1}{#3}% + \fi + \ifx\POE@key@opttripolecomp\@empty + \def\opttripole@comp{#3}% + \POE@drawcomponent{opttripole}{}% + \else + \def\opttripole@comp{\POE@key@opttripolecomp}% + \POE@drawcomponent{opttripole}{#4}% + \fi + \ifPOE@backlayer + \POE@InternalConn + \fi + \end@OptexpTripole +}% \def\opttripole@nodes{\POE@tripole@nodes} \def\fibercollimator{\pst@object{fibercollimator}} \def\fibercollimator@i(#1)(#2){% @@ -3658,10 +3754,13 @@ \fi \ifx\POE@key@extnode\@empty\else \ifPOE@backlayer - \pnode(! \POE@dict{ - \POE@key@extnode@xref\space - \POE@key@extnode@yref\space - DefineExtNode}){\oenodeExt{}}% + \multido{\i=1+1}{\POE@key@extnode@cnt}{% + \pnode(! \POE@dict{ + @xref \i\space 1 sub get + @yref \i\space 1 sub get + DefineExtNode}){\oenode{Ext\i}{}}% + \pnode(\oenode{Ext1}{}){\oenodeExt{}}% + }% \POE@Verb{% tx@NodeDict begin /N@\oenodeExt{} load \ifnum9<1\POE@key@compname @@ -4288,15 +4387,17 @@ \POE@dict{ exch@ref@\oenode{}{} { -90 }{ 90 } ifelse } \POE@key@angle\space add }% - \edef\POE@temp{\POE@key@extnode@xref}% - \edef\POE@key@extnode@xref{% - \POE@dict{% - \POE@key@extnode@yref\space - exch@ref@\oenode{}{} { -1 mul } if } }% - \edef\POE@key@extnode@yref{% - \POE@dict{% - \POE@temp\space - exch@ref@\oenode{}{} { -1 mul } if } }% + \POE@Verb{% + @xref @yref + exch@ref@\oenode{}{} { + [ exch { neg } forall ] + } if + /@xref ED + exch@ref@\oenode{}{} { + [ exch { neg } forall ] + } if + /@yref ED + }% }% \def\transmissiongrating@nodes{% \newOptexpComp{% @@ -4778,8 +4879,8 @@ \egroup \else \psline[arrows=-, ArrowInside=-, linewidth=1.5\pslinewidth]% - (! \POE@dict{@@x} -0.6 mul @lw add @lw)% - (! \POE@dict{@@x 0.6 mul @@y 0.6 mul})% + (! \POE@dict{@@x} -0.6 mul @lw add @lw 0.5 mul)% + (! \POE@dict{@@x 0.45 mul @@y 0.6 mul})% \pscircle(! \POE@dict{@@x} -0.6 mul 0){\pslinewidth}% \psdot[dotsize=3\pslinewidth](! \POE@dict{@@x} 0.6 mul 0)% \fi -- cgit v1.2.3