diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/pst-optexp/Changes | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf | bin | 2854555 -> 2860933 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf | bin | 49687 -> 49600 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf | bin | 2808019 -> 2817070 bytes | |||
-rw-r--r-- | Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx | 329 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty | 195 |
8 files changed, 351 insertions, 186 deletions
diff --git a/Master/texmf-dist/doc/latex/pst-optexp/Changes b/Master/texmf-dist/doc/latex/pst-optexp/Changes index 9522d317b8a..0b568b3af96 100644 --- a/Master/texmf-dist/doc/latex/pst-optexp/Changes +++ b/Master/texmf-dist/doc/latex/pst-optexp/Changes @@ -1,3 +1,6 @@ +4.7 2014-01-12 + * Added syntax <\prm{num} for accessing relative component IDs. + 4.6 2013-11-27 * Added option extnodes. * Added option optdipolecomp. diff --git a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf Binary files differindex 1ca6dd0b60b..ba8c730dda0 100644 --- a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf +++ b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf diff --git a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf Binary files differindex 3be863aa5c9..7c324af5644 100644 --- a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf +++ b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf diff --git a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf Binary files differindex 6f551ec89c1..3da878c326c 100644 --- a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf +++ b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf diff --git a/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro b/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro index bcd6c0193b1..baf32e37473 100644 --- a/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro +++ b/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro @@ -9,9 +9,9 @@ %% This is a generated file. %% %% Project: pst-optexp -%% Version: 4.6 (2013/11/27) +%% Version: 4.7 (2014/01/12) %% -%% Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net> +%% Copyright (C) 2007-2014 by Christoph Bersch <usenet@bersch.net> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c 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 7bbc707a1b4..acc893eae3c 100644 --- a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx +++ b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net> +% Copyright (C) 2007-2014 by Christoph Bersch <usenet@bersch.net> % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -18,7 +18,7 @@ %<stylefile>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<stylefile>\ProvidesPackage{pst-optexp} %<*stylefile> - [2013/11/27 v4.6 Optical experimental setups with PSTricks] + [2014/01/12 v4.7 Optical experimental setups with PSTricks] %</stylefile> % %<*driver> @@ -111,7 +111,7 @@ oeBeamCenter, optplate, optretplate, pinhole, crystal, optdetector, optdiode, doveprism, glanthompson, polarization, mirror, beamsplitter, optgrating, optprism, rightangleprism, pentaprism, - optdipole, optripole, optfiber, optamp, optmzm, optfilter, + optdipole, opttripole, optfiber, optamp, optmzm, optfilter, polcontrol, optisolator, optswitch, fiberdelayline, optfiberpolarizer, fibercollimator, optcoupler, wdmcoupler, wdmsplitter, optcirculator, fiberbox, eleccoupler, elecsynthesizer, @@ -968,24 +968,27 @@ % \ifGERMAN % Ich danke allen Aktiven auf der PSTricks-Mailingliste für ihre Hilfe, % insbesondere Herbert Voß. Mein Dank gilt ebenfalls unterschiedlichen -% Paketautoren, von denen ich Code kopiert und viel gelernt habe: Florent -% Chervet, Rolf Niepraschk und Heiko Oberdiek. Christine Römer hat mich mit -% ihrem Artikel in der DTK\footnote{Pakete in Deutsch dokumentieren. in Die -% TeXnische Komödie. Heft 2/2011, S. 28-35.} überzeugt, ebenfalls eine deutsche -% Dokumentation bereitzustellen. Der Dokumentationsstil ist eine Mischung aus -% der \opt{pst-doc} Klasse (Herbert Voß) und dem \opt{ltxdockit} Paket für die -% \opt{biblatex} Dokumentation (Philipp Lehmann). +% Paketautoren, von denen ich Code kopiert und viel gelernt habe: David +% Carlisle, Florent Chervet, Enrico Gregorio, Rolf Niepraschk und Heiko +% Oberdiek. Christine Römer hat mich mit ihrem Artikel in der +% DTK\footnote{Pakete in Deutsch dokumentieren. in Die TeXnische +% Komödie. Heft 2/2011, S. 28-35.} überzeugt, ebenfalls eine deutsche +% Dokumentation bereitzustellen. Der Dokumentationsstil ist eine +% Mischung aus der \opt{pst-doc} Klasse (Herbert Voß) und dem +% \opt{ltxdockit} Paket für die \opt{biblatex} Dokumentation (Philipp +% Lehmann). % \fi % \ifENGLISH -% I thank all the people of the PSTricks mailinglist for the continuous help, -% especially Herbert Voß. Thanks also to various package authors from which I -% learned and adopted code for this package, Florent Chervet, Rolf Niepraschk -% and Heiko Oberdiek. Christine Römer convinced me with her article in the -% german DTK\footnote{Pakete in Deutsch dokumentieren. in Die TeXnische -% Komödie. Heft 2/2011, S. 28-35.} to provide a german translation of the -% documentation. The documentation style is a mixture of the \opt{pst-doc} class -% (Herbert Voß) and the \opt{ltxdockit} package for the \opt{biblatex} -% documentation (Philipp Lehman). +% I thank all the people of the PSTricks mailinglist for the continuous +% help, especially Herbert Voß. Thanks also to various package authors +% from which I learned and adopted code for this package: David +% Carlisle, Florent Chervet, Enrico Gregorio, Rolf Niepraschk and Heiko +% Oberdiek. Christine Römer convinced me with her article in the german +% DTK\footnote{Pakete in Deutsch dokumentieren. in Die TeXnische +% Komödie. Heft 2/2011, S. 28-35.} to provide a german translation of +% the documentation. The documentation style is a mixture of the +% \opt{pst-doc} class (Herbert Voß) and the \opt{ltxdockit} package for +% the \opt{biblatex} documentation (Philipp Lehman). % \fi % % \ifGERMAN @@ -6028,12 +6031,24 @@ % Alle Komponenten einer Aufbauskizze werden in Reihenfolge ihrer Definition im % Code aufsteigend nummeriert, angefangen bei \opt{1}. Die Komponenten und deren % Spezialknoten können immer über diese Nummer (ID) referenziert werden. +% +% IDs können auch relativ zur aktuellen ID über die Syntax +% \opt{<}\prm{num} angegeben werden: \opt{<1} ist die vorletzte ID, +% \opt{<2} die vorvorletzte ID usw. Die vorletzte ID kann abgekürzt auch +% mit \opt{<} erhalten werden, und die aktuelle ID mit \opt{<0}, was +% äquivalent zu einem leeren Parameter ist. % \fi % \ifENGLISH % All components of a setup drawing are numbered automatically in increasing % order according to their definition in the code, starting with \opt{1}. The % components as well as their special nodes can always be accessed by this -% number (ID). +% number (ID). +% +% ID specifications relative to the current ID can be used with the +% syntax \opt{<}\prm{num}: \opt{<1} is the previous ID, \opt{<2} is the +% current ID minus two etc. The previous ID can also be accessed by only +% \opt{<}, and the current ID is \opt{<0}, which is equivalent to an +% empty parameter. % \fi % % \begin{optionlist} @@ -6046,11 +6061,21 @@ % \Lenv*{pspicture}-Umgebung eindeutig sein. % \fi % \ifENGLISH -% Assigns a name identifier to a component, which can then be referenced both -% by this name and by its ID. The parameter can be assigned only in the -% optional Argument of a \nxLPack{pst-optexp} component and should be unique -% within one \Lenv*{pspicture} environment. +% Assigns a name identifier to a component, which can then be +% referenced both by this name and by its ID. The parameter can be +% assigned only locally, i.e. in the optional argument of a +% \nxLPack{pst-optexp} component, and should be unique within one +% \Lenv*{pspicture} environment. % \fi +% \end{optionlist} +% +% \ifGERMAN Beispiele für unterschiedliche Methoden auf ein und +% dieselbe Komponente zuzugreifen. +% \fi +% \ifENGLISH Examples for different methods to access the same +% component. +% \fi +% % \iffalse %<*ignore> % \fi @@ -6073,11 +6098,43 @@ \end{pspicture} \end{LTXexample} \fi -% \end{optionlist} % \iffalse %</ignore> % \fi % +% \ifGERMAN +% Die Verwendung von relativen IDs ist u.a. nützlich, um eine neue +% Komponente relativ zur vorangegangenen zu definieren. Die Verwendung +% von z.B. \Lcs{oenodeOut}\opt{\{\}} in den Referenzknoten ist nicht +% möglich, da hiermit zum Zeitpunkt der Auswertung der Koordinaten schon +% auf die neue, nicht fertige Komponente referenziert wird. Ein Aufruf +% der Art \lstinline!\optbox(\oenodeOut{})(B)! ist daher nicht möglich, +% und führt zu einem Fehler. Mit relativen IDs kann das allerdings mit +% \lstinline!\optbox(\oenodeOut{<})(B)! erreicht werden: +% \fi +% \ifENGLISH +% Using relative IDs can be very handy to define a component relative to +% the previous one. It is not possible to use +% e.g. \Lcs{oenodeOut}\opt{\{\}} as reference node, because at the time +% these coordinates are evaluated, they reference to the new, not yet +% defined component. A call like \lstinline!\optbox(\oenodeOut{})(B)! +% is, therefore, not possible and gives an error. With relative IDs one +% can achieve that with \lstinline!\optbox(\oenodeOut{<})(B)!: +% \fi +% \iffalse +%<*ignore> +% \fi +\begin{LTXexample} +\begin{pspicture}(4,2) + \psset{optboxsize=0.4 0.8, abspos=0.5} + \optbox(0,1)(4,1) + \multido{}{3}{\optbox(\oenodeOut{<})(4,1)} +\end{pspicture} +\end{LTXexample} +% \iffalse +%</ignore> +% \fi +% % \ifGERMAN\section{Referenzknoten}\fi % \ifENGLISH\section{Reference nodes}\fi % \label{sec:refnode} @@ -12917,6 +12974,10 @@ % % \begin{changelog} %\patchcmd{\release}{\setlength{\itemsep}{0pt}}{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}}{}{} +% \begin{release}{4.7}{2014-01-12} +% \item Added syntax \opt{<}\prm{num} for accessing relative component +% IDs\see{sec:namingobj} +% \end{release} % \begin{release}{4.6}{2013-11-27} % \item Added option \opt{extnodes}\see{prm:extnodes} % \item Added option \opt{optdipolecomp}\see{prm:optdipolecomp} @@ -16188,43 +16249,77 @@ \else \@tempcnta=#1 \fi - \POE@getlastcomp#2% - \ifnum\@tempcnta>\POE@cnt - \ifnum\@tempcntb>\POE@cnt - \PackageError{pst-optexp}% - {All components \the\@tempcnta-\the\@tempcntb\space out of range}% - \fi + \edef\POE@temp{\POE@getfirstchar#2\@nil}% + \expandafter\ifx\POE@temp<\relax + \POE@getlastcompprev#2% + \else + \POE@getlastcomp#2% \fi - \ifnum\@tempcnta<\@ne - \PackageWarning{pst-optexp}% - {Component ID \the\@tempcnta\space is not valid, setting to 1.}% - \@tempcnta=\@ne - \else\ifnum\@tempcnta>\POE@cnt - \PackageWarning{pst-optexp}% - {Component ID \the\@tempcnta\space is not valid, setting to \MessageBreak - the last defined value (\the\POE@cnt).}% - \@tempcnta=\POE@cnt% - \fi\fi + \POE@checkandfixcomprange + \fi +}% +\def\POE@getcomprangeprev<#1-#2\@nil{% + \@tempcnta=\POE@cnt + \@tempcntb=\POE@cnt + \ifx\\#1\\% + \advance\@tempcnta by -1 + \else + \advance\@tempcnta by -#1 + \fi + \ifx\\#2\\\else + \edef\POE@temp{\POE@getfirstchar#2\@nil}% + \expandafter\ifx\POE@temp<\relax + \POE@getlastcompprev#2% + \else + \POE@getlastcomp#2% + \fi + \fi + \POE@checkandfixcomprange +}% +\def\POE@checkandfixcomprange{% + \ifnum\@tempcnta>\POE@cnt \ifnum\@tempcntb>\POE@cnt - \PackageWarning{pst-optexp}% - {Component ID \the\@tempcntb\space is not valid, setting to \MessageBreak - the last defined value (\the\POE@cnt).}% - \@tempcntb=\POE@cnt% - \else\ifnum\@tempcntb<\@ne - \PackageWarning{pst-optexp}% - {Component ID \the\@tempcntb\space is not valid, setting to 1.}% - \@tempcntb=\@ne - \fi\fi + \PackageError{pst-optexp}% + {All components \the\@tempcnta-\the\@tempcntb\space out of range}% + \fi \fi + \ifnum\@tempcnta<\@ne + \PackageWarning{pst-optexp}% + {Component ID \the\@tempcnta\space is not valid, setting to 1.}% + \@tempcnta=\@ne + \else\ifnum\@tempcnta>\POE@cnt + \PackageWarning{pst-optexp}% + {A: Component ID \the\@tempcnta\space is not valid, setting to \MessageBreak + the last defined value (\the\POE@cnt).}% + \@tempcnta=\POE@cnt + \fi\fi + \ifnum\@tempcntb>\POE@cnt + \PackageWarning{pst-optexp}% + {B: Component ID \the\@tempcntb\space is not valid, setting to \MessageBreak + the last defined value (\the\POE@cnt).}% + \@tempcntb=\POE@cnt + \else\ifnum\@tempcntb<\@ne + \PackageWarning{pst-optexp}% + {Component ID \the\@tempcntb\space is not valid, setting to 1.}% + \@tempcntb=\@ne + \fi\fi }% \def\POE@getlastcomp#1-{% - \ifx\@empty#1\relax + \ifx\\#1\\% \ifnum\@tempcnta>\POE@cnt \PackageError{pst-optexp}{All components \the\@tempcnta- out of range.}% - \fi + \fi% \@tempcntb=\POE@cnt \else - \@tempcntb=#1 + \@tempcntb=#1\relax + \fi +}% +\def\POE@getlastcompprev<#1-{% + \@tempcntb=\POE@cnt + \ifx\\#1\\% + \advance\@tempcntb by -1 + \else + \advance\@tempcntb by -#1 \fi }% % \end{macrocode} @@ -16244,32 +16339,42 @@ \def\POE@getcomps@ii{% \@ifnextchar\bgroup{\POE@getcomps@iii}{\POE@aftercomps}% }% +\def\POE@getfirstchar#1#2\@nil{#1}% +\def\POE@getprevcompid<#1\@nil{% + \ifx\\#1\\% + \number\numexpr\POE@cnt-1\relax + \else + \number\numpexp\POE@cnt-#1\relax + \fi +}% \def\POE@getcomps@iii#1{% - \def\POE@temp{#1\@empty}% - \expandafter\POE@getcomps@iv\POE@temp\@nil -}% -\def\POE@getcomps@iv#1#2\@nil{% - \edef\POE@temp{#1}% + \edef\POE@temp{\POE@getfirstchar#1{}\@nil}% \ifx\POE@temp\@empty \POE@getcomp{(\oenode{}{})}% - \else\ifx(#1\relax%) - \POE@getplanenode#1#2% - \else\ifnum9<1#1\relax - \POE@getcomprange#1#2-\@nil + \else\expandafter\ifx\POE@temp(\relax%) + \POE@getplanenode#1% + \else\ifnum9<1\POE@temp\relax + \expandafter\POE@getcomprange#1-\@nil \POE@getcomp{% (\POE@str@basicname@prefix\POE@str@basicname@default) \the\@tempcnta\space\the\@tempcntb\space GetCompRange % }% - \else\ifx-#1\relax - \POE@getcomprange#1#2-\@nil + \else\expandafter\ifx\POE@temp<\relax + \expandafter\POE@getcomprangeprev#1-\@nil + \POE@getcomp{% + (\POE@str@basicname@prefix\POE@str@basicname@default) + \the\@tempcnta\space\the\@tempcntb\space GetCompRange % + }% + \else\expandafter\ifx\POE@temp-\relax + \POE@getcomprange#1-\@nil \POE@getcomp{% (\POE@str@basicname@prefix\POE@str@basicname@default) \the\@tempcnta\space\the\@tempcntb\space GetCompRange % }% \else - \POE@checkcompname{#1#2}% - \POE@getcomp{(\oenode{}{#1#2})}% - \fi\fi\fi\fi% + \POE@checkcompname{#1}% + \POE@getcomp{(\oenode{}{#1})}% + \fi\fi\fi\fi\fi% \POE@getcomps@i% }% % \end{macrocode} @@ -16305,7 +16410,7 @@ % \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 +% becomes {1}{2}{3}. Nodes are wrapped with brackets, if necessary: % (1,1) becomes {(1,1)}. % \begin{macrocode} \def\POE@normalizecomps#1{% @@ -16325,21 +16430,25 @@ \def\POE@normalizecomps@iii{% \@ifnextchar\bgroup{\POE@normalizecomps@iv}{\POE@aftercomps}% }% +% \end{macrocode} +% +% Analyze the content of the comp id and expand it accordingly. +% \begin{macrocode} \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} + \edef\POE@temp{\POE@getfirstchar#1{}\@nil}% + \let\POE@tempb\POE@getcomprange + \ifnum9<1\POE@temp\relax + \def\POE@tempa{1}% + \else\expandafter\ifx\POE@temp-\relax + \def\POE@tempa{1}% + \else\expandafter\ifx\POE@temp<\relax + \def\POE@tempa{1}% + \let\POE@tempb\POE@getcomprangeprev \else - \def\POE@tempa{0} - \fi\fi + \def\POE@tempa{0}% + \fi\fi\fi \ifodd\POE@tempa - \POE@getcomprange#1#2-\@nil + \POE@tempb#1-\@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 @@ -16348,7 +16457,7 @@ \advance\@tempcnta\POE@inc }% \else - \edef\POE@comps{\POE@comps{#1#2}}% + \edef\POE@comps{\POE@comps{#1}}% \fi \POE@normalizecomps@i% }% @@ -16456,35 +16565,20 @@ % \end{macrocode} % \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 -}% -\def\POE@getlastcompname@i#1,#2,#3\@nil{#1}% -% \end{macrocode} -% \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% \ifx\\#2\\% - \ifnum9<1\POE@getlastcompname\space% - \POE@str@basicname@default - \POE@getlastcompname - \else - \POE@getlastcompname - \POE@str@basicname@sep - \fi + \POE@str@basicname@default\the\POE@cnt \else \ifnum9<1#2 \POE@str@basicname@default #2% \else - #2\POE@str@basicname@sep% + \POE@prevnode#2\@nil + \POE@str@basicname@sep% \fi% \fi% #1% @@ -16492,6 +16586,23 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{POE@prevnode} +% \begin{macrocode} +\def\POE@prevnode#1#2\@nil{% + \ifx<#1% + \POE@str@basicname@default + \ifx\\#2\\% + \number\numexpr\POE@cnt-1\relax + \else + \number\numexpr\POE@cnt-#2\relax + \fi + \else + #1#2% + \fi +}% +% \end{macrocode} +% \end{macro} +% % Define some special nodes, which should be accessed always via these macros. % % \begin{macro}{\oenodeExt} @@ -16750,22 +16861,23 @@ % \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 -% dictionary) are referenced such that any information is accessible via -% numeber or name. +% Components which have a \opt{compname} assigned, must also be +% available by their component number. Here, all necessary +% informations (nodes, component dictionary) are referenced such that +% any information is accessible via number or name. First parameter is +% the component name, second one the component id. % \begin{macrocode} \def\POE@compalias#1#2{% \POE@Verb{% % \end{macrocode} % Copy the component dictionary % \begin{macrocode} - /\oenode{}{#1} dup currentdict exch known { - load /#2 ED + /\oenode{}{#2} dup currentdict exch known { + load /\oenode{}{#1} ED } { pop } ifelse - (#2) (\oenode{}{#1}) + (\oenode{}{#1}) (\oenode{}{#2}) tx@NodeDict begin % \end{macrocode} % Copy all interface nodes of the component. @@ -16893,7 +17005,7 @@ % \begin{macrocode} \def\end@OptexpObj{% \ifnum9<1\POE@key@compname\else - \POE@compalias{\POE@key@compname}{\oenode{}{\the\POE@cnt}}% + \POE@compalias{\POE@key@compname}{\the\POE@cnt}% \fi \endgroup \ignorespaces% @@ -17540,6 +17652,9 @@ }% \fi \ignorespaces}% +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\POE@pnode@shiftedrot} % Define a new node \#3 shifted by (\#1) relative to existing node \#2. % Aditionally rotate the new node by \#4 degree around existing node as origin. 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 45a986f5f1c..0a020009772 100644 --- a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins +++ b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins @@ -1,5 +1,5 @@ %% -%% Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net> +%% Copyright (C) 2007-2014 by Christoph Bersch <usenet@bersch.net> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -53,9 +53,9 @@ This is a generated file. Project: pst-optexp -Version: 4.6 (2013/11/27) +Version: 4.7 (2014/01/12) -Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net> +Copyright (C) 2007-2014 by Christoph Bersch <usenet@bersch.net> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c 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 9602efcbc19..905c664bf88 100644 --- a/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty +++ b/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty @@ -9,9 +9,9 @@ %% This is a generated file. %% %% Project: pst-optexp -%% Version: 4.6 (2013/11/27) +%% Version: 4.7 (2014/01/12) %% -%% Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net> +%% Copyright (C) 2007-2014 by Christoph Bersch <usenet@bersch.net> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -31,7 +31,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{pst-optexp} - [2013/11/27 v4.6 Optical experimental setups with PSTricks] + [2014/01/12 v4.7 Optical experimental setups with PSTricks] \RequirePackage{ifthen} \RequirePackage{pstricks} \RequirePackage{pst-xkey} @@ -2533,43 +2533,77 @@ \else \@tempcnta=#1 \fi - \POE@getlastcomp#2% - \ifnum\@tempcnta>\POE@cnt - \ifnum\@tempcntb>\POE@cnt - \PackageError{pst-optexp}% - {All components \the\@tempcnta-\the\@tempcntb\space out of range}% - \fi + \edef\POE@temp{\POE@getfirstchar#2\@nil}% + \expandafter\ifx\POE@temp<\relax + \POE@getlastcompprev#2% + \else + \POE@getlastcomp#2% \fi - \ifnum\@tempcnta<\@ne - \PackageWarning{pst-optexp}% - {Component ID \the\@tempcnta\space is not valid, setting to 1.}% - \@tempcnta=\@ne - \else\ifnum\@tempcnta>\POE@cnt - \PackageWarning{pst-optexp}% - {Component ID \the\@tempcnta\space is not valid, setting to \MessageBreak - the last defined value (\the\POE@cnt).}% - \@tempcnta=\POE@cnt% - \fi\fi + \POE@checkandfixcomprange + \fi +}% +\def\POE@getcomprangeprev<#1-#2\@nil{% + \@tempcnta=\POE@cnt + \@tempcntb=\POE@cnt + \ifx\\#1\\% + \advance\@tempcnta by -1 + \else + \advance\@tempcnta by -#1 + \fi + \ifx\\#2\\\else + \edef\POE@temp{\POE@getfirstchar#2\@nil}% + \expandafter\ifx\POE@temp<\relax + \POE@getlastcompprev#2% + \else + \POE@getlastcomp#2% + \fi + \fi + \POE@checkandfixcomprange +}% +\def\POE@checkandfixcomprange{% + \ifnum\@tempcnta>\POE@cnt \ifnum\@tempcntb>\POE@cnt - \PackageWarning{pst-optexp}% - {Component ID \the\@tempcntb\space is not valid, setting to \MessageBreak - the last defined value (\the\POE@cnt).}% - \@tempcntb=\POE@cnt% - \else\ifnum\@tempcntb<\@ne - \PackageWarning{pst-optexp}% - {Component ID \the\@tempcntb\space is not valid, setting to 1.}% - \@tempcntb=\@ne - \fi\fi + \PackageError{pst-optexp}% + {All components \the\@tempcnta-\the\@tempcntb\space out of range}% + \fi \fi + \ifnum\@tempcnta<\@ne + \PackageWarning{pst-optexp}% + {Component ID \the\@tempcnta\space is not valid, setting to 1.}% + \@tempcnta=\@ne + \else\ifnum\@tempcnta>\POE@cnt + \PackageWarning{pst-optexp}% + {A: Component ID \the\@tempcnta\space is not valid, setting to \MessageBreak + the last defined value (\the\POE@cnt).}% + \@tempcnta=\POE@cnt + \fi\fi + \ifnum\@tempcntb>\POE@cnt + \PackageWarning{pst-optexp}% + {B: Component ID \the\@tempcntb\space is not valid, setting to \MessageBreak + the last defined value (\the\POE@cnt).}% + \@tempcntb=\POE@cnt + \else\ifnum\@tempcntb<\@ne + \PackageWarning{pst-optexp}% + {Component ID \the\@tempcntb\space is not valid, setting to 1.}% + \@tempcntb=\@ne + \fi\fi }% \def\POE@getlastcomp#1-{% - \ifx\@empty#1\relax + \ifx\\#1\\% \ifnum\@tempcnta>\POE@cnt \PackageError{pst-optexp}{All components \the\@tempcnta- out of range.}% - \fi + \fi% \@tempcntb=\POE@cnt \else - \@tempcntb=#1 + \@tempcntb=#1\relax + \fi +}% +\def\POE@getlastcompprev<#1-{% + \@tempcntb=\POE@cnt + \ifx\\#1\\% + \advance\@tempcntb by -1 + \else + \advance\@tempcntb by -#1 \fi }% \def\POE@getcomps#1#2{% @@ -2585,32 +2619,42 @@ \def\POE@getcomps@ii{% \@ifnextchar\bgroup{\POE@getcomps@iii}{\POE@aftercomps}% }% -\def\POE@getcomps@iii#1{% - \def\POE@temp{#1\@empty}% - \expandafter\POE@getcomps@iv\POE@temp\@nil +\def\POE@getfirstchar#1#2\@nil{#1}% +\def\POE@getprevcompid<#1\@nil{% + \ifx\\#1\\% + \number\numexpr\POE@cnt-1\relax + \else + \number\numpexp\POE@cnt-#1\relax + \fi }% -\def\POE@getcomps@iv#1#2\@nil{% - \edef\POE@temp{#1}% +\def\POE@getcomps@iii#1{% + \edef\POE@temp{\POE@getfirstchar#1{}\@nil}% \ifx\POE@temp\@empty \POE@getcomp{(\oenode{}{})}% - \else\ifx(#1\relax%) - \POE@getplanenode#1#2% - \else\ifnum9<1#1\relax - \POE@getcomprange#1#2-\@nil + \else\expandafter\ifx\POE@temp(\relax%) + \POE@getplanenode#1% + \else\ifnum9<1\POE@temp\relax + \expandafter\POE@getcomprange#1-\@nil \POE@getcomp{% (\POE@str@basicname@prefix\POE@str@basicname@default) \the\@tempcnta\space\the\@tempcntb\space GetCompRange % }% - \else\ifx-#1\relax - \POE@getcomprange#1#2-\@nil + \else\expandafter\ifx\POE@temp<\relax + \expandafter\POE@getcomprangeprev#1-\@nil + \POE@getcomp{% + (\POE@str@basicname@prefix\POE@str@basicname@default) + \the\@tempcnta\space\the\@tempcntb\space GetCompRange % + }% + \else\expandafter\ifx\POE@temp-\relax + \POE@getcomprange#1-\@nil \POE@getcomp{% (\POE@str@basicname@prefix\POE@str@basicname@default) \the\@tempcnta\space\the\@tempcntb\space GetCompRange % }% \else - \POE@checkcompname{#1#2}% - \POE@getcomp{(\oenode{}{#1#2})}% - \fi\fi\fi\fi% + \POE@checkcompname{#1}% + \POE@getcomp{(\oenode{}{#1})}% + \fi\fi\fi\fi\fi% \POE@getcomps@i% }% \def\POE@getplanenode(#1){% @@ -2650,20 +2694,20 @@ \@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} + \edef\POE@temp{\POE@getfirstchar#1{}\@nil}% + \let\POE@tempb\POE@getcomprange + \ifnum9<1\POE@temp\relax + \def\POE@tempa{1}% + \else\expandafter\ifx\POE@temp-\relax + \def\POE@tempa{1}% + \else\expandafter\ifx\POE@temp<\relax + \def\POE@tempa{1}% + \let\POE@tempb\POE@getcomprangeprev \else - \def\POE@tempa{0} - \fi\fi + \def\POE@tempa{0}% + \fi\fi\fi \ifodd\POE@tempa - \POE@getcomprange#1#2-\@nil + \POE@tempb#1-\@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 @@ -2672,7 +2716,7 @@ \advance\@tempcnta\POE@inc }% \else - \edef\POE@comps{\POE@comps{#1#2}}% + \edef\POE@comps{\POE@comps{#1}}% \fi \POE@normalizecomps@i% }% @@ -2747,30 +2791,33 @@ \PackageError{pst-optexp}{Component '#1' is undefined} \fi }% -\def\POE@getlastcompname{% - \expandafter\POE@getlastcompname@i \POE@complist,\relax,\@nil -}% -\def\POE@getlastcompname@i#1,#2,#3\@nil{#1}% \def\oenode#1#2{% \POE@str@basicname@prefix% \ifx\\#2\\% - \ifnum9<1\POE@getlastcompname\space% - \POE@str@basicname@default - \POE@getlastcompname - \else - \POE@getlastcompname - \POE@str@basicname@sep - \fi + \POE@str@basicname@default\the\POE@cnt \else \ifnum9<1#2 \POE@str@basicname@default #2% \else - #2\POE@str@basicname@sep% + \POE@prevnode#2\@nil + \POE@str@basicname@sep% \fi% \fi% #1% }% +\def\POE@prevnode#1#2\@nil{% + \ifx<#1% + \POE@str@basicname@default + \ifx\\#2\\% + \number\numexpr\POE@cnt-1\relax + \else + \number\numexpr\POE@cnt-#2\relax + \fi + \else + #1#2% + \fi +}% \def\oenodeExt#1{\oenode{\POE@str@extnode@postfix}{#1}}% \def\oenodeIn#1{\oenode{1}{#1}}% \def\oenodeOut#1{\oenode{N}{#1}}% @@ -2879,12 +2926,12 @@ \let\newOptexpElecComp\newOptexpFiberComp \def\POE@compalias#1#2{% \POE@Verb{% - /\oenode{}{#1} dup currentdict exch known { - load /#2 ED + /\oenode{}{#2} dup currentdict exch known { + load /\oenode{}{#1} ED } { pop } ifelse - (#2) (\oenode{}{#1}) + (\oenode{}{#1}) (\oenode{}{#2}) tx@NodeDict begin 1 { 3 copy inttostr dup @@ -2967,7 +3014,7 @@ }% \def\end@OptexpObj{% \ifnum9<1\POE@key@compname\else - \POE@compalias{\POE@key@compname}{\oenode{}{\the\POE@cnt}}% + \POE@compalias{\POE@key@compname}{\the\POE@cnt}% \fi \endgroup \ignorespaces% |