diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/pst-optexp')
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty | 126 |
1 files changed, 82 insertions, 44 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 b3d4416dad4..43653daae39 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: 3.5 (2013/02/22) +%% Version: 3.6 (2013/03/20) %% %% Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net> %% @@ -31,7 +31,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{pst-optexp} - [2013/02/22 v3.5 Optical experimental setups with PSTricks] + [2013/03/20 v3.6 Optical experimental setups with PSTricks] \RequirePackage{pstricks} \RequirePackage{pst-xkey} \RequirePackage{pst-node} @@ -237,30 +237,55 @@ \define@boolkey[psset]{optexp}[POE@]{usefiberstyle}[true]{} \define@boolkey[psset]{optexp}[POE@debug@]{showoptdots}[true]{} \define@boolkey[psset]{optexp}[POE@debug@]{showifcnodes}[true]{} +\define@boolkey[psset]{optexp}[POE@]{endbox}[true]{} +\define@boolkey[psset]{optexp}[POE@]{startbox}[true]{} \define@choicekey*+[psset]{optexp}{position}[\val\nr]{start,end}{% \ifcase\nr\relax \psset[optexp]{startbox, endbox=false}% \or \psset[optexp]{startbox=false, endbox=true}% \fi -}{\edef\POE@key@position{#1}}% +}{% + \psset[optexp]{startbox=false, endbox=false}% + \edef\POE@key@position{#1}% +}% \define@choicekey*+[psset]{optexp}{abspos}[\val\nr]{start,end}{% \ifcase\nr\relax \psset[optexp]{startbox, endbox=false}% \or \psset[optexp]{startbox=false, endbox=true}% \fi -}{\edef\POE@key@abspos{#1}}% +}{% + \psset[optexp]{startbox=false, endbox=false}% + \edef\POE@key@abspos{#1}% +}% \define@key[psset]{optexp}{compshift}{% \pst@checknum{#1}\POE@key@compshift } \define@key[psset]{optexp}{angle}{% \pst@checknum{#1}\POE@key@angle } +\define@key[psset]{optexp}{compoffset}{% + \pst@checknum{#1}\POE@key@compoffset +} +\define@choicekey+[psset]{optexp}{innercompalign}% + [\val\nr]{rel,abs,relative,absolute}% + {% + \ifcase\nr\relax + \let\POE@key@innercompalign\POE@str@relative + \or + \let\POE@key@innercompalign\POE@str@absolute + \else + \def\POE@key@innercompalign{#1}% + \fi + }% + {\PackageError{pst-optexp}{Unknown value '\val' for innercompalign}}% \psset[optexp]{% position={}, abspos={}, compshift=0, + compoffset=0, + innercompalign=relative, angle=0 }% \define@boolkey[psset]{optexp}[POE@]{backlayer}[true]{} @@ -583,8 +608,6 @@ \fi \psset[optexp]{optboxwidth=#1, optboxheight=#2}% }% -\define@boolkey[psset]{optexp}[POE@]{endbox}[true]{} -\define@boolkey[psset]{optexp}[POE@]{startbox}[true]{} \psset[optexp]{% optboxwidth=1.4, optboxheight=0.8 @@ -1211,8 +1234,8 @@ \define@boolkey[psset]{optexp}[POE@]{forcebeaminside}[true]{}% \define@boolkey[psset]{optexp}[POE@]{raytrace}[true]{}% \define@boolkey[psset]{optexp}[POE@]{useNA}[true]{}% -\define@key[psset]{optexp}{skipconn}{% - \pst@checknum{#1}\POE@key@skipconn +\define@key[psset]{optexp}{beampathskip}{% + \pst@checknum{#1}\POE@key@beampathskip }% \define@choicekey+[psset]{optexp}{beamalign}% [\val\nr]{rel,abs,relative,absolute}% @@ -1252,7 +1275,7 @@ ,beamwidth=0 ,beamdiv=0 ,n=1.5 - ,skipconn=0 + ,beampathskip=0 ,ArrowInsideMinLength=0.2 ,ArrowInsideMaxLength=-1 }% @@ -1589,7 +1612,7 @@ \else relative \fi def - /skipconn \POE@key@skipconn\space def + /beampathskip \POE@key@beampathskip\space def /useNA \ifPOE@useNA true \else false \fi def }% }% @@ -1929,7 +1952,7 @@ \fi \POE@getlastcomp#2% \ifnum\POE@firstcomp>\the\POE@cnt - \ifnum\POE@lastcomp>\the\POE@cnt + \ifnum\POE@lastcomp>\the\POE@cnt\relax \PackageError{pst-optexp}% {All components \POE@firstcomp-\POE@lastcomp\space out of range}% \fi @@ -1957,14 +1980,13 @@ \fi }% \def\POE@getlastcomp#1-{% - \ifx\\#1\\% + \ifx\@empty#1\relax + \ifnum\POE@firstcomp>\the\POE@cnt\relax + \PackageError{pst-optexp}{All components \POE@firstcomp- out of range.}% + \fi \edef\POE@lastcomp{\the\POE@cnt}% \else - \ifx\@empty#1\relax - \edef\POE@lastcomp{\the\POE@cnt}% - \else - \edef\POE@lastcomp{#1}% - \fi + \edef\POE@lastcomp{#1}% \fi }% \def\POE@getcomps#1#2{% @@ -2331,15 +2353,15 @@ \POE@str@basicname@prefix\POE@str@basicname@default BeamLow% \ifx\\#1\\1\else#1\fi }% -\def\oe@BeamVec#1#2{% +\def\POE@beamvec#1#2{% \POE@dict{% /prevVec#1\ifx\\#2\\1\else#2\fi\space dup currentdict exch known { load exec }{ pop 0 0 } ifelse }% }% -\def\oeBeamVec#1{\oe@BeamVec{}{#1}}% -\def\oeBeamVecUp#1{\oe@BeamVec{Up}{#1}}% -\def\oeBeamVecLow#1{\oe@BeamVec{Low}{#1}}% +\def\oeBeamVec#1{\POE@beamvec{}{#1}}% +\def\oeBeamVecUp#1{\POE@beamvec{Up}{#1}}% +\def\oeBeamVecLow#1{\POE@beamvec{Low}{#1}}% \def\POE@useifccode{% \POE@Verb{% [ \pst@code @@ -2442,7 +2464,7 @@ \POE@Verb{InitOptexpComp }% \use@par \let\POE@key@comp@Yshift\POE@key@compshift% - \def\POE@key@comp@Xshift{0}% + \let\POE@key@comp@Xshift\POE@key@compoffset% \edef\POE@refnodeA{\oenodeRefA{}}% \edef\POE@refnodeB{\oenodeRefB{}}% \edef\POE@trefnodeA{\oenodeTrefA{}}% @@ -2457,7 +2479,7 @@ \def\begin@OptexpTripole{% \begin@OptexpObj \def\POE@key@comp@Xshift{\POE@key@compshift\space neg }% - \def\POE@key@comp@Yshift{0}% + \let\POE@key@comp@Yshift\POE@key@compoffset \def\POE@disablepos{% \let\POE@key@abspos\@empty \let\POE@key@position\@empty @@ -2494,8 +2516,8 @@ \edef\pst@par{\the\pst@toks,\the\toks@}% \fi% }% -\def\getCLWH{CLW \pst@number\psxunit 2 mul div }% -\def\getCLW{CLW \pst@number\psxunit div }% +\def\POE@clwh{CLW \pst@number\psxunit 2 mul div }% +\def\POE@clw{CLW \pst@number\psxunit div }% \let\POE@restorerefnodes\relax \def\newOptexpDipole{% \@ifnextchar[%] @@ -3244,7 +3266,7 @@ {\POE@drawcomponent@i}{\POE@drawcomponent@i[]}% }% \def\POE@drawcomponent@i[#1]#2#3{% - \def\@@comp{% + \def\POE@comp{% #3% \ifx\POE@key@extnode\@empty\else \ifPOE@backlayer @@ -3267,6 +3289,7 @@ \ifx\\#1\\\else \@ifundefined{#1@ref}{}{\@nameuse{#1@ref}}% \fi + \begingroup \ifPOE@endbox \psset[optexp]{abspos={% \POE@dict{% @@ -3281,20 +3304,19 @@ \POE@disablepos \ncline[linestyle=none,fillstyle=none,npos=,arrows=-,ArrowInside=-]% {\POE@refnodeA}{\POE@refnodeB}% - \begingroup \psset{style=OptComp}% \ifPOE@component@optional \psset{style=OptionalStyle}% \fi \ifx\POE@key@abspos\@empty \ifx\POE@key@position\@empty - \ncput[nrot=:U,npos=]{\POE@putcomp{\@@comp}}% + \ncput[nrot=:U,npos=]{\POE@putcomp{\POE@comp}}% \else - \ncput[nrot=:U,npos=\POE@key@position]{\POE@putcomp{\@@comp}}% + \ncput[nrot=:U,npos=\POE@key@position]{\POE@putcomp{\POE@comp}}% \fi \else \POE@nlput[nrot=:U](\POE@refnodeA)(\POE@refnodeB)% - {\POE@key@abspos}{\POE@putcomp{\@@comp}}% + {\POE@key@abspos}{\POE@putcomp{\POE@comp}}% \fi \endgroup \ifPOE@backlayer @@ -3504,7 +3526,7 @@ (! \@ht neg 0)(! \@ht 0) \else \psline[linewidth=\POE@key@mirrorlinewidth]% - (! \@ht neg \getCLWH)(! \@ht \getCLWH) + (! \@ht neg \POE@clwh)(! \@ht \POE@clwh) \fi \else \ifdim\POE@key@mirrorradius pt<0pt @@ -3930,8 +3952,8 @@ \pspolygon(! \@sz -0.2 mul \@sz -0.4 mul)% (! \@sz 0.6 mul \@sz -0.4 mul)% (! \@sz 0.2 mul \@sz 0.4 mul)% - \psline(! \@sz -0.2 mul \@sz 0.4 mul \getCLWH add)% - (! \@sz 0.6 mul \@sz 0.4 mul \getCLWH add) + \psline(! \@sz -0.2 mul \@sz 0.4 mul \POE@clwh add)% + (! \@sz 0.6 mul \@sz 0.4 mul \POE@clwh add) \psset{arrows=->, arrowinset=0, arrowscale=0.8}% \psline(! \@sz -0.8 mul \@sz 0.3 mul)% (! \@sz -0.3 mul \@sz 0.15 mul)% @@ -3962,8 +3984,8 @@ \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 \getCLWH add \@sz 0.2 mul)% - (! \@sz 0.2 mul \getCLWH add \@sz -0.2 mul) + \psline(! \@sz 0.2 mul \POE@clwh add \@sz 0.2 mul)% + (! \@sz 0.2 mul \POE@clwh add \@sz -0.2 mul) \ignorespaces}% \def\doveprism@ref{% \POE@setref{/@@x \POE@key@doveprismwidth\space 0.5 mul def @@ -4054,7 +4076,11 @@ \edef\@ang{\POE@key@prismangle\space 0.5 mul\space}% \edef\@hshift{% \ifx\POE@key@prismalign\POE@str@auto - \@sz 0.6 mul \@ang tan mul \POE@dict{OEangle} 0.5 mul tan div + \POE@dict{OEangle} 1e-5 lt { + 0 + } { + \@sz 0.6 mul \@ang tan mul \POE@dict{OEangle} 0.5 mul tan div + } ifelse \else 0 \fi @@ -4074,7 +4100,11 @@ \edef\@altan{\POE@key@prismangle\space 0.5 mul tan }% \edef\@hshift{% \ifx\POE@key@prismalign\POE@str@auto - \@sz 0.6 mul \@altan mul \POE@dict{OEangle} 0.5 mul tan div + \POE@dict{OEangle} 1e-5 lt { + 0 + } { + \@sz 0.6 mul \@altan mul \POE@dict{OEangle} 0.5 mul tan div + } ifelse \else 0 \fi @@ -4157,9 +4187,17 @@ (! \POE@dict{@@x} -0.7 mul 0)% \egroup \ignorespaces}% -\def\optfilter@ref{% - \POE@setref{\POE@key@filtersize\space 0.5 mul dup /@@y ED /@@x ED }% -}% + \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 + }% + }% \let\optfilter@nodes\dipole@nodes \def\optfilter@comp{% \edef\@sz{\POE@key@filtersize\space 0.5 mul }% @@ -4169,7 +4207,7 @@ 90 add cos 0.2 \@sz mul mul}% }% \psframe[dimen=outer](! \@sz neg dup)(! \@sz dup) - \psrotate(\oenodeCenter{}){\POE@key@filterangle}{% + \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)% @@ -4304,7 +4342,7 @@ \def\optswitch@comp{% \psframe[dimen=outer](! \POE@dict{@@x neg @@y neg})% (! \POE@dict{@@x @@y})% - \pstVerb{tx@Dict begin /@lw \getCLW def end}% + \pstVerb{tx@Dict begin /@lw \POE@clw def end}% \bgroup \ifPOE@usefiberstyle \psset{style=Fiber, arrows=-, ArrowInside=-} @@ -4561,8 +4599,8 @@ \def\fibercollimator@comp{% \def\@wd{\POE@key@fibercolwidth\space 0.5 mul }% \def\@ht{\POE@key@fibercolheight\space 0.5 mul }% - \pspolygon(!\@wd neg \getCLWH add \@ht neg)% - (!\@wd 0)(!\@wd neg \getCLWH add \@ht) + \pspolygon(!\@wd neg \POE@clwh add \@ht neg)% + (!\@wd 0)(!\@wd neg \POE@clwh add \@ht) }% \endinput %% |