From 1c26998ba324331b711efc275ccf9768955b03da Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 16 May 2014 21:12:50 +0000 Subject: pst-tools (16may14) git-svn-id: svn://tug.org/texlive/trunk@34067 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/pst-tools/Changes | 2 ++ .../doc/generic/pst-tools/pst-tools-doc.pdf | Bin 68588 -> 68714 bytes .../doc/generic/pst-tools/pst-tools-doc.tex | 31 +++++++++++---------- .../texmf-dist/tex/generic/pst-tools/pst-tools.tex | 17 ++++++----- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/Master/texmf-dist/doc/generic/pst-tools/Changes b/Master/texmf-dist/doc/generic/pst-tools/Changes index fecbea12802..f389a55b24a 100644 --- a/Master/texmf-dist/doc/generic/pst-tools/Changes +++ b/Master/texmf-dist/doc/generic/pst-tools/Changes @@ -1,4 +1,6 @@ ..... pst-tools.tex +0.05 2014-05-12 - new optional arguments for printing values + on PS level 0.04 2013-07-08 - ??? 0.03 2012-12-04 - added option for \psPrintValue to save the value diff --git a/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf b/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf index e8b97a905d6..e3e25b7fded 100644 Binary files a/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf and b/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf differ diff --git a/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.tex b/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.tex index 20691f8e678..c825dbaa38d 100644 --- a/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.tex @@ -50,7 +50,8 @@ There are the following valid options for \Lcs{psPrintValue}: prints all possible digits.\\ \Lkeyword{xShift} & & 0 & the x shift in pt for the output, relative to the current point.\\ \Lkeyword{algebraic} & & false & function in algebraic notation.\\ -\Lkeyword{VarName} & & \{\} & saves the value in / for further use +\Lkeyword{VarName} & & \{\} & saves the value in / for further use\\ +\Lkeyword{comma} & & false & comma instead of the dor for decimals\\ \end{tabularx} \begin{center} @@ -61,8 +62,8 @@ There are the following valid options for \Lcs{psPrintValue}: \makebox[1em]{\iA} \makebox[5em]{\psPrintValue[PSfont=Helvetica,xShift=-10]{\iA\space sin}} \makebox[4em][r]{\psPrintValue[PSfont=Courier,fontscale=10,decimals=3,xShift=-20]{\iA\space cos}}\hspace{1em} - \makebox[5em]{\psPrintValue[dot,valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\iA\space sqrt}} - \makebox[7em]{\psPrintValue[PSfont=Times-Italic]{\iA\space dup sin exch cos add}} + \makebox[5em]{\psPrintValue[valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\iA\space sqrt}} + \makebox[7em]{\psPrintValue[comma,PSfont=Times-Italic]{\iA\space dup sin exch cos add}} \makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\iA\space dup sin dup mul exch cos dup mul add}}\\} \end{center} @@ -76,8 +77,8 @@ There are the following valid options for \Lcs{psPrintValue}: \makebox[1em]{\iA} \makebox[5em]{\psPrintValue[PSfont=Helvetica,xShift=-10]{\iA\space sin}} \makebox[4em][r]{\psPrintValue[PSfont=Courier,fontscale=10,decimals=3,xShift=-20]{\iA\space cos}}\hspace{1em} - \makebox[5em]{\psPrintValue[dot,valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\iA\space sqrt}} - \makebox[7em]{\psPrintValue[PSfont=Times-Italic]{\iA\space dup sin exch cos add}} + \makebox[5em]{\psPrintValue[valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\iA\space sqrt}} + \makebox[7em]{\psPrintValue[comma,PSfont=Times-Italic]{\iA\space dup sin exch cos add}} \makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\iA\space dup sin dup mul exch cos dup mul add}}\\} \end{lstlisting} @@ -93,8 +94,8 @@ Pay attention, in algebraic notation angles must be in radian and not degrees. \multido{\rA=0+0.1}{18}{\makebox[1em]{\rA} \makebox[5em]{\psPrintValue[PSfont=Helvetica,xShift=-10]{\rA, sin(x)}} \makebox[4em][r]{\psPrintValue[PSfont=Courier,fontscale=10,decimals=3,xShift=-20]{\rA,cos(x)}}\hspace{1em} - \makebox[5em]{\psPrintValue[dot,valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\rA,sqrt(x)}} - \makebox[7em]{\psPrintValue[PSfont=Times-Italic]{\rA,sin(x)+cos(x)}} + \makebox[5em]{\psPrintValue[valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\rA,sqrt(x)}} + \makebox[7em]{\psPrintValue[comma,PSfont=Times-Italic]{\rA,sin(x)+cos(x)}} \makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\rA,sin(x)^2+cos(x)^2}}\\} \end{center} @@ -107,28 +108,28 @@ Pay attention, in algebraic notation angles must be in radian and not degrees. \multido{\rA=0+0.1}{18}{\makebox[1em]{\rA} \makebox[5em]{\psPrintValue[PSfont=Helvetica,xShift=-10]{\rA, sin(x)}} \makebox[4em][r]{\psPrintValue[PSfont=Courier,fontscale=10,decimals=3,xShift=-20]{\rA,cos(x)}}\hspace{1em} - \makebox[5em]{\psPrintValue[dot,valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\rA,sqrt(x)}} - \makebox[7em]{\psPrintValue[PSfont=Times-Italic]{\rA,sin(x)+cos(x)}} + \makebox[5em]{\psPrintValue[valuewidth=15,linecolor=blue,PSfont=AvantGarde]{\rA,sqrt(x)}} + \makebox[7em]{\psPrintValue[comma,PSfont=Times-Italic]{\rA,sin(x)+cos(x)}} \makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\rA,sin(x)^2+cos(x)^2}}\\} \end{lstlisting} \begin{center} -foo \makebox[2em][l]{\psPrintValue[dot]{3.14 10 mul round 10 div}}bar\\3pt -foo \makebox[2em][l]{\psPrintValue[dot,PSfont=Symbol, +foo \makebox[2em][l]{\psPrintValue[comma]{3.14 10 mul round 10 div}}bar\\3pt +foo \makebox[2em][l]{\psPrintValue[comma,PSfont=Symbol, postString=\string\260]{3.14 10 mul round 10 div}}bar\\3pt -foo \makebox[3.5em][l]{\psPrintValue[dot,PSfont=Symbol,decimals=6, +foo \makebox[3.5em][l]{\psPrintValue[PSfont=Symbol,decimals=6, postString=\string\260]{3.14 dup mul}}bar \end{center} \bigskip \begin{lstlisting} -foo \makebox[2em][l]{\psPrintValue[dot]{3.14 10 mul round 10 div}}bar\\3pt -foo \makebox[2em][l]{\psPrintValue[dot,PSfont=Symbol, +foo \makebox[2em][l]{\psPrintValue[comma]{3.14 10 mul round 10 div}}bar\\3pt +foo \makebox[2em][l]{\psPrintValue[comma,PSfont=Symbol, postString=\string\260]{3.14 10 mul round 10 div}}bar\\3pt -foo \makebox[3.5em][l]{\psPrintValue[dot,PSfont=Symbol,decimals=6, +foo \makebox[3.5em][l]{\psPrintValue[PSfont=Symbol,decimals=6, postString=\string\260]{3.14 dup mul}}bar \end{lstlisting} diff --git a/Master/texmf-dist/tex/generic/pst-tools/pst-tools.tex b/Master/texmf-dist/tex/generic/pst-tools/pst-tools.tex index 1d30cb3d8b0..7303d83c49d 100644 --- a/Master/texmf-dist/tex/generic/pst-tools/pst-tools.tex +++ b/Master/texmf-dist/tex/generic/pst-tools/pst-tools.tex @@ -26,11 +26,13 @@ % interface to the `xkeyval' package \pst@addfams{pst-tools} % -\def\fileversion{0.04} -\def\filedate{2013/07/08} +\def\fileversion{0.05} +\def\filedate{2014/05/12} \message{`PST-tools' v\fileversion, \filedate\space (hv)} % -\define@boolkey[psset]{pst-tools}[Pst@]{dot}[true]{} +\define@key[psset]{pst-tools}{decimalSeparator}[.]{\def\psk@decimalSeparator{#1}}% +\define@boolkey[psset]{pst-tools}[Pst@]{comma}[true]{% + \ifPst@comma\def\psk@decimalSeparator{,}\else\def\psk@decimalSeparator{.}\fi} \define@boolkey[psset]{pst-tools}[Pst@]{trimSpaces}[true]{} \define@key[psset]{pst-tools}{xShift}[0]{\def\psk@xShift{#1}} \define@key[psset]{pst-tools}{yShift}[0]{\def\psk@yShift{#1}} @@ -41,7 +43,8 @@ \define@key[psset]{pst-tools}{fontscale}[10]{\pst@checknum{#1}\psk@fontscale } \define@key[psset]{pst-tools}{decimals}[-1]{\pst@getint{#1}\psk@decimals } \psset[pst-tools]{PSfont=Times-Roman,fontscale=10,valuewidth=10,decimals=-1, - xShift=0,yShift=0,dot,trimSpaces=false,postString={},VarName={}} + xShift=0,yShift=0,trimSpaces=false,postString={},VarName={}, + comma=false,decimalSeparator=.} % \def\txG{ true setglobal globaldict begin } \def\etxG{ end false setglobal } @@ -63,7 +66,7 @@ %/concatstringarray{ % [(a) (b) ... (z)] --> (ab...z) 20100422 \ifx\relax\psk@postString\relax\else [ exch (\psk@postString) ] concatstringarray \fi \ifPst@trimSpaces rightTrim \fi - \ifPst@dot dot2comma \fi % do we have to change dot to comma + \ifPst@comma dot2comma \fi % do we have to change dot to comma \psk@xShift\space \psk@yShift\space moveto %Output show grestore }% @@ -96,7 +99,7 @@ \psk@decimals 0 eq { cvi } if /numb ED expon \psk@valuewidth string cvs /expon exch def numb \psk@valuewidth string cvs - \ifPst@dot dot2comma \fi % do we have to change dot to comma + \ifPst@comma dot2comma \fi % do we have to change dot to comma /Output exch def /txspc \psk@fontscale 4 div def \psk@xShift\space 0 moveto mfont Output show @@ -108,7 +111,7 @@ \ifPst@round round \else cvi \fi exch div } if \psk@decimals 0 eq { cvi } if %inserted to handle decimals=0 \psk@valuewidth string cvs - \ifPst@dot dot2comma \fi % do we have to change dot to comma + \ifPst@comma dot2comma \fi % do we have to change dot to comma \psk@xShift\space 0 moveto mfont %Output show } ifelse -- cgit v1.2.3