diff options
author | Karl Berry <karl@freefriends.org> | 2013-10-26 21:42:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-10-26 21:42:03 +0000 |
commit | 8fd740a32619f187dd09484ff3ee7efc8c80d044 (patch) | |
tree | 10eae9424c316849a7f29ab872f346ca46f28e35 /Master/texmf-dist | |
parent | c6b08c07fcd3b89fa78aae8d84283366454b0d9a (diff) |
pst-tools (26oct13)
git-svn-id: svn://tug.org/texlive/trunk@32002 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-tools/Changes | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf | bin | 67428 -> 68588 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.tex | 1 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pst-tools/pst-tools.pro | 52 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/pst-tools/Makefile | 70 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-tools/pst-tools.tex | 14 |
6 files changed, 61 insertions, 81 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-tools/Changes b/Master/texmf-dist/doc/generic/pst-tools/Changes index 680a2891f1a..fecbea12802 100644 --- a/Master/texmf-dist/doc/generic/pst-tools/Changes +++ b/Master/texmf-dist/doc/generic/pst-tools/Changes @@ -1,4 +1,7 @@ ..... pst-tools.tex +0.04 2013-07-08 - ??? +0.03 2012-12-04 - added option for \psPrintValue to save + the value 0.02 2012-10-16 - added option postString and stripSpaces to macro \psPrintValue 0.01 2012-01-01 - first CTAN version @@ -9,6 +12,8 @@ ---- pst-tools.pro +0.04 2013-10-26 - added function /ps@reverseOrderOfPoints + - modified /rightTrim 0.03 2012-10-16 - added function /rightTrim - moved file from pstricks base to pst-tools 0.02 2012-01-01 moved some stuff from pst-func.pro 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 Binary files differindex 1af154fe372..e8b97a905d6 100644 --- a/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf 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 1c4e3a73582..20691f8e678 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,6 +50,7 @@ There are the following valid options for \Lcs{psPrintValue}: prints all possible digits.\\ \Lkeyword{xShift} & <number> & 0 & the x shift in pt for the output, relative to the current point.\\ \Lkeyword{algebraic} & <boolean> & false & function in algebraic notation.\\ +\Lkeyword{VarName} & <string> & \{\} & saves the value in /<VarName> for further use \end{tabularx} \begin{center} diff --git a/Master/texmf-dist/dvips/pst-tools/pst-tools.pro b/Master/texmf-dist/dvips/pst-tools/pst-tools.pro index 971f66a1f21..c9f7e652e89 100644 --- a/Master/texmf-dist/dvips/pst-tools/pst-tools.pro +++ b/Master/texmf-dist/dvips/pst-tools/pst-tools.pro @@ -1,7 +1,7 @@ -% $Id: pst-tools.pro 713 2012-10-16 14:25:00Z herbert $ +% $Id: pst-tools.pro 842 2013-10-26 10:25:41Z herbert $ % %% PostScript tools prologue for pstricks.tex. -%% Version 0.03, 2012/10/16 +%% Version 0.04, 2013/10/26 %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -23,6 +23,15 @@ end } def % +/ps@ReverseOrderOfPoints { % on stack [P1 P2 P3 ...Pn]=>[Pn,Pn-1,...,P2,P1] + 5 dict begin % all local + aload length /n ED % number of coors + n 2 div cvi /m ED % number of Points + /n1 n def + m { n1 2 roll /n1 n1 2 sub def } repeat + n array astore + end +} def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % subroutines for complex numbers, given as an array [a b] % which is a+bi = Real+i Imag @@ -212,20 +221,49 @@ end end } def % -/rightTrim { +/rightTrim { % on stack the string and the character number to be stripped + /charNo exch def dup length 1 sub -1 0 { - /i exch def dup i get 32 ne { exit } if + /i exch def dup i get charNo ne { exit } if } for 0 i 1 add getinterval dup length string copy -} bind def +} bind def % leaves the stripped string on the stack /psStringwidth /stringwidth load def /psShow /show load def -%/stringwidth{ rightTrim psStringwidth } bind def +%/stringwidth{ 32 rightTrim psStringwidth } bind def -%/show { rightTrim psShow } bind def +%/show { 32 rightTrim psShow } bind def +%-----------------------------------------------------------------------------% + +/pgffunctions { + /pgfsc{}bind def% stroke color is empty by default + /pgffc{}bind def% fill color is empty by default + /pgfstr{stroke}bind def% + /pgffill{fill}bind def% + /pgfeofill{eofill}bind def% + /pgfe{a dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath}bind def% rectangle + /pgfw{setlinewidth}bind def% setlinewidth + /pgfs{save pgfpd 72 Resolution div 72 VResolution div neg scale + magscale{1 DVImag div dup scale}if + pgfx neg pgfy neg translate pgffoa .setopacityalpha}bind def% save + /pgfr{pgfsd restore}bind def %restore + userdict begin% + /pgfo{pgfsd /pgfx currentpoint /pgfy exch def def @beginspecial}bind def %open + /pgfc{newpath @endspecial pgfpd}bind def %close + /pgfsd{globaldict /pgfdelta /delta where {pop delta} {0} ifelse put}bind def% save delta + /pgfpd{/delta globaldict /pgfdelta get def}bind def % put delta + /.setopacityalpha where {pop} {/.setopacityalpha{pop}def} ifelse % install .setopacityalpha + /.pgfsetfillopacityalpha{/pgffoa exch def + /pgffill{gsave pgffoa .setopacityalpha fill 1 .setopacityalpha newpath fill grestore newpath}bind def + /pgfeofill{gsave pgffoa .setopacityalpha eofill 1 .setopacityalpha newpath eofill grestore newpath}bind def}bind def + /.pgfsetstrokeopacityalpha{/pgfsoa exch def /pgfstr{gsave pgfsoa .setopacityalpha stroke grestore newpath}bind def}bind def + /pgffoa 1 def + /pgfsoa 1 def + end +} def %-----------------------------------------------------------------------------% % END pst-tools.pro diff --git a/Master/texmf-dist/source/generic/pst-tools/Makefile b/Master/texmf-dist/source/generic/pst-tools/Makefile deleted file mode 100644 index c8e6bf62b78..00000000000 --- a/Master/texmf-dist/source/generic/pst-tools/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# `Makefile' for `pst-func.pdf', hv, 2006/08/11 - -.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps - -PACKAGE = pst-tools - -MAIN = $(PACKAGE)-doc - -LATEX = latex - -ARCHNAME = $(MAIN)-$(shell date +%y%m%d) - -ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Changes Makefile - -TDS = ~/PSTricks/PSTricks-TDS - -all : doc clean tds -doc: $(MAIN).pdf - -$(MAIN).pdf : $(MAIN).ps - GS_OPTIONS=-dAutoRotatePages=/None ps2pdf $< - -$(MAIN).ps : $(MAIN).dvi - dvips $< - -$(MAIN).dvi : $(MAIN).tex - $(LATEX) $< - $(LATEX) $< - if ! test -f $(basename $<).glo ; then touch $(basename $<).glo; fi - if ! test -f $(basename $<).idx ; then touch $(basename $<).idx; fi - makeindex -s gglo.ist -t $(basename $<).glg -o $(basename $<).gls \ - $(basename $<).glo - makeindex -s pst-doc.ist -t $(basename $<).ilg -o $(basename $<).ind \ - $(basename $<).idx - bibtex $(basename $<) - $(LATEX) $< - $(LATEX) $< - -clean : - $(RM) $(addprefix $(MAIN), .log .aux .bbl .blg .glg .glo .gls .ilg .idx .ind .tmp .toc .out ) - $(RM) $(addprefix $(MAIN), .dvi .ps .xcp) - rm *.dat - -veryclean : clean - $(RM) $(addprefix $(MAIN), .pdf .bbl .blg) - -arch : - zip $(ARCHNAME).zip $(ARCHFILES) - -tds: - cp -u Changes $(TDS)/doc/generic/$(PACKAGE)/ - cp -u README $(TDS)/doc/generic/$(PACKAGE)/ - cp -u $(MAIN).pdf $(TDS)/doc/generic/$(PACKAGE)/ -# - cp -u Changes $(TDS)/tex/latex/$(PACKAGE)/ - cp -u $(PACKAGE).sty $(TDS)/tex/latex/$(PACKAGE)/ -# - cp -u Changes $(TDS)/tex/generic/$(PACKAGE)/ - cp -u $(PACKAGE).tex $(TDS)/tex/generic/$(PACKAGE)/ -# - cp -u Changes $(TDS)/dvips/$(PACKAGE)/ - cp -u $(PACKAGE).pro $(TDS)/dvips/$(PACKAGE)/ - cp -u $(PACKAGE).pro ~/Links/dvips-local/ -# - cp -u Changes $(TDS)/source/$(PACKAGE)/ - cp -u $(MAIN).tex $(TDS)/source/$(PACKAGE)/ - cp -u $(MAIN).bib $(TDS)/source/$(PACKAGE)/ - cp -u Makefile $(TDS)/source/$(PACKAGE)/ - -# EOF 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 81885f0fea8..1d30cb3d8b0 100644 --- a/Master/texmf-dist/tex/generic/pst-tools/pst-tools.tex +++ b/Master/texmf-dist/tex/generic/pst-tools/pst-tools.tex @@ -26,20 +26,25 @@ % interface to the `xkeyval' package \pst@addfams{pst-tools} % -\def\fileversion{0.02} -\def\filedate{2012/10/16} +\def\fileversion{0.04} +\def\filedate{2013/07/08} \message{`PST-tools' v\fileversion, \filedate\space (hv)} % \define@boolkey[psset]{pst-tools}[Pst@]{dot}[true]{} \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}} \define@key[psset]{pst-tools}{postString}[]{\def\psk@postString{#1}} +\define@key[psset]{pst-tools}{VarName}[]{\def\psk@VarName{#1 }} \define@key[psset]{pst-tools}{PSfont}[Times-Roman]{\def\psk@PSfont{/#1 }} \define@key[psset]{pst-tools}{valuewidth}[10]{\pst@getint{#1}\psk@valuewidth } \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,dot,trimSpaces=false,postString={}} + xShift=0,yShift=0,dot,trimSpaces=false,postString={},VarName={}} +% +\def\txG{ true setglobal globaldict begin } +\def\etxG{ end false setglobal } % \def\psPrintValue{\pst@object{psPrintValue}} \def\psPrintValue@i#1{\expandafter\psPrintValue@ii#1,,\@nil} @@ -52,13 +57,14 @@ /Func (#2) tx@AlgToPs begin AlgToPs end cvx def Func \else #1 \fi + \ifx\relax\psk@VarName\relax\else dup \txG 10 string cvs /\psk@VarName\space exch def \etxG \fi \psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul cvi exch div } if \psk@valuewidth string cvs %/Output exch def % save output %/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 - \psk@xShift\space 0 moveto %Output + \psk@xShift\space \psk@yShift\space moveto %Output show grestore }% \end@SpecialObj% |