diff options
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks/Changes.dvips | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks/pst-news12.pdf | bin | 0 -> 61370 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks/pst-news12.tex | 137 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pstricks/pst-tools.pro | 156 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pstricks/pstricks.pro | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg | 1 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks/pstricks.tex | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pstricks/pstricks.sty | 2 |
8 files changed, 300 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks/Changes.dvips b/Master/texmf-dist/doc/generic/pstricks/Changes.dvips index 5168b8fd942..7e925d91bb2 100644 --- a/Master/texmf-dist/doc/generic/pstricks/Changes.dvips +++ b/Master/texmf-dist/doc/generic/pstricks/Changes.dvips @@ -40,6 +40,7 @@ 0.01 2008-01-01 initial version (hv) ---- pst-tools.pro +0.02 2012-01-01 moved some stuff from pst-func.pro 0.01 2011-04-23 initial version (hv) ---- pstricks97.pro diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news12.pdf b/Master/texmf-dist/doc/generic/pstricks/pst-news12.pdf Binary files differnew file mode 100644 index 00000000000..56e78298a7f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/pst-news12.pdf diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news12.tex b/Master/texmf-dist/doc/generic/pstricks/pst-news12.tex new file mode 100644 index 00000000000..55025792662 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/pst-news12.tex @@ -0,0 +1,137 @@ +%% $Id: pst-news09.tex 62 2008-11-25 19:52:07Z herbert $ +\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings + headexclude,footexclude,oneside]{pst-doc} +\listfiles +\let\Lfile\LFile +\usepackage[utf8]{inputenc} +\usepackage{pst-node} +\usepackage{xkvview} +\let\pstnodeFV\fileversion +\let\pstnodeFD\filedate +\renewcommand\bgImage{\psscalebox{15}{\color{blue!20}2012}} +\def\textat{\char064} +\lstset{explpreset={pos=l,width=-99pt,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={}}, + escapechar=?} +\begin{document} + +%\psset{PstDebug=1} +\title{\texttt{News -- 2012}\\ \Large new macros and bugfixes for the +basic package \nxLFile{pstricks}} +\author{Herbert Voß} +\date{\today} + +\maketitle + +\clearpage +\tableofcontents + +\clearpage +\part{\texttt{pstricks} -- package} + +\section{General} +There exists a new document class \LClass{pst-doc} for writing PSTricks documentations, +like this news document. It depends on the KOMA-Script document class \LClass{scrartcl}. +\LClass{pst-doc} defines a lot of special macros to create a good index. Take one of +the already existing package documentation and look into the source file. Then it will be +easy to understand, how all these macros have to be used. + +When running \Lprog{pdflatex} the title page is created with boxes and inserted +with the macro \Lcs{AddToShipoutPicture} from the package \LPack{eso-pic}. It +inserts the background title page image \Lfile{pst-doc-pdf} to use directly +\Lprog{pdflatex}. +When running \Lprog{latex} the title page + is created with \PST\ macros.This allows to use the Perl script \Lprog{pst2pdf} or +the package \LPack{pst-pdf} or \LPack{auto-pst-pdf} or any other program/package which +supports \PS\ code in the document. + + +%-------------------------------------------------------------------------------------- +\section{\texttt{pstricks.sty}} +%-------------------------------------------------------------------------------------- +\subsection{New optional argument} + + +%-------------------------------------------------------------------------------------- +\section{\texttt{pstricks.tex} (\pstricksFV -- \pstricksFD)} +%-------------------------------------------------------------------------------------- + +\section{The PostScript header files} +\subsection{\nxLFile{pstricks.pro}} +%-------------------------------------------------------------------------------------- + +The file \Lfile{pst-tools.pro} contains additional helper functions: + +\begin{lstlisting} +/factorial { % n on stack, returns n! +/MoverN { % m n on stack, returns the binomial coefficient m over n +/cxadd { % [a1 b1] [a2 b2] = [a1+a2 b1+b2] +/cxneg { % [a b] +/cxsub { cxneg cxadd } def % same as negative addition +/cxmul { % [a1 b1] [a2 b2] +/cxsqr { % [a b] square root +/cxsqrt { % [a b] +/cxarg { % [a b] +/cxlog { % [a b] +/cxnorm2 { % [a b] +/cxnorm { % [a b] +/cxconj { % conjugent complex +/cxre { 0 get } def % real value +/cxim { 1 get } def % imag value +/cxrecip { % [a b] +/cxmake1 { 0 2 array astore } def % make a complex number, real given +/cxmake2 { 2 array astore } def % dito, both given +/cxdiv { cxrecip cxmul } def +/cxrmul { % [a b] r +/cxrdiv { % [a b] r +/cxconv { % theta +/bubblesort { % on stack must be an array [ ... ] +/concatstringarray{ % [(a) (b) ... (z)] --> (ab...z) 20100422 +/dot2comma {% on stack a string (...) +\end{lstlisting} + + +%-------------------------------------------------------------------------------------- +%\subsection{\nxLFile{pst-algparser.pro}} +%-------------------------------------------------------------------------------------- + +%\section{\nxLcs{psforeach} and \nxLcs{psForeach}} +%-------------------------------------------------------------------------------------- + +\section{List of all optional arguments for \texttt{pstricks}} + +\makeatletter +\xkvview{family=pstricks,columns={key,type,default}} +\makeatother + + +\clearpage +\part{Other packages} +\section{\texttt{pst-node} -- version \pstnodeFV\ | \pstnodeFD} +The command \Lcs{pnode} now knows an optional argument for an offset, which +expects two values (x,y) separated by a comma: + +\begin{BDef} +\Lcs{pnode}\OptArg*{\Largs{\Larga{offset}}}\Largr{\CAny}\Largb{\Larga{node name}} +\end{BDef} + + +\begin{LTXexample}[width=6cm] +\begin{pspicture}[showgrid](0,-2)(6,2) +\pnode{A}\psdot(A)\uput[90](A){A} +\pnode[0,-2]{B}\psdot(B)\uput[90](B){B} +\pnode(2,0){C}\psdot(C)\uput[90](C){C} +\pnode[1,-2](2,0){D}\psdot(D)\uput[90](D){D} +\pnode[2,2](3.5,0){E}\psdot(E)\uput[90](E){E} +\end{pspicture} +\end{LTXexample} + + +\clearpage +\nocite{*} +\bibliographystyle{plain} +\bibliography{PSTricks} + +\printindex + + +\end{document} diff --git a/Master/texmf-dist/dvips/pstricks/pst-tools.pro b/Master/texmf-dist/dvips/pstricks/pst-tools.pro index 580f9381c3d..d463d158ff1 100644 --- a/Master/texmf-dist/dvips/pstricks/pst-tools.pro +++ b/Master/texmf-dist/dvips/pstricks/pst-tools.pro @@ -1,13 +1,165 @@ -% $Id: pst-tools.pro 490 2011-04-23 09:25:30Z herbert $ +% $Id: pst-tools.pro 622 2012-01-01 15:36:14Z herbert $ % %% PostScript tools prologue for pstricks.tex. -%% Version 0.01, 2011/04/23 +%% Version 0.02, 2012/01/01 %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives %% in directory macros/latex/base/lppl.txt. % % +/Pi2 1.57079632679489661925640 def +/factorial { % n on stack, returns n! + dup 0 eq { 1 }{ + dup 1 gt { dup 1 sub factorial mul } if } + ifelse } def +% +/MoverN { % m n on stack, returns the binomial coefficient m over n + 2 dict begin + /n exch def /m exch def + n 0 eq { 1 }{ + m n eq { 1 }{ + m factorial n factorial m n sub factorial mul div } ifelse } ifelse + end +} def +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% subroutines for complex numbers, given as an array [a b] +% which is a+bi = Real+i Imag +% +/cxadd { % [a1 b1] [a2 b2] = [a1+a2 b1+b2] + dup 0 get % [a1 b1] [a2 b2] a2 + 3 -1 roll % [a2 b2] a2 [a1 b1] + dup 0 get % [a2 b2] a2 [a1 b1] a1 + 3 -1 roll % [a2 b2] [a1 b1] a1 a2 + add % [a2 b2] [a1 b1] a1+a2 + 3 1 roll % a1+a2 [a2 b2] [a1 b1] + 1 get % a1+a2 [a2 b2] b1 + exch 1 get % a1+a2 b1 b2 + add 2 array astore +} def +% +/cxneg { % [a b] + dup 1 get % [a b] b + exch 0 get % b a + neg exch neg % -a -b + 2 array astore +} def +% +/cxsub { cxneg cxadd } def % same as negative addition +% +% [a1 b1][a2 b2] = [a1a2-b1b2 a1b2+b1a2] = [a3 b3] +/cxmul { % [a1 b1] [a2 b2] + dup 0 get % [a1 b1] [a2 b2] a2 + exch 1 get % [a1 b1] a2 b2 + 3 -1 roll % a2 b2 [a1 b1] + dup 0 get % a2 b2 [a1 b1] a1 + exch 1 get % a2 b2 a1 b1 + dup % a2 b2 a1 b1 b1 + 5 -1 roll dup % b2 a1 b1 b1 a2 a2 + 3 1 roll mul % b2 a1 b1 a2 b1a2 + 5 -2 roll dup % b1 a2 b1a2 b2 a1 a1 + 3 -1 roll dup % b1 a2 b1a2 a1 a1 b2 b2 + 3 1 roll mul % b1 a2 b1a2 a1 b2 a1b2 + 4 -1 roll add % b1 a2 a1 b2 b3 + 4 2 roll mul % b1 b2 b3 a1a2 + 4 2 roll mul sub % b3 a3 + exch 2 array astore +} def +% +% [a b]^2 = [a^2-b^2 2ab] = [a2 b2] +/cxsqr { % [a b] square root + dup 0 get exch 1 get % a b + dup dup mul % a b b^2 + 3 -1 roll % b b^2 a + dup dup mul % b b^2 a a^2 + 3 -1 roll sub % b a a2 + 3 1 roll mul 2 mul % a2 b2 + 2 array astore +} def +% +/cxsqrt { % [a b] +% dup cxnorm sqrt /r exch def +% cxarg 2 div RadtoDeg dup cos r mul exch sin r mul cxmake2 + cxlog % log[a b] + 2 cxrdiv % log[a b]/2 + aload pop exch % b a + 2.781 exch exp % b exp(a) + exch cxconv exch % [Re +iIm] exp(a) + cxrmul % +} def +% +/cxarg { % [a b] + aload pop % a b + exch atan % arctan b/a + DegtoRad % arg(z)=atan(b/a) +} def +% +% log[a b] = [a^2-b^2 2ab] = [a2 b2] +/cxlog { % [a b] + dup % [a b][a b] + cxnorm % [a b] |z| + log % [a b] log|z| + exch % log|z|[a b] + cxarg % log|z| Theta + cxmake2 % [log|z| Theta] +} def +% +% square of magnitude of complex number +/cxnorm2 { % [a b] + dup 0 get exch 1 get % a b + dup mul % a b^2 + exch dup mul add % a^2+b^2 +} def +% +/cxnorm { % [a b] + cxnorm2 sqrt +} def +% +/cxconj { % conjugent complex + dup 0 get exch 1 get % a b + neg 2 array astore % [a -b] +} def +% +/cxre { 0 get } def % real value +/cxim { 1 get } def % imag value +% +% 1/[a b] = ([a -b]/(a^2+b^2) +/cxrecip { % [a b] + dup cxnorm2 exch % n2 [a b] + dup 0 get exch 1 get % n2 a b + 3 -1 roll % a b n2 + dup % a b n2 n2 + 4 -1 roll exch div % b n2 a/n2 + 3 1 roll div % a/n2 b/n2 + neg 2 array astore +} def +% +/cxmake1 { 0 2 array astore } def % make a complex number, real given +/cxmake2 { 2 array astore } def % dito, both given +% +/cxdiv { cxrecip cxmul } def +% +% multiplikation by a real number +/cxrmul { % [a b] r + exch aload pop % r a b + 3 -1 roll dup % a b r r + 3 1 roll mul % a r b*r + 3 1 roll mul % b*r a*r + exch 2 array astore % [a*r b*r] +} def +% +% division by a real number +/cxrdiv { % [a b] r + 1 exch div % [a b] 1/r + cxrmul +} def +% +% exp(i theta) = cos(theta)+i sin(theta) polar<->cartesian +/cxconv { % theta + RadtoDeg dup sin exch cos cxmake2 +} def + %%%%% ### bubblesort ### %% syntax : array bubblesort --> array2 trie par ordre croissant %% code de Bill Casselman diff --git a/Master/texmf-dist/dvips/pstricks/pstricks.pro b/Master/texmf-dist/dvips/pstricks/pstricks.pro index a91ca474cff..707b9307f5d 100644 --- a/Master/texmf-dist/dvips/pstricks/pstricks.pro +++ b/Master/texmf-dist/dvips/pstricks/pstricks.pro @@ -1,4 +1,4 @@ -% $Id: pstricks.pro 594 2011-10-31 18:13:18Z herbert $ +% $Id: pstricks.pro 622 2012-01-01 15:36:14Z herbert $ % %% PostScript prologue for pstricks.tex. %% Version 1.09, 2011/10/31 @@ -361,9 +361,10 @@ tx@Dict begin /showpoints ED counttomark 2 div dup cvi /n ED % n 2 div on stack n eq not { exch pop } if % even numbers of points? delete one - showpoints - { ] aload /Points ED } - { n 2 mul 1 add -1 roll pop } ifelse % delete the mark symbol + ] aload /Points ED + showpoints not { Points aload pop } if +% { ] aload /Points ED } +% { n 2 mul 1 add -1 roll pop } ifelse % delete the mark symbol } def % /Line { diff --git a/Master/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg b/Master/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg index 351a17d869c..9ca3de516d5 100644 --- a/Master/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg +++ b/Master/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg @@ -153,6 +153,7 @@ \def\AltOverlayMode{} %The next line is not necessary, if pstricks.sty of [2007/02/18 v0.33] or newer is used. \@ifundefined{LaTeXe}{}{\AtBeginDocument{\psset{fillcolor=white}}} +% \endinput % % diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex index 9330cc4bab0..eb4ff0639cc 100644 --- a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex +++ b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex @@ -1926,7 +1926,6 @@ \immediate\closein1\relax} % \def\tx@NArray{NArray } -\def\tx@NArray{NArray } \def\tx@Line{Line } \def\tx@Arcto{Arcto } \def\tx@CheckClosed{CheckClosed } @@ -2287,8 +2286,8 @@ \else /Lineto /lineto load def \fi - \ifshowpoints true \else false \fi \tx@setlinejoin % hv 2007-10-13 + \ifshowpoints true \else false \fi } % \def\pst@isnum#1{\pst@isnum@i\zap@space#1 \@empty\@nil}% diff --git a/Master/texmf-dist/tex/latex/pstricks/pstricks.sty b/Master/texmf-dist/tex/latex/pstricks/pstricks.sty index 56b72ef7096..7ea5ccbf6eb 100644 --- a/Master/texmf-dist/tex/latex/pstricks/pstricks.sty +++ b/Master/texmf-dist/tex/latex/pstricks/pstricks.sty @@ -102,7 +102,7 @@ \@addtofilelist{pst-algparser.pro}}{}% \IfFileExists{pst-tools.pro}{% \ProvidesFile{pst-tools.pro} - [2011/04/23 v. 0.01, PostScript prologue file (hv)] + [2012/01/01 v. 0.02, PostScript prologue file (hv)] \@addtofilelist{pst-tools.pro}}{}% \IfFileExists{pst-dots.pro}{% \ProvidesFile{pst-dots.pro} |