diff options
author | Karl Berry <karl@freefriends.org> | 2007-10-22 00:37:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-10-22 00:37:36 +0000 |
commit | bb5fa8d3a61725395fb2e078e52f4ede24b33ae9 (patch) | |
tree | 6f7df862c9d0134b5fa82a971c31644e74ee67c3 /Master/texmf-dist | |
parent | f6d12e1de2869816f6fb6bb59f3266544bee5588 (diff) |
pstricks-add update (21oct07)
git-svn-id: svn://tug.org/texlive/trunk@5253 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/Changes | 14 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf | bin | 1807427 -> 1817939 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex | 85 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex | 66 |
4 files changed, 92 insertions, 73 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/Changes b/Master/texmf-dist/doc/generic/pstricks-add/Changes index 222c084aa82..2d1ed734b2d 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/Changes +++ b/Master/texmf-dist/doc/generic/pstricks-add/Changes @@ -1,8 +1,3 @@ -pstricks-add.sty ----------- (hv) - v. 0.11 2007-09-04 add a message for loading the prologue file pstrick-add.pro - - - pstricks-add.pro ----------- (Dominik Rodriguez/hv) v 0.14 2007-09-17 - moved Pyth2 into tx@Add part v 0.13 2007-09-12 - temporarely version for \psbrace, code @@ -28,11 +23,18 @@ pstricks-add.pro ----------- (Dominik Rodriguez/hv) v 2004.01 2004/09/14 (dr) initial version +pstricks-add.sty ----------- (hv) + v. 0.11 2007-09-04 add a message for loading the prolouge file pstrick-add.pro + + pstricks-add.tex ----------- (Dominik Rodriguez/hv) + v 2.91 2007-10-20 - add the step types supremum/infimum for showing the + integral of a function + - add \chardef\f@ur=4 v 2.90 2007-09-25 - add \DefPSPNodes to defines 9 nodes depending to the pspciture environment. - - fix bug in psHomothetie for special coor + - fix bug in psHomothetie and pstRotate for special coor v 2.89 2007-09-12 - temporarely version for \psbrace, code will later go into pstricks.tex v 2.88 2007-09-03 - add \psHomothetie for mirroring any object diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf Binary files differindex 6117ea79831..beeda452e89 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex index 3cf252acc0b..862ce41c362 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex @@ -4732,7 +4732,8 @@ the linewidth od the document. \verb+\psStep+ caclulates a step function for the upper or lower sum or the max/min of the Riemann integral definition of a given function. The available option is -\verb+StepType=lower|upper|Riemann+ +\verb+StepType=lower|upper|Riemann|infimum|supremum+ or alternative +\verb+StepType=l|u|R|i|s+ with \verb+lower+ as the default setting. The syntax of the function is @@ -4743,76 +4744,66 @@ with \verb+lower+ as the default setting. The syntax of the function is n is the number of the rectangles and \verb+function+ is the mathematical function in postfix or algebraic notation (with \verb+algebraic=true+). -\begin{center} -\bgroup -\begin{pspicture}(-0.5,-0.5)(10,3) \psaxes{->}(10,3) - \psplot[plotpoints=100,linewidth=1.5pt,algebraic,% - labelFontSize=\footnotesize]{0}{10}{sqrt(x)} +\begin{LTXexample}[pos=t,preset=\centering] +\begin{pspicture}(-0.5,-0.5)(10,3) + \psaxes[labelFontSize=\footnotesize]{->}(10,3) + \psplot[plotpoints=100,linewidth=1.5pt,algebraic]{0}{10}{sqrt(x)} \psStep[linecolor=magenta,StepType=upper,fillstyle=hlines](0,9){9}{x sqrt} \psStep[linecolor=blue,fillstyle=vlines](0,9){9}{x sqrt } \end{pspicture} +\end{LTXexample} +\begin{LTXexample}[pos=t,preset=\centering] \psset{plotpoints=200} -\begin{pspicture}(-0.5,-2.25)(10,3) \psaxes{->}(0,0)(0,-2.25)(10,3) - \psplot[linewidth=1.5pt,algebraic,labelFontSize=\footnotesize]{0}{10}{sqrt(x)*sin(x)} +\begin{pspicture}(-0.5,-2.25)(10,3) + \psaxes[labelFontSize=\footnotesize]{->}(0,0)(0,-2.25)(10,3) + \psplot[linewidth=1.5pt,algebraic]{0}{10}{sqrt(x)*sin(x)} \psStep[algebraic,linecolor=magenta,StepType=upper](0,9){20}{sqrt(x)*sin(x)} \psStep[linecolor=blue,linestyle=dashed](0,9){20}{x sqrt x RadtoDeg sin mul} \end{pspicture} +\end{LTXexample} -\psset{yunit=1.25cm} -\begin{pspicture}(-0.5,-1.5)(10,1.5) \psaxes{->}(0,0)(0,-1.5)(10,1.5) +\begin{LTXexample}[pos=t,preset=\centering] +\psset{yunit=1.25cm,plotpoints=200} +\begin{pspicture}(-0.5,-1.5)(10,1.5) + \psaxes[labelFontSize=\footnotesize]{->}(0,0)(0,-1.5)(10,1.5) \psStep[algebraic,StepType=Riemann,fillstyle=solid,fillcolor=black!10](0,10){50}% {sqrt(x)*cos(x)*sin(x)} - \psplot[linewidth=1.5pt,algebraic,labelFontSize=\footnotesize]% - {0}{10}{sqrt(x)*cos(x)*sin(x)} -\end{pspicture} - -\psset{unit=1.5cm} -\begin{pspicture}[plotpoints=200](-0.5,-3)(10,2.5) - \psStep[algebraic,fillstyle=solid,fillcolor=yellow](0.001,9.5){40}{2*sqrt(x)*cos(ln(x))*sin(x)} - \psStep[algebraic,StepType=Riemann,fillstyle=solid,fillcolor=blue](0.001,9.5){40}{2*sqrt(x)*cos(ln(x))*sin(x)} - \psaxes{->}(0,0)(0,-2.75)(10,2.5) - \psplot[algebraic,linecolor=white,labelFontSize=\footnotesize]% - {0.001}{9.75}{2*sqrt(x)*cos(ln(x))*sin(x)} - \uput[90](6,1.2){$f(x)=2\cdot\sqrt{x}\cdot\cos{(\ln{x})}\cdot\sin{x}$} + \psplot[linewidth=1.5pt,algebraic]{0}{10}{sqrt(x)*cos(x)*sin(x)} \end{pspicture} -\egroup -\end{center} - +\end{LTXexample} -\begin{lstlisting} -\begin{pspicture}(-0.5,-0.5)(10,3) \psaxes{->}(10,3) - \psplot[plotpoints=100,linewidth=1.5pt,algebraic,% - labelFontSize=\footnotesize]{0}{10}{sqrt(x)} - \psStep[linecolor=magenta,§\ON§StepType=upper§\OFF§,fillstyle=hlines](0,9){9}{x sqrt} - \psStep[linecolor=blue,fillstyle=vlines](0,9){9}{x sqrt } -\end{pspicture} -\psset{plotpoints=200} -\begin{pspicture}(-0.5,-2.25)(10,3) \psaxes{->}(0,0)(0,-2.25)(10,3) - \psplot[linewidth=1.5pt,algebraic,labelFontSize=\footnotesize]{0}{10}{sqrt(x)*sin(x)} - \psStep[algebraic,linecolor=magenta,StepType=upper](0,9){20}{sqrt(x)*sin(x)} - \psStep[linecolor=blue,linestyle=dashed](0,9){20}{x sqrt x RadtoDeg sin mul} +\begin{LTXexample}[pos=t,preset=\centering] +\psset{yunit=1.25cm,plotpoints=200} +\begin{pspicture}(-0.5,-1.5)(10,1.5) + \psaxes[labelFontSize=\footnotesize]{->}(0,0)(0,-1.5)(10,1.5) + \psStep[algebraic,StepType=infimum,fillstyle=solid,fillcolor=black!10](0,10){50}% + {sqrt(x)*cos(x)*sin(x)} + \psplot[linewidth=1.5pt,algebraic]{0}{10}{sqrt(x)*cos(x)*sin(x)} \end{pspicture} +\end{LTXexample} -\psset{yunit=1.25cm} -\begin{pspicture}(-0.5,-1.5)(10,1.5) \psaxes{->}(0,0)(0,-1.5)(10,1.5) - \psStep[§\ON§algebraic§\OFF§,§\ON§StepType=Riemann§\OFF§,fillstyle=solid,fillcolor=black!10](0,10){50}% +\begin{LTXexample}[pos=t,preset=\centering] +\psset{yunit=1.25cm,plotpoints=200} +\begin{pspicture}(-0.5,-1.5)(10,1.5) + \psaxes[labelFontSize=\footnotesize]{->}(0,0)(0,-1.5)(10,1.5) + \psStep[algebraic,StepType=supremum,fillstyle=solid,fillcolor=black!10](0,10){50}% {sqrt(x)*cos(x)*sin(x)} - \psplot[linewidth=1.5pt,algebraic,labelFontSize=\footnotesize]% - {0}{10}{sqrt(x)*cos(x)*sin(x)} + \psplot[linewidth=1.5pt,algebraic]{0}{10}{sqrt(x)*cos(x)*sin(x)} \end{pspicture} +\end{LTXexample} -\psset{unit=1.5cm} +\begin{LTXexample}[pos=t,preset=\centering] +\psset{unit=1.5cm,plotpoints=200} \begin{pspicture}[plotpoints=200](-0.5,-3)(10,2.5) \psStep[algebraic,fillstyle=solid,fillcolor=yellow](0.001,9.5){40}{2*sqrt(x)*cos(ln(x))*sin(x)} \psStep[algebraic,StepType=Riemann,fillstyle=solid,fillcolor=blue](0.001,9.5){40}{2*sqrt(x)*cos(ln(x))*sin(x)} - \psaxes{->}(0,0)(0,-2.75)(10,2.5) - \psplot[algebraic,linecolor=white,labelFontSize=\footnotesize]% - {0.001}{9.75}{2*sqrt(x)*cos(ln(x))*sin(x)} + \psaxes[labelFontSize=\footnotesize]{->}(0,0)(0,-2.75)(10,2.5) + \psplot[algebraic,linecolor=white]{0.001}{9.75}{2*sqrt(x)*cos(ln(x))*sin(x)} \uput[90](6,1.2){$f(x)=2\cdot\sqrt{x}\cdot\cos{(\ln{x})}\cdot\sin{x}$} \end{pspicture} -\end{lstlisting} +\end{LTXexample} %-------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex index f30244f185b..ec822fca6f9 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -5,7 +5,7 @@ %% %% Package `pstricks-add.tex' %% -%% Dominique Rodriguez <Dominique.Rodriguez _at_ waika9.fr> +%% Dominique Rodriguez <DR _at_ pstricks.de> %% Herbert Voss <Herbert.Voss _at_ pstricks.de> %% %% This program can be redistributed and/or modified under the terms @@ -27,8 +27,8 @@ \ifx\MultidoLoaded\endinput\else \input multido \fi \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % -\def\fileversion{2.90} -\def\filedate{2007/09/25} +\def\fileversion{2.91} +\def\filedate{2007/10/20} \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -53,6 +53,7 @@ %\psset{dx=0}% %\psset{dy=0}% \newcount\@zero\@zero=0\relax +\chardef\f@ur=4 % \def\psPiFour{12.566371} \def\psPiTwo{6.283185} @@ -200,17 +201,17 @@ \pst@getangle{#2}\pst@tempB% \leavevmode% \pst@Verb{% - \pst@tempA /yRot ED /xRot ED - \pst@tempB dup cos /cosA ED sin /sinA ED - /ax cosA def - /by sinA def - /cx sinA neg def - /dy cosA def - /ex xRot cosA mul neg xRot add yRot sinA mul add def - /fy xRot sinA mul neg yRot add yRot cosA mul sub def - { [ax by cx dy ex fy] concat } \tx@TMChange }% + { \pst@tempA /yRot ED /xRot ED + \pst@tempB dup cos /cosA ED sin /sinA ED + /ax cosA def + /by sinA def + /cx sinA neg def + /dy cosA def + /ex xRot cosA mul neg xRot add yRot sinA mul add def + /fy xRot sinA mul neg yRot add yRot cosA mul sub def + [ax by cx dy ex fy] concat } \tx@TMChange }% \box\pst@hbox% - \pst@Verb{\tx@TMRestore }\endgroup} + \pst@Verb{ \tx@TMRestore }\endgroup} % % [#1]: obtargs; (#2,#3): center; {#4}: factor; {#5}: object \def\psHomothetie{\pst@object{psHomothetie}} @@ -2604,11 +2605,15 @@ \pst@stroke \end@SpecialObj% } +% \define@key[psset]{pstricks-add}{StepType}{\pst@expandafter\psset@@StepType{#1}\@nil}% \def\psset@@StepType#1#2\@nil{% \ifx#1u\let\psk@StepType\@ne - \else\ifx#1l\let\psk@StepType\z@\else\let\psk@StepType\tw@\fi\fi} -\psset{StepType=lower} % alternative StepType=upper StepType=Riemann + \else\ifx#1l\let\psk@StepType\z@ + \else\ifx#1i\let\psk@StepType\thr@@ + \else\ifx#1s\let\psk@StepType\f@ur + \else\let\psk@StepType\tw@\fi\fi\fi\fi} +\psset{StepType=lower} % alternative StepType=upper/inf/sup/Riemann % \def\psStep{\pst@object{psStep}} \def\psStep@i(#1,#2)#3#4{% @@ -2619,14 +2624,14 @@ /dx #2 #1 sub #3 div def /scx { \pst@number\psxunit mul } def /scy { \pst@number\psyunit mul } def - \ifcase\psk@StepType % 0->lower + \ifcase\psk@StepType % 0->lower, height is always f(x) x scx 0 moveto #3 { \ifPst@algebraic Func \else #4 \fi scy dup x scx exch lineto /x x dx add def x scx exch lineto x scx 0 lineto } repeat - \or % 1-> upper + \or % 1-> upper, height is always f(x+dx) x scx 0 moveto #3 { /x x dx add def @@ -2658,6 +2663,27 @@ /yMax ED /yMin ED /x ED x yMin moveto dx 0 rlineto x dx add yMax lineto dx neg 0 rlineto x yMin lineto } repeat + \or % 3->inf(imum) + x scx 0 moveto + #3 { + \ifPst@algebraic Func \else #4 \fi /y0 ED % left value f(x) + /xOld x def + /x x dx add def + \ifPst@algebraic Func \else #4 \fi /y1 ED % right value f(x+dx) + y0 y1 lt { y0 }{ y1 } ifelse % use infimum + scy dup xOld scx exch lineto + x scx exch lineto x scx 0 lineto + } repeat + \or % 4-> sup(remum) + x scx 0 moveto + #3 { + \ifPst@algebraic Func \else #4 \fi /y0 ED % left value f(x) + /x x dx add def + \ifPst@algebraic Func \else #4 \fi /y1 ED % right value f(x+dx) + y0 y1 gt { y0 }{ y1 } ifelse % use supremum + scy dup x dx sub scx exch lineto + x scx exch lineto x scx 0 lineto + } repeat \fi }% \psk@fillstyle @@ -3082,9 +3108,9 @@ } \psset{% %%%% pstricks %%%%%%%% - opacity=1, - blendmode=0, - shapealpha=0.6, +% opacity=1, +% blendmode=0, +% shapealpha=0.6, unit=1cm,% swapaxes=false,% showpoints=false,% |