diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty | 97 |
1 files changed, 66 insertions, 31 deletions
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 91a84e34d89..c8b7a378dbd 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.4 (2013/07/14) +%% Version: 4.5 (2013/07/21) %% %% Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net> %% @@ -31,7 +31,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{pst-optexp} - [2013/07/14 v4.4 Optical experimental setups with PSTricks] + [2013/07/21 v4.5 Optical experimental setups with PSTricks] \RequirePackage{ifthen} \RequirePackage{pstricks} \RequirePackage{pst-xkey} @@ -64,6 +64,7 @@ \def\pst@optexpdict{tx@OptexpDict begin } \def\POE@dict#1{\pst@optexpdict #1 end} \def\POE@Verb#1{\pst@Verb{\pst@optexpdict #1 end }}% +\let\POE@tx@Line\tx@Line \SpecialCoor \newif\ifPOE@backlayer \newif\ifPOE@frontlayer @@ -80,6 +81,7 @@ \newif\ifPOE@startbox \newif\ifPOE@thicklens \newif\ifPOE@usefiberstyle +\newif\ifPOE@usewirestyle \newif\ifPOE@fiberin@ \newif\ifPOE@fiberin@top \newif\ifPOE@fiberin@bottom @@ -168,6 +170,7 @@ \def\POE@str@standard{standard} \def\POE@str@top{top} \def\POE@str@transmittive{transmittive} +\def\POE@str@transparency{transparency} \def\POE@str@triangle{triangle} \def\POE@str@vector{vector} \def\POE@str@verbose{verbose} @@ -305,6 +308,15 @@ \newpsstyle{VariableCoupler}{arrowinset=0, arrows=->} \define@boolkey[psset]{optexp}[POE@component@]{optional}[true]{} \define@boolkey[psset]{optexp}[POE@]{usefiberstyle}[true]{} +\define@choicekey[psset]{optexp}{usewirestyle}% + [\val\nr]{true,false}[true]{% + \psset[optexp]{usefiberstyle=false}% + \ifcase\nr\relax + \POE@usewirestyletrue + \or + \POE@usewirestylefalse + \fi}% +\define@boolkey[psset]{optexp}[POE@]{usewirestyle}[true]{} \define@boolkey[psset]{optexp}[POE@debug@]{showoptdots}[true]{} \define@boolkey[psset]{optexp}[POE@debug@]{showifcnodes}[true]{} \define@boolkey[psset]{optexp}[POE@]{endbox}[true]{} @@ -1488,6 +1500,32 @@ \define@key[psset]{optexp}{ArrowInsideMaxLength}{% \def\POE@key@ArrowInsideMaxLength{#1}% }% +\define@choicekey[psset]{optexp}{fadeto}[\val\nr]{white,black,transparency}{% + \def\POE@key@fadeto{#1}% +}% +\define@key[psset]{optexp}{fadefunc}{% + \def\POE@key@fadefunc{#1}% +}% +\define@key[psset]{optexp}{fadefuncname}{% + \def\POE@key@fadefuncname{#1}% +}% +\define@key[psset]{optexp}{fadepoints}{% + \def\POE@key@fadepoints{#1}% +}% +\def\psls@fade{% + \pst@optexpdict + \ifx\POE@key@fadefunc\@empty\else + /fadefunc@custom {\POE@key@fadefunc} def + \fi + /fadecorrect \ifx\POE@key@fadeto\POE@str@transparency 0 \else 0.1 \fi def + \pst@usecolor\pslinecolor + \POE@key@fadepoints\space + \psk@strokeopacityalpha + currentdict /fadeto@\POE@key@fadeto\space dup 3 1 roll known not { pop /fadeto@white } if load + currentdict /fadefunc@\POE@key@fadefuncname\space dup 3 1 roll known not { pop /fadefunc@linear } if load + FadeStroke + end +}% \psset[optexp]{% raytrace=true ,useNA=true @@ -1515,6 +1553,10 @@ ,startinsidecount=-1 ,ArrowInsideMinLength=0.2 ,ArrowInsideMaxLength=-1 + ,fadepoints=200 + ,fadeto=white + ,fadefunc=\@empty + ,fadefuncname=linear }% \define@key[psset]{optexp}{fiber}[all]{% \POE@psset@fibercheck#1\@nil @@ -2124,6 +2166,7 @@ /useNA \ifPOE@useNA true \else false \fi def /aligntovector \ifx\POE@key@beamnodealign\POE@str@vector true \else false \fi def }% + \let\tx@Line\POE@tx@Line }% \def\begin@WideBeamObj{% \addbefore@par{style=Beam}% @@ -2652,6 +2695,13 @@ \fi \fi }% +\def\POE@usefiberorwirestyle{% + \ifPOE@usefiberstyle + \psset{style=Fiber, arrows=-, ArrowInside=-}% + \else\ifPOE@usewirestyle + \psset{style=Wire, arrows=-, ArrowInside=-}% + \fi\fi +}% \def\POE@checkcompname#1{% \@expandtwoargs\in@{,#1,}{,\POE@complist,}% \ifin@\else @@ -2851,6 +2901,7 @@ \POE@transformnode{\oenodeRefA{}}{\oenodeTrefA{}}% \POE@transformnode{\oenodeRefB{}}{\oenodeTrefB{}}% }% + \def\tx@Line{Line }% }% \let\POE@disablepos\relax \def\begin@OptexpTripole{% @@ -4574,9 +4625,7 @@ \def\optmzm@comp{% \POE@comp@rectangle \begingroup - \ifPOE@usefiberstyle - \psset{style=Fiber, arrows=-, ArrowInside=-} - \fi + \POE@usefiberorwirestyle \psline(! \POE@dict{@@x} neg 0)(! \POE@dict{@@x} -0.7 mul 0)% (! \POE@dict{@@x} -0.4 mul \POE@dict{@@y} 0.6 mul)% (! \POE@dict{@@x 0.4 mul @@y 0.6 mul})% @@ -4612,33 +4661,25 @@ \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 + \POE@usefiberorwirestyle \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 + \POE@usefiberorwirestyle \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 + \POE@usefiberorwirestyle \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 + \POE@usefiberorwirestyle \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} @@ -4675,9 +4716,7 @@ \psline[style=Fiber, arrows=-, ArrowInside=-](\oenodeIn{})(\oenodeOut{}) \fi \bgroup - \ifPOE@usefiberstyle - \psset{style=Fiber, arrows=-, ArrowInside=-}% - \fi + \POE@usefiberorwirestyle \ifx\POE@key@polcontroltype\POE@str@linear \multips(! -2 \@sz mul \@sz)(! 2 \@sz mul 0){3}{% \pscircle(0,0){\POE@key@polcontrolsize}% @@ -4724,25 +4763,21 @@ \POE@comp@rectangle \pstVerb{tx@Dict begin /@lw \POE@clw def end}% \bgroup - \ifPOE@usefiberstyle - \psset{style=Fiber, arrows=-, ArrowInside=-} - \fi - \psline[arrows=-](! \POE@dict{@@x} neg 0)% - (! \POE@dict{@@x} -0.6 mul @lw sub 0)% - \psline[arrows=-](! \POE@dict{@@x} 0.6 mul 0)(! \POE@dict{@@x} 0)% + \POE@usefiberorwirestyle + \psset{arrows=-, ArrowInside=-}% + \psline(! \POE@dict{@@x} neg 0)(! \POE@dict{@@x} -0.6 mul @lw sub 0)% + \psline(! \POE@dict{@@x} 0.6 mul 0)(! \POE@dict{@@x} 0)% \egroup \ifx\POE@key@switchstyle\POE@str@closed% \bgroup - \ifPOE@usefiberstyle - \psset{style=Fiber} - \fi + \POE@usefiberorwirestyle \psdot[dotsize=3\pslinewidth](! \POE@dict{@@x} 0.6 mul 0)% \psdot[dotsize=3\pslinewidth](! \POE@dict{@@x} -0.6 mul 0)% - \psline[arrows=-, linewidth=1.5\pslinewidth]% + \psline[arrows=-, ArrowInside=-, linewidth=1.5\pslinewidth]% (! \POE@dict{@@x} -0.6 mul @lw)(! \POE@dict{@@x} 0.6 mul @lw)% \egroup \else - \psline[arrows=-, linewidth=1.5\pslinewidth]% + \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})% \pscircle(! \POE@dict{@@x} -0.6 mul 0){\pslinewidth}% |