From 7a88911ffe2801abc78f25c81f6b3cf2bc0c4b82 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 26 Jul 2015 22:50:40 +0000 Subject: pstricks (26jul15) git-svn-id: svn://tug.org/texlive/trunk@37963 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/pstricks/Changes | 1 + .../doc/generic/pstricks/Changes.generic | 1 + Master/texmf-dist/doc/generic/pstricks/README | 4 +- .../texmf-dist/doc/generic/pstricks/pst-news15.pdf | Bin 208035 -> 279726 bytes .../texmf-dist/doc/generic/pstricks/pst-news15.tex | 28 ++++- Master/texmf-dist/dvips/pstricks/pst-show.pro | 14 +++ .../texmf-dist/tex/generic/pstricks/pstricks.tex | 28 +++-- Master/texmf-dist/tex/latex/pstricks/pstricks.app | 138 +++++++++++++++++++++ Master/texmf-dist/tex/latex/pstricks/pstricks.sty | 22 ++-- 9 files changed, 214 insertions(+), 22 deletions(-) create mode 100644 Master/texmf-dist/dvips/pstricks/pst-show.pro create mode 100644 Master/texmf-dist/tex/latex/pstricks/pstricks.app (limited to 'Master') diff --git a/Master/texmf-dist/doc/generic/pstricks/Changes b/Master/texmf-dist/doc/generic/pstricks/Changes index c0b01626623..58ef4d16ea9 100644 --- a/Master/texmf-dist/doc/generic/pstricks/Changes +++ b/Master/texmf-dist/doc/generic/pstricks/Changes @@ -1,3 +1,4 @@ +2015-07-25 - updated news2015 2015-06-29 - new news2015 2014-08-28 - updated news2014 2014-07-28 - updated news2014 diff --git a/Master/texmf-dist/doc/generic/pstricks/Changes.generic b/Master/texmf-dist/doc/generic/pstricks/Changes.generic index 6a1270906c6..11555cd484b 100644 --- a/Master/texmf-dist/doc/generic/pstricks/Changes.generic +++ b/Master/texmf-dist/doc/generic/pstricks/Changes.generic @@ -2,6 +2,7 @@ pstricks.tex -------- versions like 2.47a have only changes in other files, but not in this main package. +2.62 2015-07-24 - added optional argument bgcolor 2.61 2015-06-28 - added optional arguments precode and postcode 2.60 2014-10-25 - make it compatible for using it with ConTeXt 2.57 2014-08-27 - take option correctAngle into account for \psellipticwedge diff --git a/Master/texmf-dist/doc/generic/pstricks/README b/Master/texmf-dist/doc/generic/pstricks/README index 993cb771801..efcf531d19a 100644 --- a/Master/texmf-dist/doc/generic/pstricks/README +++ b/Master/texmf-dist/doc/generic/pstricks/README @@ -1,4 +1,4 @@ -PSTricks 2014 +PSTricks 2015 ----------------------------------------------------------------------- PSTricks is the original work of Timothy van Zandt @@ -9,7 +9,7 @@ and Sebastian Rahtz PSTricks 2004 is edited by Herbert Voss and Rolf Niepraschk -PSTricks 2005-2014 is edited by Herbert Voss +PSTricks 2005-2015 is edited by Herbert Voss ----------------------------------------------------------------------- For more informations go to http://tug.org/PSTricks _and_ read the diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news15.pdf b/Master/texmf-dist/doc/generic/pstricks/pst-news15.pdf index 7d8065da0c0..a8590c0a1d9 100644 Binary files a/Master/texmf-dist/doc/generic/pstricks/pst-news15.pdf and b/Master/texmf-dist/doc/generic/pstricks/pst-news15.pdf differ diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news15.tex b/Master/texmf-dist/doc/generic/pstricks/pst-news15.tex index c0a058f3b1f..fe8ffe6fa84 100644 --- a/Master/texmf-dist/doc/generic/pstricks/pst-news15.tex +++ b/Master/texmf-dist/doc/generic/pstricks/pst-news15.tex @@ -1,4 +1,4 @@ -%% $Id: pst-news13.tex 856 2013-12-09 10:34:40Z herbert $ +%% $Id: pst-news15.tex 161 2015-07-25 17:43:11Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings headexclude,footexclude,oneside]{pst-doc} \listfiles @@ -56,6 +56,32 @@ packages to paste PostScript code before and after the macros. \end{pspicture} \end{LTXexample} +\subsection{Background color} +There is now the optional argument \Lkeyword{bgcolor} (backgound color), +which is only valid for the background +of the environment \Lenv{pspicture} with its defined coordinates. +Internally it uses the macro \Lcs{psframe*}: + +\begin{LTXexample}[pos=t] +\begin{pspicture*}[bgcolor=black!20](-12,-5)(-2,5) +\psset{viewpoint=6 -50 0 rtp2xyz,Decran=4,lightsrc=viewpoint} +\defFunction[algebraic]{torus}(u,v) + {2*(1+ 0.5*cos(u))*cos(v)}% x=f(u,v) + {2*(1+ 0.5*cos(u))*sin(v)}% y=f(u,v) + {2*0.5*sin(u)}% z=f(u) +\psSolid[object=surfaceparametree, + precode=/n1 48 def /n2 90 def /n1n2 n1 n2 mul 2 mul 1 sub def /iS 0 def, + base=0 2 pi mul 0 pi 1.5 mul , + fcol=0 2 n1 2 sub {/i exch def + i n2 mul 2 i n2 mul n2 add 1 sub {(Black)} for} for + 1 2 n1 1 sub {/i exch def i n2 mul 1 add 2 i n2 mul n2 add 1 sub {(Black)} for} for, + fillcolor=white,incolor=yellow!50, + function=torus, + linewidth=0.5\pslinewidth,unit=5,ngrid=n1 n2] +\end{pspicture*} +\end{LTXexample} + + \clearpage \nocite{*} diff --git a/Master/texmf-dist/dvips/pstricks/pst-show.pro b/Master/texmf-dist/dvips/pstricks/pst-show.pro new file mode 100644 index 00000000000..c951f3a3f2b --- /dev/null +++ b/Master/texmf-dist/dvips/pstricks/pst-show.pro @@ -0,0 +1,14 @@ +%% To get PSTricks charpath and textpath to work: +%----------- pst-show.pro ------------------------------------------ +%! +% Patch for dvipsone to get PSTricks' charpath and textpath to work. +% Save as pst-show.pro, put it with your other PSTricks .pro files. +% Add "\pstheader{pst-show.pro}" to the beginning of your document. +% +% We unbind show: +dvidict begin +/S {show dup 0 rmoveto} def +/T {show 2 index 0 rmoveto} def +/s {show} def +end +%% \ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex index 9f662edb996..802ea10fe22 100644 --- a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex +++ b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex @@ -116,8 +116,8 @@ \input pgffor.code.tex \let\pgfforeach\foreach % -\def\fileversion{2.61} -\def\filedate{2015/06/28} +\def\fileversion{2.62} +\def\filedate{2015/07/25} \catcode`\@=11\relax \pst@addfams{pstricks} % @@ -125,40 +125,42 @@ \newcount\psLoopIndex \def\@fornoop#1\@@#2#3{} \long\def\@for#1:=#2\do#3{% - \pst@cntm=0% + \pst@cntm=0 \expandafter\def\expandafter\@fortmp\expandafter{#2}% \ifx\@fortmp\@empty \else \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}\fi} -\long\def\@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else - #5\def#4{#2}\ifx #4\@nnil \else\global\advance\psLoopIndex by \@ne\relax% +% +\long\def\@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx#4\@nnil \else + #5\def#4{#2}\ifx#4\@nnil \else\global\advance\psLoopIndex by \@ne\relax #5\@iforloop #3\@@#4{#5}\fi\fi} + \long\def\@iforloop#1,#2\@@#3#4{\global\advance\psLoopIndex by \@ne\relax% \def#3{#1}\ifx #3\@nnil \expandafter\@fornoop \else #4\relax\expandafter\@iforloop\fi#2\@@#3{#4}} % \long\def\psforeach#1#2#3{% - \global\psLoopIndex=0\relax% + \global\psLoopIndex=0\relax \if$\ifnum9<1#2$\else\fi\psforeach@ii{#1}{#2}{#3}% \else \expandafter\psforeach@i#2,..,,..,\@nil{#1}{#3}\fi} \long\def\psforeach@i#1,#2,..,#3,..,#4\@nil#5#6{% \ifx\relax#3\relax\psforeach@ii{#5}{#1,#2}{#6}% \else\psforeach@iii{#5}{#1}{#2}{#3}{#6}\fi} \long\def\psforeach@ii#1#2#3{% - \begingroup% + \begingroup \edef\reserved@a{#2}% \@for#1:=\reserved@a\do{#3}% \endgroup} \long\def\psforeach@iii#1#2#3#4#5{% \pstFPsub\pst@tempA{#3}{#2}% - \pst@dimm=\pst@tempA pt + \pst@dimm=\pst@tempA pt% \pstFPstripZeros{\pst@tempA}\pst@tempB% \def\pst@tempA{#2}% \def\pst@tempa{#2}% \pst@dimn=#4pt% - \loop% - \pst@dimm=\pst@tempA pt% - \ifdim\pst@dimm<\pst@dimn% + \loop + \pst@dimm=\pst@tempA pt + \ifdim\pst@dimm<\pst@dimn \pstFPadd\pst@tempA{\pst@tempA}{\pst@tempB}% \pstFPstripZeros{\pst@tempA}\pst@tempA% \edef\pst@tempa{\pst@tempa,\pst@tempA}% @@ -678,6 +680,9 @@ \newrgbcolor{cyan}{0 1 1} \newrgbcolor{magenta}{1 0 1} % +\define@key[psset]{pstricks}{bgcolor}{\def\pst@bgcolor{#1}}% background for pspicture +\psset[pstricks]{bgcolor={}}% \pst@bgcolor is \@empty + \define@key[psset]{pstricks}{style}{% \@ifundefined{pscs@#1}% {\@pstrickserr{Custom style `#1' undefined}\@ehpa}% @@ -4376,6 +4381,7 @@ pop \psset{showgrid=false}% % for nested pspicture environemnets \def\pst@tempA{#1}% \ifx\pst@tempA\@empty\else\psset{#1}\fi% sets the shift and grid option + \ifx\pst@bgcolor\@empty \else\psframe*[linecolor=\pst@bgcolor](#2,#3)(#4,#5)\fi \ifshowgrid\ifnum\showgridp@s=0\psgrid[style=gridstyle]\fi\fi% % ----------- 1.10/12 end hv ------------------- \ignorespaces% % 2008-12-07 diff --git a/Master/texmf-dist/tex/latex/pstricks/pstricks.app b/Master/texmf-dist/tex/latex/pstricks/pstricks.app new file mode 100644 index 00000000000..38bd2afe179 --- /dev/null +++ b/Master/texmf-dist/tex/latex/pstricks/pstricks.app @@ -0,0 +1,138 @@ +\newif\if@app@off@ +\newif\if@app@crop@ +\newcounter{app@runs} +\def\app@suffix{autopp} +\edef\app@jobname{\jobname-\app@suffix} +\edef\app@pics{\jobname-pics.pdf} +\DeclareOptionX{off}[]{\@app@off@true} +\define@choicekey{auto-pst-pdf.sty}{crop}[\@tempa\@tempb]{on,off}{% + \ifcase\@tempb\relax + \@app@crop@true + \or + \@app@crop@false + \fi} +\DeclareOptionX{on}[]{\@app@off@false} +\DeclareOptionX{ext}{\def\app@ext{#1}} +\DeclareOptionX{latex}{% + \def\app@latex@opts{% + \ifwindows + -disable-write18 + \else + -no-shell-escape + \fi + -jobname="\app@jobname" + -interaction=batchmode + #1}} +\DeclareOptionX{dvips}{\def\app@dvips@opts{#1}} +\DeclareOptionX{pspdf}{\def\app@pspdf@opts{#1}} +\DeclareOptionX{pdfcrop}{\def\app@pdfcrop@opts{#1}} + +\DeclareOptionX{cleanup}{% + \let\app@rm@files\@empty + \@for\@ii:=#1\do{% + \edef\app@rm@files{\app@rm@files,\app@jobname.\@ii}}} + +\DeclareOptionX{runs}{% + \setcounter{app@runs}{#1}% support calc + \ifnum\c@app@runs > \z@ + \else + \app@PackageWarning{The number of runs must be at least one.}% + \c@app@runs\@ne + \fi} + +\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{pst-pdf}} + +\ExecuteOptionsX{% + ext=tex, + crop=on, + latex={}, + dvips={-Ppdf}, + pdfcrop={}, + cleanup={log,aux,dvi,ps,pdf}, + runs=1 +} +\ifwindows + \ExecuteOptionsX{pspdf={}} +\else + \ExecuteOptionsX{pspdf={-dAutoRotatePages=/None}} +\fi +\ProcessOptionsX +\def\app@exe{\immediate\write18} +\def\app@nl{^^J\space\space\space\space} +\newcommand\app@PackageError[2]{% + \PackageError{auto-pst-pdf}{\app@nl #1^^J}{#2}} +\newcommand\app@PackageWarning[1]{% + \PackageWarning{auto-pst-pdf}{\app@nl #1^^JThis warning occured}} +\newcommand\app@PackageInfo[1]{\PackageInfo{auto-pst-pdf}{#1}} +\newcommand\OnlyIfFileExists[2]{\IfFileExists{#1}{#2}{}} +\newcommand\NotIfFileExists[2]{\IfFileExists{#1}{}{#2}} +\def\app@convert#1#2#3{% + \OnlyIfFileExists{#2}{% + \app@exe{\csname app@cmd@#1\endcsname{#2}{#3}}% + \NotIfFileExists{#3}{\app@PackageWarning{Creation of #3 failed.}}}} +\def\app@compile{% + \app@cleanup + \app@remove@container + \loop\ifnum\c@app@runs > \@ne + \app@convert{extralatex}{\jobname.\app@ext}{\app@jobname.dvi}% + \advance\c@app@runs\m@ne + \repeat + \app@convert{latex}{\jobname.\app@ext}{\app@jobname.dvi}% + \app@convert{dvips}{\app@jobname.dvi}{\app@jobname.ps}% + \if@app@crop@ + \app@convert{pstopdf}{\app@jobname.ps}{\app@jobname.pdf}% + \app@convert{pdfcrop}{\app@jobname.pdf}{\app@pics}% + \else + \app@convert{pstopdf}{\app@jobname.ps}{\app@pics}% + \fi + \IfFileExists{\app@pics} + {\app@cleanup} + {\app@PackageWarning{Could not create \app@pics. + Auxiliary files not deleted.}}} +\edef\app@rm{\ifwindows del \else rm -- \fi} +\newcommand\app@try@rm[1]{% + \@for\@tempa:=#1\do{% + \OnlyIfFileExists{\@tempa}{\app@exe{\app@rm "\@tempa"}}}} +\def\app@remove@container{\app@try@rm{\app@pics}} +\def\app@cleanup{\app@try@rm{\app@rm@files}} +\def\app@cmd@latex#1#2{latex \app@latex@opts\space + "\unexpanded{\let\APPmakepictures\empty\input} #1"} +\def\app@cmd@extralatex#1#2{latex \app@latex@opts\space + "\unexpanded{\let\APPmakepictures\undefined\input} #1"} +\def\app@cmd@dvips#1#2{dvips \app@dvips@opts\space -o "#2" "#1"} +\def\app@cmd@pstopdf#1#2{ps2pdf \app@pspdf@opts\space "#1" "#2"} +\def\app@cmd@pdfcrop#1#2{pdfcrop \app@pdfcrop@opts\space "#1" "#2"} +\ifpdf + \if@app@off@\else + \ifshellescape + \app@exe{echo " "} + \app@exe{echo "-------------------------------------------------"} + \app@exe{echo "auto-pst-pdf: Auxiliary LaTeX compilation"} + \app@exe{echo "-------------------------------------------------"} + \app@compile + \app@exe{echo "-------------------------------------------------"} + \app@exe{echo "auto-pst-pdf: End auxiliary LaTeX compilation"} + \app@exe{echo "-------------------------------------------------"} + \else + \app@PackageError{% + "shell escape" (or "write18") is not enabled:\app@nl + auto-pst-pdf will not work!} + {You need to run LaTeX with the equivalent of + "pdflatex -shell-escape"\app@nl + Or turn off auto-pst-pdf.}% + \fi + \fi + \if@app@crop@ + \PassOptionsToPackage{notightpage}{pst-pdf} + \fi +\else + \ifx\APPmakepictures\@undefined + \PassOptionsToPackage{inactive}{pst-pdf} + \else + \if@app@crop@ + \PassOptionsToPackage{notightpage}{pst-pdf} + \fi + \fi +\fi +\RequirePackage{pst-pdf} +\let\app@ig\includegraphics \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/pstricks/pstricks.sty b/Master/texmf-dist/tex/latex/pstricks/pstricks.sty index d34dd775288..14c94b22dee 100644 --- a/Master/texmf-dist/tex/latex/pstricks/pstricks.sty +++ b/Master/texmf-dist/tex/latex/pstricks/pstricks.sty @@ -56,9 +56,9 @@ % \DeclareOption*{\OptionNotUsed} % -\ProcessOptions\relax +%\ProcessOptions\relax % -\RequirePackage{ifpdf} +\RequirePackage{ifpdf,xkeyval,ifplatform} % \ifpst@loadPDF \ifnum\pdfshellescape=\@ne\else @@ -69,22 +69,28 @@ (if you are using MikTeX) \MessageBreak ************************************} \fi - \def\app@pdfcrop@opts{--hres}%%% hv 20130405 \@ifclassloaded{beamer}{% \ifpdf \else\setbeamertemplate{navigation symbols}{} \fi - \AtEndOfPackage{\RequirePackage{auto-pst-pdf}}} - {\AtBeginDocument{% + \AtEndOfPackage{\input{pstricks.app}}% + \typeout{>>> Loading auto-pst-pdf at end of pstricks.sty }}% + {\let\pst@document\document + \def\document{% {\@ifundefined{shorthandoff} % we have no babel until now - { \typeout{noshorthand}\usepackage{auto-pst-pdf}} + { \typeout{>>> noshorthand}\input{pstricks.app}} { \@ifundefined{bbl@active@"}{}{\shorthandoff{"}} - \usepackage{auto-pst-pdf} - \@ifundefined{bbl@active@"}{}{\shorthandon{"}}}}}} + \input{pstricks.app}% + \typeout{>>> Loading auto-pst-pdf at begin of document }% + \@ifundefined{bbl@active@"}{}{\shorthandon{"}}}} + \pst@document}% + } + \def\app@pdfcrop@opts{--hres}%%% hv 20130405 \fi % \ifpst@ovl \RequirePackage{pst-ovl}\fi % \@ifundefined{PSTricksLoaded} {% + \ProcessOptions\relax \let\saved@scalebox\scalebox \ifpst@OldVersion \def\psDEBUG[#1]#2{} -- cgit v1.2.3