diff options
author | Karl Berry <karl@freefriends.org> | 2018-04-09 21:10:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-04-09 21:10:42 +0000 |
commit | 33c34a3cbe55e895506b7bfb14dc562b87b41a82 (patch) | |
tree | 4db2b92876ca96b4347d18dbb808ea6f1950742d /Master | |
parent | 7671bfb8ed52d8d9ce3a720eacad7b1fee553c28 (diff) |
pst-func (9apr18)
git-svn-id: svn://tug.org/texlive/trunk@47400 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-func/Changes | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-func/README.md | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf | bin | 3885597 -> 3911316 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex | 52 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-func/pst-func.tex | 47 |
5 files changed, 82 insertions, 25 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes index 5f0cb2b0549..3fa24cd4261 100644 --- a/Master/texmf-dist/doc/generic/pst-func/Changes +++ b/Master/texmf-dist/doc/generic/pst-func/Changes @@ -1,4 +1,5 @@ ..... pst-func.tex +0.89 2018-04-08 - added labelangle and labeldistance for \psZero, 0.88 2017-08-24 - use always URW fonts instead of PostScript, eg Helvetica->NimbusSanL 0.87a 2017-08-17 - added \RequirePackage for pst-func.sty diff --git a/Master/texmf-dist/doc/generic/pst-func/README.md b/Master/texmf-dist/doc/generic/pst-func/README.md index ac18c266c9e..e561341de8e 100644 --- a/Master/texmf-dist/doc/generic/pst-func/README.md +++ b/Master/texmf-dist/doc/generic/pst-func/README.md @@ -35,10 +35,6 @@ Save the files pst-func.sty|pro|tex in a directory, which is part of your local TeX tree. The pro file should go into $TEXMF/dvips/pstricks/ Then do not forget to run texhash to update this tree. -For more information see the documentation of your TeX distribution -on installing packages into your local TeX system or read the -TeX Frequently Asked Questions: -(http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages). pst-func needs pst-plot (pstricks-add) and pstricks, which should be part of your local TeX installation, otherwise get it from a @@ -48,4 +44,7 @@ PSTricks is PostScript Tricks, the documentation cannot be run with pdftex, use the sequence latex->dvips->ps2pdf or pdflatex with package auto-pst-pdf or xelatex. +hvoss@tug.org + %% $Id: README 897 2014-03-21 08:06:41Z herbert $ + diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf Binary files differindex 5917f210881..3711135db29 100644 --- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex index dd322755d9d..00bac51fcf1 100644 --- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex @@ -1,11 +1,12 @@ %% $Id: pst-func-doc.tex 918 2014-05-19 12:32:37Z herbert $ -\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false, - smallheadings, headexclude,footexclude,oneside]{pst-doc} +\documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false, + headings=small, headinclude=false,footinclude=false,oneside]{pst-doc} \usepackage[utf8]{inputenc} \usepackage{pst-func} \let\pstFuncFV\fileversion \usepackage{pst-math} \usepackage{pstricks-add} +\usepackage{luatex85} \usepackage{animate} \renewcommand\bgImage{% \psset{yunit=4cm,xunit=3} @@ -605,7 +606,7 @@ which plots the envelope curve instead of the Bernstein polynomial. \clearpage -\subsection{Calculating the zeros of a function or the the intermediate point of two function} +\section{Calculating the zeros of a function or the the intermediate point of two function} \begin{BDef} \Lcs{psZero}\OptArgs\Largr{$x_0,x_1$}\Largb{functionA}\OptArg{functionB}\Largb{node name} @@ -952,7 +953,52 @@ The following examples where done by Jürgen Gilg and Thomas Söll. %\end{LTXexample} +As an alternative the values of the zeros can be placed by using the optional arguments +\Lkeyword{labelangle} and +\Lkeyword{labeldistance}: + + +\begin{LTXexample}[pos=t] +\definecolor{BeigeTS}{rgb}{0.98,0.95,0.87} +\definecolor{CornBlauTS}{rgb}{0.39,0.59,0.93} +\definecolor{SandBraun}{rgb}{0.96,0.64,0.38} +\psset{yunit=1.25cm,arrowinset=0.02,arrowlength=2,linewidth=0.5pt,saveNodeCoors,NodeCoorPrefix=n,comma} +\def\funkf{2*sqrt(x)*cos(ln(x))*sin(x)} +\begin{pspicture}[plotpoints=500,algebraic,fontscale=5,markZeros, + PointName=N,dotscale=0.7](-0.5,-3)(10,2.5) +\psStep[fillstyle=solid,fillcolor=BeigeTS,opacity=0.7,linewidth=0.3pt, + linecolor=SandBraun!50](0.001,9.5){40}{\funkf} +\psStep[StepType=Riemann,fillstyle=solid,opacity=0.3,fillcolor=CornBlauTS, + linecolor=CornBlauTS,linewidth=0.3pt](0.001,9.5){40}{\funkf} +\psaxes[labelFontSize=\scriptstyle,ticksize=-0.1 0]{->}(0,0)(0,-2.75)(10,2.5) +\psplot[linecolor=BeigeTS!60,linewidth=0.8pt]{0.001}{9.75}{\funkf} +\psplotTangent[linecolor=blue,Derive={Derive(1,\funkf)}]{1.29}{1.5}{\funkf} +\uput[90](6,1.2){$f(x)=2\cdot\sqrt{x}\cdot\cos{(\ln{x})}\cdot\sin{x}$} +{\psset{dotscale=1.5,linecolor=blue!50!black!90,ydecimals=0,Framed,opacity=0.8,decimals=1,PrintCoord} + \psZero[labelangle=-90,labeldistance=0.3,postString=1,Newton](0.5,1){\funkf}{N1} + \psZero[labelangle=-90,labeldistance=0.3,postString=2](2,4){\funkf}{N2} + \psZero[labelangle=-90,labeldistance=0.3,postString=3](4,6){\funkf}{N3} + \psZero[labelangle=-90,labeldistance=0.3,postString=4](6,7){\funkf}{N4} + \psZero[labelangle=-90,labeldistance=0.3,PointName=x,postString=5,xory,PrintCoord=false, + linestyle=none,fillcolor=green,opacity=0.6](9,11){\funkf}{N5} + \psZero[labelangle=-90,labeldistance=0.3,PointName=M,decimals=0,linestyle=none,fillcolor=SandBraun, + ydecimals=1,opacity=0.8,postString={m=1}](0.5,2){Derive(1,\funkf)-1+\funkf}[\funkf]{M}% +} +\pcline{->}(0.5,-1)(M) +\nbput[nrot=:U,labelsep=0.3,npos=0.2]{% + \scriptsize \psZero[originV=true,xory=true,onlyYVal=true,PointName=f(x),postString={m=1},Framed, + opacity=0.8,linestyle=none,markZeros=false,fontscale=10](0.5,2){Derive(1,\funkf)-1+\funkf}[\funkf]{R}} +\psdot[linecolor=green,strokeopacity=0.8](M) +\uput{0.5}[40](M){\psZero[originV=true,approx=false,xory=true,onlyYVal=true, + PointName=m,postString={m=1},markZeros=false,fontscale=8](0.5,2){Derive(1,\funkf)-1}[1]{R}} +\end{pspicture} +\end{LTXexample} + + + \psset{unit=1cm} + + \clearpage \section{\Lcs{psFourier}} A Fourier sum has the form: diff --git a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex index af5c8c4b35d..8b9572fc3d6 100644 --- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex +++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex @@ -31,8 +31,8 @@ % interface to the `xkeyval' package \pst@addfams{pst-func} % -\def\fileversion{0.88} -\def\filedate{2017/08/24} +\def\fileversion{0.89} +\def\filedate{2018/04/08} \message{`PST-func' v\fileversion, \filedate\space (hv)} % \pstheader{pst-func.pro} @@ -106,7 +106,6 @@ \pst@killglue \begin@SpecialObj \use@par - \typeout{>>> GetZeros}% \addto@pscode{ tx@FuncDict begin /xStart #1 def /xEnd #2 def @@ -543,7 +542,8 @@ \def\psfs@alternateColors{} \def\pst@alternateColors{alternateColors} % -\psset[pst-func]{printValue=false,barwidth=1,labelangle=90,xlabelsep=0,LabelColor=black,LineEndColorL=green,LineEndColorR=red,radiusout=2, radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLines=false,fillcolorA=blue!40,fillcolorB=red!40,PrintVLimit=1e-64,Switch2Log=80} +\psset[pst-func]{printValue=false,barwidth=1,labelangle=90,xlabelsep=0,LabelColor=black,LineEndColorL=green,LineEndColorR=red,radiusout=2, radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLines=false, + fillcolorA=blue!40,fillcolorB=red!40,PrintVLimit=1e-64,Switch2Log=80} % \def\psBinomial{\pst@object{psBinomial}} \def\psBinomial@i#1#2{\psBinomial@ii#1,,,\@nil{#2}}% @@ -1714,19 +1714,23 @@ \define@boolkey[psset]{pst-func}[Pst@]{originV}[true]{} \define@key[psset]{pst-func}{PointName}[I]{\def\psk@func@PointName{#1}} \define@key[psset]{pst-func}{ydecimals}[2]{\pst@getint{#1}\psk@ydecimals } -\psset[pst-func]{originV=false,onlyNode=false,ydecimals=2, +\define@key[psset]{pst-func}{labeldistance}[0]{\def\psk@ldistance{#1 }} +\psset[pst-func]{originV=false,onlyNode=false,ydecimals=2,labeldistance=0, PrintCoord=false,onlyYVal=false,Newton=false,PointName=I,Framed=false,xory=false,approx=true} % %-------------------------------------------------------------------- %------------- calculate the value of an intersectionpoint ----------- %--------------------------------------------------------------------- +% \def\psZero{\def\pst@par{}\pst@object{psZero}} \def\psZero@i(#1,#2)#3{\@ifnextchar[{\psZero@ii(#1,#2)#3}{\psZero@ii(#1,#2){#3}[0]}} \def\psZero@ii(#1,#2)#3[#4]#5{% % (#1,#2) Intervall f\"{u}r die Nullstelle, bzw #1 Startwert f\"{u}r Newton, #3 1. Funktion, #4 2. Funktion, #5 Knotenname \begingroup \pst@killglue - \addbefore@par{framesep=1pt}%fontscale=40,PSfont=NimbusRomNo9L-Regu}% + \addbefore@par{labelangle=0,framesep=1pt}%fontscale=40,PSfont=NimbusRomNo9L-Regu}% + % labelangle=0 -> take xShift and yShift into account, otherwise xShift=pslabelsep * cos(labelangle) + % yShift=pslabelsep * sin(labelangle) \use@par \pst@Verb{ /FunctionA @@ -1767,6 +1771,13 @@ }% \pnode(! xM yM){#5}% \addto@pscode{% + \iftrue %\psFunc@langle pt>\z@ + /xShift \psFunc@langle cos \psk@ldistance mul def + /yShift \psFunc@langle sin \psk@ldistance mul def + \else + /xShift \psk@xShift\space def + /yShift \psk@yShift\space def + \fi \ifPst@onlyNode\else /dec \psk@decimals\space def % Anzahl der Dezimahlen f\"{u}r x /ydec \psk@ydecimals\space def % Anzahl der Dezimalen f\"{u}r y @@ -1811,8 +1822,8 @@ \fi /x xM def FunctionA /yM exch def \ifPst@originV 0 0 \else - xM \psk@xShift\space add \pst@number\psxunit mul - yM \psk@yShift\space add \pst@number\psyunit mul + xM xShift add \pst@number\psxunit mul + yM yShift add \pst@number\psyunit mul \fi \pst@usecolor\pslinecolor \ifPst@PrintCoord @@ -1831,8 +1842,8 @@ \ifPst@originV frs neg \psk@fontscale 0.75 mul frs add L \else - xM \psk@xShift\space add \pst@number\psxunit mul frs sub - yM \psk@yShift\space add \pst@number\psyunit mul \psk@fontscale 0.75 mul add frs add L + xM xShift add \pst@number\psxunit mul frs sub + yM yShift add \pst@number\psyunit mul \psk@fontscale 0.75 mul add frs add L \fi 0 \psk@fontscale 0.9 mul frs 2 mul add neg rlineto closepath gsave @@ -1842,8 +1853,8 @@ \pst@number\pslinewidth SLW \pst@usecolor\pslinecolor \tx@setStrokeTransparency \@nameuse{psls@\pslinestyle} stroke \fi \ifPst@originV 0 0 \else - xM \psk@xShift\space add \pst@number\psxunit mul - yM \psk@yShift\space add \pst@number\psyunit mul + xM xShift add \pst@number\psxunit mul + yM yShift add \pst@number\psyunit mul \fi xytext 0 spdy neg rmoveto @@ -1851,8 +1862,8 @@ %------------------------------ Wenn nicht die Form P(a|b) sondern x = a oder y = b oder nur a oder nur b ------------------- \else \ifPst@originV 0 0 \else - xM \psk@xShift\space add \pst@number\psxunit mul - yM \psk@yShift\space add \pst@number\psyunit mul + xM xShift add \pst@number\psxunit mul + yM yShift add \pst@number\psyunit mul \fi /xorytext { moveto schrift \ifPst@onlyYVal% nur der y-Wert @@ -1879,8 +1890,8 @@ \ifPst@originV frs neg \psk@fontscale 0.75 mul frs add L \else - xM \psk@xShift\space add \pst@number\psxunit mul frs sub - yM \psk@yShift\space add \pst@number\psyunit mul \psk@fontscale 0.75 mul add frs add L + xM xShift add \pst@number\psxunit mul frs sub + yM yShift add \pst@number\psyunit mul \psk@fontscale 0.75 mul add frs add L \fi 0 \psk@fontscale 0.9 mul frs 2 mul add neg rlineto closepath gsave @@ -1890,8 +1901,8 @@ \pst@number\pslinewidth SLW \pst@usecolor\pslinecolor \tx@setStrokeTransparency \@nameuse{psls@\pslinestyle} stroke \fi \ifPst@originV 0 0 \else - xM \psk@xShift\space add \pst@number\psxunit mul - yM \psk@yShift\space add \pst@number\psyunit mul + xM xShift add \pst@number\psxunit mul + yM yShift add \pst@number\psyunit mul \fi xorytext \fi |