texlive[47400] Master/texmf-dist: pst-func (9apr18)

commits+karl at tug.org commits+karl at tug.org
Mon Apr 9 23:10:42 CEST 2018


Revision: 47400
          http://tug.org/svn/texlive?view=revision&revision=47400
Author:   karl
Date:     2018-04-09 23:10:42 +0200 (Mon, 09 Apr 2018)
Log Message:
-----------
pst-func (9apr18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pst-func/Changes
    trunk/Master/texmf-dist/doc/generic/pst-func/README.md
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
    trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2018-04-09 21:10:25 UTC (rev 47399)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2018-04-09 21:10:42 UTC (rev 47400)
@@ -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

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/README.md	2018-04-09 21:10:25 UTC (rev 47399)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/README.md	2018-04-09 21:10:42 UTC (rev 47400)
@@ -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 @@
 with pdftex, use the sequence latex->dvips->ps2pdf or
 pdflatex with package auto-pst-pdf or xelatex.
 
+hvoss at tug.org
+
 %% $Id: README 897 2014-03-21 08:06:41Z herbert $
+

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2018-04-09 21:10:25 UTC (rev 47399)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2018-04-09 21:10:42 UTC (rev 47400)
@@ -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 @@
 
 
 \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 @@
 %\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:

Modified: trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2018-04-09 21:10:25 UTC (rev 47399)
+++ trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2018-04-09 21:10:42 UTC (rev 47400)
@@ -31,8 +31,8 @@
 % interface to the `xkeyval' package
 \pst at 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 at killglue
   \begin at SpecialObj
   \use at par
-  \typeout{>>> GetZeros}%
   \addto at pscode{
     tx at FuncDict begin
     /xStart #1 def /xEnd #2 def
@@ -543,7 +542,8 @@
 \def\psfs at alternateColors{}
 \def\pst at 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 at object{psBinomial}}
 \def\psBinomial at i#1#2{\psBinomial at ii#1,,,\@nil{#2}}%
@@ -1714,12 +1714,14 @@
 \define at boolkey[psset]{pst-func}[Pst@]{originV}[true]{}
 \define at key[psset]{pst-func}{PointName}[I]{\def\psk at func@PointName{#1}}
 \define at key[psset]{pst-func}{ydecimals}[2]{\pst at getint{#1}\psk at ydecimals }
-\psset[pst-func]{originV=false,onlyNode=false,ydecimals=2,
+\define at key[psset]{pst-func}{labeldistance}[0]{\def\psk at 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 at par{}\pst at object{psZero}}
 \def\psZero at i(#1,#2)#3{\@ifnextchar[{\psZero at ii(#1,#2)#3}{\psZero at ii(#1,#2){#3}[0]}}
 \def\psZero at ii(#1,#2)#3[#4]#5{%
@@ -1726,7 +1728,9 @@
 % (#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 at killglue
-  \addbefore at par{framesep=1pt}%fontscale=40,PSfont=NimbusRomNo9L-Regu}%
+ \addbefore at 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 at par
  \pst at Verb{
    /FunctionA
@@ -1767,6 +1771,13 @@
  }%
 \pnode(! xM yM){#5}%
 \addto at pscode{%
+  \iftrue %\psFunc at langle pt>\z@
+    /xShift \psFunc at langle cos \psk at ldistance mul def 
+    /yShift \psFunc at langle sin \psk at ldistance mul def 
+  \else
+    /xShift \psk at xShift\space def
+    /yShift \psk at yShift\space def
+  \fi
 \ifPst at onlyNode\else
   /dec \psk at decimals\space def   % Anzahl der Dezimahlen f\"{u}r x
   /ydec \psk at ydecimals\space def % Anzahl der Dezimalen f\"{u}r y
@@ -1811,8 +1822,8 @@
  \fi
   /x xM def FunctionA /yM exch def
   \ifPst at originV 0 0 \else
-    xM \psk at xShift\space add \pst at number\psxunit mul
-    yM \psk at yShift\space add \pst at number\psyunit mul
+    xM xShift add \pst at number\psxunit mul
+    yM yShift add \pst at number\psyunit mul
   \fi
   \pst at usecolor\pslinecolor
  \ifPst at PrintCoord
@@ -1831,8 +1842,8 @@
        \ifPst at originV
           frs neg \psk at fontscale 0.75 mul frs add L
          \else
-          xM \psk at xShift\space add \pst at number\psxunit mul frs sub
-          yM \psk at yShift\space add \pst at number\psyunit mul \psk at fontscale 0.75 mul add frs add L
+          xM xShift add \pst at number\psxunit mul frs sub
+          yM yShift add \pst at number\psyunit mul \psk at fontscale 0.75 mul add frs add L
        \fi
         0 \psk at fontscale 0.9 mul frs 2 mul add neg rlineto closepath
          gsave
@@ -1842,8 +1853,8 @@
             \pst at number\pslinewidth SLW \pst at usecolor\pslinecolor \tx at setStrokeTransparency \@nameuse{psls@\pslinestyle} stroke
            \fi
        \ifPst at originV 0 0 \else
-          xM \psk at xShift\space add \pst at number\psxunit mul
-          yM \psk at yShift\space add \pst at number\psyunit mul
+          xM xShift add \pst at number\psxunit mul
+          yM yShift add \pst at 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 at originV 0 0 \else
-       xM \psk at xShift\space add \pst at number\psxunit mul
-       yM \psk at yShift\space add \pst at number\psyunit mul
+       xM xShift add \pst at number\psxunit mul
+       yM yShift add \pst at number\psyunit mul
     \fi
       /xorytext { moveto schrift
   \ifPst at onlyYVal%  nur der y-Wert
@@ -1879,8 +1890,8 @@
           \ifPst at originV
              frs neg \psk at fontscale 0.75 mul frs add L
            \else
-             xM \psk at xShift\space add \pst at number\psxunit mul frs sub
-             yM \psk at yShift\space add \pst at number\psyunit mul \psk at fontscale 0.75 mul add frs add L
+             xM xShift add \pst at number\psxunit mul frs sub
+             yM yShift add \pst at number\psyunit mul \psk at fontscale 0.75 mul add frs add L
           \fi
        0 \psk at fontscale 0.9 mul frs 2 mul add neg rlineto closepath
         gsave
@@ -1890,8 +1901,8 @@
            \pst at number\pslinewidth SLW \pst at usecolor\pslinecolor \tx at setStrokeTransparency \@nameuse{psls@\pslinestyle} stroke
          \fi
        \ifPst at originV 0 0 \else
-          xM \psk at xShift\space add \pst at number\psxunit mul
-          yM \psk at yShift\space add \pst at number\psyunit mul
+          xM xShift add \pst at number\psxunit mul
+          yM yShift add \pst at number\psyunit mul
        \fi
      xorytext
    \fi



More information about the tex-live-commits mailing list