summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-04 22:54:05 +0000
committerKarl Berry <karl@freefriends.org>2010-11-04 22:54:05 +0000
commit97feaccaf34dfd3ad2d01c2d31a71d82a3a2e845 (patch)
tree5e556502b772770c3feb79a4c648005fab2d5609 /Master/texmf-dist/tex
parentbb64659eb013780c07781bc90d37b77be7189782 (diff)
pstricks 2.13 (3nov10)
git-svn-id: svn://tug.org/texlive/trunk@20315 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/pstPlain.tex5
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/pstricks.tex102
-rw-r--r--Master/texmf-dist/tex/latex/pstricks/pstricks.sty43
3 files changed, 124 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/generic/pstricks/pstPlain.tex b/Master/texmf-dist/tex/generic/pstricks/pstPlain.tex
new file mode 100644
index 00000000000..243413cede7
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pstricks/pstPlain.tex
@@ -0,0 +1,5 @@
+%\input pst-xkey
+\input pstricks
+This is a test
+\bye
+
diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
index 084e7a17e9c..05f5a9efc3c 100644
--- a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
+++ b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
@@ -65,8 +65,8 @@
\pst@addfams{pstricks}
\ifx\PSTFPloaded\endinput\else \input pst-fp.tex\fi
%
-\def\fileversion{2.12}
-\def\filedate{2010/09/16}
+\def\fileversion{2.13}
+\def\filedate{2010/11/01}
%
% stolen from latex.ltx to make it TeX compatible
\newcount\psLoopIndex
@@ -670,6 +670,9 @@
\edef\pst@coors{\pst@coor\pst@coors}%
\@ifnextchar({\pst@@getcoors}{\pst@aftercoors}%
}
+%
+\newcount\pst@C@@rType% 0: default cartesian coordinates and angles
+%
\def\pst@getangle#1#2{\pst@@getangle{#1}\let#2\pst@angle}
\def\pst@angle{0 }
%
@@ -680,6 +683,7 @@
}
\def\NormalCoor{%
\def\pst@@getcoor##1{\pst@expandafter\cartesian@coor{##1},\relax,\@nil}%
+ \def\pstCheckCoorType##1{\global\pst@C@@rType=0}%
\Pst@SpecialLengthfalse
\def\pssetlength##1##2{%
\let\@psunit\psunit
@@ -710,6 +714,15 @@
\xdef\pst@tempg{##1}%
\endgroup%
\expandafter\special@coor\pst@tempg||\@nil}%
+ \def\pstCheckCoorType##1{%
+ \begingroup%
+ \pst@activecoor%
+ \xdef\pst@tempg{##1}%
+ \endgroup
+ \psDEBUG[pstCheckCoorType]{:Checking coor \pst@tempg:}%
+ \expandafter\pst@CheckCoorType\pst@tempg||\@nil%
+ \psDEBUG[pstCheckCoorType]{::Coor type=\the\pst@C@@rType::}%
+ }%
\def\pssetlength##1##2{%
\begingroup%
\pst@activecoor%
@@ -731,13 +744,60 @@
\catcode`\;=13
\catcode`\!=13
\catcode`\*=13
+\catcode`\>=13
\gdef\pst@activecoor{%
\def|{\string|}%
\def;{\string;}%
\def!{\string!}%
\def*{\string*}% algebraic expression hv 2007-11-17
+ \def>{\string>}%
}
\endgroup
+% \pst@C@@rType = 0 cartesian (x,y)
+% = 1 polar (r;phi)
+% = 2 PS (! x y)
+% = 3 mixed ((x,y)|(x,y))
+% = 4 algebraic (*x f(x))
+% = 5 node (A)
+% = 6 special node ([...]A)
+% = 7 node (>A)
+\def\pst@CheckCoorType#1|#2|#3\@nil{%
+ \ifx#3|\relax
+ \global\pst@C@@rType=3\relax
+ \else
+ \expandafter\pst@@CheckCoorType#1;;\@nil%
+ \fi}
+%
+\def\pst@@CheckCoorType#1#2;#3;#4\@nil{%
+ \ifx#1>\relax% node with special rotation for \uput
+ \global\pst@C@@rType=7\relax%
+ \else
+ \ifcat#1a\relax% node names should start with a letter
+ \global\pst@C@@rType=5\relax%
+ \else
+ \ifx#1[\relax% special node coor: [..]A
+ \global\pst@C@@rType=6\relax%
+ \else
+ \ifx#1!\relax% PostScript code: x y
+ \global\pst@C@@rType=2\relax%
+ \else
+ \ifx#1*\relax% algebraic PostScript code: x f(x)
+ \global\pst@C@@rType=4\relax%
+ \else
+ \ifx#3;\relax
+ \global\pst@C@@rType=1\relax%
+ \else
+ \global\pst@C@@rType=0\relax%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \psDEBUG[pstCheckCoorType]{::\the\pst@C@@rType::}%
+ }%
+%
+%
\def\special@coor#1|#2|#3\@nil{%
\ifx#3|\relax
\mixed@coor{#1}{#2}%
@@ -752,6 +812,9 @@
\ifx#1[\relax% special node coor: [..]A
\def\ps@next{\Node@coor[}%
\else
+ \ifx#1>\relax% PostScript code: x y
+ \def\ps@next{\special@@@@coor}%
+ \else
\ifx#1!\relax% PostScript code: x y
\def\ps@next{\raw@coor}%
\else
@@ -761,7 +824,7 @@
\def\ps@next{\special@@@coor#1}%
\fi
\fi
- \fi
+ \fi\fi
\fi
\ps@next%
}
@@ -772,6 +835,14 @@
\cartesian@coor#1,\relax,\@nil
\fi%
}
+\def\special@@@@coor#1#2;#3;#4\@nil{%
+ \def\ps@A{A}\def\ps@B{#1}%
+ \ifcat\ps@A\ps@B\relax%
+ \node@coor#1#2;;\@nil%
+ \else%
+ \cartesian@coor#1#2,\relax,\@nil
+ \fi%
+}
\def\mixed@coor#1#2{%
\begingroup%
% DG/SR modification begin - Oct. 27, 1997 - Patch 6
@@ -3687,18 +3758,19 @@ pop
\begingroup%
\use@par%
\if@star\pst@starbox\fi%
+ \pstCheckCoorType{#1}% needed for \uput@vii
\uput@vi%
\psput@{#1}\pst@hbox
\endgroup%
\ignorespaces}
+%
\def\uput@vi{%
\ifx\psk@uputref\@empty\uput@vii\tx@UUput{}%
\else%
\ifx\psk@rot\@empty\expandafter\uput@viii\psk@uputref%
\else\uput@vii\tx@UUput{}\fi%
\fi}
-
-% Fix \uput@vii
+%
\def\uput@vii#1#2{%
\edef\pst@coor{%
\pst@number\pslabelsep
@@ -3706,13 +3778,23 @@ pop
\pst@number{\wd\pst@hbox}%
\pst@number{\ht\pst@hbox}%
\pst@number{\dp\pst@hbox}%
- ps@refangle % CHANGED (MJS) FROM \psk@refangle\space
- \ifx\psk@rot\@empty\else\psk@rot\space sub \fi
+ \ifnum\pst@C@@rType=7
+ ps@refangle % CHANGED (MJS) FROM \psk@refangle\space
+ \ifx\psk@rot\@empty\else ps@rot\space sub \fi
+ \else
+ \psk@refangle\space
+ \ifx\psk@rot\@empty\else \psk@rot\space sub \fi
+ \fi
\tx@Uput #1}%
+ %\show\pst@coor
\setbox\pst@hbox=\hbox to\z@{\hss\vbox to\z@{\vss\box\pst@hbox\vss}\hss}%
- \setbox\pst@hbox=\psput@special\pst@hbox%
- \ifx\psk@rot\@empty\else\pst@rotate{ps@rot }\pst@hbox\fi}% (MJS)
-% \ifx\psk@rot\@empty\else\pst@rotate\psk@rot\pst@hbox\fi}
+ \setbox\pst@hbox=\psput@special\pst@hbox
+ \ifnum\pst@C@@rType=7
+ \ifx\psk@rot\@empty\else\pst@rotate{ps@rot }\pst@hbox\fi% CHANGED FROM \psk@rot (MJS)
+ \else
+ \ifx\psk@rot\@empty\else\pst@rotate{\psk@rot}\pst@hbox\fi%
+ \fi}
+%
%
\def\uput@viii#1#2{%
\ifnum#1>\z@\relax\ifnum#2>\z@\relax\pslabelsep=.707\pslabelsep\fi\fi%
diff --git a/Master/texmf-dist/tex/latex/pstricks/pstricks.sty b/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
index 9f71b371508..0aa3884b5c7 100644
--- a/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
+++ b/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
@@ -16,7 +16,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pstricks}
- [2010/08/28 v0.46 LaTeX wrapper for `PSTricks' (RN,HV)]
+ [2010/09/18 v0.47 LaTeX wrapper for `PSTricks' (RN,HV)]
%
\def\documentclass{%
\edef\@tempa{\jobname.tex }%
@@ -80,21 +80,32 @@
\input{\pst@tempa}%
\ProvidesFile{\pst@tempa}
[\filedate\space v\fileversion\space `PSTricks' (tvz,hv)]
- \input{pst-fp.tex}
- \ProvidesFile{pst-fp.tex}
- [\filedate\space v\fileversion\space `PST-fp' (hv)]
- \IfFileExists{pstricks.pro}{%
- \ProvidesFile{pstricks.pro}
- [2010/04/24 v. 1.07, PostScript prologue file (hv)]
- \@addtofilelist{pstricks.pro}}{}%
- \IfFileExists{pst-dots.pro}{%
- \ProvidesFile{pst-dots.pro}
- [2006/12/19 v. 2.00, PostScript prologue file (hv)]
- \@addtofilelist{pst-dots.pro}}{}%
- \IfFileExists{pst-algparser.pro}{%
- \ProvidesFile{pst-algparser.pro}
- [2008/01/01 v. 0.01, PostScript prologue file (hv)]
- \@addtofilelist{pst-algparser.pro}}{}%
+ \ifpst@OldVersion
+ \IfFileExists{pstricks97.pro}{%
+ \ProvidesFile{pstricks97.pro}%
+ [1998/06/01 v. 97 patch 3, PostScript prologue file (hv)]
+ \@addtofilelist{pstricks97.pro}}{}%
+ \IfFileExists{pst-dots97.pro}{%
+ \ProvidesFile{pst-dots97.pro}
+ [1999/12/16 v. 97 patch 1, PostScript prologue file (hv)]
+ \@addtofilelist{pst-dots97.pro}}{}%
+ \else
+ \input{pst-fp.tex}
+ \ProvidesFile{pst-fp.tex}
+ [\filedate\space v\fileversion\space `PST-fp' (hv)]
+ \IfFileExists{pstricks.pro}{%
+ \ProvidesFile{pstricks.pro}
+ [2010/04/24 v. 1.07, PostScript prologue file (hv)]
+ \@addtofilelist{pstricks.pro}}{}%
+ \IfFileExists{pst-dots.pro}{%
+ \ProvidesFile{pst-dots.pro}
+ [2006/12/19 v. 2.00, PostScript prologue file (hv)]
+ \@addtofilelist{pst-dots.pro}}{}%
+ \IfFileExists{pst-algparser.pro}{%
+ \ProvidesFile{pst-algparser.pro}
+ [2008/01/01 v. 0.01, PostScript prologue file (hv)]
+ \@addtofilelist{pst-algparser.pro}}{}%
+ \fi
{%
\let\psscalebox\scalebox
\let\psscaleboxto\scaleboxto