summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-02-17 23:49:31 +0000
committerKarl Berry <karl@freefriends.org>2010-02-17 23:49:31 +0000
commit31fd85170acdf20d47dac76d8ddb30b5372028ff (patch)
treeb259c37af0318a7ae938420ffeb0bce210e4512d /Master/texmf-dist
parent5cadf8084791f36763cd2feaf2c6efdcc303c5bb (diff)
pstricks update (17feb10)
git-svn-id: svn://tug.org/texlive/trunk@17078 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/generic/pstricks/Changes.generic5
-rw-r--r--Master/texmf-dist/doc/generic/pstricks/pst-news10.pdfbin213908 -> 258906 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pstricks/pst-news10.tex171
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/pstricks.tex66
4 files changed, 209 insertions, 33 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks/Changes.generic b/Master/texmf-dist/doc/generic/pstricks/Changes.generic
index f81d8cb198d..ef320d8c846 100644
--- a/Master/texmf-dist/doc/generic/pstricks/Changes.generic
+++ b/Master/texmf-dist/doc/generic/pstricks/Changes.generic
@@ -1,4 +1,9 @@
pstricks.tex --------
+2.01 2010-02-15 - fix problem with nonlinear angles for
+ \psellipticarc
+ - fix problem with tex: pst-xkey must be loaded
+ after we are sure having all latex macros
+ defined
2.00 2010-02-11 - use pst-xkey to get rid of dependencies with
other packages
1.33 2009-12-22 - add linestyle symbol
diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news10.pdf b/Master/texmf-dist/doc/generic/pstricks/pst-news10.pdf
index c5cdb2dae9b..a98d282b185 100644
--- a/Master/texmf-dist/doc/generic/pstricks/pst-news10.pdf
+++ b/Master/texmf-dist/doc/generic/pstricks/pst-news10.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news10.tex b/Master/texmf-dist/doc/generic/pstricks/pst-news10.tex
index e2923970409..30d3493ce24 100644
--- a/Master/texmf-dist/doc/generic/pstricks/pst-news10.tex
+++ b/Master/texmf-dist/doc/generic/pstricks/pst-news10.tex
@@ -55,6 +55,49 @@ No changes
\section{\texttt{pstricks.tex} (\pstricksFV -- \pstricksFD)}
%--------------------------------------------------------------------------------------
+\subsection{Macro \nxLcs{psellipticarc}}
+In a circle the angle is proportional to the bow: $b=r\alpha$. In an
+elliptic arc this is no more the case, which is the reason why angles are
+internally corrected by PSTricks, to get the same arc lengthts for
+different radii:
+
+\xLcs{psellipticarc}
+\begin{LTXexample}[width=6cm]
+\psset{unit=0.5cm}
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)%
+\psset{linewidth=0.4pt,linejoin=1}
+\psline(5,0)(0,0)(5,-5)
+\psellipticarc(0,0)(3,3){0}{315}
+\end{pspicture}%
+\end{LTXexample}
+
+\begin{LTXexample}[width=6cm]
+\psset{unit=0.5cm}
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)%
+\psset{linewidth=0.4pt,linejoin=1}
+\psline(5,0)(0,0)(5,-5)
+\psellipticarc(0,0)(1,3){0}{315}%
+\psset{linecolor=red}
+\psellipticarc(0,0)(3,1){22}{222}%
+\psline(3;22)\psline(3;222)
+\end{pspicture}%
+\end{LTXexample}
+
+\begin{LTXexample}[width=6cm]
+\psset{unit=0.5cm}
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)%
+\psset{linewidth=0.4pt,linejoin=1}
+\psline(5,0)(0,0)(5,-5)
+\psellipticarc*(0,0)(1,3){0}{315}%
+\psset{linecolor=red}
+\psellipticarc*(0,0)(3,1){22}{222}%
+\psline(3;22)\psline(3;222)
+\end{pspicture}%
+\end{LTXexample}
+
+\psset{unit=1cm}
+
+
\subsection{Option \nxLkeyword{algebraic}}
The option \Lkeyword{algebraic} moved from the other packages into
the main package \LPack{pstricks} to get rid of the dependencies.
@@ -153,6 +196,123 @@ For the \Lcs{parametricplot} the two parts must be divided by the \Lnotation{|}
\endpsgraph
\end{lstlisting}
+\section{New linestyle \nxLkeyval{symbol}}
+
+Instead of drawing a continous line or curve for a series of coordinates, one
+can now out a symbol in a given size, direction, and step. This works only
+for the line style \Lkeyval{symbol}. It takes the symbol defined by the optional
+argument \Lkeyword{symbol}, which can have a single character or a octal number
+of three digits. The font is specified by the key \Lkeyword{symbolFont}, which can take
+as argument one of the valid \PS fonts or the internal \Lkeyval{PSTricksDotFont}.
+If the symbol is given by a single character then the equivilant character in
+the given font is used. The difference between two symbols is set by \Lkeyword{symbolStep}
+and the symbol rotation by \Lkeyword{rotateSymbol}. For the first symbol there
+is an additional keyword \Lkeyword{startAngle}.
+The default values for these new
+optional keywords are:
+
+\begin{Xverbatim}{}
+\psset[pstricks]{symbolStep=20pt}
+\psset[pstricks]{symbolWidth=10pt}
+\psset[pstricks]{symbolFont=Dingbats}
+\psset[pstricks]{rotateSymbol=false}
+\psset[pstricks]{startAngle=0}
+\end{Xverbatim}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\pspicture(-1,-1)(8,6)
+\psline[linestyle=symbol](0,0)(5,0)(8,4)
+\psline[linestyle=symbol,symbol=T](0,1)(5,1)(8,4)
+\psline[linestyle=symbol,symbol=u,symbolFont=PSTricksDotFont](0,2)(5,2)(8,4)
+\psline[linestyle=symbol,symbol=u,symbolStep=25pt,linecolor=red](0,3)(5,3)(8,2)
+\psline[linestyle=symbol,symbol=A,symbolStep=25pt,
+ symbolWidth=20pt,linecolor=blue](0,4)(5,4)(8,1)
+\psline[linestyle=symbol,symbol=342,rotateSymbol=true,symbolStep=12pt](0,5)(5,5)(8,0)
+\endpspicture
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\pspicture(-1,-1)(8,6)
+\pscurve[linestyle=symbol](0,0)(5,0)(8,4)
+\pscurve[linestyle=symbol](0,1)(5,1)(8,4)
+\pscurve[linestyle=symbol,symbol=u,symbolFont=PSTricksDotFont](0,2)(5,2)(8,4)
+\pscurve[linestyle=symbol,symbol=u,symbolStep=25pt,linecolor=red](0,3)(5,3)(8,2)
+\pscurve[linestyle=symbol,symbol=A,symbolStep=25pt,
+ symbolWidth=20pt,linecolor=blue](0,4)(5,4)(8,1)
+\pscurve[linestyle=symbol,symbol=342,rotateSymbol=true,
+ startAngle=190,symbolStep=12pt](0,5)(5,5)(8,0)
+\endpspicture
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\pspicture(-1,-1)(8,6)
+\psccurve[linestyle=symbol](0,0)(5,0)(8,4)
+\psccurve[linestyle=symbol](0,1)(5,1)(8,4)
+\psccurve[linestyle=symbol,symbol=u,symbolFont=PSTricksDotFont](0,2)(5,2)(8,4)
+\psccurve[linestyle=symbol,symbol=u,symbolStep=25pt,linecolor=red](0,3)(5,3)(8,2)
+\psccurve[linestyle=symbol,symbol=A,symbolStep=25pt,
+ symbolWidth=20pt,linecolor=blue](0,4)(5,4)(8,1)
+\psccurve[linestyle=symbol,symbol=342,rotateSymbol=true,
+ startAngle=190,symbolStep=12pt](0,5)(5,5)(8,0)
+\endpspicture
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\pspicture(-1,-1)(5,4)
+\pscurve[rotateSymbol=true,linestyle=symbol,
+ rot=180,startAngle=100,symbol=",
+ symbolWidth=20pt](0,0)(1,4)(3,0)(5,2)
+\endpspicture
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\pspicture(-1,-1)(6,4)
+\psbezier[rotateSymbol=true,linestyle=symbol,symbol=u,
+ symbolFont=PSTricksDotFont,rot=-90,startAngle=0](0,0)(0,4)(6,4)(6,0)
+\endpspicture
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\psset{unit=0.5cm}
+\pspicture(-1,-4)(6,4)
+\pscbezier[rotateSymbol=true,linestyle=symbol,symbol=u,
+ symbolFont=PSTricksDotFont](0,4)(4,4)(4,-4)(0,-4)
+\pscbezier[linestyle=dashed](0,4)(4,4)(4,-4)(0,-4)
+\endpspicture
+\end{LTXexample}
+
+\psset{unit=1cm}
+\begin{LTXexample}[pos=t,preset=\centering]
+\pspicture(-1,-1)(6,4)
+\psbezier[rotateSymbol=true,linestyle=symbol,symbol=u,
+ symbolFont=PSTricksDotFont](0,0)(0,4)(6,4)(6,0)
+\endpspicture
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\pspicture(-1,-1)(6,4)
+\pspolygon[rotateSymbol=true,linestyle=symbol,symbol=u,
+ symbolFont=PSTricksDotFont](0,0)(0,4)(6,4)(6,0)(1,3)
+\endpspicture
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\pspicture(-3,-1)(6,6)
+\psccurve[linestyle=symbol,symbol=u, rot=-90,rotateSymbol,
+ symbolFont=PSTricksDotFont, symbolWidth=5pt, symbolStep=10pt
+](-3,-1)(0,0)(0,4)(6,4)(6,0)(0,4)(-1,5)
+\endpspicture
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\pspicture(-1,-1)(6,6)
+\pscurve[linestyle=dashed,linecolor=black!30](0,0)(0,4)(6,4)(6,0)(0,4)
+\pscurve[rotateSymbol=true,linestyle=symbol,symbol=k,
+ symbolFont=PSTricksDotFont, symbolWidth=5pt, symbolStep=10pt,linecolor=blue
+](0,0)(0,4)(6,4)(6,0)(0,4)
+\endpspicture
+\end{LTXexample}
+
%--------------------------------------------------------------------------------------
\section{Numeric functions}
@@ -304,6 +464,7 @@ following examples. A classic example is a piece-wise linear
function.
\begin{center}
+\psset{unit=0.7cm}
\begin{pspicture}(-7.5,-2.5)(7.5,6)
\psaxes{->}(0,0)(-7,-2)(7.5,6)[x,-90][y,0]
\psset{algebraic=true, plotpoints=21,linewidth=2pt}
@@ -312,7 +473,7 @@ function.
IfTE(2*x<-2^2*sqrt(9),7+x,IfTE(x<0,x^2/18-1,IfTE(x<3,2*x^2/3-1,8-x)))}%
\end{pspicture}
\end{center}
-
+\psset{unit=1cm}
\begin{lstlisting}
\psset{unit=1.5, algebraic, ?\ON?VarStep?\OFF?, showpoints, ?\ON?VarStepEpsilon?\OFF?=.001}
@@ -447,7 +608,7 @@ With \Lcs{psforeach} the \Larg{action} is done inside a group and for \Lcs{psFor
This maybe useful when using the macro to create tabular cells, which are
alread grouped itself.
-\begin{LTXexample}
+\begin{LTXexample}[width=6cm]
\begin{pspicture}[showgrid=true](5,5)
\psforeach{\nA}{0, 1, 1.5, 3, 5}{%
\psdot[dotscale=3](\nA,\nA)}
@@ -484,15 +645,15 @@ The value List can also be given by the first two and the last value, e.\,g. \ve
then \PST calculates all values with the distance given by the first two values.
\begin{LTXexample}[pos=t]
-\psset{xunit=0.3cm,yunit=2cm}
-\begin{pspicture}[showgrid](0,-5mm)(40,1)
+\psset{xunit=0.55cm,yunit=2cm}
+\begin{pspicture}[showgrid](0,-5mm)(25,1)
\psforeach{\nA}{0, 3.14,..,25}{\psline(\nA,0)(\nA,1)}
\end{pspicture}
\end{LTXexample}
The internal counter for the steps is named \LCtr{psLoopIndex} and can be used for own purposes.
-\begin{LTXexample}[pos=l]
+\begin{LTXexample}[pos=l,width=6cm]
\begin{pspicture}[showgrid=true](5,5)
\psforeach{\nA}{0, 1, 1.5, 2.25, 5}{%
\psdot[dotscale=3](\the\psLoopIndex,\nA)}
diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
index 06f90a2553e..94ad473f5c7 100644
--- a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
+++ b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
@@ -15,25 +15,19 @@
%
% This Current Maintainer of this work is Herbert Voss
%
-% This work consists of the file pstricks.tex, PostScript macros
-% for Generic TeX.
-% See the PSTricks User's Guide for description.
-% This uses the header file `pstricks.pro'.
-%
-%
\csname PSTricksLoaded\endcsname
\let\PSTricksLoaded\endinput
-\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey.tex \fi
-\ifx\PSTFPloaded\endinput\else \input pst-fp.tex\fi
%
-\def\fileversion{2.0}
-\def\filedate{2010/02/11}
+%% !! loading additional TeX packages see line 70 !!
+%% !! loading config file pstricks.con line 380 !!
+%% !! loading pro files line 395 !!
+%
+\def\fileversion{2.01}
+\def\filedate{2010/02/16}
%
\edef\PstAtCode{\the\catcode`\@}
\catcode`\@=11\relax
%
-\pst@addfams{pstricks}
-%
\expandafter\ifx\csname @latexerr\endcsname\relax% do we have LaTeX?
\def\typeout#1{\immediate\write\@unused{#1}}
\alloc@7\write\chardef\sixt@@n\@unused
@@ -66,6 +60,12 @@
\def\:{\@xifnch} \expandafter\gdef\: {\futurelet\@tempc\@ifnch}
\endgroup
\fi
+%
+% now we have all commands defined, for TeX and LaTeX
+%
+\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey.tex \fi
+\pst@addfams{pstricks}
+\ifx\PSTFPloaded\endinput\else \input pst-fp.tex\fi
% stolen from latex.ltx to make it TeX compatible
\newcount\psLoopIndex
\def\@fornoop#1\@@#2#3{}
@@ -137,7 +137,6 @@
\psForeach@ii{#1}{\pst@tempa}{#5}}
%
%
-%
% hv 2007-10-16 to fix the bug in pst-node with \\[name=...]
% hv fix bug with empty fnodes in psmatrix
\def\ps@ifnextchar#1#2#3{%
@@ -550,7 +549,6 @@
\def\pst@tempA{#2}%
\ifx\pst@tempA\@empty\else\psset{#2}\fi}%
}
-%
\def\addto@psstyle#1#2{%
\pst@toks=\expandafter{#1#2}%
\edef#1{\the\pst@toks}}
@@ -3020,42 +3018,51 @@ pop
\let\if@psarcn\iffalse
\def\psellipticarc@ii{\pst@getarrows\psellipticarc@iii}
\def\psellipticarc@iii(#1){%
- \@ifnextchar({\psellipticarc@iv(#1)}{\psellipticarc@iv(0,0)(#1)}}
+ \@ifnextchar({\psellipticarc@iv(#1)}{\psellipticarc@iv(0,0)(#1)}}
\def\psellipticarc@iv(#1)(#2)#3#4{%
\begin@OpenObj
- \pst@getcoor{#1}\pst@tempa
- \pst@getcoor{#2}\pst@tempb
- \pst@getangle{#3}\pst@tempc
- \pst@getangle{#4}\pst@tempd
+ \pst@getcoor{#1}\pst@tempa% origin
+ \pst@getcoor{#2}\pst@tempb% a,b
+ \pst@getangle{#3}\pst@tempc% start angle
+ \pst@getangle{#4}\pst@tempd% end angle
\addto@pscode{\psellipticarc@definearg \psellipticarc@draw}%
\showpointsfalse
\end@OpenObj%
}
\def\psellipticarc@definearg{%
\pst@tempa /yOrig ED /xOrig ED % Origin
- \pst@tempb % radii. Now adjust:
+ \pst@tempb % radii. Now adjust:
\ifdim\psk@dimen\p@=\z@\else
\psk@dimen CLW mul dup 3 1 roll
sub 3 1 roll sub exch
\fi
- /ry ED /rx ED
+ /ry ED /rx ED % a b
/angleA
- /d { \if@psarcn sub \else add \fi } def
- \pst@tempc \psk@arcsepA 2 div
+ /d { \if@psarcn sub \else add \fi } def
+% \pst@tempc
+% the angle in the parameter equation is not proportional to the real angle!
+% phi=atan(b*tan(angle)/a)+floor(angle/180+0.5)*180
+ \pst@tempc cvi 90 mod 0 eq { \pst@tempc }
+ { rx ry \tx@UserCoor exch \pst@tempc tan mul exch atan
+ \pst@tempc 180 div .5 add floor 180 mul sub } ifelse
+ \psk@arcsepA 2 div
ArcAdjust
def
/angleB
/d { \if@psarcn add \else sub \fi } def
- \pst@tempd \psk@arcsepB 2 div ArcAdjust
- def
+% \pst@tempd
+ \pst@tempd cvi 90 mod 0 eq { \pst@tempd }
+ { rx ry \tx@UserCoor exch \pst@tempd tan mul exch atan
+ \pst@tempd 180 div .5 add floor 180 mul sub } ifelse
+ \psk@arcsepB 2 div ArcAdjust def
\ifshowpoints\psellipticarc@showpoints\fi
\ifx\psk@arrowA\@empty
\ifnum\psk@liftpen=2
angleA cos rx mul xOrig add
angleA sin ry mul yOrig add
moveto
- \fi
- \fi
+ \fi%
+ \fi%
}
\def\psellipticarc@draw{%
0 0 1
@@ -3074,7 +3081,9 @@ pop
/mtrx CM def
xOrig yOrig T
rx ry scale
+ \if@star 0 0 moveto \fi % for filling
\if@psarcn arcn \else arc \fi
+ \if@star 0 0 moveto \fi
mtrx setmatrix%
}
\def\psellipticarc@showpoints{%
@@ -3088,7 +3097,8 @@ pop
closepath
mtrx setmatrix
CLW 2 div SLW
- [ \psk@dash\space ] 0 setdash stroke
+ [ \psk@dash\space ] 0 setdash
+ stroke
grestore %
}
\def\pscircle{\def\pst@par{}\pst@object{pscircle}}