summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-26 22:50:40 +0000
committerKarl Berry <karl@freefriends.org>2015-07-26 22:50:40 +0000
commit7a88911ffe2801abc78f25c81f6b3cf2bc0c4b82 (patch)
tree0ced28a9465f3a0244595c7f82eaca1c4d198197 /Master/texmf-dist/tex
parent92fc98cab37ec4df1477c3c9a32d724d4ed049d5 (diff)
pstricks (26jul15)
git-svn-id: svn://tug.org/texlive/trunk@37963 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/pstricks.tex28
-rw-r--r--Master/texmf-dist/tex/latex/pstricks/pstricks.app138
-rw-r--r--Master/texmf-dist/tex/latex/pstricks/pstricks.sty22
3 files changed, 169 insertions, 19 deletions
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{}