summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/generic/pstricks/pst-news2008.pdfbin0 -> 173945 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pstricks/pst-news2008.tex721
-rw-r--r--Master/texmf-dist/dvips/pstricks/Changes29
-rw-r--r--Master/texmf-dist/dvips/pstricks/pst-algparser.pro739
-rw-r--r--Master/texmf-dist/dvips/pstricks/pst-dots.pro5
-rw-r--r--Master/texmf-dist/dvips/pstricks/pst-node.pro92
-rw-r--r--Master/texmf-dist/dvips/pstricks/pstricks.pro260
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/Changes37
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/pst-plot.tex60
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/pst-tree.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/pstricks.tex880
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/vtex.con40
-rw-r--r--Master/texmf-dist/tex/latex/pstricks/Changes10
-rw-r--r--Master/texmf-dist/tex/latex/pstricks/pst-all.sty13
-rw-r--r--Master/texmf-dist/tex/latex/pstricks/pst-node.sty5
-rw-r--r--Master/texmf-dist/tex/latex/pstricks/pstricks.sty36
16 files changed, 2448 insertions, 485 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news2008.pdf b/Master/texmf-dist/doc/generic/pstricks/pst-news2008.pdf
new file mode 100644
index 00000000000..95e6c5c677b
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pstricks/pst-news2008.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news2008.tex b/Master/texmf-dist/doc/generic/pstricks/pst-news2008.tex
new file mode 100644
index 00000000000..745ac79b7ee
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pstricks/pst-news2008.tex
@@ -0,0 +1,721 @@
+\documentclass[11pt]{article}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+%\usepackage{geometry}
+%
+\usepackage{pstricks}
+\let\PSTfiledate\filedate
+\let\PSTfileversion\fileversion
+\usepackage{pst-node}
+\let\NODEfiledate\filedate
+\let\NODEfileversion\fileversion
+\usepackage{pst-plot}
+\let\PLOTfiledate\filedate
+\let\PLOTfileversion\fileversion
+\usepackage{pst-tree}
+\let\TREEfiledate\filedate
+\let\TREEfileversion\fileversion
+%
+\usepackage{showexpl}
+\usepackage{tabularx,array,longtable}
+\SpecialCoor
+\usepackage[colorlinks,linktocpage]{hyperref}
+\def\UrlFont{\small\ttfamily}
+\makeatletter
+\def\verbatim@font{\small\normalfont\ttfamily}
+\let\Oldpart\part
+\renewcommand\part[1]{\clearpage\Oldpart{#1}}
+\makeatother
+%\usepackage{color}
+\definecolor{hellgelb}{rgb}{1,1,0.8}
+\definecolor{colKeys}{rgb}{0,0,1}
+\definecolor{colIdentifier}{rgb}{0,0,0}
+\definecolor{colComments}{rgb}{1,0,0}
+\definecolor{colString}{rgb}{0,0.5,0}
+%
+\usepackage{listings}
+\lstset{%
+ language=PSTricks,%
+ float=hbp,%
+ basicstyle=\ttfamily\small, %
+ identifierstyle=\color{colIdentifier}, %
+ keywordstyle=\color{colKeys}, %
+ stringstyle=\color{colString}, %
+ commentstyle=\color{colComments}, %
+ columns=flexible, %
+ tabsize=4, %
+ frame=single, %
+ extendedchars=true, %
+ showspaces=false, %
+ showstringspaces=false, %
+ numbers=left, %
+ numberstyle=\tiny, %
+ breaklines=true, %
+% backgroundcolor=\color{hellgelb}, %
+ breakautoindent=true, %
+ captionpos=b,%
+ xleftmargin=0pt%
+}
+
+%\parindent=0pt
+\newcommand\verbI[1]{{\small\texttt{#1}}}
+\newcommand\CMD[1]{{\texttt{\textbackslash#1}}}
+\let\Lcs\CMD
+%
+%\psset{subgriddiv=0,griddots=5,gridlabels=7pt}
+%
+\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
+\def\PS{PostScript}
+%
+\begin{document}
+\title{\texttt{PSTricks -- 2008}\\ new macros and bugfixes for the
+basic packages \Lcs{pstricks}, \Lcs{pst-plot}, \Lcs{pst-tree},\\ and \Lcs{pst-node}}
+\author{Herbert Voß\thanks{%
+\url{Herbert.Voss@pstricks.de}}}
+\date{\today}
+
+\maketitle
+
+\clearpage
+\tableofcontents
+
+\clearpage
+\part{\texttt{pstricks} -- package}
+
+%--------------------------------------------------------------------------------------
+\section{\texttt{pstricks.sty}}
+%--------------------------------------------------------------------------------------
+
+\begin{itemize}
+\item Loading the package \texttt{pstricks} by \LaTeX\ will now write a message
+into the file list of file version and date for the file \texttt{pstricks.pro}.
+\item A frequently done error is choosing a file name for the document, which is
+already a name of one PSTricks package, e.\,g. \verb=pstricks.tex=. The error
+message in the log file was not really helpful. There is now an extended message:
+{\small\begin{verbatim}
+! LaTeX Error: Two \documentclass or \documentstyle commands
+ or `pstricks.tex' is a forbidden name for your document,
+ it is already a name of a PSTricks package!
+ Choose another name for your document!
+\end{verbatim}
+}
+\end{itemize}
+
+%--------------------------------------------------------------------------------------
+\section{\texttt{pstricks.tex} (\PSTfileversion -- \PSTfiledate)}
+%--------------------------------------------------------------------------------------
+
+
+\subsection{Option \texttt{gridfont}}
+By default the grid labels were printed always in Helvetica. With the new option \verb+gridfont+
+one can define another PostScript Font. Available are
+
+\medskip
+{\ttfamily\noindent
+Helvetica (default) -- Helvetica-Narrow -- Times-Roman -- Courier -- AvantGard --NewCenturySchlbk --
+Palatino-Roman -- Bookman-Demi -- \linebreak Zapf-Dingbats -- Symbol}
+
+\begin{LTXexample}[width=4cm]
+\usepackage{pstricks}
+\begin{pspicture}[showgrid=true](3,2)
+\end{pspicture}\\[20pt]
+\begin{pspicture}(3,2)
+ \psgrid[style=gridstyle,gridfont=AvantGard-Demi]
+\end{pspicture}
+\end{LTXexample}
+
+
+\clearpage
+\subsection{\texttt{linejoin}}
+Connecting lines can be done in several ways and is controlled on PS level
+by the \verb+setlinejoin+ command. With this version of PSTricks it is
+possible to controll this by an optional argument, called \verb+linejoin+.
+It is preset by 0 and can take values of 0,1,2. Other values jave
+no effect.
+
+\begin{LTXexample}[width=4cm]
+\psset{linewidth=3mm,unit=0.8}
+\begin{pspicture}[showgrid=true](3,2)
+ \psline(0,0)(1,2)(2,0)(3,2)
+\end{pspicture}\\[10pt]
+\begin{pspicture}[showgrid=true](4,2)
+ \psline[linejoin=1](0,0)(1,2)(2,0)(3,2)(4,0)%
+\end{pspicture}\\[10pt]
+\begin{pspicture}[showgrid=true](3,2)
+ \psline[linejoin=2](0,0)(1,2)(2,0)(3,2)%
+\end{pspicture}
+\end{LTXexample}
+
+\clearpage
+\subsection{\texttt{setlinecap}}
+The value of \texttt{linecap} determines how the line ends are drawn:
+
+\begin{description}
+\item[0] lines are cut (default)
+\item[1] lines are ended by a filled semicircle of radius 0.5$\cdot$\verb+\pslinewidth+
+\item[2] lines are ended by a filled half square of radius 0.5$\cdot$\verb+\pslinewidth+
+\end{description}
+
+The following example shows that using \texttt{linecap} for lines is the same
+than using the arrow option.
+
+\begin{LTXexample}[width=4cm]
+\begin{pspicture}[showgrid=true](4,4)%
+ \psset{linewidth=5mm}
+ \psline[arrows=C-C](0,3.75)(4,3.75)
+ \psline[linecap=2](0,3)(4,3)
+ \psline[arrows=c-c](0,2.25)(4,2.25)
+ \psline[linecap=1](0,1.5)(4,1.5)
+ \psline[arrows=-](0,0.75)(4,0.75)
+ \psline(4,0)
+\end{pspicture}
+\end{LTXexample}
+
+Using this optional argument makes only sense in some special cases, because
+it is the same as the arrow type \verb+c-c+. But the arrows are not part
+of the current path and filling an open curve with the \texttt{linecap} option
+is different to a curve using the \verb+c-c+ arrow.
+
+\begin{LTXexample}[width=3cm,wide]
+\psset{unit=5cm,linewidth=5mm}
+\begin{pspicture}(-0.2,-0.6)(0.2,0.5)%
+\def\curve{\pscurve(-.1,.1)(-.15,.15)(0,.2)(.15,.15)(.1,.1)}
+\rput(0,.2){\psset{arrows=c-c}\curve}
+\rput(0,-.2){%
+ \psset{fillstyle=solid,fillcolor=red,arrows=c-c}
+ \curve}
+\rput(0,-.6){%
+ \psset{fillstyle=solid,fillcolor=red,linecap=1}
+ \curve}
+\end{pspicture}
+\end{LTXexample}
+
+
+\clearpage
+\subsection{New arrowtype \texttt{D>} and \texttt{D>D>}}
+All arrows are drawn as polygons. The new arrow type \verb+D>+ or \verb+<D+ for the other way round,
+draws it lines as bezier curves, which looks nicer for big arrows.
+
+\begin{LTXexample}[width=4cm,wide]
+\psset{arrowscale=5}
+\begin{pspicture}(4,2)
+\psline{<D<D-D>D>}(0,2)(4,2)
+\psline[arrows=<-D>,arrowlength=2](0,1)(4,1)
+\psline[arrowinset=0]{<D-D>}(0,0.25)(4,0.25)
+\end{pspicture}
+\end{LTXexample}
+
+
+
+\clearpage
+\subsection{Transparent colors}
+The package \texttt{pstricks-add} already defined a fillstyle for
+transparency colors by using the GhostScripts blendmode.
+It now moves into the main \texttt{PSTricks} package, together with
+another possibility for creating transparent colors.
+Transparency is only seen with the PDF output (version 1.4 or greater),
+nearly all PostScript viewer cannot show transparencies.
+
+Loading the \verb+pstricks+ package with the option \verb=vtex=, disables
+the transparency effekts and everything works as before.
+
+\subsubsection{Options \texttt{strokeopacity} and \texttt{opacity}}
+For the existing fill style \verb+solid+ the new option \verb+opacity+
+can be used to get also transparent colors. It is predefined by 1 ($0\ldots1$), which
+is the old behaviour, no transpareny. The option is valid only for PostScripts
+fill commands. Lines and curves can be trabsparent with setting the option
+\verb+strokeopacity+, which can have a different value as for the \verb+opacity+ option.
+
+\begin{LTXexample}[width=4cm,wide]
+\begin{pspicture}[linewidth=1cm](4,4)
+ \psline[linecolor=red](0,0)(4,4)
+ \psline[linecolor=blue,strokeopacity=0.5](0,4)(4,0)
+ \psline[linecolor=green,strokeopacity=0.5](0,3.5)(4,3.5)
+ \psline[linecolor=yellow,strokeopacity=0.5](0,0.5)(4,0.5)
+\end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[width=4cm,wide]
+\begin{pspicture}[linewidth=1cm](4,4)
+\psline[linecolor=red](0,0)(4,4)
+\pscircle*[opacity=0.5](2,2){2}
+\psline[linecolor=blue,strokeopacity=0.6](0,4)(4,0)
+\end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[width=4cm,wide]
+\begin{pspicture}[linewidth=3mm](4,5.5)
+ \multido{\rA=0.0+0.5}{9}{%
+ \psline[linecolor=red!40](\rA,0)(\rA,5)}
+ \multido{\rA=0.0+0.5,\rB=0.0+0.1}{11}{%
+ \psline[arrows=<D-D>,linecolor=blue,
+ linewidth=5pt,arrowscale=1.5,
+ strokeopacity=\rB](0,\rA)(4,\rA)}
+\end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[width=5cm,wide]
+\begin{pspicture}(5,5)
+ \psset{fillstyle=solid}
+ \psframe[fillcolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,opacity=0.7](2,2)(5,5)
+ \psframe[fillcolor=green,opacity=0.7](1,0)(4,3)
+ \pscircle[fillcolor=cyan,
+ opacity=0.5](1.5,3.5){1.25}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=5cm,wide]
+\begin{pspicture}(5,5)
+ \psset{fillstyle=solid}
+ \psframe[fillcolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,opacity=0.3](2,2)(5,5)
+ \psframe[fillcolor=green,opacity=0.3](1,0)(4,3)
+ \pscircle[fillcolor=cyan,
+ opacity=0.5](1.5,3.5){1.25}
+\end{pspicture}
+\end{LTXexample}
+
+
+\clearpage
+\subsubsection{Fill style \texttt{shape}}
+There is now one more fill style for transparent colors: \verb+shape+
+with using the \verb+shapealpha+ value and one of the possible blendmodes:
+\begin{verbatim}
+ /Normal ->0
+ /Compatible ->1
+ /Screen ->2
+ /Multiply ->3
+\end{verbatim}
+
+
+The fill style \verb+solid+ uses
+GhostScripts \verb+.setopacityalpha+ function
+and the new style \verb+shape+ the \verb+blendmode+ together with \verb+.setshapealpha+.
+\verb+shapealpha+ is predefined
+with 0.6 and both alpha values can be chosen from the range $0\le\alpha\le1$.
+
+\begin{pspicture}(5,5)% default blendmode
+ \psframe*[linecolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,fillstyle=shape](2,2)(5,5)
+ \psframe[fillcolor=green,fillstyle=shape](1,0)(4,3)
+ \pscircle[fillcolor=cyan,fillstyle=shape,
+ shapealpha=0.3](1.5,3.5){1.25}
+ \rput(1.5,3.5){\huge\textbf{0}}
+\end{pspicture}
+\hfill
+\begin{pspicture}(5,5)
+ \psset{blendmode=1}% type /Compatible
+ \psframe*[linecolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,fillstyle=shape](2,2)(5,5)
+ \psframe[fillcolor=green,fillstyle=shape](1,0)(4,3)
+ \pscircle[fillcolor=cyan,fillstyle=shape,
+ shapealpha=0.3](1.5,3.5){1.25}
+ \rput(1.5,3.5){\huge\textbf{1}}
+\end{pspicture}
+
+\begin{pspicture}(5,5)
+ \psset{blendmode=2}% type /Screen
+ \psframe*[linecolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,fillstyle=shape](2,2)(5,5)
+ \psframe[fillcolor=green,fillstyle=shape](1,0)(4,3)
+ \pscircle[fillcolor=cyan,fillstyle=shape,
+ shapealpha=0.3](1.5,3.5){1.25}
+ \rput(1.5,3.5){\huge\textbf{2}}
+\end{pspicture}
+\hfill
+\begin{pspicture}(5,5)
+ \psset{blendmode=3}% type /Multiply
+ \psframe*[linecolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,fillstyle=shape](2,2)(5,5)
+ \psframe[fillcolor=green,fillstyle=shape](1,0)(4,3)
+ \pscircle[fillcolor=cyan,fillstyle=shape,
+ shapealpha=0.3](1.5,3.5){1.25}
+ \rput(1.5,3.5){\huge\textbf{3}}
+\end{pspicture}
+
+\begin{lstlisting}
+\begin{pspicture}(5,5)% default blendmode
+ \psframe*[linecolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,fillstyle=shape](2,2)(5,5)
+ \psframe[fillcolor=green,fillstyle=shape](1,0)(4,3)
+ \pscircle[fillcolor=cyan,fillstyle=shape,
+ shapealpha=0.3](1.5,3.5){1.25}
+ \rput(1.5,3.5){\huge\textbf{0}}
+\end{pspicture}
+\hfill
+\begin{pspicture}(5,5)
+ \psset{blendmode=1}% type /Compatible
+ \psframe*[linecolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,fillstyle=shape](2,2)(5,5)
+ \psframe[fillcolor=green,fillstyle=shape](1,0)(4,3)
+ \pscircle[fillcolor=cyan,fillstyle=shape,
+ shapealpha=0.3](1.5,3.5){1.25}
+ \rput(1.5,3.5){\huge\textbf{1}}
+\end{pspicture}
+
+\begin{pspicture}(5,5)
+ \psset{blendmode=2}% type /Screen
+ \psframe*[linecolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,fillstyle=shape](2,2)(5,5)
+ \psframe[fillcolor=green,fillstyle=shape](1,0)(4,3)
+ \pscircle[fillcolor=cyan,fillstyle=shape,
+ shapealpha=0.3](1.5,3.5){1.25}
+ \rput(1.5,3.5){\huge\textbf{2}}
+\end{pspicture}
+\hfill
+\begin{pspicture}(5,5)
+ \psset{blendmode=3}% type /Multiply
+ \psframe*[linecolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,fillstyle=shape](2,2)(5,5)
+ \psframe[fillcolor=green,fillstyle=shape](1,0)(4,3)
+ \pscircle[fillcolor=cyan,fillstyle=shape,
+ shapealpha=0.3](1.5,3.5){1.25}
+ \rput(1.5,3.5){\huge\textbf{3}}
+\end{pspicture}
+\end{lstlisting}
+
+
+\iffalse
+\begin{LTXexample}[width=5cm,wide]
+\begin{pspicture}(5,5)
+ \psset{blendmode=4}% type /Hardlight
+ \psframe*[linecolor=red](0,1)(3,4)
+ \psframe[fillcolor=blue,fillstyle=shape](2,2)(5,5)
+ \psframe[fillcolor=green,fillstyle=shape](1,0)(4,3)
+ \pscircle[fillcolor=cyan,fillstyle=shape,
+ shapealpha=0.3](1.5,3.5){1.25}
+\end{pspicture}
+\end{LTXexample}
+
+\fi
+
+\clearpage
+
+\subsection{\CMD{addtopsstyle}}
+\begin{verbatim}
+\addtopsstyle{style-name}{settings}
+\end{verbatim}
+
+This macro allows to add some more settings to an existing style.
+If the style is not defined, then \verb+\addtopsstyle+ behaves like the
+already defined \verb+\newpsstyle+ macro.
+
+\begin{LTXexample}[width=5cm,wide]
+\newpsstyle{Fiber}{linewidth=2pt}
+\begin{pspicture}(5,5)
+ \psline[style=Fiber](0,0)(5,1)
+ \addtopsstyle{Fiber}{linecolor=green}
+ \psline[style=Fiber](0,1)(5,2)
+ \addtopsstyle{Fiber}{linestyle=dotted}
+ \psline[style=Fiber](0,2)(5,3)
+ \addtopsstyle{Fiber}{}
+ \psline[style=Fiber](0,3)(5,4)
+ \addtopsstyle{Fibber}{linecolor=red}
+ \psline[style=Fibber](0,4)(5,5)
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsection{\CMD{psTextFrame}}
+\begin{verbatim}
+\psTextFrame[settings](x1,y1)(x2,y2){Text}
+\end{verbatim}
+
+The \emph{Text} cannot have a linebreak. In case it is needed, put the \emph{Text}
+into a \verb+minipage+ or \CMD{parbox}, as seen in the following example. The
+\verb+ref+-option allows different placing and the \verb+rot+-option allows
+the rotating of the \emph{Text}. The macro itself first uses the
+\CMD{psframe} and then \CMD{rput} with calculated coordinates.
+
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}[showgrid=true](0,-0.5)(10,10)
+ \psTextFrame[linecolor=lightgray,ref=l](0,0.5)(4,1.5){Hallo}
+ \psTextFrame[linecolor=blue](2,4)(4,7){\color{blue}Hallo}
+ \psTextFrame[linestyle=dashed](9,9)(10,10){\huge H}
+ \psTextFrame*[linecolor=red,linestyle=dashed](7,7)(9,9){\Huge H}
+ \psTextFrame*[linecolor=red!40,ref=lB](7,4)(9,6){\Huge H}
+ \psTextFrame*[linecolor=blue!40,ref=rt](7,1)(9,3){\Huge H}
+ \psTextFrame[linestyle=dashed](4.5,0)(6.5,10){%
+ \parbox{2cm}{\centering Here comes some more text over several
+ lines, which is also horizontally and vertically centered and
+ written in a parbox.}}
+ \psTextFrame*[linecolor=cyan!20,rot=90](.5,2)(1.5,10){%
+ \parbox{8cm}{\centering Here comes some more text over several
+ lines and rotated by 90 degrees.}}
+\end{pspicture}
+\end{LTXexample}
+
+\subsection{Special coordinates}
+
+Additionally to the existing !-operator for PostScript coordinates,
+there is new a *-operator, which invokes the algebraic parser before
+the coordinates are passed to the default !-operator. The syntax
+is pretty easy: \verb=(<value> {f(x)})=. In the following example the
+predefined value of Pi from pstricks.pro is used. The function must be enclosed
+in braces when itself contains round braces.
+
+\begin{LTXexample}[width=5cm,wide]
+\SpecialCoor
+\begin{pspicture}(0,-1)(5,1)
+ \psaxes{->}(0,0)(0,-1)(5,1)
+ \psline(0,0)(*Pi {sqrt(abs(cos(x)))})
+ \psline{<->}(*Pi {cos(x)})(*5 {sin(x)*cos(x)})
+\end{pspicture}
+\end{LTXexample}
+
+
+
+
+\subsection{Code changes}
+
+\begin{verbatim}
+% hv 2007-10-16 to fix the bug in pst-node with \\[name=...]
+\def\ps@ifnextchar#1#2#3{%
+ \let\reserved@d= #1%
+ \def\reserved@a{#2}\def\reserved@b{#3}%
+ \futurelet\@let@token\ps@ifnch}
+\def\ps@ifnch{%
+ \ifx\@let@token\reserved@d \let\reserved@b\reserved@a \fi
+ \reserved@b
+}
+\end{verbatim}
+
+
+
+
+%--------------------------------------------------------------------------------------
+\section{\texttt{pstricks.pro}}
+%--------------------------------------------------------------------------------------
+
+\begin{verbatim}
+/Pyth2 { % Pythagoras, xA yA xB yB
+ 3 -1 roll % xA xB yB yA
+ sub % xA xB yB-yA
+ 3 1 roll % yB-yA xA xB
+ sub % yB-yA xA-xB
+ Pyth } def
+\end{verbatim}
+
+This new PostScript function allows to calculate the distance
+between two points, given by their coordinates whereas the
+existing /Pyth does ist for two values.
+
+
+\part{\texttt{pst-node} -- package}
+
+\section{\texttt{pst-node.tex} (\NODEfileversion -- \NODEfiledate)}
+
+\subsection{Bugfix for \texttt{psmatrix}}
+A long standing bug with psmatrix and using the \texttt{name} option is now fixed.
+The following now works as expected:
+
+\begin{LTXexample}[width=2cm]
+\begin{psmatrix}[rowsep=5mm]
+[name=a]a\\
+[name=b]b\\[1cm]
+[name=c]c\\
+\end{psmatrix}
+\ncline{a}{b}
+\ncarc{a}{c}
+\end{LTXexample}
+
+An optional argument after \verb+\\+ is now scanned in the correct way.
+
+
+\subsection{New option \texttt{pcRef}}
+There is a new option \texttt{pcRef} for the \Lcs{ncangles} connection. By default,
+the reference point for the \texttt{armA} option is the border of the node. This makes
+it difficult, to get horizontically aligned lines for different node images.
+With \texttt{pcRef=true} the node center is the reference point and the connection is
+still drawn from the border of the node.
+
+The first three images show the default behaviour:
+
+\makebox[\linewidth]{%
+\begin{pspicture}(5,4)
+ \cnode(2.5,3.5){0.2}{A}
+ \cnode(0.5,1){0.2}{B1}
+ \cnode(1.5,1){0.4}{B2}
+ \cnode(2.6,1){0.6}{B3}
+ \cnode(4,1){0.8}{B4}
+ \psset{angleB=90,angleA=-90,armA=0.5cm}
+ \ncangles{A}{B1}
+ \ncangles{A}{B2}
+ \ncangles{A}{B3}
+ \ncangles{A}{B4}
+\end{pspicture}
+%
+\begin{pspicture}(5,4)
+ \cnode(2.5,3.5){0.4}{A}
+ \cnode(0.5,1){0.2}{B1}
+ \cnode(1.5,1){0.4}{B2}
+ \cnode(2.6,1){0.6}{B3}
+ \cnode(4,1){0.8}{B4}
+ \psset{angleB=90,angleA=-90,armA=0.5cm}
+ \ncangles{A}{B1}
+ \ncangles{A}{B2}
+ \ncangles{A}{B3}
+ \ncangles{A}{B4}
+\end{pspicture}
+%
+\begin{pspicture}(5,4)
+ \cnode(2.5,3.5){0.8}{A}
+ \cnode(0.5,1){0.2}{B1}
+ \cnode(1.5,1){0.4}{B2}
+ \cnode(2.6,1){0.6}{B3}
+ \cnode(4,1){0.8}{B4}
+ \psset{angleB=90,angleA=-90,armA=0.5cm}
+ \ncangles{A}{B1}
+ \ncangles{A}{B2}
+ \ncangles{A}{B3}
+ \ncangles{A}{B4}
+\end{pspicture}
+}
+
+The next three one the influence of \texttt{pcRef=true}; the horizontal line
+for the three examples is on the same height:
+
+\makebox[\linewidth]{%
+\begin{pspicture}(5,4)
+ \cnode(2.5,3.5){0.2}{A}
+ \cnode(0.5,1){0.2}{B1}
+ \cnode(1.5,1){0.4}{B2}
+ \cnode(2.6,1){0.6}{B3}
+ \cnode(4,1){0.8}{B4}
+ \psset{angleB=90,angleA=-90,armA=1cm}
+ \ncangles[pcRef=true]{A}{B1}
+ \ncangles[pcRef=true]{A}{B2}
+ \ncangles[pcRef=true]{A}{B3}
+ \ncangles[pcRef=true]{A}{B4}
+\end{pspicture}
+%
+\begin{pspicture}(5,4)
+ \cnode(2.5,3.5){0.4}{A}
+ \cnode(0.5,1){0.2}{B1}
+ \cnode(1.5,1){0.4}{B2}
+ \cnode(2.6,1){0.6}{B3}
+ \cnode(4,1){0.8}{B4}
+ \psset{angleB=90,angleA=-90,armA=1cm}
+ \ncangles[pcRef=true]{A}{B1}
+ \ncangles[pcRef=true]{A}{B2}
+ \ncangles[pcRef=true]{A}{B3}
+ \ncangles[pcRef=true]{A}{B4}
+\end{pspicture}
+%
+\begin{pspicture}(5,4)
+ \cnode(2.5,3.5){0.8}{A}
+ \cnode(0.5,1){0.2}{B1}
+ \cnode(1.5,1){0.4}{B2}
+ \cnode(2.6,1){0.6}{B3}
+ \cnode(4,1){0.8}{B4}
+ \psset{angleB=90,angleA=-90,armA=1cm}
+ \ncangles[pcRef=true]{A}{B1}
+ \ncangles[pcRef=true]{A}{B2}
+ \ncangles[pcRef=true]{A}{B3}
+ \ncangles[pcRef=true]{A}{B4}
+\end{pspicture}
+}
+
+\begin{lstlisting}
+\begin{pspicture}(5,4)
+ \cnode(2.5,3.5){0.2}{A}
+ \cnode(0.5,1){0.2}{B1}
+ \cnode(1.5,1){0.4}{B2}
+ \cnode(2.6,1){0.6}{B3}
+ \cnode(4,1){0.8}{B4}
+ \psset{angleB=90,angleA=-90,armA=1cm}
+ \ncangles[pcRef=true]{A}{B1}
+ \ncangles[pcRef=true]{A}{B2}
+ \ncangles[pcRef=true]{A}{B3}
+ \ncangles[pcRef=true]{A}{B4}
+\end{pspicture}
+%
+\begin{pspicture}(5,4)
+ \cnode(2.5,3.5){0.4}{A}
+ \cnode(0.5,1){0.2}{B1}
+ \cnode(1.5,1){0.4}{B2}
+ \cnode(2.6,1){0.6}{B3}
+ \cnode(4,1){0.8}{B4}
+ \psset{angleB=90,angleA=-90,armA=1cm}
+ \ncangles[pcRef=true]{A}{B1}
+ \ncangles[pcRef=true]{A}{B2}
+ \ncangles[pcRef=true]{A}{B3}
+ \ncangles[pcRef=true]{A}{B4}
+\end{pspicture}
+%
+\begin{pspicture}(5,4)
+ \cnode(2.5,3.5){0.8}{A}
+ \cnode(0.5,1){0.2}{B1}
+ \cnode(1.5,1){0.4}{B2}
+ \cnode(2.6,1){0.6}{B3}
+ \cnode(4,1){0.8}{B4}
+ \psset{angleB=90,angleA=-90,armA=1cm}
+ \ncangles[pcRef=true]{A}{B1}
+ \ncangles[pcRef=true]{A}{B2}
+ \ncangles[pcRef=true]{A}{B3}
+ \ncangles[pcRef=true]{A}{B4}
+\end{pspicture}
+\end{lstlisting}
+
+\part{\texttt{pst-plot} -- package}
+
+\section{\texttt{pst-plot.tex} (\PLOTfileversion -- \PLOTfiledate)}
+\subsection{New options \texttt{LineToXAxis} and \texttt{LineToYAxis}}
+
+
+\psset{xunit=0.0333cm,yunit=2.5cm}
+\begin{pspicture}(0,-1)(400,1)
+ \psline{->}(0,0)(400,0)
+ \psline{->}(0,-1)(0,1)
+ \psplot[plotstyle=LineToXAxis,linestyle=dashed,plotpoints=50,
+ linecolor=red!40,
+ showpoints=true,dotstyle=o,dotsize=0.2]{0}{360}{x sin}
+\end{pspicture}
+
+\begin{lstlisting}
+\psset{xunit=0.0333cm,yunit=2.5cm}
+\begin{pspicture}(0,-1)(400,1)
+ \psline{->}(0,0)(400,0)
+ \psline{->}(0,-1)(0,1)
+ \psplot[plotstyle=LineToXAxis,linestyle=dashed,plotpoints=50,
+ linecolor=red!40,
+ showpoints=true,dotstyle=o,dotsize=0.2]{0}{360}{x sin}
+\end{pspicture}
+\end{lstlisting}
+
+
+
+\psset{xunit=0.0333cm,yunit=2.5cm}
+\begin{pspicture}(0,-1.2)(400,1.4)
+ \psline{->}(0,0)(390,0)
+ \psline{->}(0,-1.1)(0,1.2)
+ \psplot[plotstyle=LineToYAxis,linestyle=dashed,plotpoints=50,
+ linecolor=blue!40,
+ showpoints=true]{0}{360}{x cos}
+\end{pspicture}
+
+\begin{lstlisting}
+\psset{xunit=0.0333cm,yunit=2.5cm}
+\begin{pspicture}(0,-1.2)(400,1.4)
+ \psline{->}(0,0)(390,0)
+ \psline{->}(0,-1.1)(0,1.2)
+ \psplot[plotstyle=LineToYAxis,linestyle=dashed,plotpoints=50,
+ linecolor=blue!40,
+ showpoints=true]{0}{360}{x cos}
+\end{pspicture}
+\end{lstlisting}
+
+
+\part{\texttt{pst-tree} -- package}
+\section{\texttt{pst-tree.tex} (\TREEfileversion -- \TREEfiledate)}
+
+There was a bug with \texttt{style=...} in fact of a missing \Lcs{use@par} in
+\Lcs{pstree@ii}.
+
+
+\end{document}
diff --git a/Master/texmf-dist/dvips/pstricks/Changes b/Master/texmf-dist/dvips/pstricks/Changes
index 2974ffd99ce..d57551e998c 100644
--- a/Master/texmf-dist/dvips/pstricks/Changes
+++ b/Master/texmf-dist/dvips/pstricks/Changes
@@ -1,16 +1,29 @@
---- pstricks.pro
+1.02 2008-01-01 - added the arrowtype D>, sides as curves (ArrowD)
+ - added the whole algebraic parser stuff
+ - added function tan := sin cos div
+ - added function Tan := sin cos Div
+ - added Pyth2 for 2 points given by xA yA xB yB
+ - change variable names from x,y to xOrig, yOrig for
+ EllipticArcArrow
+ - move font setting for \psgrid into pstricks.tex
1.01 2006-01-11 (vg) fix a bug with ArcAdjust when both angles ares negative
- (hv) add Sqrt sunction
-1.00 2005-09-19 (hv) move the code for arcs of an ellipse from
+ add Sqrt sunction
+1.00 2005-09-19 move the code for arcs of an ellipse from
the main pstricks.tex into this pro
-97, patch 7 2005-09-11 (hv) added new fillstyles
-97, patch 6 2005-05-17 (hv) added some helper stuff
- RadtoDeg, DegtoRad, Pi, TwoPi, ATAN
-97, patch 5 2005-03-08 (hv) bugfix for DashLine
+97, patch 7 2005-09-11 added new fillstyles
+97, patch 6 2005-05-17 added some helper stuff
+ RadtoDeg, DegtoRad, Pi, TwoPi, ATAN
+97, patch 5 2005-03-08 bugfix for DashLine
----- pst-text.pro
-1.00 2005-11-29 (hv) add a patch for japanese text
+---- pst-node.pro
+1.00 2008-01-01 code formatting (hv)
+
---- pst-dots.pro
2.00 2006-12-19 add more dot symbols from Etienne Riga (hv)
+
+
+---- pst-alpparser.pro
+0.01 2008-01-01 initial version (hv)
diff --git a/Master/texmf-dist/dvips/pstricks/pst-algparser.pro b/Master/texmf-dist/dvips/pstricks/pst-algparser.pro
new file mode 100644
index 00000000000..398a0ecedd7
--- /dev/null
+++ b/Master/texmf-dist/dvips/pstricks/pst-algparser.pro
@@ -0,0 +1,739 @@
+% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $
+%
+% PostScript prologue for PSTricks algorithm parser
+% Version 0.01, 2008/01/01
+% For distribution and copyright, see pstricks.tex. hv@pstricks.de
+%
+%-----------------------------------------------------------------------------%
+/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez
+%
+/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin
+%
+% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12
+% E->T|E+T
+% T->FS|T*FS
+% FS -> F | +FS | -FS
+% F->P|F^SF
+% P->(E)|literal
+% literal->number|var|var[E]|func(params)
+% params->E|E,param
+% number->TOBEFINISHED
+%
+%% E expression, T term, SF signed factor, F factor, P power
+%
+%% parser
+%
+%% str
+%
+%% C->E<condition_operators>E
+%% STR index -> STR index+lenExpr
+/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def
+%
+%% analyze Expression List (separator , or | )
+%% STR index -> STR index+lenExpr
+%% /AnalyzeListOfE {
+%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar
+%% NextNonBlankChar dup 0 eq { pop exit } if
+%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if
+%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop
+%% AnalyzeListOfEPostHook
+%% } def
+/AnalyzeListOfE {
+ /NotFirst false def
+ { NextNonBlankChar pop AnalyzeExpr
+ NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse
+ dup Strlen eq { exit } if NextNonBlankChar
+ dup 44 ne 1 index 124 ne and
+ { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse }
+ if pop 1 add } loop
+ AnalyzeListOfEPostHook
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% E->T|E+T
+%% STR index -> STR index+lenExpr
+/AnalyzeExpr {
+ AnalyzePreHook AnalyzeTerm IsEndingExpr
+ { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse }
+ { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop }
+ ifelse
+ AnalyzePostHook
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% T->FS|T*FS
+%% STR index
+/AnalyzeTerm {
+ AnalyzePreHook AnalyzeSignedFactor IsEndingTerm
+ { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse }
+ { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop }
+ ifelse
+ AnalyzePostHook
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FS -> F | +FS | -FS
+%% STR index
+/AnalyzeSignedFactor {
+ AnalyzePreHook 2 copy get dup IsUnaryOp
+ { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp }
+ { pop AnalyzeFactor }
+ ifelse AnalyzePostHook
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% F->P|F^P
+%% STR index
+/AnalyzeFactor {
+ AnalyzePreHook AnalyzePower IsEndingFactor
+ { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse }
+ { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop }
+ ifelse AnalyzePostHook
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% P->(E)|literal
+%% STR index
+/AnalyzePower {
+ %% depending of first char either a number, or a literal
+ 2 copy get dup 40 eq%%an open par
+ { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop }
+ { AnalyzeLiteral }
+ ifelse
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% STR index STR[index] -> STR index
+%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def
+/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% recognize + or -
+%% chr -> T/F
+/IsUnaryOp { dup 43 eq exch 45 eq or } bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% a number can contain only : 0123456789.
+%% chr -> T/F
+/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% STR index -> STR index number
+%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)?
+%% STR index -> STR index' number
+/ReadNumber {
+ exch dup 3 -1 roll dup 3 1 roll
+ %%read mantissa
+ { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop
+ dup 101 eq exch 69 eq or
+ %%% there is a "e" or "E" -> read exponant
+ { 1 add 2 copy get dup IsUnaryOp
+ { pop 1 add 2 copy get } if
+ { IsNumber not { exit } if 1 add 2 copy get } loop }
+ if
+ dup 4 1 roll
+ 3 -1 roll exch 1 index sub getinterval
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% a number can contain only : 0123456789.
+%% chr -> T/F
+/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% STR index -> STR index number
+%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)?
+%% STR index -> STR index' number
+/ReadCondOp {
+ NextNonBlankChar 1 index 4 1 roll
+ { IsCondOp not { exit } if 1 add 2 copy get } loop
+ 2 copy 5 -1 roll
+ exch 1 index sub getinterval 3 1 roll
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% a literal can contain only : 0123456789.
+%% chr -> T/F
+/IsLiteral {%
+ dup 48 ge exch dup 57 le 3 -1 roll and exch
+ dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch
+ dup 97 ge exch 122 le and or } bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)?
+%% STR index -> literal STR index' nextchr
+/ReadLiteral {
+ exch dup 3 -1 roll dup 3 1 roll
+ %%read literal core
+ { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop
+ 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% expr is ended by end of str or a clpar
+%% STR index -> STR index STR[index] T/F
+/IsEndingExpr {%
+ 2 copy dup Strlen eq
+ %% if end of str is reached -> end !
+ { pop pop 0 true }
+ %% ending chr -> clpar, comma, |, <, >, =, !,
+ {get dup dup 41 eq
+ exch dup 124 eq
+ exch dup 93 eq
+ exch dup 44 eq
+ exch dup 30 eq
+ exch dup 60 ge exch 62 le and or or or or or}
+ ifelse } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% expr is ended by end of str or a +-
+%% STR index -> STR index STR[index] T/F
+/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% expr is ended by end of str or */
+%% STR index -> STR index STR[index] T/F
+/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% expr is ended by end of str or ^
+%% STR index -> STR index STR[index] T/F
+/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% STR index -> STR index STR[index]
+/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def
+/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def
+%%%%%%%%%%%%%%%%%%%%%%%%
+%% DEBUG
+/BRK {false} def
+/BRKtrue {/BRK true def} def
+/BRKStop {BRK {BRKtoto} if } def
+/BRKEvalStop {BRK exch if } def
+/BRKBRK2true {BRK {BRK2true} if } def
+/BRK2 {false} def
+/BRK2true {/BRK2 true def} def
+/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def
+end
+%
+%-------------------------------------------------------------------------------%
+%
+/tx@AlgToPs 12 dict def tx@AlgToPs begin
+%
+%% algExpr -> PSVector
+/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def
+/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def
+/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def
+/Strlen 0 def
+/EvalListOfExpr {} def%
+/EvalNumber {%
+ ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx
+ exch 1 add array astore def NextNonBlankChar pop } def
+/EvalAddSub {%
+ /ExpressionVector ExpressionVector aload length dup 5 add -1 roll
+ 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def
+} def
+/EvalMulDiv {%
+ /ExpressionVector ExpressionVector aload length dup 5 add -1 roll
+ 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def
+} def
+/EvalPower {%
+ /ExpressionVector ExpressionVector aload length dup 5 add -1 roll
+ pop /exp cvx exch 1 add array astore def
+} def
+/EvalLiteral {%
+ ReadLiteral
+ dup 40 eq%%% there is an open par -> function call
+ { pop 2 index
+ dup (Sum) eq { EvalSum }
+ { dup (IfTE) eq { EvalCond }
+ { dup (Derive) eq { pop EvalDerive }
+ { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc
+ /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx
+ exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse }
+ { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def
+ dup 91 eq%%% there is an open bracket -> vector element
+ { pop 1 add NextNonBlankChar pop AnalyzeExpr
+ /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add }
+ { pop NextNonBlankChar pop }
+ ifelse}
+ ifelse
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% the derive function : Derive(n,f(x))
+%% firstparindex lastparindex ->
+/EvalDerive {
+ %% manage the function descripiton
+ 1 add ReadNumber 3 1 roll NextNonBlankChar
+ 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if
+ 1 add NextNonBlankChar pop
+ 3 -1 roll cvi
+ dup 0 eq
+ { pop AnalyzeExpr 3 -1 roll pop 1 add }
+ { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll
+ { (x) tx@Derive begin Derive end } repeat
+ ExpressionVector exch /ExpressionVector [] def
+ AlgToPs aload length
+ /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def
+ l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add
+ 1 index length /Strlen exch def } ifelse
+} def
+/EvalSum {%
+ pop 1 add NextNonBlankChar pop
+ %% read the variable name
+ ReadLiteral pop NextNonBlankChar
+ 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if
+ %% read the initial value
+ 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll
+ 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if
+ %% read the increment value
+ 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll
+ 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if
+ %% read the limit value
+ 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll
+ 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if
+ /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll
+ 5 -1 roll 4 add array astore def
+ %% keep ExpressionVector for later and create a new one for internal Sum computation
+ ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def
+ 1 add NextNonBlankChar pop AnalyzeExpr
+ %% add each term
+ /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def
+ /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add
+ array astore def 3 -1 roll pop 1 add
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Convert to radians if trigo function call
+%% (name) ->
+/TrigoFunc {
+ dup (cos) eq 1 index (sin) eq or exch (tan) eq or
+ { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add
+ array astore def
+ } if
+} def
+/EvalCond {%
+ pop 1 add AnalyzeCond NextNonBlankChar
+ 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if
+ ExpressionVector 3 1 roll /ExpressionVector [] def
+ 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def
+ NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if
+ 1 add AnalyzeExpr
+ NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if
+ ExpressionVector
+ /ExpressionVector 6 -1 roll aload length dup
+ 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def
+ 1 add 3 -1 roll pop
+} def
+%% CondOp STR index
+/EvalCondOp {%
+ 3 -1 roll
+ dup (=) eq { /eq } {%
+ dup (<) eq { /lt } {%
+ dup (>) eq { /gt } {%
+ dup (>=) eq { /ge } {%
+ dup (<=) eq { /ge } {%
+ dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator }
+ ifelse } ifelse } ifelse } ifelse } ifelse } ifelse
+ cvx exch pop
+ /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def
+/EvalUnaryOp {
+ 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% H O O K S
+/AnalyzePreHook {} bind def
+/PreEvalHook {} bind def
+/AnalyzeListOfEPostHook {} bind def
+/AnalyzePostHook {} def
+/RollOp { 3 1 roll } bind def
+end %tx@CoreAnalyzerDict
+%
+%--------------------------------------------------------------------%
+%
+/tx@Derive 41 dict def tx@Derive begin
+%%increase ^^ for each function added
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% algExpr variable -> PSVector
+/Derive {%
+ 10240 string 3 1 roll 0 3 1 roll
+ /Variable exch def
+ tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end
+} def
+/Strlen 0 def
+/InitParser { dup length /Strlen exch def 0 } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% algExpr variable index -> PSVector
+/DeriveIndexed {%
+ 3 1 roll 10240 string 3 1 roll 0 3 1 roll
+ /Variable exch def
+ tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% (u,v)'=-(u',v')
+/EvalListOfExpr {%
+ 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe
+ 2 copy 7 -1 roll dup length 4 1 roll putinterval add
+ 6 -2 roll pop pop
+ 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% (-u)'=-(u')
+/EvalUnaryOp {
+ 4 -2 roll 4 index (0) eq
+ { (0) StrConcat 7 -1 roll pop }
+ { 7 -1 roll 45 eq
+ { AddSub AddOpPar true } { false } ifelse
+ 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse
+ 2 copy pop 0 6 2 roll GetIntervalNewStr
+ 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% (number)'=0
+/EvalNumber { ReadNumber (0) 6 2 roll } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% (u+v)'=u'+v'
+/EvalAddSub {%
+ 7 index dup (0) eq
+ { pop true }%% du=0 nothing added
+ { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false }
+ ifelse
+ 5 index dup (0) eq
+ { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0
+ { exch
+ { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added
+ { 5 -2 roll 7 index 43 eq%%something yet added
+ { AddAdd false } { AddSub AddOpPar true } ifelse }
+ ifelse 11 1 roll
+ 3 -1 roll StrConcat 10 -1 roll { AddClPar } if
+ 2 copy pop 0 6 2 roll GetIntervalNewStr }
+ ifelse
+ mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% (u*v)' or (u/v)'
+/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% (u*v)'=u'*v+u*v'
+/EvalMul {%
+ 4 -2 roll 7 index dup (0) eq
+ { pop false }%%du=0
+ { (1) eq%%du=1
+ { false }
+ { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse
+ 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if
+ true }%%du!=0
+ ifelse
+ 5 1 roll 5 index (0) eq
+ { 5 -1 roll not { (0) StrConcat } if }%%dv=0
+ { 5 -1 roll { AddAdd } if
+ 4 index (1) eq
+ { 8 index StrConcat }
+ { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar }
+ ifelse
+ }%%dv!=0
+ ifelse
+ 2 copy pop 0 6 2 roll GetIntervalNewStr
+ mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% (u/v)'=(u'*v-u*v')/v^2
+/EvalDiv {%
+ 4 -2 roll
+ 4 index (0) eq%%dv=0 -> u'/v
+ { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse }
+ { 7 index dup (0) eq
+ { pop }%%du=0
+ { (1) eq%%du=1
+ { false }
+ { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse
+ 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0
+ ifelse
+ AddSub
+ 4 index (1) eq
+ { 8 index StrConcat }
+ { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar }
+ ifelse
+ %}%%dv!=0
+ 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar
+ AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add }
+ ifelse
+ 2 copy pop 0 6 2 roll GetIntervalNewStr
+ mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% str1 index str2 -> str1 index
+/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def
+/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u)
+/EvalPower {%
+ 4 -2 roll 7 index (0) eq
+ {%%if du=0 then (u^v)'=v'ln(u)u^v
+ 4 index (0) eq
+ { (0) StrConcat }%%if dv=0 then (u^v)'=0
+ { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if
+ 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if
+ AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse
+ }
+ {%%du!=0
+ 4 index (0) eq
+ {%%if dv=0 then (u^v)'=vu'u^(v-1)
+ 5 index dup IsStrNumber
+ { dup (0) eq
+ { StrConcat }
+ { dup dup (1) eq exch (1.0) eq or
+ { StrConcat }
+ { StrConcat
+ 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1
+ { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006
+ (*\() StrConcat 8 index StrConcat (\)) StrConcat
+ 5 index dup dup (2) eq exch (2.0) eq or
+ { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse }
+ { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat
+ 5 index StrConcat (-1\)) StrConcat } ifelse
+ }
+ {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u)
+ 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if
+ AddOpPar 5 index StrConcat (\)*\() StrConcat
+ 8 index StrConcat (\)^\() StrConcat
+ 5 index StrConcat (-1\)+\() StrConcat
+ 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if
+ 8 index StrConcat (\)^\() StrConcat
+ 5 index StrConcat (\)*ln\() StrConcat
+ 8 index StrConcat AddClPar
+ } ifelse
+ } ifelse
+ 2 copy pop 0 6 2 roll GetIntervalNewStr
+ mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% str -> true/false
+/IsStrNumber {%
+ true exch
+ { dup 48 lt exch dup 57 gt 3 -1 roll or
+ exch dup 46 ne%%.
+ exch dup 43 ne%%+
+ exch 45 ne%%-
+ and and and { pop false } if } forall
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% literal switch -> func call, vector, variables
+/EvalLiteral {%
+ ReadLiteral dup 40 eq%%% there is an open par -> function call
+ { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec }
+ { dup 91 eq%%% there is an open bracket -> vector element
+ { ERROR_vector_not_yet_implemented }
+ { pop EvalVariable }
+ ifelse }
+ ifelse
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% first last parpos Expr[first:parpos-1] ->
+/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% (f(u))'=u'f'(u)
+/EvalFunc {
+ 4 2 roll 4 index (1) ne
+ { AddOpPar 4 index StrConcat (\)*) StrConcat } if
+ (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec
+ 2 copy pop 0 6 2 roll GetIntervalNewStr
+ mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Func derivative -> Eval<func>
+/EvalFunc_sin {%
+ PreCommonFunc
+ { (cos\() StrConcat 5 index StrConcat AddClPar } if
+ PostCommonFunc } def
+/EvalFunc_cos {%
+ PreCommonFunc
+ { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if
+ PostCommonFunc } def
+/EvalFunc_tan {%
+ PreCommonFunc
+ { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if
+ PostCommonFunc } def
+/EvalFunc_asin {%
+ PreCommonFunc
+ { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if
+ PostCommonFunc } def
+/EvalFunc_acos {%
+ PreCommonFunc
+ { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if
+ PostCommonFunc } def
+/EvalFunc_atg {%
+ PreCommonFunc
+ { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if
+ PostCommonFunc } def
+/EvalFunc_ln {%
+ PreCommonFunc
+ { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if
+ PostCommonFunc } def
+/EvalFunc_exp {%
+ PreCommonFunc
+ { (exp\() StrConcat 5 index StrConcat AddClPar } if
+ PostCommonFunc } def
+/EvalFunc_sqrt {%
+ PreCommonFunc
+ { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if
+ PostCommonFunc } def
+/EvalFunc_Fact {%
+ PreCommonFunc { ERROR_no_variable_expression_in_Fact } if
+ PostCommonFunc } def
+/EvalFunc_sh {%
+ PreCommonFunc
+ { (ch\() StrConcat 5 index StrConcat AddClPar } if
+ PostCommonFunc } def
+/EvalFunc_ch {%
+ PreCommonFunc
+ { (sh\() StrConcat 5 index StrConcat AddClPar } if
+ PostCommonFunc } def
+/EvalFunc_th {%
+ PreCommonFunc
+ { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if
+ PostCommonFunc } def
+/EvalFunc_Argsh {%
+ PreCommonFunc
+ { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if
+ PostCommonFunc } def
+/EvalFunc_Argch {%
+ PreCommonFunc
+ { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if
+ PostCommonFunc } def
+/EvalFunc_Argth {%
+ PreCommonFunc
+ { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if
+ PostCommonFunc } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+/PreCommonFunc {
+ 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop
+ 4 2 roll 4 index (0) eq
+ { (0) StrConcat false }
+ { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse
+} def
+/PostCommonFunc {
+ 2 copy pop 0 6 2 roll GetIntervalNewStr
+ mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
+} def
+/EvalFunc_Derive {%
+ 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs
+ 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add
+ 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar
+ 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval
+ exch 6 2 roll } def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% literal switch -> func call, vector, variables
+/EvalFunc_Sum {%
+ 1 add NextNonBlankChar pop
+ %% read the variable name
+ ReadLiteral pop 3 -1 roll pop NextNonBlankChar
+ 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if
+ %% read the initial value
+ 1 add NextNonBlankChar pop ReadNumber pop
+ 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if
+ %% read the increment value
+ 1 add NextNonBlankChar pop ReadNumber pop
+ 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if
+ %% read the limit value
+ 1 add NextNonBlankChar pop ReadNumber pop
+ 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if
+ 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop
+ 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat
+ 4 index StrConcat AddClPar
+ 2 copy pop 0 6 2 roll GetIntervalNewStr
+ mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% literal switch -> func call, vector, variables
+/EvalFunc_IfTE {%
+ 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond
+ NextNonBlankChar
+ 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if
+ 1 add NextNonBlankChar pop dup 5 1 roll
+ AnalyzeExpr NextNonBlankChar
+ 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if
+ 1 add NextNonBlankChar pop
+ AnalyzeExpr 1 add NextNonBlankChar pop
+ 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat
+ 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar
+ 2 copy pop 0 6 2 roll GetIntervalNewStr
+ mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% advance in str until a comma is found (no error detection!)
+%% str index -> str index'
+/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Convert to radians if trigo function call
+%% (name) ->
+/TrigoFunc {
+ dup (cos) eq 1 index (sin) eq or exch (tan) eq or
+ { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add
+ array astore def
+ } if
+} def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% No derivative for condition....
+/EvalCondOp { 3 -1 roll pop } bind def
+/PutIntervalOneAdd {putinterval 1 add} bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Add open parenthesis in string at the given index
+%% str index -> str index+1
+/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Add close parenthesis in string at the given index
+%% str index -> str index+1
+/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Add 0 in string at the given index
+%% str index -> str index+1
+/AddZero {2 copy (0) PutIntervalOneAdd} bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Add open parenthesis in string at the given index
+%% str index -> str index+1
+/AddMul {2 copy (*) PutIntervalOneAdd} bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Add open parenthesis in string at the given index
+%% str index -> str index+1
+/AddDiv {2 copy (/) PutIntervalOneAdd} bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Add a plus sign in string at the given index
+%% str index -> str index+1
+/AddAdd {2 copy (+) PutIntervalOneAdd} bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Add a minus sign in string at the given index
+%% str index -> str index+1
+/AddSub {2 copy (-) PutIntervalOneAdd} bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Add a pipe sign in string at the given index
+%% str index -> str index+1
+/AddPipe {2 copy (|) PutIntervalOneAdd} bind def
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% H O O K S
+/AnalyzePreHook { dup 5 1 roll } bind def
+/PreEvalHook {} def
+/AnalyzePostHook { 7 -1 roll pop } bind def
+/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def
+/RollOp { 5 1 roll } bind def
+end%%%tx@CoreAnalyzerDict
+/tx@AddMathFunc 12 dict def tx@AddMathFunc begin
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% NEW FUNC
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2))
+%% x -> theta
+/asin {%
+ dup abs 1 gt { EQDFasinrangeerror } if
+ dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad
+} def
+%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x)
+%% x -> theta
+/acos {%
+ dup abs 1 gt { EQDFacosrangeerror } if
+ dup dup mul 1 exch sub sqrt exch atan DegtoRad
+} def
+%% function arctangent in radians
+%% x -> theta
+/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def
+%% HYPERBOLIC FUNCTIONS
+/sh { dup Ex exch neg Ex sub 2 div } def
+/ch { dup Ex exch neg Ex add 2 div } def
+/th { dup sh exch ch div } def
+/Argsh { dup dup mul 1 add sqrt add ln } def
+/Argch { dup dup mul 1 sub sqrt add ln } def
+/Argth { dup 1 add exch 1 exch sub div ln 2 div } def
+%% modified exponential funtion for 0
+%% x n -> x^n
+/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def
+%% modified exponential funtion for 0
+%% x -> e^x
+/Ex { Euler exch exp } bind def
+%%
+%% factorial function
+%% n -> n!
+/Fact { 1 exch 2 exch 1 exch { mul } for } bind def
+/fact { Fact } bind def
+end
+
+% END pstricks.pro
diff --git a/Master/texmf-dist/dvips/pstricks/pst-dots.pro b/Master/texmf-dist/dvips/pstricks/pst-dots.pro
index e8297d814e0..2f98b1777e2 100644
--- a/Master/texmf-dist/dvips/pstricks/pst-dots.pro
+++ b/Master/texmf-dist/dvips/pstricks/pst-dots.pro
@@ -1,6 +1,7 @@
-%!
+% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $
+%
%% PostScript prologue for pstricks.tex.
-%% Version 2.00, Suggestion of 2006/12/19
+%% Version 2.00, 2006/12/19
%% For distribution, see pstricks.tex.
%%
%% Timothy Van Zandt <tvz@Princeton.EDU>
diff --git a/Master/texmf-dist/dvips/pstricks/pst-node.pro b/Master/texmf-dist/dvips/pstricks/pst-node.pro
index 5502ecbd202..85c44dde388 100644
--- a/Master/texmf-dist/dvips/pstricks/pst-node.pro
+++ b/Master/texmf-dist/dvips/pstricks/pst-node.pro
@@ -1,17 +1,39 @@
-%!
+% $Id: pst-node.pro 7 2007-12-29 22:21:13Z herbert $
+%
% PostScript prologue for pst-node.tex.
-% Version 97 patch 1, 97/05/09.
+% Version 1.00, 2008/01/01.
% For distribution, see pstricks.tex.
%
/tx@NodeDict 400 dict def tx@NodeDict begin
-tx@Dict begin /T /translate load def end
-/NewNode { gsave /next ED dict dup 3 1 roll def exch { dup 3 1 roll def }
-if begin tx@Dict begin STV CP T exec end /NodeMtrx CM def next end
-grestore } def
-/InitPnode { /Y ED /X ED /NodePos { NodeSep Cos mul NodeSep Sin mul } def
+tx@Dict begin
+ /T /translate load def
+end
+/NewNode { % on stack: { x y } boolean N@name type InitXnode
+ gsave
+ /next ED % { x y } boolean N@name type
+ dict dup % { x y } boolean N@name dict dict
+ 3 1 roll def % { x y } boolean dict N@name dict def
+ exch { dup 3 1 roll def } if % { x y } dict boolean
+ begin % { x y } dict begin
+ tx@Dict begin
+ STV CP T exec % set scaling
+ end
+ /NodeMtrx CM def % save CM
+ next % InitXNode
+ end
+ grestore
+} def
+%
+/InitPnode {
+ /Y ED /X ED
+ /NodePos { NodeSep Cos mul NodeSep Sin mul } def
+} def
+%
+/InitCnode {
+ /r ED /Y ED /X ED
+ /NodePos { NodeSep r add dup Cos mul exch Sin mul } def
} def
-/InitCnode { /r ED /Y ED /X ED /NodePos { NodeSep r add dup Cos mul exch
-Sin mul } def } def
+%
/GetRnodePos { Cos 0 gt { /dx r NodeSep add def } { /dx l NodeSep sub def
} ifelse Sin 0 gt { /dy u NodeSep add def } { /dy d NodeSep sub def }
ifelse dx Sin mul abs dy Cos mul abs gt { dy Cos mul Sin div dy } { dx
@@ -30,13 +52,16 @@ sin def /NodePos { TriNodePos } def } def
/OvalNodePos { /ww w NodeSep add def /hh h NodeSep add def Sin ww mul Cos
hh mul Atan dup cos ww mul exch sin hh mul } def
/GetCenter { begin X Y NodeMtrx transform CM itransform end } def
+%
/XYPos { dup sin exch cos Do /Cos ED /Sin ED /Dist ED Cos 0 gt { Dist
-Dist Sin mul Cos div } { Cos 0 lt { Dist neg Dist Sin mul Cos div neg }
-{ 0 Dist Sin mul } ifelse } ifelse Do } def
+ Dist Sin mul Cos div } { Cos 0 lt { Dist neg Dist Sin mul Cos div neg }
+ { 0 Dist Sin mul } ifelse } ifelse Do
+} def
/GetEdge { dup 0 eq { pop begin 1 0 NodeMtrx dtransform CM idtransform
-exch atan sub dup sin /Sin ED cos /Cos ED /NodeSep ED NodePos NodeMtrx
-dtransform CM idtransform end } { 1 eq {{exch}} {{}} ifelse /Do ED pop
-XYPos } ifelse } def
+ exch atan sub dup sin /Sin ED cos /Cos ED /NodeSep ED NodePos NodeMtrx
+ dtransform CM idtransform end } { 1 eq {{exch}} {{}} ifelse /Do ED pop
+ XYPos } ifelse
+} def
/AddOffset { 1 index 0 eq { pop pop } { 2 copy 5 2 roll cos mul add 4 1
roll sin mul sub exch } ifelse } def
/GetEdgeA { NodeSepA AngleA NodeA NodeSepTypeA GetEdge OffsetA AngleA
@@ -51,10 +76,18 @@ ArmA AngleA XYPos OffsetA AngleA AddOffset yA add /yA2 ED xA add /xA2 ED
AngleB sin mul yB1 add def } { ArmTypeB 1 eq {{exch}} {{}} ifelse /Do ED
ArmB AngleB XYPos OffsetB AngleB AddOffset yB add /yB2 ED xB add /xB2 ED
} ifelse } def
-/InitNC { /b ED /a ED /NodeSepTypeB ED /NodeSepTypeA ED /NodeSepB ED
-/NodeSepA ED /OffsetB ED /OffsetA ED tx@NodeDict a known tx@NodeDict b
-known and dup { /NodeA a load def /NodeB b load def NodeA GetCenter /yA
-ED /xA ED NodeB GetCenter /yB ED /xB ED } if } def
+/InitNC {
+ /b ED /a ED % second and first node
+ /NodeSepTypeB ED /NodeSepTypeA ED
+ /NodeSepB ED /NodeSepA ED
+ /OffsetB ED /OffsetA ED
+ tx@NodeDict a known tx@NodeDict b known and dup {
+ /NodeA a load def
+ /NodeB b load def
+ NodeA GetCenter /yA ED /xA ED
+ NodeB GetCenter /yB ED /xB ED } if
+} def
+%
/LPutLine { 4 copy 3 -1 roll sub neg 3 1 roll sub Atan /NAngle ED 1 t sub
mul 3 1 roll 1 t sub mul 4 1 roll t mul add /Y ED t mul add /X ED } def
/LPutLines { mark LPutVar counttomark 2 div 1 sub /n ED t floor dup n gt
@@ -107,12 +140,21 @@ begin ArrowB end curveto /LPutVar [ xA1 yA1 xA2 yA2 xB2 yB2 xB1 yB1 ]
cvx def /LPutPos { t LPutVar BezierMidpoint } def /HPutPos { { HPutLines
} HPutCurve } def /VPutPos { { VPutLines } HPutCurve } def } def
%
-/NCAngles { GetEdgeA GetEdgeB GetArmA GetArmB /mtrx AngleA matrix rotate
-def xA2 yA2 mtrx transform pop xB2 yB2 mtrx transform exch pop mtrx
-itransform /y0 ED /x0 ED mark ArmB 0 ne { xB1 yB1 } if xB2 yB2 x0 y0 xA2
-yA2 ArmA 0 ne { xA1 yA1 } if tx@Dict begin false Line end /LPutVar [ xB1
-yB1 xB2 yB2 x0 y0 xA2 yA2 xA1 yA1 ] cvx def /LPutPos { LPutLines } def
-/HPutPos { HPutLines } def /VPutPos { VPutLines } def } def
+/NCAngles {
+ GetEdgeA GetEdgeB GetArmA GetArmB
+ /mtrx AngleA matrix rotate def
+ xA2 yA2 mtrx transform pop
+ xB2 yB2 mtrx transform exch pop
+ mtrx itransform
+ /y0 ED /x0 ED
+ mark ArmB 0 ne { xB1 yB1 } if
+ xB2 yB2 x0 y0 xA2 yA2
+ ArmA 0 ne { xA1 yA1 } if
+ tx@Dict begin false Line end
+ /LPutVar [ xB1 yB1 xB2 yB2 x0 y0 xA2 yA2 xA1 yA1 ] cvx def
+ /LPutPos { LPutLines } def
+ /HPutPos { HPutLines } def
+ /VPutPos { VPutLines } def } def
%
/NCAngle { GetEdgeA GetEdgeB GetArmB /mtrx AngleA matrix rotate def xB2
yB2 mtrx itransform pop xA1 yA1 mtrx itransform exch pop mtrx transform
@@ -196,8 +238,10 @@ w sub yB } { xB yB w sub xB yB w add } ifelse xA1 yA1 ] cvx def /LPutPos
{ pop pop pop pop 4 2 roll } ifelse } def /VPutPos { VPutPos@ VPutLine }
def /HPutPos { VPutPos@ HPutLine } def mark LPutVar tx@Dict begin
/ArrowA { moveto } def /ArrowB { } def false Line closepath end } def
+
/LPutCoor { NAngle tx@Dict begin /NAngle ED end gsave CM STV CP Y sub neg
exch X sub neg exch moveto setmatrix CP grestore } def
+
/LPut { tx@NodeDict /LPutPos known { LPutPos } { CP /Y ED /X ED /NAngle 0
def } ifelse LPutCoor } def
/HPutAdjust { Sin Cos mul 0 eq { 0 } { d Cos mul Sin div flag not { neg }
diff --git a/Master/texmf-dist/dvips/pstricks/pstricks.pro b/Master/texmf-dist/dvips/pstricks/pstricks.pro
index 9a527fb6cff..12b81d67af3 100644
--- a/Master/texmf-dist/dvips/pstricks/pstricks.pro
+++ b/Master/texmf-dist/dvips/pstricks/pstricks.pro
@@ -1,7 +1,13 @@
-%!
+% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $
+%
% PostScript prologue for pstricks.tex.
-% Version 1.01, 2006/01/11
-% For distribution, see pstricks.tex.
+% Version 1.03, 2008/01/01
+% For distribution and copyright, see pstricks.tex.
+%
+%
+systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if
+systemdict /.setblendmode known not {/.setblendmode { pop } def } if
+systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if
%
/tx@Dict 200 dict def tx@Dict begin
/ADict 25 dict def
@@ -18,13 +24,28 @@
/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known
/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter)
/Div { dup 0 eq { pop } { div } ifelse } def % control the division
+/tan { dup cos abs 1.e-10 lt
+ { pop 1.e10 } % return 1.e10 as infinit
+ { dup sin exch cos div } ifelse % default sin/cos
+} def
+/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees
+/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root
+ pop pop 0 }{ sqrt exch atan} ifelse } def
/NET { neg exch neg exch T } def % change coordinate system to the negative one
-/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, epects 2 parameter
+/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter
+/Pyth2 { % Pythagoras, xA yA xB yB
+ 3 -1 roll % xA xB yB yA
+ sub % xA xB yB-yA
+ 3 1 roll % yB-yA xA xB
+ sub % yB-yA xA-xB
+ Pyth } def
/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian
%----------------- hv added 20050516 ---------------
+/PiDiv2 1.57079632680 def
/Pi 3.14159265359 def
/TwoPi 6.28318530718 def
/Euler 2.71828182846 def
+%/e Euler bind def
/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees
/DegtoRad { Pi mul 180 div } bind def % viceversa
%----------------- hv end---------------------------
@@ -122,22 +143,75 @@
%pop pop } def
%% DG/SR modification end
%
-/BeginArrow { ADict begin /@mtrx CM def gsave 2 copy T 2 index sub neg
-exch 3 index sub exch Atan rotate newpath } def
+/BeginArrow { ADict begin
+ /@mtrx CM def
+ gsave
+ 2 copy T
+ 2 index sub neg exch
+ 3 index sub exch Atan
+ rotate newpath
+} def
+%
/EndArrow { @mtrx setmatrix CP grestore end } def
-/Arrow { CLW mul add dup 2 div /w ED mul dup /h ED mul /a ED { 0 h T 1 -1
-scale } if w neg h moveto 0 0 L w h L w neg a neg rlineto gsave fill
-grestore } def
-/Tbar { CLW mul add /z ED z -2 div CLW 2 div moveto z 0 rlineto stroke 0
-CLW moveto } def
-/Bracket { CLW mul add dup CLW sub 2 div /x ED mul CLW add /y ED /z CLW 2
-div def x neg y moveto x neg CLW 2 div L x CLW 2 div L x y L stroke 0
-CLW moveto } def
-/RoundBracket { CLW mul add dup 2 div /x ED mul /y ED /mtrx CM def 0 CLW
-2 div T x y mul 0 ne { x y scale } if 1 1 moveto .85 .5 .35 0 0 0
-curveto -.35 0 -.85 .5 -1 1 curveto mtrx setmatrix stroke 0 CLW moveto }
-def
+%
+/Arrow {
+ CLW mul add dup
+ 2 div /w ED
+ mul dup /h ED
+ mul /a ED
+ { 0 h T 1 -1 scale } if
+ w neg h moveto
+ 0 0 L w h L w neg a neg rlineto
+ gsave fill grestore
+} def
+%
+/ArrowD { % the sides are drawn as curves (hv 20071211)
+ CLW mul add dup
+ 2 div /w ED
+ mul dup /h ED
+ mul /Inset ED
+ { 0 h T 1 -1 scale } if % changes the direction
+% we use y=w/h^2 * x^2 as equation for the control points
+% for the coordinates the arrow is seen from top to bottom
+% the bottom (tip) is (0;0)
+ w neg h moveto % lower left of >
+ w 9 div 4 mul neg h 3 div 2 mul
+ w 9 div neg h 3 div
+ 0 0 curveto % tip of >
+ w 9 div h 3 div
+ w 9 div 4 mul h 3 div 2 mul
+ w h curveto % upper left of >
+ w neg Inset neg rlineto % move to x=0 and inset
+ gsave fill grestore
+} def
+%
+/Tbar {
+ CLW mul add /z ED
+ z -2 div CLW 2 div moveto
+ z 0 rlineto stroke
+ 0 CLW moveto
+} def
+%
+/Bracket {
+ CLW mul add dup CLW sub 2 div
+ /x ED mul CLW add /y ED /z CLW 2 div def
+ x neg y moveto
+ x neg CLW 2 div L x CLW 2 div L x y L stroke
+ 0 CLW moveto
+} def
+%
+/RoundBracket {
+ CLW mul add dup 2 div
+ /x ED mul /y ED /mtrx CM def
+ 0 CLW 2 div T x y mul 0 ne { x y scale } if
+ 1 1 moveto
+ .85 .5 .35 0 0 0 curveto
+ -.35 0 -.85 .5 -1 1 curveto
+ mtrx setmatrix stroke 0 CLW moveto
+} def
+%
/SD { 0 360 arc fill } def
+%
/EndDot { % DS is the dot size
{ /z DS def } { /z 0 def } ifelse
/b ED 0 z DS SD b { 0 z DS CLW sub SD } if
@@ -147,13 +221,16 @@ def
/closepath load } /pathforall load stopped { pop pop pop pop CP /moveto
load } if ] cvx newpath 3 1 roll T exec } def
%
-/NArray { aload length 2 div dup dup cvi eq not { exch pop } if /n exch
-cvi def } def
+%/NArray {
+% aload length 2 div dup dup cvi eq not { exch pop } if /n exch
+% cvi def
+%} def
+%
/NArray { % holds the coordinates and on top of stack the showpoints boolean
- /f ED
+ /showpoints ED
counttomark 2 div dup cvi /n ED
n eq not { exch pop } if
- f { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse
+ showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse
} def
/Line {
NArray n 0 eq not
@@ -262,38 +339,86 @@ def
sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA
x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0
y0 x0 2 mul x1 sub y1 ] def } def
-/Grid { newpath /a 4 string def /b ED /c ED /n ED cvi dup 1 lt { pop 1 }
-if /s ED s div dup 0 eq { pop 1 } if /dy ED s div dup 0 eq { pop 1 } if
-/dx ED dy div round dy mul /y0 ED dx div round dx mul /x0 ED dy div
-round cvi /y2 ED dx div round cvi /x2 ED dy div round cvi /y1 ED dx div
-round cvi /x1 ED /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def /w x2 x1 sub
-0 gt { 1 } { -1 } ifelse def b 0 gt { /z1 b 4 div CLW 2 div add def
-/Helvetica findfont b scalefont setfont /b b .95 mul CLW 2 div add def }
-if systemdict /setstrokeadjust known { true setstrokeadjust /t { } def }
-{ /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add
-exch itransform } bind def } ifelse gsave n 0 gt { 1 setlinecap [ 0 dy n
-div ] dy n div 2 div setdash } { 2 setlinecap } ifelse /i x1 def /f y1
-dy mul n 0 gt { dy n div 2 div h mul sub } if def /g y2 dy mul n 0 gt {
-dy n div 2 div h mul add } if def x2 x1 sub w mul 1 add dup 1000 gt {
-pop 1000 } if { i dx mul dup y0 moveto b 0 gt { gsave c i a cvs dup
-stringwidth pop /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse h 0 gt {b neg}
-{z1} ifelse rmoveto show grestore } if dup t f moveto g t L stroke /i i
-w add def } repeat grestore gsave n 0 gt
-% DG/SR modification begin - Nov. 7, 1997 - Patch 1
-%{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash }
-{ 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash }
-% DG/SR modification end
-{ 2 setlinecap } ifelse /i y1 def /f x1 dx mul
-n 0 gt { dx n div 2 div w mul sub } if def /g x2 dx mul n 0 gt { dx n
-div 2 div w mul add } if def y2 y1 sub h mul 1 add dup 1000 gt { pop
-1000 } if { newpath i dy mul dup x0 exch moveto b 0 gt { gsave c i a cvs
-dup stringwidth pop /z2 ED w 0 gt {z1 z2 add neg} {z1} ifelse h 0 gt
-{z1} {b neg} ifelse rmoveto show grestore } if dup f exch t moveto g
-exch t L stroke /i i h add def } repeat grestore } def
-/ArcArrow { /d ED /b ED /a ED gsave newpath 0 -1000 moveto clip newpath 0
-1 0 0 b grestore c mul /e ED pop pop pop r a e d PtoC y add exch x add
-exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c
-mul neg d } def
+%
+/Grid {
+ newpath
+ /a 4 string def
+ /b ED /c ED /n ED
+ cvi dup 1 lt { pop 1 } if
+ /s ED
+ s div dup 0 eq { pop 1 } if
+ /dy ED s div dup 0 eq { pop 1 } if
+ /dx ED dy div round dy mul
+ /y0 ED dx div round dx mul
+ /x0 ED dy div round cvi
+ /y2 ED dx div round cvi
+ /x2 ED dy div round cvi
+ /y1 ED dx div round cvi
+ /x1 ED
+ /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def
+ /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def
+ b 0 gt {
+ /z1 b 4 div CLW 2 div add def
+% /Helvetica findfont b scalefont setfont
+ /b b .95 mul CLW 2 div add def } if
+ systemdict /setstrokeadjust known
+ { true setstrokeadjust /t { } def }
+ { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add
+ exch itransform } bind def } ifelse
+ gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse
+ /i x1 def
+ /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def
+ /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def
+ x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if
+ { i dx mul dup y0 moveto
+ b 0 gt
+ { gsave c i a cvs dup stringwidth pop
+ /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse
+ h 0 gt {b neg}{z1} ifelse
+ rmoveto show grestore } if
+ dup t f moveto
+ g t L stroke
+ /i i w add def
+ } repeat
+ grestore
+ gsave
+ n 0 gt
+ % DG/SR modification begin - Nov. 7, 1997 - Patch 1
+ %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash }
+ { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash }
+ % DG/SR modification end
+ { 2 setlinecap } ifelse
+ /i y1 def
+ /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def
+ /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def
+ y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if
+ { newpath i dy mul dup x0 exch moveto
+ b 0 gt { gsave c i a cvs dup stringwidth pop
+ /z2 ED
+ w 0 gt {z1 z2 add neg} {z1} ifelse
+ h 0 gt {z1} {b neg} ifelse
+ rmoveto show grestore } if
+ dup f exch t moveto
+ g exch t L stroke
+ /i i h add def
+ } repeat
+ grestore
+} def
+%
+/ArcArrow {
+ /d ED /b ED /a ED
+ gsave
+ newpath 0 -1000 moveto clip
+ newpath
+ 0 1 0 0 b
+ grestore
+ c mul
+ /e ED
+ pop pop pop r a e d PtoC y add exch x add
+ exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c
+ mul neg d
+} def
+%
/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def
%
/ArcAdjust { %%%% Vincent Guirardel
@@ -366,7 +491,7 @@ dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifel
} def
%
/EllipticArcArrow {
- /d ED % add/sub
+ /d ED % is add or sub
/b ED % arrow procedure
/a1 ED % angle
gsave
@@ -381,10 +506,10 @@ dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifel
a1 exch ArcAdjust % Angular position of base of arrow.
/a2 ED
pop pop pop
- a2 cos rx mul x add
- a2 sin ry mul y add
- a1 cos rx mul x add
- a1 sin ry mul y add
+ a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig
+ a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig
+ a1 cos rx mul xOrig add %
+ a1 sin ry mul yOrig add %
% Now arrow tip coor and base coor are on stack.
b pop pop pop pop % Draw arrow, and discard coordinates.
a2 CLW 8 div
@@ -397,11 +522,16 @@ dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifel
%%------------------ tvz/DG/hv (2004-05-10) end -------------------%%
%
/Rot { CP CP translate 3 -1 roll neg rotate NET } def
-/RotBegin { tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 }
-def } if /TMatrix [ TMatrix CM ] cvx def /a ED a Rot /RAngle [ RAngle
-dup a add ] cvx def } def
-/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ]
-cvx def } def
+%
+/RotBegin {
+ tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if
+ /TMatrix [ TMatrix CM ] cvx def
+ /a ED
+ a Rot /RAngle [ RAngle dup a add ] cvx def
+} def
+%
+/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def
+%
/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def
/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def
/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def
@@ -421,4 +551,6 @@ exch } def
neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def
/IfVisible true def } def
end
+%-----------------------------------------------------------------------------%
+
% END pstricks.pro
diff --git a/Master/texmf-dist/tex/generic/pstricks/Changes b/Master/texmf-dist/tex/generic/pstricks/Changes
index 124160c393b..a48459bf116 100644
--- a/Master/texmf-dist/tex/generic/pstricks/Changes
+++ b/Master/texmf-dist/tex/generic/pstricks/Changes
@@ -1,4 +1,24 @@
pstricks.tex --------
+1.20 2008-01-01 - added opacity for normal stroke operation (lines)
+ - added the arrowtype <D-D> and <D<D-D>D>, which draws the
+ sides as betier curves (ArrowD type in pstricks.pro)
+ - add special coor type (*x f(x)), which invokes the
+ algebraic parser for f(x) before using the default
+ (!x y) coor type
+ - add option linejoin=0,1,or 2 for connecting lines
+ - add option linecap=0,1,or 2 for line ends
+ - small tweaks to psellipticarc x y -> xOrig yOrig
+ - fix introduced bug with \newpsstyle: \pst@tempa->\pst@tempA
+ - add PS subroutines /UserCoor and /ScreenCoor for easy
+ transforming into user or screen coordinates
+ - changed wrong name of \psk@shift to \pst@shift
+ - fix bug with pst-node and \\[name=...]. It now uses
+ \ps@ifnextchar for scanning the next token
+ - fix bug with pst@tempg in \polar@coor. It was already used in
+ \pst@getangle.
+ - new option gridfont for the label font of \psgrid
+ can now be any of the PS-fonts Helvetica (Default),
+ Times-Roman, Palatino-Roman, ...
1.15a 2007-01-05 - \parabola->\psparabola (old name still valid) (hv)
1.15 2006-12-19 - add support for more dot styles (from Etienne Riga)
1.14c 2006-04-29 - add option linecap for dashed lines
@@ -28,10 +48,25 @@ pstricks.tex --------
1.06 2005-02-24 fix spurious blank in doublestroke (hv)
+pst-node.tex --------
+1.00 2007-08-18 - new option pcRef for the first node (hv)
+ - new option Circle for psmatrix (hv)
+ - fix bug with pst-node and \\[name=...]. It now uses
+ \ps@ifnextchar for scanning the next token (defined
+ in pstricks.tex)
+
+
+pst-plot.tex --------
+1.00 2007-06-26 - added two new line style LineToXaxis/LineToYaxis (hv)
+
+
pst-tree.tex --------
-1.15 2007-01-03 - fix bug with \endpsTree (hv)
+1.00 2007-01-03 - fix bug with \endpsTree (hv)
xdvipdfmx.con ------
0.01 2007-03-11 - first CTAN version, must be renamed to pstricks.con
when used with XeTeX
+
+vtex.con ------
+0.02 2008-01-01 - disable transparent color setting
diff --git a/Master/texmf-dist/tex/generic/pstricks/pst-plot.tex b/Master/texmf-dist/tex/generic/pstricks/pst-plot.tex
index a3273fd2228..4ce191dde77 100644
--- a/Master/texmf-dist/tex/generic/pstricks/pst-plot.tex
+++ b/Master/texmf-dist/tex/generic/pstricks/pst-plot.tex
@@ -5,6 +5,7 @@
%%
%%
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
+%% COPYRIGHT 2007-2008 by Herbert Voss, hvoss@tug.org
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
@@ -23,8 +24,8 @@
\expandafter\next
\fi
-\def\fileversion{97 patch 2}
-\def\filedate{1999/12/12}
+\def\fileversion{1.00}
+\def\filedate{2007/06/26}
\message{ v\fileversion, \filedate}
@@ -139,7 +140,20 @@ D\space##1%
\def\endplot@bezier{\psbezier@ii}
\def\beginplot@cbezier{\begin@ClosedObj}
\def\endplot@cbezier{\pscbezier@ii}
-
+% added 2007-06-26 (hv)
+\let\beginplot@LineToYAxis\beginplot@line % all from pst-plot
+\def\endplot@LineToYAxis{\psLineToYAxis@ii}
+\let\beginqp@LineToYAxis\beginqp@line
+\let\doqp@LineToYAxis\doqp@line
+\let\endqp@LineToYAxis\endqp@line
+\let\testqp@LineToYAxis\testqp@line
+\let\beginplot@LineToXAxis\beginplot@line
+\def\endplot@LineToXAxis{\psLineToXAxis@ii}
+\let\beginqp@LineToXAxis\beginqp@line
+\let\doqp@LineToXAxis\doqp@line
+\let\endqp@LineToXAxis\endqp@line
+\let\testqp@LineToXAxis\testqp@line
+% end (hv)
\def\psset@plotstyle#1{%
\@ifundefined{beginplot@#1}%
{\@pstrickserr{Plot style `#1' not defined}\@eha}%
@@ -221,7 +235,44 @@ D\space##1%
\addto@pscode{n 3 mod { pop pop } repeat closepath}
\end@ClosedObj}%
\def\testqp@cbezier{\ifshowpoints\else\@psttrue\fi}
-
+%
+% added 2007-06-26 (hv) -------------------------------------------------
+\def\psLineToYAxis@ii{%
+\addto@pscode{\pst@cp \psline@iii \tx@LineToYAxis}%
+\end@OpenObj}
+%
+\def\tx@LineToYAxis{LineToYAxis }
+%
+\pst@def{LineToYAxis}<{
+ NArray % all x-y pairs on stack
+ n { 2 copy moveto % go to current point
+ 0 exch Lineto % line to y-axis
+ pop % delete old x-value
+ } repeat
+}>
+%
+\def\psLineToXAxis@ii{%
+\addto@pscode{\pst@cp \psline@iii \tx@LineToXAxis}%
+\end@OpenObj}
+%
+\def\tx@LineToXAxis{LineToXAxis }
+%
+\pst@def{LineToXAxis}<{%
+NArray
+n 0 eq not
+ { n 1 eq { 0 0 /n 2 def } if
+ ArrowA
+ /n n 2 sub def
+ CP 2 copy moveto pop 0 Lineto
+ n { 2 copy moveto pop 0 Lineto } repeat
+ CP
+ 4 2 roll
+ ArrowB
+ 2 copy moveto pop 0
+ L
+ pop pop } if}>
+% end (hv) --------------------------------------------------------------
+%
\def\dataplot{\def\pst@par{}\pst@object{dataplot}}
\def\dataplot@i#1{%
\pst@killglue
@@ -236,6 +287,7 @@ D\space##1%
\fi
\endgroup
\ignorespaces}
+%
\def\dataplot@ii#1{%
\@nameuse{beginplot@\psplotstyle}%
\addto@pscode{%
diff --git a/Master/texmf-dist/tex/generic/pstricks/pst-tree.tex b/Master/texmf-dist/tex/generic/pstricks/pst-tree.tex
index 93024663d89..3a4a578ee49 100644
--- a/Master/texmf-dist/tex/generic/pstricks/pst-tree.tex
+++ b/Master/texmf-dist/tex/generic/pstricks/pst-tree.tex
@@ -1,7 +1,7 @@
%% pst-tree.tex
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
%% COPYRIGHT 2000-2003 by Denis Girou.
-%% Copyright 2004-2007 Herbert Voss
+%% Copyright 2004-2008 Herbert Voss
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -22,8 +22,8 @@
\csname PSTreeLoaded\endcsname
\let\PSTreeLoaded\endinput
\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi\relax
-\def\fileversion{1.00}
-\def\filedate{2007/01/03}
+\def\fileversion{1.01}
+\def\filedate{2007/06/26}
\message{ v\fileversion, \filedate}
%
\edef\TheAtCode{\the\catcode`\@}
diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
index 5e77b88da65..bb18c11cc13 100644
--- a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
+++ b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
@@ -1,7 +1,7 @@
%% pstricks.tex
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
%% COPYRIGHT 2000-2003 by Denis Girou.
-%% Copyright 2004-2007 Herbert Voss
+%% Copyright 2004-2008 Herbert Voss
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -20,8 +20,8 @@
% See the PSTricks User's Guide for description.
% This uses the header file `pstricks.pro'.
%
-\def\fileversion{1.15a}
-\def\filedate{2006/12/22}
+\def\fileversion{1.20}
+\def\filedate{2008/01/01}
%
\csname PSTricksLoaded\endcsname
\let\PSTricksLoaded\endinput
@@ -32,6 +32,7 @@
#1\endcsname\relax#2\else#3\fi}
\def\@namedef#1{\expandafter\def\csname #1\endcsname}
\def\@nameuse#1{\csname #1\endcsname}
+%
\def\@eha{%
Your command was ignored.^^J
Type \space I <command> <return> \space to replace
@@ -43,20 +44,32 @@
\def\@empty{}
\def\@gobble#1{}
\def\@nnil{\@nil}
+%
\def\@ifnextchar#1#2#3{%
-\let\@tempe#1\def\@tempa{#2}\def\@tempb{#3}\futurelet\@tempc\@ifnch}
+ \let\@tempe#1\def\@tempa{#2}\def\@tempb{#3}\futurelet\@tempc\@ifnch}
+%
\def\@ifnch{%
- \ifx\@tempc\@sptoken
- \let\@tempd\@xifnch
- \else
- \ifx\@tempc\@tempe \let\@tempd\@tempa \else \let\@tempd\@tempb \fi
+ \ifx\@tempc\@sptoken \let\@tempd\@xifnch
+ \else\ifx\@tempc\@tempe \let\@tempd\@tempa \else \let\@tempd\@tempb \fi
\fi
\@tempd}
+%
\begingroup
\def\:{\global\let\@sptoken= } \:
\def\:{\@xifnch} \expandafter\gdef\: {\futurelet\@tempc\@ifnch}
\endgroup
\fi
+%
+% hv 2007-10-16 to fix the bug in pst-node with \\[name=...]
+\def\ps@ifnextchar#1#2#3{%
+ \let\reserved@d= #1%
+ \def\reserved@a{#2}\def\reserved@b{#3}%
+ \futurelet\@let@token\ps@ifnch}
+\def\ps@ifnch{%
+ \ifx\@let@token\reserved@d \let\reserved@b\reserved@a \fi
+ \reserved@b
+}
+% end bugfix
\typeout{`PSTricks' v\fileversion\space\space <\filedate> (tvz)}
\def\@pstrickserr#1#2{%
\begingroup
@@ -186,7 +199,9 @@
\def\pstdriver{\pst@configerr\pstdriver}
\@ifundefined{pstcustomize}%
{\def\pstcustomize{\endinput\let\pstcustomize\relax}}{}
-\input pstricks.con
+%
+\input pstricks.con % local config file
+%
\newif\ifPSTricks
\PSTrickstrue
\def\PSTricksOff{%
@@ -197,9 +212,12 @@
}
\@ifundefined{pst@def}{\def\pst@def#1<#2>{\@namedef{tx@#1}{#2 }}}{}
\@ifundefined{pst@ATH}{\def\pst@ATH<#1>{}}{}
+%
\pstheader{pstricks.pro}
+\pstheader{pst-algparser.pro}
+%
\def\pst@dict{tx@Dict begin }
-\def\pst@theheaders{pstricks.pro}
+\def\pst@theheaders{pstricks.pro pst-algparser.pro}
\def\pst@Verb#1{\pstVerb{\pst@dict #1 end}}
\def\tx@Atan{Atan }
\def\tx@Div{Div }
@@ -216,6 +234,13 @@
\fi
\def\tx@STP{STP }
\def\tx@STV{STV }
+%
+%--------------------------------------- PS stuff ---------------------------------
+% on stack x y
+\pst@def{UserCoor}< \pst@number\psyunit div exch \pst@number\psxunit div exch >
+\pst@def{ScreenCoor}< \pst@number\psyunit mul exch \pst@number\psxunit mul exch >
+%--------------------------------------- PS stuff end -----------------------------
+%
\def\pst@number#1{\pst@@dimtonum#1\space}
\def\pst@checknum#1#2{%
\edef\next{#1}%
@@ -236,6 +261,7 @@
{\let\pst@num\tw@\expandafter\pst@@@checknum\@gobble}%
{\let\pst@num\@ne\pst@@@checknum}%
}
+%
\def\pst@@@checknum#1.#2.#3\@nil{%
\afterassignment\pst@@@@checknum\pst@cntg=0#1\relax\@nil
\afterassignment\pst@@@@checknum\pst@cnth=1#2\relax\@nil}
@@ -275,7 +301,7 @@
%\ifdim\pst@tempg\p@=\p@ \ifdim\pst@temph\p@=\p@
%\def#2{}%
%\fi\fi}
-\def\pst@getscale#1#2{%
+\def\pst@getscale#1#2{% read and check a scale input x [y]
\edef\pst@tempg{#1}%
\ifx\pst@tempg\@none
\def#2{}%
@@ -295,7 +321,7 @@
\fi%
}
% DG/SR modification end
-\def\pst@getint#1#2{%
+\def\pst@getint#1#2{% read and check an integer
\pst@cntg=#1\relax
\edef#2{\the\pst@cntg\space}%
}
@@ -373,9 +399,22 @@
%\def\newpsstyle#1#2{\@namedef{pscs@#1}{\psset{#2}}}
%------------ hv 1.10 beg -------------------
\def\newpsstyle#1#2{\@namedef{pscs@#1}{%
- \def\pst@tempa{#2}%
- \ifx\pst@tempa\@empty\else\psset{#2}\fi}}
+ \def\pst@tempA{#2}%
+ \ifx\pst@tempA\@empty\else\psset{#2}\fi}}
%------------ hv 1.10 end -------------------
+%------------ hv 1.16 begin -------------------
+\def\addto@psstyle#1#2{%
+ \pst@toks=\expandafter{#1#2}%
+ \edef#1{\the\pst@toks}}
+\def\addtopsstyle#1#2{%
+ \def\pst@tempA{#2}%
+ \ifx\pst@tempA\@empty\else
+ \@ifundefined{pscs@#1}%
+ {\newpsstyle{#1}{#2}}%
+ {\expandafter\addto@psstyle\csname pscs@#1\endcsname{\psset{#2}}}%
+ \fi}
+%------------ hv 1.16 end -------------------
+%
\def\@none{none}
\def\pst@getcolor#1#2{%
% \@ifundefined{color@#1}% hv 1.14 2005-12-17
@@ -387,7 +426,9 @@
\newdimen\psxunit \psxunit 1cm
\newdimen\psyunit \psyunit 1cm
\let\psrunit\psunit
+%
\def\pstunit@off{\let\@psunit\ignorespaces\ignorespaces}
+%
\def\pssetlength#1#2{%
\let\@psunit\psunit
\afterassignment\pstunit@off
@@ -450,7 +491,7 @@
\def\NormalCoor{%
\def\pst@@getcoor##1{\pst@expandafter\cartesian@coor{##1},\relax,\@nil}%
\def\pst@@getangle##1{%
- \pst@checknum{##1}\pst@angle
+ \pst@checknum{##1}\pst@angle%
\edef\pst@angle{\pst@angle \pst@angleunit}%
}%
\def\psput@##1{\pst@@getcoor{##1}\leavevmode\psput@cartesian}%
@@ -458,24 +499,24 @@
\NormalCoor
\def\degrees{\@ifnextchar[{\@degrees}{\def\pst@angleunit{}}}
\def\@degrees[#1]{%
-\pst@checknum{#1}\pst@tempg
-\edef\pst@angleunit{360 \pst@tempg div mul }%
-\ignorespaces}
+ \pst@checknum{#1}\pst@tempg
+ \edef\pst@angleunit{360 \pst@tempg div mul }%
+ \ignorespaces}
\def\radians{\def\pst@angleunit{57.2956 mul }}
\def\pst@angleunit{}
\def\SpecialCoor{%
\def\pst@@getcoor##1{%
- \begingroup
- \pst@activecoor
+ \begingroup%
+ \pst@activecoor%
\xdef\pst@tempg{##1}%
- \endgroup
+ \endgroup%
\expandafter\special@coor\pst@tempg||\@nil%
}%
- \def\pst@@getangle##1{%
- \begingroup
- \pst@activecoor
+\def\pst@@getangle##1{%
+ \begingroup%
+ \pst@activecoor%
\xdef\pst@tempg{##1}%
- \endgroup
+ \endgroup%
\expandafter\special@angle\pst@tempg\@empty)\@nil%
}%
\def\psput@##1{\pst@@getcoor{##1}\leavevmode\psput@special}%
@@ -484,10 +525,12 @@
\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
}
\endgroup
\def\special@coor#1|#2|#3\@nil{%
@@ -498,16 +541,20 @@
\fi%
}
\def\special@@coor#1{%
- \ifcat#1a\relax
+ \ifcat#1a\relax% node names should start with a letter
\def\next{\node@coor#1}%
\else
- \ifx#1[\relax
+ \ifx#1[\relax% special node coor: [..]A
\def\next{\Node@coor[}%
\else
- \ifx#1!\relax
+ \ifx#1!\relax% PostScript code: x y
\def\next{\raw@coor}%
\else
- \def\next{\special@@@coor#1}%
+ \ifx#1*\relax% algebraic PostScript code: x f(x)
+ \def\next{\alg@coor}%
+ \else
+ \def\next{\special@@@coor#1}%
+ \fi
\fi
\fi
\fi
@@ -521,28 +568,37 @@
\fi%
}
\def\mixed@coor#1#2{%
- \begingroup
+ \begingroup%
% DG/SR modification begin - Oct. 27, 1997 - Patch 6
%\specialcoor@ii#1;;\@nil
%\let\pst@tempa\pst@coor
%\specialcoor@ii#2;;\@nil
- \special@@coor#1;;\@nil
- \let\pst@tempa\pst@coor
- \special@@coor#2;;\@nil
+ \special@@coor#1;;\@nil%
+ \let\pst@tempa\pst@coor%
+ \special@@coor#2;;\@nil%
% DG/SR modification end
\xdef\pst@tempg{\pst@tempa pop \pst@coor exch pop }%
- \endgroup
+ \endgroup%
\let\pst@coor\pst@tempg%
}
\def\polar@coor#1#2{%
- \pssetlength\pst@dimg{#1}%
+% \pssetlength\pst@dimg{#1}%
+ \pssetlength\pst@dimb{#1}% hv 2007-10-16 g is already used in get@@angle
\pst@@getangle{#2}%
- \edef\pst@coor{\pst@number\pst@dimg \pst@angle \tx@PtoC}%
+% \edef\pst@coor{\pst@number\pst@dimg \pst@angle \tx@PtoC}% dito
+ \edef\pst@coor{\pst@number\pst@dimb \pst@angle \tx@PtoC}%
}
-\def\raw@coor#1;#2\@nil{%
+\def\raw@coor#1;#2\@nil{% PostScript code
\edef\pst@coor{%
#1 \pst@number\psyunit mul exch \pst@number\psxunit mul exch }%
}
+\def\alg@coor#1 #2;#3\@nil{% algebraic PostScript code
+ \edef\pst@coor{%
+ /x #1 def
+ /Func (#2) AlgParser cvx def
+ x Func
+ \pst@number\psyunit mul exch \pst@number\psxunit mul exch }%
+}
\def\node@coor#1\@nil{%
\@pstrickserr{You must load `pst-node.tex' to use node coordinates.}\@ehps
\def\pst@coor{0 0 }%
@@ -593,10 +649,13 @@
\fi%
}
\psset@swapaxes{false}
+%
\newif\ifshowpoints
\def\psset@showpoints#1{\@nameuse{showpoints#1}}
\psset@showpoints{false}
+%
\let\pst@setrepeatarrowsflag\relax
+%
\def\psset@border#1{%
\pst@getlength{#1}\psk@border
\pst@setrepeatarrowsflag}
@@ -634,7 +693,14 @@
\psset@linewidth{.8pt}
\def\psset@linecolor#1{\pst@getcolor{#1}\pslinecolor}
\psset@linecolor{black}
-\def\psls@solid{0 setlinecap stroke }
+\def\psls@solid{\psk@linecap\space setlinecap stroke }
+%
+\def\psset@linecap#1{\pst@getint{#1}\psk@linecap}% hv 2007-12-01
+\psset@linecap{0}% hv 2007-12-01
+\def\psset@linejoin#1{\pst@getint{#1}\psk@linejoin}% hv 2007-10-13
+\def\tx@setlinejoin{\psk@linejoin\space setlinejoin }% hv 2007-10-13
+\psset@linejoin{0}% hv 2007-10-13
+%
\def\pst@missing{%
\z@
\@pstrickserr{Missing number or dimension. 0 substituted}\@ehpa}
@@ -702,15 +768,45 @@
\fi\fi%
}
\psset{linecap=0}
-%%--------------------------------- hv 2006-04-29 end ---------------------
-
-\def\psfs@none{}
+%--------------------------------- hv 2006-04-29 end ---------------------
+%
+%--------------------------------- hv 2007-09-09 begin ---------------------
+% transparency needs a run through latex -> dvips -> ps2pdf14(!)
+% use transpalpha=<mumber> to the the opacity level
+%
\def\psset@fillcolor#1{\pst@getcolor{#1}\psfillcolor}
\psset@fillcolor{white}
-\def\psfs@solid{\pst@fill{\pst@usecolor\psfillcolor fill}}
-%-------------- hv begin patch 15 (2004-05-10)---------------%%
-\def\psfs@eofill{\pst@fill{\pst@usecolor\psfillcolor eofill}}
-%-------------- hv end patch 15 (2004-05-10)---------------%%
+\def\psset@strokeopacity#1{\pst@checknum{#1}\psk@strokeopacityalpha }% for lines
+\psset@strokeopacity{1}
+\def\psset@opacity#1{\pst@checknum{#1}\psk@opacityalpha }% for filled areas
+\psset@opacity{1}
+\def\psset@shapealpha#1{\pst@checknum{#1}\psk@shapealpha }
+\psset@shapealpha{0.6}
+\def\psset@blendmode#1{\pst@getint{#1}\psk@blendmode }% must be one of
+% /Normal 0
+% /Compatible 1
+% /Screen 2
+% /Multiply 3
+% /HardLight 4
+\psset@blendmode{0}
+%
+\def\psfs@none{}
+\def\psfs@solid{\pst@fill{\pst@usecolor\psfillcolor \psk@opacityalpha .setopacityalpha fill }}
+\def\psfs@eofill{\pst@fill{\pst@usecolor\psfillcolor \psk@opacityalpha .setopacityalpha eofill}}
+\def\psfs@shape{%
+ \pst@fill{
+ \pst@usecolor\psfillcolor
+ \ifcase\psk@blendmode
+ /Normal \or
+ /Compatible \or
+ /Screen \or
+ /Multiply %\or
+% /Hardlight
+ \fi
+ .setblendmode \psk@shapealpha .setshapealpha fill }}
+%
+%--------------------------------- hv 2007-09-09 end ---------------------
+%
\def\psset@hatchwidth#1{\pst@getlength{#1}\psk@hatchwidth}
\psset@hatchwidth{.8pt}
\def\psset@hatchsep#1{\pst@getlength{#1}\psk@hatchsep}
@@ -785,7 +881,7 @@
\def\psk@arrowA{}
\def\psk@arrowB{}
%\def\pst@arrowtable{,<->,<<->>,>-<,>>-<<,(-),[-]}
-\def\pst@arrowtable{,<->,<<->>,>-<,>>-<<,(-),[-],)-(,]-[,|>-<|} % hv --1.12
+\def\pst@arrowtable{,<->,<<->>,>-<,>>-<<,(-),[-],)-(,]-[,|>-<|,<D-D>,<D<D-D>D>} % hv --1.16
\begingroup
\catcode`\<=13
\catcode`\>=13
@@ -811,13 +907,19 @@
\psset@arrowlength{1.4}
\def\psset@arrowinset#1{\pst@checknum{#1}\psk@arrowinset}%
\psset@arrowinset{.4}
-\def\tx@Arrow{Arrow }
+\def\tx@Arrow{ \psk@strokeopacityalpha .setopacityalpha Arrow }% hv 2008-01-13
% new definitions of the missing arrows ---- hv 1.1.2
-\@namedef{psas@<|}{%
+\def\tx@ArrowD{ \psk@strokeopacityalpha .setopacityalpha ArrowD }% hv 2008-01-13
+%
+\@namedef{psas@<|}{
\psk@tbarsize\space \tx@Tbar
0 CLW 2 div T
newpath
- true \psk@arrowinset\space \psk@arrowlength\space \psk@arrowsize\space \tx@Arrow%
+ true
+ \psk@arrowinset
+ \psk@arrowlength
+ \psk@arrowsize
+ \tx@Arrow
}
% ]-[ arrow
\def\tx@BracketOut{BracketOut }
@@ -833,7 +935,7 @@
\psk@bracketlength\space \psk@tbarsize\space \tx@BracketOut
}
% )-( arrow
-\def\tx@RoundBracketOut{RoundBracketOut }
+\def\tx@RoundBracketOut{ \psk@strokeopacityalpha .setopacityalpha RoundBracketOut }% hv 2008-01-13
\@namedef{psas@(}{%
/RoundBracketOut {%
CLW mul add dup 2 div
@@ -850,29 +952,34 @@
\psk@rbracketlength\space \psk@tbarsize\space \tx@RoundBracketOut
}
% end of new definitions of the missing arrows ---- hv 1.12
-\@namedef{psas@>}{%
- false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
-}
+\@namedef{psas@>}{ false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow }
\@namedef{psas@>>}{%
false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
- 0 h T
- gsave
- newpath
+ 0 h T gsave newpath
false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
- CP
- grestore
- CP newpath moveto
- 2 copy
- L
- stroke
- moveto
+ CP grestore CP newpath moveto 2 copy L stroke moveto
}
\@namedef{psas@<}{true \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow}
-\@namedef{psas@<<}{%
+\@namedef{psas@<<}{
true \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
CP newpath moveto 0 a neg L stroke 0 h neg T
false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
}
+\@namedef{psas@D>}{ false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@ArrowD }% hv 20071211
+\@namedef{psas@D>D>}{ % hv 20071211
+ false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@ArrowD
+ 0 h Inset sub T gsave newpath
+ false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@ArrowD
+ CP grestore moveto
+}
+\@namedef{psas@<D}{ % hv 20071211
+ true \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@ArrowD
+}
+\@namedef{psas@<D<D}{ % hv 20071211
+ true \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@ArrowD
+ CP newpath moveto 0 a neg L stroke 0 h neg T
+ true \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@ArrowD
+}
\def\psset@tbarsize#1{%
\pst@expandafter\pst@getdimnum{#1} 0 {} {}\@nil
\edef\psk@tbarsize{\pst@number\pst@dimg \pst@tempg}%
@@ -918,7 +1025,7 @@
}
\def\psas@{}
\psset@arrows{-}
-\def\tx@SD{SD }
+\def\tx@SD{ \psk@opacityalpha .setopacityalpha SD }
\def\tx@EndDot{EndDot }
\def\psas@oo{{\pst@usecolor\psfillcolor true} true \psk@dotsize \tx@EndDot}
\def\psas@o{{\pst@usecolor\psfillcolor true} false \psk@dotsize \tx@EndDot}
@@ -926,19 +1033,21 @@
\@namedef{psas@*}{{false} false \psk@dotsize \tx@EndDot}
\def\pst@par{}
\def\addto@par#1{%
-\ifx\pst@par\@empty
-\def\pst@par{#1}%
-\else
-\expandafter\def\expandafter\pst@par\expandafter{\pst@par,#1}%
-\fi}
+ \ifx\pst@par\@empty
+ \def\pst@par{#1}%
+ \else
+ \expandafter\def\expandafter\pst@par\expandafter{\pst@par,#1}%
+ \fi%
+}
\def\addbefore@par#1{%
-\ifx\pst@par\@empty
-\def\pst@par{#1}%
-\else
-\toks@{#1}%
-\pst@toks\expandafter{\pst@par}%
-\edef\pst@par{\the\toks@,\the\pst@toks}%
-\fi}
+ \ifx\pst@par\@empty
+ \def\pst@par{#1}%
+ \else
+ \toks@{#1}%
+ \pst@toks\expandafter{\pst@par}%
+ \edef\pst@par{\the\toks@,\the\pst@toks}%
+ \fi%
+}
\def\use@par{%
\ifx\pst@par\@empty\else
\expandafter\@psset\pst@par,\@nil
@@ -1000,6 +1109,7 @@
\begin@ClosedObj
\def\pst@repeatarrowsflag{\z@}%
\def\pst@linetype{0}}
+%
\def\end@OpenObj{%
\ifpsshadow \pst@openshadow \fi
\ifdim\psk@border\p@>\z@ \pst@addborder \fi
@@ -1011,16 +1121,19 @@
\use@pscode
\endgroup
\ignorespaces}
+%
\def\begin@SpecialObj{%
-\leavevmode
-\pst@killglue
-\begingroup
-\use@par
-\init@pscode}
+ \leavevmode
+ \pst@killglue
+ \begingroup
+ \use@par
+ \init@pscode}
+%
\def\end@SpecialObj{%
-\use@pscode
-\endgroup
-\ignorespaces}
+ \use@pscode
+ \endgroup
+ \ignorespaces}
+%
\def\pst@code{}%
\def\init@pscode{%
\addto@pscode{%
@@ -1029,7 +1142,7 @@
}
\def\addto@pscode#1{\xdef\pst@code{\pst@code#1\space}}
\def\use@pscode{%
- \pstverb{%
+ \pstverb{
\pst@dict
\tx@STP
\pst@newpath
@@ -1041,10 +1154,12 @@
\gdef\pst@code{}%
}
\def\pst@newpath{newpath }
+%
\def\pst@@killglue{\unskip\ifdim\lastskip>\z@\expandafter\pst@@killglue\fi}
\def\KillGlue{\let\pst@killglue\pst@@killglue}
\def\DontKillGlue{\let\pst@killglue\relax}
\DontKillGlue
+%
\def\solid@star{%
\if@star
\pslinewidth=\z@
@@ -1053,6 +1168,7 @@
\def\psk@fillstyle{\psfs@solid}%
\let\psfillcolor\pslinecolor
\fi}
+%
\def\pst@setdoublesep{%
\pst@getlength\psdoublesep\psdoublesep
\pslinewidth=2\pslinewidth
@@ -1073,6 +1189,7 @@
gsave fill grestore
stroke
grestore}}
+%
\def\pst@openshadow{%
\addto@pscode{%
gsave
@@ -1093,6 +1210,7 @@
stroke
grestore}%
\fi}
+%
\def\pst@addborder{%
\addto@pscode{%
gsave
@@ -1101,16 +1219,20 @@
\pst@usecolor\psbordercolor
stroke
grestore}}
+%
\def\pst@stroke{%
\ifx\pslinestyle\@none\else
\addto@pscode{%
gsave
\pst@number\pslinewidth SLW
\pst@usecolor\pslinecolor
+ \psk@strokeopacityalpha .setopacityalpha % hv 2008-01-13
\@nameuse{psls@\pslinestyle}
grestore}%
\fi}
+%
\def\pst@fill#1{\addto@pscode{gsave #1 grestore}}%
+%
\def\pst@doublestroke{%
\addto@pscode{%
gsave
@@ -1118,42 +1240,44 @@
\pst@usecolor\psdoublecolor
stroke
grestore
- }}
+}}
+%
\def\pst@arrowtype{%
-\ifx\psk@arrowB\@empty 0 \else -2 \fi
-\ifx\psk@arrowA\@empty 0 \else -1 \fi
-add}
+ \ifx\psk@arrowB\@empty 0 \else -2 \fi
+ \ifx\psk@arrowA\@empty 0 \else -1 \fi
+ add }
+%
\def\pst@addarrowdef{%
-\addto@pscode{%
-/ArrowA {
-\ifx\psk@arrowA\@empty
- \pst@oplineto
-\else
- \pst@arrowdef{A}
-moveto
-\fi
-} def
-/ArrowB {
-\ifx\psk@arrowB\@empty \else \pst@arrowdef{B} \fi
-} def}}
+ \addto@pscode{%
+ /ArrowA {
+ \ifx\psk@arrowA\@empty
+ \pst@oplineto
+ \else
+ \pst@arrowdef{A}
+ moveto
+ \fi
+ } def
+ /ArrowB { \ifx\psk@arrowB\@empty \else \pst@arrowdef{B} \fi } def
+}}
+%
\def\pst@arrowdef#1{%
-\ifnum\pst@repeatarrowsflag>\z@
-/Arrow#1c [ 6 2 roll ] cvx def Arrow#1c
-\fi
-\tx@BeginArrow
-\psk@arrowscale
-\@nameuse{psas@\@nameuse{psk@arrow#1}}
-\tx@EndArrow}
+ \ifnum\pst@repeatarrowsflag>\z@
+ /Arrow#1c [ 6 2 roll ] cvx def Arrow#1c
+ \fi
+ \tx@BeginArrow
+ \psk@arrowscale
+ \@nameuse{psas@\@nameuse{psk@arrow#1}}
+ \tx@EndArrow
+}
+%
\def\pst@repeatarrows{%
-\addto@pscode{%
-gsave
-\ifx\psk@arrowA\@empty\else
-ArrowAc ArrowA pop pop
-\fi
-\ifx\psk@arrowB\@empty\else
-ArrowBc ArrowB pop pop pop pop
-\fi
-grestore}}
+ \addto@pscode{%
+ gsave
+ \ifx\psk@arrowA\@empty\else ArrowAc ArrowA pop pop \fi
+ \ifx\psk@arrowB\@empty\else ArrowBc ArrowB pop pop pop pop \fi
+ grestore
+}}
+%
\def\pst@OpenShowPoints{%
\addto@pscode{%
gsave
@@ -1168,6 +1292,7 @@ grestore}}
{ N 2 mul { pop } repeat } ifelse
grestore
}}
+%
\def\pscustom{\pst@object{pscustom}}
\long\def\pscustom@i#1{%
\begin@SpecialObj
@@ -1203,6 +1328,7 @@ grestore}}
\psk@fillstyle
\pst@stroke
\end@SpecialObj}
+%
\def\begin@CustomObj{%
\begingroup
\use@par
@@ -1312,6 +1438,7 @@ grestore}}
\def\arrows#1{{\psset@arrows{#1}\pst@addarrowdef}}%
\let\file\pst@rawfile
} % END \pst@customdefs
+%
\def\closedshadow@i{\cuse@par\pst@closedshadow}
\def\openshadow@i{\cuse@par\pst@openshadow}
\def\stroke@i{\cuse@par\pst@stroke}%
@@ -1320,36 +1447,39 @@ grestore}}
\pst@@getcoor{#2}%
\addto@pscode{\pst@coor #1}}
\def\pst@threecoor#1(#2)#3(#4)#5(#6){%
-\begingroup
-\pst@getcoor{#2}\pst@tempa
-\pst@getcoor{#4}\pst@tempb
+ \begingroup
+ \pst@getcoor{#2}\pst@tempa
+ \pst@getcoor{#4}\pst@tempb
% DG/SR modification begin - Aug. 4, 1999 - Patch 11
%\pst@getcoor{#6}\pst@tembc
-\pst@getcoor{#6}\pst@tempc
+ \pst@getcoor{#6}\pst@tempc
% DG/SR modification end
-\addto@pscode{\pst@tempa \pst@tempb \pst@tempc #1}%
-\endgroup}
+ \addto@pscode{\pst@tempa \pst@tempb \pst@tempc #1}%
+ \endgroup}
+%
\def\pst@rawfile#1{%
-\begingroup
-\def\do##1{\catcode`##1=12\relax}"
-\dospecials
-\catcode`\%=14
-\pst@@rawfile{#1}%
-\endgroup}
+ \begingroup
+ \def\do##1{\catcode`##1=12\relax}"
+ \dospecials
+ \catcode`\%=14
+ \pst@@rawfile{#1}%
+ \endgroup}
+%
\def\pst@@rawfile#1{%
-\immediate\openin1 #1
-\ifeof1
-\@pstrickserr{File `#1' not found}\@ehpa
-\else
-\immediate\read1 to \pst@tempg
-\loop
-\ifeof1 \@pstfalse\else\@psttrue\fi
-\if@pst
-\addto@pscode\pst@tempg
-\immediate\read1 to \pst@tempg
-\repeat
-\fi
-\immediate\closein1\relax}
+ \immediate\openin1 #1
+ \ifeof1
+ \@pstrickserr{File `#1' not found}\@ehpa
+ \else
+ \immediate\read1 to \pst@tempg
+ \loop
+ \ifeof1 \@pstfalse\else\@psttrue\fi
+ \if@pst
+ \addto@pscode\pst@tempg
+ \immediate\read1 to \pst@tempg
+ \repeat
+ \fi
+ \immediate\closein1\relax}
+%
\def\tx@NArray{NArray }
\def\tx@NArray{NArray }
\def\tx@Line{Line }
@@ -1358,10 +1488,10 @@ grestore}}
\def\tx@Polygon{Polygon }
\def\psset@gangle#1{\pst@getangle{#1}\psk@gangle}
\psset@gangle{0}
+%
\def\tx@Diamond{Diamond }
\def\psdiamond{\pst@object{psdiamond}}
-\def\psdiamond@i(#1){%
-\@ifnextchar({\psdiamond@ii(#1)}{\psdiamond@ii(0,0)(#1)}}
+\def\psdiamond@i(#1){\@ifnextchar({\psdiamond@ii(#1)}{\psdiamond@ii(0,0)(#1)}}
\def\psdiamond@ii(#1)(#2){%
\begin@ClosedObj
\pst@getcoor{#1}\pst@tempa
@@ -1380,8 +1510,7 @@ grestore}}
%
\def\tx@Triangle{Triangle }
\def\pstriangle{\pst@object{pstriangle}}
-\def\pstriangle@i(#1){%
- \@ifnextchar({\pstriangle@ii(#1)}{\pstriangle@ii(0,0)(#1)}}
+\def\pstriangle@i(#1){\@ifnextchar({\pstriangle@ii(#1)}{\pstriangle@ii(0,0)(#1)}}
\def\pstriangle@ii(#1)(#2){%
\begin@ClosedObj
\pst@getcoor{#1}\pst@tempa% the center of the baseline
@@ -1428,11 +1557,11 @@ grestore}}
}%
}
\def\pscurve@ii{%
- \addto@pscode{%
+ \addto@pscode{
\pst@cp
\psk@curvature\space /c ED /b ED /a ED
\ifshowpoints true \else false \fi
- \tx@OpenCurve%
+ \tx@OpenCurve
}%
\end@OpenObj%
}
@@ -1509,19 +1638,19 @@ grestore}}
\def\psdot{\pst@object{psdot}}
\def\psdot@i{\@ifnextchar({\psdot@ii}{\psdot@ii(\z@,\z@)}}
\def\psdot@ii(#1){%
- \begin@SpecialObj
+ \begin@SpecialObj%
% hv modification 1.13 2005-11-28
- \solid@star
+ \solid@star%
% hv modification end
\pst@@getcoor{#1}%
- \addto@pscode{%
+ \addto@pscode{
\psk@dotsize
\@nameuse{psds@\psk@dotstyle}%
\pst@coor Dot}%
\end@SpecialObj}
\def\psdots{\pst@object{psdots}}
\def\psdots@i{%
- \begin@SpecialObj
+ \begin@SpecialObj%
\pst@getcoors[\psdots@ii}
\def\psdots@ii{%
\addto@pscode{false \tx@NArray \psdots@iii}%
@@ -1705,6 +1834,7 @@ grestore}}
/Lineto /lineto load def
\fi
\ifshowpoints true \else false \fi
+ \tx@setlinejoin % hv 2007-10-13
}
\def\qline(#1)(#2){%
\def\pst@par{}%
@@ -1726,19 +1856,19 @@ grestore}}
\def\pspolygon@ii{%
\addto@pscode{\psline@iii \tx@Polygon}%
\def\pst@linetype{1}%
- \end@ClosedObj%
-}
+ \end@ClosedObj}
+%
\def\psset@framearc#1{\pst@checknum{#1}\psk@framearc}
\psset@framearc{0}
-\def\psset@cornersize#1{%
-\pst@expandafter\psset@@cornersize{#1}\@nil}
+%
+\def\psset@cornersize#1{\pst@expandafter\psset@@cornersize{#1}\@nil}
\def\psset@@cornersize#1#2\@nil{%
-\if #1a\relax
-\def\psk@cornersize{\pst@number\pslinearc false }%
-\else
-\def\psk@cornersize{\psk@framearc true }%
-\fi}
+ \if #1a\relax
+ \def\psk@cornersize{\pst@number\pslinearc false }%
+ \else\def\psk@cornersize{\psk@framearc true }%
+ \fi}
\psset@cornersize{relative}
+%
\def\tx@Rect{Rect }
\def\tx@OvalFrame{OvalFrame }
\def\tx@Frame{Frame }
@@ -1768,6 +1898,30 @@ grestore}}
\showpointsfalse
\end@ClosedObj%
}
+%
+\def\psTextFrame{\pst@object{psTextFrame}}
+\def\psTextFrame@i(#1)(#2)#3{%
+ \addbefore@par{ref=c}% to prevent an empty value
+ \leavevmode%
+ \pst@killglue
+ \begingroup
+ \use@par
+ \ifx\psk@yref\relax \def\psk@yref{0}\fi% no Baseline possible
+ \SpecialCoor
+ \pst@getcoor{#1}\pst@tempA
+ \pst@getcoor{#2}\pst@tempB
+ \if@star\psframe*(#1)(#2)\else\psframe(#1)(#2)\fi
+ \rput(! \pst@tempA \pst@tempB % x1 y1 x2 y2
+ exch 4 -1 roll % y1 y2 x2 x1
+ dup /x1 ED % y1 y2 x2 x1
+ sub /dx ED % y1 y2
+ exch dup /y1 ED % y2 y1
+ sub /dy ED
+ x1 dx \psk@xref\space mul add \pst@number\psxunit div
+ y1 dy \psk@yref\space mul add \pst@number\psyunit div ){#3}
+ \endgroup
+ \ignorespaces}
+%
\def\tx@BezierNArray{BezierNArray }
\def\tx@OpenBezier{OpenBezier }
\def\tx@ClosedBezier{ClosedBezier }
@@ -1830,18 +1984,21 @@ grestore}}
\def\psset@subgriddiv#1{%
\pst@cntg=#1\relax\edef\psk@subgriddiv{\the\pst@cntg}}
\psset@subgriddiv{5}
+%
+\def\psset@gridfont#1{\def\psk@gridfont{/#1 }}% hv 2007-11-13
+\psset@gridfont{Helvetica}
+%
\def\psset@gridlabels#1{\pst@getlength{#1}\psk@gridlabels}
\psset@gridlabels{10pt}
\def\psset@gridlabelcolor#1{\pst@getcolor{#1}\psgridlabelcolor}
\psset@gridlabelcolor{black}
+
\def\tx@Grid{Grid }
+
\def\psgrid{\pst@object{psgrid}}
-\def\psgrid@i{\@ifnextchar(%
- {\psgrid@ii}{\expandafter\psgrid@iv\pic@coor}}
-\def\psgrid@ii(#1){\@ifnextchar(%
- {\psgrid@iii(#1)}{\psgrid@iv(0,0)(0,0)(#1)}}
-\def\psgrid@iii(#1)(#2){\@ifnextchar(%
- {\psgrid@iv(#1)(#2)}{\psgrid@iv(#1)(#1)(#2)}}
+\def\psgrid@i{\@ifnextchar({\psgrid@ii}{\expandafter\psgrid@iv\pic@coor}}
+\def\psgrid@ii(#1){\@ifnextchar({\psgrid@iii(#1)}{\psgrid@iv(0,0)(0,0)(#1)}}
+\def\psgrid@iii(#1)(#2){\@ifnextchar({\psgrid@iv(#1)(#2)}{\psgrid@iv(#1)(#1)(#2)}}
\def\psgrid@iv(#1)(#2)(#3){%
\begin@SpecialObj
\pst@getcoor{#1}\pst@tempA% hv 1.11
@@ -1855,22 +2012,25 @@ grestore}}
% \pst@number\psxunit \pst@number\psyunit % hv 1.11
\pst@number\psxunit abs \pst@number\psyunit abs % hv 1.11
\psk@subgriddiv\space \psk@subgriddots\space
- {} 0 \tx@Grid
+ {} 0
+ \psk@gridfont findfont 0 scalefont setfont % hv 1.16
+ \tx@Grid
grestore
}%
\fi
- \addto@pscode{%
+ \addto@pscode{
gsave
\psk@gridwidth SLW \pst@usecolor\psgridcolor
\pst@tempB \pst@coor \pst@tempA % hv 1.11
\pst@number\psxunit abs \pst@number\psyunit abs % hv 1.11
% \pst@number\psxunit \pst@number\psyunit % hv 1.11
1 \psk@griddots\space { \pst@usecolor\psgridlabelcolor }
- \psk@gridlabels \tx@Grid
+ \psk@gridlabels
+ \psk@gridfont findfont \psk@gridlabels scalefont setfont % hv 1.16
+ \tx@Grid
grestore
}%
- \end@SpecialObj%
-}
+ \end@SpecialObj}
%
\newif\ifpsmathbox
\psmathboxtrue
@@ -1885,8 +2045,8 @@ grestore}}
{\pst@thisbox\the\everypsbox#2}%
\ifnum\pst@mathflag>\z@$\fi% $
}%
- #1%
-}
+ #1}
+%
\def\pst@makeverbbox#1{%
\def\pst@afterbox{#1}%
\edef\pst@mathflag{%
@@ -1934,15 +2094,18 @@ grestore}}
\egroup%
}
\def\pslongbox#1#2{%
-\@namedef{#1}{\pst@longbox#2}%
-\@namedef{end#1}{\pst@endlongbox}%
-}
+ \@namedef{#1}{\pst@longbox#2}%
+ \@namedef{end#1}{\pst@endlongbox}}
+%
\newdimen\psframesep
\def\psset@framesep#1{\pssetlength\psframesep{#1}}
\psset@framesep{3pt}
+%
\newif\ifpsboxsep
\def\psset@boxsep#1{\@nameuse{psboxsep#1}}
+%
\psset@boxsep{true}
+%
\def\pst@useboxpar{%
\use@par
\if@star
@@ -1950,8 +2113,8 @@ grestore}}
\solid@star
\let\solid@star\relax
\fi
- \ifpsdoubleline \pst@setdoublesep \fi%
-}
+ \ifpsdoubleline \pst@setdoublesep \fi}
+%
\def\psframebox{\pst@object{psframebox}}
\def\psframebox@i{\pst@makebox\psframebox@ii}
\def\psframebox@ii{%
@@ -1966,7 +2129,7 @@ grestore}}
\ifpsboxsep\kern\pst@dima\fi
\begin@ClosedObj
\addto@pscode{%
- \psk@cornersize
+ \psk@cornersize % arcradius boolean
\pst@number\pst@dima neg
\pst@number\pst@dimb neg
\pst@number\pst@dimc
@@ -1982,8 +2145,8 @@ grestore}}
}%
\ifpsboxsep\dp\pst@hbox=\pst@dimb\ht\pst@hbox=\pst@dimd\fi
\leavevmode\box\pst@hbox
- \endgroup%
-}
+ \endgroup}
+%
\def\psdblframebox{\pst@object{psdblframebox}}
\def\psdblframebox@i{\addto@par{doubleline=true}\psframebox@i}
\def\psclip#1{%
@@ -2095,93 +2258,99 @@ newpath \pscirclebox@iv \tx@SD end}%
\pscirclebox@iv CLW 2 div add 0 360 arc closepath}%
\end@ClosedObj
\fi}
+%
\def\pscirclebox@iv{%
-\pst@number{\wd\pst@hbox}2 div
-\pst@number{\ht\pst@hbox}\pst@number{\dp\pst@hbox}add 2 div
-2 copy \pst@number{\dp\pst@hbox}sub 4 2 roll
-\tx@Pyth \pst@number\psframesep add }
+ \pst@number{\wd\pst@hbox}2 div
+ \pst@number{\ht\pst@hbox}\pst@number{\dp\pst@hbox}add 2 div
+ 2 copy \pst@number{\dp\pst@hbox}sub 4 2 roll
+ \tx@Pyth \pst@number\psframesep add }
+%
\def\pscirclebox@sep{%
-\pst@dimb=\ht\pst@hbox
-\advance\pst@dimb\dp\pst@hbox
-\divide\pst@dimb 2
-\pst@dima=.5\wd\pst@hbox
-\pst@pyth\pst@dima\pst@dimb\pst@dimc
-\advance\pst@dimc\pslinewidth
-\advance\pst@dimc\psframesep
-\advance\pst@dimb-\pst@dimc
-\setbox\pst@hbox=\hbox to2\pst@dimc{%
-\hss
-\vbox{\kern-\pst@dimb\box\pst@hbox}%
-\hss}%
-\advance\pst@dimb-\dp\pst@hbox
-\dp\pst@hbox=-\pst@dimb}
+ \pst@dimb=\ht\pst@hbox
+ \advance\pst@dimb\dp\pst@hbox
+ \divide\pst@dimb 2
+ \pst@dima=.5\wd\pst@hbox
+ \pst@pyth\pst@dima\pst@dimb\pst@dimc
+ \advance\pst@dimc\pslinewidth
+ \advance\pst@dimc\psframesep
+ \advance\pst@dimb-\pst@dimc
+ \setbox\pst@hbox=\hbox to2\pst@dimc{%
+ \hss\vbox{\kern-\pst@dimb\box\pst@hbox}\hss}%
+ \advance\pst@dimb-\dp\pst@hbox
+ \dp\pst@hbox=-\pst@dimb}
+%
\let\pst@nodehook\relax
+%
\def\psCirclebox{\pst@object{psCirclebox}}
\def\psCirclebox@i{\pst@makebox\psCirclebox@ii}
\def\psCirclebox@ii{%
-\begingroup
-\pst@useboxpar
-\pst@dima=\ht\pst@hbox
-\advance\pst@dima\dp\pst@hbox
-\divide\pst@dima\tw@
-\pssetlength\pst@dimb\psk@radius
-\setbox\pst@hbox=\hbox{%
-\pst@nodehook
-\pscircle(.5\wd\pst@hbox,\pst@dima){\pst@dimb}%
-\box\pst@hbox}%
-\ifpsboxsep \psCirclebox@sep \fi
-\leavevmode
-\box\pst@hbox
-\endgroup}
+ \begingroup
+ \pst@useboxpar
+ \pst@dima=\ht\pst@hbox
+ \advance\pst@dima\dp\pst@hbox
+ \divide\pst@dima\tw@
+ \pssetlength\pst@dimb\psk@radius
+ \setbox\pst@hbox=\hbox{%
+ \pst@nodehook
+ \pscircle(.5\wd\pst@hbox,\pst@dima){\pst@dimb}%
+ \box\pst@hbox}%
+ \ifpsboxsep \psCirclebox@sep \fi
+ \leavevmode
+ \box\pst@hbox
+ \endgroup}
+%
\def\psCirclebox@sep{%
-\pst@dimc=\pst@dimb
-\advance\pst@dimb-\pst@dima
-\advance\pst@dima\pst@dimc
-\setbox\pst@hbox=\hbox to\tw@\pst@dimc{%
-\hss
-\vrule width \z@ depth \pst@dimb height \pst@dima
-\box\pst@hbox
-\hss}}%
+ \pst@dimc=\pst@dimb
+ \advance\pst@dimb-\pst@dima
+ \advance\pst@dima\pst@dimc
+ \setbox\pst@hbox=\hbox to\tw@\pst@dimc{%
+ \hss\vrule width \z@ depth \pst@dimb height \pst@dima
+ \box\pst@hbox\hss}}
+%
\def\psovalbox{\pst@object{psovalbox}}
\def\psovalbox@i{\pst@makebox{\psovalbox@ii}}
\def\psovalbox@ii{%
-\begingroup
-\pst@useboxpar
-\psovalbox@iii
-\ifpsboxsep\psovalbox@sep\fi
-\leavevmode
-\box\pst@hbox
-\endgroup}
+ \begingroup
+ \pst@useboxpar
+ \psovalbox@iii
+ \ifpsboxsep\psovalbox@sep\fi
+ \leavevmode
+ \box\pst@hbox
+ \endgroup}
+%
\def\psovalbox@iii{%
-\psovalbox@iv
-\setbox\pst@hbox=\hbox{%
-\begin@ClosedObj
-\addto@pscode{%
-0 360
-\pst@number\pst@dimc CLW 2 div sub
-\pst@number\pst@dimd CLW 2 div sub
-\pst@number\pst@dima
-\pst@number\pst@dimb
-\tx@Ellipse
-closepath}%
-\def\pst@linetype{2}%
-\end@ClosedObj
-\unhbox\pst@hbox}}
+ \psovalbox@iv
+ \setbox\pst@hbox=\hbox{%
+ \begin@ClosedObj
+ \addto@pscode{%
+ 0 360
+ \pst@number\pst@dimc CLW 2 div sub
+ \pst@number\pst@dimd CLW 2 div sub
+ \pst@number\pst@dima
+ \pst@number\pst@dimb
+ \tx@Ellipse
+ closepath }%
+ \def\pst@linetype{2}%
+ \end@ClosedObj
+ \unhbox\pst@hbox}}
+%
\def\psovalbox@iv{%
-\pst@dimc=\pslinewidth\advance\pst@dimc\psframesep
-\pst@dimd=\ht\pst@hbox\advance\pst@dimd\dp\pst@hbox
-\pst@dima=.5\wd\pst@hbox
-\pst@dimb=.5\pst@dimd\advance\pst@dimb-\dp\pst@hbox
-\pst@dimd=.707\pst@dimd
-\advance\pst@dimd\pst@dimc
-\advance\pst@dimc.707\wd\pst@hbox}
+ \pst@dimc=\pslinewidth\advance\pst@dimc\psframesep
+ \pst@dimd=\ht\pst@hbox\advance\pst@dimd\dp\pst@hbox
+ \pst@dima=.5\wd\pst@hbox
+ \pst@dimb=.5\pst@dimd\advance\pst@dimb-\dp\pst@hbox
+ \pst@dimd=.707\pst@dimd
+ \advance\pst@dimd\pst@dimc
+ \advance\pst@dimc.707\wd\pst@hbox}
+%
\def\psovalbox@sep{%
-\setbox\pst@hbox\hbox to 2\pst@dimc{\hss\unhbox\pst@hbox\hss}%
-\pst@dimg=\pst@dimd
-\advance\pst@dimg-\pst@dimb
-\dp\pst@hbox=\pst@dimg
-\advance\pst@dimd\pst@dimb
-\ht\pst@hbox=\pst@dimd}
+ \setbox\pst@hbox\hbox to 2\pst@dimc{\hss\unhbox\pst@hbox\hss}%
+ \pst@dimg=\pst@dimd
+ \advance\pst@dimg-\pst@dimb
+ \dp\pst@hbox=\pst@dimg
+ \advance\pst@dimd\pst@dimb
+ \ht\pst@hbox=\pst@dimd}
+%
\def\psdiabox{\pst@object{psdiabox}}
\def\psdiabox@i{\pst@makebox{\psdiabox@ii}}
\def\psdiabox@ii{%
@@ -2475,7 +2644,7 @@ pop
\end@OpenObj%
}
\def\psellipticarc@definearg{%
- \pst@tempa /y ED /x ED % Origin
+ \pst@tempa /yOrig ED /xOrig ED % Origin
\pst@tempb % radii. Now adjust:
\ifdim\psk@dimen\p@=\z@\else
\psk@dimen CLW mul dup 3 1 roll
@@ -2488,18 +2657,17 @@ pop
ArcAdjust
def
/angleB
- /d { \if@psarcn add \else sub \fi } def
- \pst@tempd \psk@arcsepB 2 div
- ArcAdjust
- def
- \ifshowpoints\psellipticarc@showpoints\fi
- \ifx\psk@arrowA\@empty
- \ifnum\psk@liftpen=2
- angleA cos rx mul x add
- angleA sin ry mul y add
- moveto
- \fi
- \fi%
+ /d { \if@psarcn add \else sub \fi } def
+ \pst@tempd \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
}
\def\psellipticarc@draw{%
0 0 1
@@ -2516,7 +2684,7 @@ pop
EllipticArcArrow
\fi
/mtrx CM def
- x y T
+ xOrig yOrig T
rx ry scale
\if@psarcn arcn \else arc \fi
mtrx setmatrix%
@@ -2524,7 +2692,7 @@ pop
\def\psellipticarc@showpoints{%
gsave
/mtrx CM def
- x y T
+ xOrig yOrig T
rx ry scale
0 0 moveto
0 0 1 \pst@tempc \pst@tempd
@@ -2538,32 +2706,34 @@ pop
\def\pscircle{\pst@object{pscircle}}
\def\pscircle@i{\@ifnextchar({\pscircle@do}{\pscircle@do(0,0)}}
\def\pscircle@do(#1)#2{%
-\if@star
-{\use@par\qdisk(#1){#2}}%
-\else
-\begin@ClosedObj
-\pst@@getcoor{#1}%
-\pssetlength\pst@dimc{#2}%
-\def\pst@linetype{4}%
-\addto@pscode{%
-\pst@coor
-\pst@number\pst@dimc
-\psk@dimen CLW mul sub
-0 360 arc
-closepath}%
-\showpointsfalse
-\end@ClosedObj
-\fi
-\ignorespaces}
+ \if@star{\use@par\qdisk(#1){#2}}% qdisk does not allow
+ \else% to use opacity option
+ \begin@ClosedObj
+ \pst@@getcoor{#1}%
+ \pssetlength\pst@dimc{#2}%
+ \def\pst@linetype{4}%
+ \addto@pscode{
+ \pst@coor
+ \pst@number\pst@dimc
+ \psk@dimen CLW mul sub
+ 0 360 arc
+ closepath }%
+ \showpointsfalse
+ \end@ClosedObj
+ \fi
+ \ignorespaces}
+%
\def\qdisk(#1)#2{%
-\def\pst@par{}%
-\begin@SpecialObj
-\pst@@getcoor{#1}%
-\pssetlength\pst@dimg{#2}%
-\addto@pscode{\pst@coor \pst@number\pst@dimg \tx@SD}%
-\end@SpecialObj}
+ \def\pst@par{}%
+ \begin@SpecialObj
+ \pst@@getcoor{#1}%
+ \pssetlength\pst@dimg{#2}%
+ \addto@pscode{ \pst@coor \pst@number\pst@dimg \tx@SD }%
+ \end@SpecialObj}
+%
\def\psset@radius#1{\pst@@getlength{#1}\psk@radius}
\psset@radius{.25cm}
+%
\def\psCircle{\pst@object{psCircle}}
\def\psCircle@i{\@ifnextchar({\psCircle@ii}{\psCircle@ii(0,0)}}
\def\psCircle@ii(#1){\pscircle@do(#1){\psk@radius}}
@@ -2642,29 +2812,29 @@ closepath}%
\ignorespaces}
\def\psscalebox#1{\pst@makebox{\ps@scalebox{#1}}}
\def\ps@scalebox#1{%
- \begingroup
- \pst@getscale{#1}\pst@tempa
- \let\pst@tempc\pst@tempg
- \let\pst@tempd\pst@temph
- \ps@@scalebox
+ \begingroup%
+ \pst@getscale{#1}\pst@tempa%
+ \let\pst@tempc\pst@tempg%
+ \let\pst@tempd\pst@temph%
+ \ps@@scalebox%
\endgroup}
\def\ps@@scalebox{%
- \leavevmode
+ \leavevmode%
\hbox{%
- \ifdim\pst@tempd\p@<\z@
- \pst@dimg=\pst@tempd\ht\pst@hbox
- \pst@dimh=\pst@tempd\dp\pst@hbox
- \dp\pst@hbox=-\pst@dimg
- \ht\pst@hbox=-\pst@dimh
- \else
- \ht\pst@hbox=\pst@tempd\ht\pst@hbox
- \dp\pst@hbox=\pst@tempd\dp\pst@hbox
- \fi
- \pst@dima=\pst@tempc\wd\pst@hbox
- \ifdim\pst@dima<\z@\kern-\pst@dima\fi
+ \ifdim\pst@tempd\p@<\z@%
+ \pst@dimg=\pst@tempd\ht\pst@hbox%
+ \pst@dimh=\pst@tempd\dp\pst@hbox%
+ \dp\pst@hbox=-\pst@dimg%
+ \ht\pst@hbox=-\pst@dimh%
+ \else%
+ \ht\pst@hbox=\pst@tempd\ht\pst@hbox%
+ \dp\pst@hbox=\pst@tempd\dp\pst@hbox%
+ \fi%
+ \pst@dima=\pst@tempc\wd\pst@hbox%
+ \ifdim\pst@dima<\z@\kern-\pst@dima\fi%
\pst@Verb{CP CP translate \pst@tempa \tx@NET}%
\hbox to \z@{\box\pst@hbox\hss}%
- \pst@Verb{%
+ \pst@Verb{
CP CP translate
1 \pst@tempc div 1 \pst@tempd div scale
\tx@NET}%
@@ -2769,6 +2939,7 @@ closepath}%
\def\getref@l{\def\psk@xref{0}}
\def\getref@r{\def\psk@xref{1}}
\psset@ref{c}
+%
\def\psset@rot#1{%
\pst@expandafter{\@ifnextchar*{\psset@@@rot}{\psset@@rot}}{#1}\@nil}
\def\psset@@rot#1\@nil{%
@@ -2806,9 +2977,9 @@ closepath}%
}
\def\psput@special#1{%
\hbox{%
- \pst@Verb{{ \pst@coor } \tx@PutCoor \tx@PutBegin}%
+ \pst@Verb{{ \pst@coor } \tx@PutCoor \tx@PutBegin }%
\box#1%
- \pst@Verb{\tx@PutEnd}%
+ \pst@Verb{ \tx@PutEnd }%
}%
}
\def\tx@PutCoor{PutCoor }
@@ -2971,31 +3142,33 @@ closepath}%
\ifnum#2=2 \vskip\pslabelsep\else\vss\fi}}
\def\tx@Uput{Uput }
\def\tx@UUput{UUput }
+%
\def\Rput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\Rput@ii}{\Rput@i}}}
\def\Rput@i#1{\addto@par{labelsep=#1}\Rput@ii}
\def\Rput@ii[#1]{\addto@par{ref={#1}}\@ifnextchar({\Rput@iv}{\Rput@iii}}
\def\Rput@iii#1{\addto@par{rot={#1}}\@ifnextchar({\Rput@iv}{\Rput@iv(\z@,\z@)}}
\def\Rput@iv(#1){\pst@killglue\pst@makebox{\Rput@v{#1}}}
\def\Rput@v#1{%
-\begingroup
-\use@par
-\if@star\pst@starbox\fi
-\Rput@vi
-\pst@makesmall\pst@hbox
-\pst@rotate\psk@rot\pst@hbox
-\psput@{#1}\pst@hbox
-\endgroup
-\ignorespaces}
+ \begingroup
+ \use@par
+ \if@star\pst@starbox\fi
+ \Rput@vi
+ \pst@makesmall\pst@hbox
+ \pst@rotate\psk@rot\pst@hbox
+ \psput@{#1}\pst@hbox
+ \endgroup
+ \ignorespaces}
+%
\def\Rput@vi{%
-\pst@dimg=\dp\pst@hbox
-\advance\pst@dimg\pslabelsep
-\dp\pst@hbox=\pst@dimg
-\pst@dimg=\ht\pst@hbox
-\advance\pst@dimg\pslabelsep
-\ht\pst@hbox=\pst@dimg
-\setbox\pst@hbox\hbox{\kern\pslabelsep\box\pst@hbox\kern\pslabelsep}}%
-\def\oldpsput{%
-\def\pst@par{}\pst@ifstar{\@ifnextchar[{\oldpsput@i}{\oldpsput@ii}}}
+ \pst@dimg=\dp\pst@hbox
+ \advance\pst@dimg\pslabelsep
+ \dp\pst@hbox=\pst@dimg
+ \pst@dimg=\ht\pst@hbox
+ \advance\pst@dimg\pslabelsep
+ \ht\pst@hbox=\pst@dimg
+ \setbox\pst@hbox\hbox{\kern\pslabelsep\box\pst@hbox\kern\pslabelsep}}%
+%
+\def\oldpsput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\oldpsput@i}{\oldpsput@ii}}}
\def\oldpsput@i[#1]{\addto@par{ref={#1}}\oldpsput@ii}
\def\oldpsput@ii{\@ifnextchar<{\oldpsput@iii}{\oldpsput@iv}}
\def\oldpsput@iii<#1>{\rput@iii{#1}}
@@ -3007,19 +3180,22 @@ closepath}%
\newif\ifshowgrid
\def\psset@showgrid#1{\@nameuse{showgrid#1}}
\psset@showgrid{false}
-\newdimen\psk@shift
+%
+\newdimen\pst@shift
\def\psset@shift#1{\pssetlength\pst@dimg{#1}%
- \psk@shift\pst@dimg}
-% \global\psk@shift\pst@dimg}
+ \pst@shift\pst@dimg}
+% \global\pst@shift\pst@dimg}
\psset@shift{0}
% ----------- 1.10/12 end hv -------------------
%
+%
+%------------------------------- pspicture ------------------------------
+%
\def\pspicture{\begingroup\pst@ifstar\pst@picture}
-\def\pst@picture{%
-\@ifnextchar[{\pst@@picture}{\pst@@picture[]}}
-\def\pst@@picture[#1]#2(#3,#4){%
-\@ifnextchar({\pst@@@picture[#1](#3,#4)}%
-{\pst@@@picture[#1](0,0)(#3,#4)}}
+\def\pst@picture{\@ifnextchar[{\pst@@picture}{\pst@@picture[]}}
+\def\pst@@picture[#1]#2(#3,#4){\@ifnextchar(%
+ {\pst@@@picture[#1](#3,#4)}%
+ {\pst@@@picture[#1](0,0)(#3,#4)}}
%
\def\pst@@@picture[#1](#2,#3)(#4,#5){%
\pssetxlength\pst@dima{#2}%
@@ -3052,7 +3228,7 @@ closepath}%
\newdimen\pst@shift
\def\endpspicture{%
\pst@killglue
- \global\pst@shift=\psk@shift% in fact of the following endgroup
+ \global\pst@shift=\pst@shift% in fact of the following endgroup
\endgroup
\egroup
\ifdim\wd\pst@hbox=\z@\else
@@ -3076,13 +3252,16 @@ closepath}%
\if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi
\leavevmode\box\pst@hbox
\endgroup%
- \global\psk@shift\z@% restore value
+ \global\pst@shift\z@% restore value
}
\@namedef{pspicture*}{\pspicture*}
\@namedef{endpspicture*}{\endpspicture}
%
+%------------------------------- Overlays ------------------------------
+%
\def\tx@BeginOL{BeginOL }
\def\tx@InitOL{InitOL }
+%
\def\pst@initoverlay#1{\pst@Verb{\tx@InitOL /TheOL (#1) def}}
\def\AltOverlayMode{%
\def\pst@initoverlay##1{%
@@ -3093,14 +3272,17 @@ closepath}%
CP newpath OLUnit itransform moveto clip newpath moveto
} def
/TheOL (##1) def}}}
+%
\def\pst@overlay#1{%
\edef\curr@overlay{#1}%
\pst@Verb{(#1) BOL}%
\aftergroup\pst@endoverlay}
-\def\pst@endoverlay{%
- \pst@Verb{(\curr@overlay) BOL}}
+%
+\def\pst@endoverlay{\pst@Verb{(\curr@overlay) BOL}}
\def\curr@overlay{all}
+%
\newbox\theoverlaybox
+%
\def\overlaybox{%
\global\setbox\theoverlaybox=\hbox\bgroup
\begingroup
@@ -3112,12 +3294,16 @@ closepath}%
before using \string\putoverlaybox}}%
\psoverlay{main}%
\ignorespaces}
+%
\def\endoverlaybox{\endgroup\egroup}
\def\putoverlaybox#1{%
-\hbox{\pst@initoverlay{#1}\copy\theoverlaybox}}
+ \hbox{\pst@initoverlay{#1}\copy\theoverlaybox}}
+%
\def\psoverlay{\@pstrickserr{\string\psoverlay\space
-can only be used after \string\overlaybox}}
+ can only be used after \string\overlaybox}}
+%
\ifx\pstcustomize\relax \input pstricks.con \fi
+%
\catcode`\@=\PstAtCode\relax
%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pstricks/vtex.con b/Master/texmf-dist/tex/generic/pstricks/vtex.con
index 430f35a50fd..c5016c1a27a 100644
--- a/Master/texmf-dist/tex/generic/pstricks/vtex.con
+++ b/Master/texmf-dist/tex/generic/pstricks/vtex.con
@@ -2,12 +2,12 @@
%%
%% Configuration file for PSTricks 97
%%
-%% Version 97 patch 4 (11-17-99)
+%% Version 97 patch 5 2003-04-29
%%
%% For use with VTeX PostScript driver v 6.61+
%% [MV, MK, special thanks to Denis Girou for help]
%%
-%% Requires vtex.def 6.61 or newer
+%% Requires vtex.def 7.46 or newer, 10-14-01
%%
%% For support and possible updates, check
%% http://www.micropress-inc.com
@@ -16,28 +16,22 @@
\def\pstdriver{VTeX}
{\catcode`\"=12\gdef
\pstverb#1{%
-\ifnum\OpMode=1
- \special{pS*#1}% //Raw: PDFmode only.
-\else
- \special{pS: GS }%
- \special{pS: #1}%
- \special{pS: GR }%
-\fi
- }}
+ \special{pS*GS @beginspecial @setspecial #1 @endspecial GR }%
+}}%
\def\pstunit{1bp}%
-\def\pstVerb#1{\special{pS: #1}}
-\def\pstVerb#1{%
- \special{pS: #1}%
- }
+\def\pstVerb#1{\special{pS: #1}}%
\def\pstverbscale{SDict begin normalscale end}
\ifx\textsuperscript\@undefined
\def\pstheader#1{\special{header=#1}}
\else
- \ifx\Gin@PS@file@header\@undefined
- \def\pstheader#1{\AtBeginDvi{\special{header=#1}}}
- \else
- \let\pstheader\Gin@PS@file@header
- \fi
+% D.G. modification begin - Apr. 29, 2003 - From Michael Vulis
+% \ifx\Gin@PS@file@header\@undefined
+% \def\pstheader#1{\AtBeginDvi{\special{header=#1}}}
+% \else
+% \let\pstheader\Gin@PS@file@header
+% \fi
+ \def\pstheader#1{\AtBeginDvi{\immediate\special{header=#1}}}
+% D.G. modification end
\fi
\def\pstrotate{CP CP translate 3 -1 roll neg rotate \tx@NET}
%%
@@ -56,18 +50,22 @@
\@colorstacktrue
% D.G. modification begin - Nov. 17, 1999
\let\vtex@pspicture=\pspicture
-\def\pspicture{\@colorstackfalse\vtex@pspicture}
+\def\pspicture{\special{G(}\@colorstackfalse\vtex@pspicture}%
\let\vtex@endpspicture=\endpspicture
-\def\endpspicture{\vtex@endpspicture\@colorstacktrue}
+\def\endpspicture{\vtex@endpspicture\@colorstacktrue\special{G)}%
+}
% D.G. modification end
\fi
\fi
\pstcustomize
\def\tx@RotBegin{neg RotBegin }
+\def\pst@rotlist{mark RAngle /a ED cleartomark a }
% D.G. modification begin - Oct. 6, 1999
\def\tx@Rot{neg Rot }
% D.G. modification end
+\def\psfs@solid{\pst@fill{\pst@usecolor\psfillcolor fill }}
+\def\psfs@eofill{\pst@fill{\pst@usecolor\psfillcolor eofill}}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/pstricks/Changes b/Master/texmf-dist/tex/latex/pstricks/Changes
index e967adb415e..aa5a783cc1f 100644
--- a/Master/texmf-dist/tex/latex/pstricks/Changes
+++ b/Master/texmf-dist/tex/latex/pstricks/Changes
@@ -1,4 +1,10 @@
pstricks.sty --------
+0.36 2008-01-22 - Better error message, when the document
+ has the same name than a PSTricks file. (RN)
+0.35 2008-01-01 - add message for loading pstalpparser.pro
+ - add option vtex to disable opacity values
+0.34 2007-09-13 - add message for loading pstricks.pro
+ - and pst-dots.pro (hv)
0.33 2007-02-18 set initial color (hv)
0.32 2006-08-10 message for loading the pro file (hv)
0.31 2005-12-19 one more step to a better color support (hv)
@@ -11,9 +17,11 @@ pstricks.sty --------
0.21 2005-02-21 fix problem with \newrgbcolor (RN,hv)
pst-node.sty --------
+ 2007-09-13 add message for loading pst-node.pro (hv)
2006-01-01 message for loading the pro file
-
pst-all.sty --------
+ 2008-01-01 load pstricks-add
+ 2007-09-13 change order of the packages
2006-12-19 do not load pst-char, it is now part of pst-text
\ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/pstricks/pst-all.sty b/Master/texmf-dist/tex/latex/pstricks/pst-all.sty
index d2f7b46a518..8ac0ada25bf 100644
--- a/Master/texmf-dist/tex/latex/pstricks/pst-all.sty
+++ b/Master/texmf-dist/tex/latex/pstricks/pst-all.sty
@@ -4,27 +4,28 @@
%% IMPORTANT NOTICE:
%%
%% Copyright (C) 1997 Timothy Van Zandt
-%% Copyright (C) 2004 Herbert Voss <voss@perce.de>
-%% Rolf Niepraschk <Rolf.Niepraschk@ptb.de>
+%% Copyright (C) 2004-2008 Herbert Voss <voss@perce.de>
+%% Rolf Niepraschk <Rolf.Niepraschk@ptb.de>
%%
%% This package may be distributed under the terms of the LaTeX Project
%% Public License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
-\ProvidesPackage{pst-all}[2006/12/19 the main pstricks tools]
+\ProvidesPackage{pst-all}[2008/01/01 the main pstricks tools]
\RequirePackage{pstricks} % important
% this loads the xcolor package and pstricks in the right order
% and does some modification to the color handling. Look at the
% doc for the options.
%
-\RequirePackage{pst-grad}
+\RequirePackage{pst-node}
+\RequirePackage{pst-tree}
\RequirePackage{pst-plot}
+\RequirePackage{pst-grad}
\RequirePackage{pst-coil}
\RequirePackage{pst-text}
-\RequirePackage{pst-node}
\RequirePackage{pst-3d}
\RequirePackage{pst-eps}
\RequirePackage[tiling]{pst-fill}
-\RequirePackage{pst-tree}
+\RequirePackage{pstricks-add}
\RequirePackage{multido}
\endinput
diff --git a/Master/texmf-dist/tex/latex/pstricks/pst-node.sty b/Master/texmf-dist/tex/latex/pstricks/pst-node.sty
index 5b273bf28a2..e930966dc41 100644
--- a/Master/texmf-dist/tex/latex/pstricks/pst-node.sty
+++ b/Master/texmf-dist/tex/latex/pstricks/pst-node.sty
@@ -3,5 +3,8 @@
\input{pst-node.tex}
\ProvidesFile{pst-node.tex}
[\filedate\space \fileversion\space `pst-node' (tvz)]
-\IfFileExists{pst-node.pro}{\@addtofilelist{pst-node.pro}}{}%
+\IfFileExists{pst-node.pro}{%
+ \ProvidesFile{pst-node.pro}
+ [2008/01/01 v. 1.00, PostScript prologue file (hv)]
+ \@addtofilelist{pst-node.pro}}{}%
\endinput
diff --git a/Master/texmf-dist/tex/latex/pstricks/pstricks.sty b/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
index e7d3cdc2f6d..4b5b9197b00 100644
--- a/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
+++ b/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
@@ -5,7 +5,7 @@
%%
%% pstricks.sty Copyright (C) 1997 Timothy Van Zandt
%% pstcol.sty Copyright (C) 1994-1996 1999 David Carlisle
-%% pstricks.sty Copyright (C) 2004-2007 Herbert Voss <voss@perce.de>
+%% pstricks.sty Copyright (C) 2004-2008 Herbert Voss <voss@perce.de>
%% Rolf Niepraschk <Rolf.Niepraschk@ptb.de>
%%
%% This package may be distributed under the terms of the LaTeX Project
@@ -16,7 +16,21 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pstricks}
- [2007/02/18 v0.33 LaTeX wrapper for `PSTricks' (RN,HV)]
+ [2008/01/22 v0.36 LaTeX wrapper for `PSTricks' (RN,HV)]
+%
+\def\documentclass{
+ \edef\@tempa{\jobname.tex }%
+ \edef\@tempb{\@filef@und}%
+ \@onelevel@sanitize\@tempa
+ \@onelevel@sanitize\@tempb
+ \ifx\@tempa\@tempb
+ \@latex@error
+ {`\jobname.tex' is a forbidden name for your document}%
+ {Choose another name for your document}\@gobble
+ \else
+ \@twoclasseserror
+ \fi
+}
%
\DeclareOption{plain}{%
\input{pstricks.tex}
@@ -34,7 +48,18 @@
\input{pstricks.tex}
\ProvidesFile{pstricks.tex}
[\filedate\space v\fileversion\space `PSTricks' (tvz)]
- \IfFileExists{pstricks.pro}{\@addtofilelist{pstricks.pro}}{}%
+ \IfFileExists{pstricks.pro}{%
+ \ProvidesFile{pstricks.pro}
+ [2008/01/01 v. 1.03, 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}}{}%
{%
\let\psscalebox=\scalebox
\let\psscaleboxto=\scaleboxto
@@ -50,6 +75,11 @@
\newif\ifpst@DIA\pst@DIAfalse
\DeclareOption{DIA}{\pst@DIAtrue}
\DeclareOption{noxcolor}{\def\pst@ColorPackage{color}}
+\DeclareOption{vtex}{%
+% \def\psfs@solid{\pst@fill{\pst@usecolor\psfillcolor fill }}
+% \def\psfs@eofill{\pst@fill{\pst@usecolor\psfillcolor eofill }}
+% \def\psfs@shape{\pst@fill{\pst@usecolor\psfillcolor fill }}
+}
\DeclareOption*{%
\PassOptionsToPackage\CurrentOption{\pst@ColorPackage}}
\ProcessOptions\relax