summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/generic/pstricks/README2
-rw-r--r--Master/texmf-dist/doc/generic/pstricks/pst-news21.pdfbin129526 -> 2733392 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pstricks/pst-news21.tex102
-rw-r--r--Master/texmf-dist/tex/generic/pstricks/pstricks.tex102
-rw-r--r--Master/texmf-dist/tex/latex/pstricks/pstricks.sty3
5 files changed, 198 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks/README b/Master/texmf-dist/doc/generic/pstricks/README
index c824ddb9b1c..1fd4da8c3dc 100644
--- a/Master/texmf-dist/doc/generic/pstricks/README
+++ b/Master/texmf-dist/doc/generic/pstricks/README
@@ -1,4 +1,4 @@
-PSTricks 2021
+PSTricks 2022
This package may be distributed under the terms of the LaTeX Project
Public License, as described in lppl.txt in the base LaTeX distribution.
diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news21.pdf b/Master/texmf-dist/doc/generic/pstricks/pst-news21.pdf
index 4f6554e86fa..5559ed0837d 100644
--- a/Master/texmf-dist/doc/generic/pstricks/pst-news21.pdf
+++ b/Master/texmf-dist/doc/generic/pstricks/pst-news21.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news21.tex b/Master/texmf-dist/doc/generic/pstricks/pst-news21.tex
index de90a7cc5ce..510a7435b3f 100644
--- a/Master/texmf-dist/doc/generic/pstricks/pst-news21.tex
+++ b/Master/texmf-dist/doc/generic/pstricks/pst-news21.tex
@@ -1,14 +1,14 @@
-%% $Id: pst-news21.tex 263 2021-09-24 17:58:30Z herbert $
+%% $Id: pst-news21.tex 382 2021-12-29 19:19:18Z herbert $
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
\documentclass[11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small,
- headinclude=false,footinclude=false,twoside,usegeometry]{pst-doc}
+ headinclude=false,footinclude=false,twoside,usegeometry,dvipsnames]{pst-doc}
\usepackage{libertinus}
\usepackage{hvlogos}
\listfiles
%\usepackage[svgnames,dvipsnames,x11names,pspdf=-dALLOWPSTRANSPARENCY]{pstricks-pdf}
-\usepackage{showexpl,pst-arrow}
+\usepackage{showexpl,pst-arrow,pst-plot,pst-geometrictools}
\lstset{explpreset={pos=l,width=-99pt,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={},extendedchars},
escapechar=?}
@@ -36,6 +36,10 @@ lualatex it uses the OpenType version.
The dot part is now in an own file \texttt{pstricks-dots.tex}.
+
+
+
+
%--------------------------------------------------------------------------------------
\section{\texttt{pstricks.sty}}
%--------------------------------------------------------------------------------------
@@ -45,9 +49,99 @@ Otherwise the one from URW or the system is used, which is the default.
%--------------------------------------------------------------------------------------
-\section{\texttt{pstricks.tex} (v. 3.08 -- 2021/09/10)}
+\section{\texttt{pstricks.tex} (v. 3.12 -- 2021/12/29)}
%--------------------------------------------------------------------------------------
+
+\subsection{Coordinates}
+By default the coordinates \verb|(10,10)| are used if the environment \Lenv{pspicture}
+is called without any given coordinates. This behaviour can be changed if you are running
+the document with \Lprog{lualatex}. Then you can use the optional argument \Lkeyword{calcframe}
+to allow the internal calculation of the box width and height. it needs two \Lprog{lualatex}
+runs to get the coordinates. The values are written into a file \verb|\jobname-<No>.psaux| and read
+in the next run.
+
+With the optional argument \Lkeyword{margin} it is possible to add white space to the calculated coordinates.
+The keyword must be set with the command \Lcs{psset} \emph{before} the environment \Lenv{pspicture}, otherwise it is too late.
+
+\begin{itemize}
+\item \verb|margin=5mm| will add 5mm on all sides of the box.
+\item \verb|margin={5mm,1cm}| will add 5mm on the left side and 1cm on the lower side of the box.
+\item \verb|margin={2mm,3,4,5pt}| will add 2mm on the left, 3\Lcs{psunit} at the bottom, 4\Lcs{psunit} on
+the right and 5pt on the top of the box. With the optional argument \Lkeyword{showframe} the calculated
+box coordinates can be visible. Additional white space is marked by a box with dashed lines.
+\end{itemize}
+
+Without a given unit all values are used with the current defined PSTricks unit. But remember
+that this will only work with \Lprog{lualatex}.
+
+The following example shows the same curve, but with different coordinates.
+
+\begin{LTXexample}[pos=t,width=\linewidth]
+\def\dataV{6.8 -1 5.9 -2 5.4 -3 5.7 -4 6.2 -5} % original
+\def\dataW{6.8 4 5.9 3 5.4 2 5.7 1 6.2 0} % x>= 0
+\def\dataU{1.4 4 0.5 3 0 2 0.3 1 0.8 0} % x>=0 und y>=0
+\psset{calcframe,showframe}% must be set before pspicture
+X\begin{pspicture}[showgrid]
+ \listplot[plotstyle=curve, showpoints]{\dataU} \rput(1,-0.5){default dataU}
+\end{pspicture}X \hfill X%
+\begin{pspicture}[showgrid]
+ \listplot[plotstyle=curve, showpoints]{\dataW} \rput(6,-0.5){default dataW}
+\end{pspicture}X \hfill X%
+\begin{pspicture}[showgrid]
+ \listplot[plotstyle=curve, showpoints]{\dataV} \rput(6,-5.5){default dataV}
+\end{pspicture}X
+
+\vspace{1cm}
+X\begin{pspicture}[showgrid,margin=0.5]
+ \listplot[plotstyle=curve, showpoints]{\dataU} \rput(1,5){margin=0.5}
+\end{pspicture}X \hfill X%
+\begin{pspicture}[showgrid,margin={0.5,1}]
+ \listplot[plotstyle=curve, showpoints]{\dataW} \rput(6,4.5){margin={0.5 1}}
+\end{pspicture}X \hfill X%
+\begin{pspicture}[showgrid,margin={5mm,1,15mm,2}]
+ \listplot[plotstyle=curve, showpoints]{\dataV} \rput(6,-0.5){margin={5mm,1,15mm,2}}
+\end{pspicture}X
+\end{LTXexample}
+
+Only PSTricks objects are taken into account for calculating the bounding box. All stuff
+which is placed on \TeX-level like any text with for example \Lcs{rput} cannot not be
+used for calculating the correct coordinates. With setting additional whitespace with
+the optional argument \Lkeyword{margin} the boxsize can be modified.
+
+\newpsstyle{Parallelen}{country=G,ProLineCol=cyan,ProFillCol=gray!50,
+ OwnerTxt=Pythagoras,MadeTxt={Geodreieck},RulerFillCol=cyan!40}
+\psscalebox{0.5}{%
+ \psset{calcframe,margin=5mm}%
+ \begin{pspicture}[showgrid]% no coordinates are given
+ \pnode(5,5){A}\uput[90](A){A}
+ \pnode(-8,1){B}\uput[90](B){B}
+ \pnode(3,3){C}\uput[250](C){C}
+ \pcline[linecolor=BrickRed,nodesepA=-2,nodesepB=-2](A)(B)
+ \psParallels[style=Parallelen,RulerScale=0.75,ProScale=0.75](A)(B)(C)
+ \pcline[linecolor=BrickRed](GeodrB)(GeodrA)%
+ \midAB(GeodrB)(GeodrA){M}%
+ \psPencil[PenLength=5,pencilColA=red,PenScale=0.5]{60}(M)
+\end{pspicture}}
+
+
+\begin{lstlisting}
+\psscalebox{0.5}{%
+ \psset{calcframe}%
+ \begin{pspicture}[showgrid]% no coordinates are given
+ \pnode(5,5){A}\uput[90](A){A}
+ \pnode(-8,1){B}\uput[90](B){B}
+ \pnode(3,3){C}\uput[250](C){C}
+ \pcline[linecolor=BrickRed,nodesepA=-2,nodesepB=-2](A)(B)
+ \psParallels[style=Parallelen,RulerScale=0.75,ProScale=0.75](A)(B)(C)
+ \pcline[linecolor=BrickRed](GeodrB)(GeodrA)%
+ \midAB(GeodrB)(GeodrA){M}%
+ \psPencil[PenLength=5,pencilColA=red,PenScale=0.5]{60}(M)
+\end{pspicture}}
+\end{lstlisting}
+
+
+
\subsection{Colors}
There are two new macros to get the color values:
diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
index d98e5850694..7e4086edc17 100644
--- a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
+++ b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
@@ -81,8 +81,8 @@
\fi
\let\pgfforeach\foreach
%
-\def\fileversion{3.11}
-\def\filedate{2021/09/27}
+\def\fileversion{3.12}
+\def\filedate{2021/12/29}
\pst@addfams{pstricks}
%
%\define@boolkey[psset]{pstricks}[Pst@]{useURWfonts}[true]{}
@@ -184,7 +184,7 @@
% end bugfix
\typeout{`PSTricks' v\fileversion\space\space <\filedate> (tvz,hv)}
\def\@pstrickserr#1#2{%
- \begingroup
+ \beging roup
\newlinechar`\^^J
\edef\pst@tempc{#2}%
\expandafter\errhelp\expandafter{\pst@tempc}%
@@ -1520,12 +1520,14 @@
\ignorespaces}
%
\def\pst@code{}%
+%
\def\init@pscode{%
\addto@pscode{%
\pst@number\pslinewidth SLW
\pst@usecolor\pslinecolor}%
}
\def\addto@pscode#1{\xdef\pst@code{\pst@code#1\space}}
+%
\def\use@pscode{%
\pstverb{
\pst@dict
@@ -4052,7 +4054,9 @@ pop
}
\define@key[psset]{pstricks}{showgrid}[b]{\expandafter\pst@@showgrid#1!!\@nil}
-\psset[pstricks]{showgrid=f}
+\define@boolkey[psset]{pstricks}[Pst@]{showframe}[true]{}
+\define@boolkey[psset]{pstricks}[Pst@]{calcframe}[true]{}
+\psset[pstricks]{showgrid=f,showframe=false,calcframe=false}
\define@boolkey[psset]{pstricks}[Pst@]{pgffunctions}[true]{}
\psset[pstricks]{pgffunctions=false}
@@ -4072,9 +4076,51 @@ pop
%
%------------------------------- pspicture ------------------------------
%
+\def\ps@readmargin#1,#2,#3,#4,#5\@nil{%
+ \ifx\\#2\\
+% \typeout{>>> Case 1 para}%
+ \pst@getlength{#1}\ps@margin@left
+ \let\ps@margin@right\ps@margin@left
+ \let\ps@margin@top\ps@margin@left
+ \let\ps@margin@bottom\ps@margin@left
+ \else
+ \ifx\\#3\\%
+% \typeout{>>> Case 2 para: #1,#2}%
+ \pst@getlength{#1}\ps@margin@left
+ \def\ps@margin@right{0}%
+ \pst@getlength{#2}\ps@margin@bottom
+ \def\ps@margin@top{0}
+ \else
+% \typeout{>>> Case 4 para: #1,#2,#3,#4}%
+ \pst@getlength{#1}\ps@margin@left
+ \pst@getlength{#2}\ps@margin@bottom
+ \pst@getlength{#3}\ps@margin@right
+ \pst@getlength{#4}\ps@margin@top
+ \fi\fi
+%\typeout{>>>>>>>>>\ps@margin@left,\ps@margin@bottom,\ps@margin@right,\ps@margin@top}%
+}%
+\define@key[psset]{pstricks}{margin}[0pt]{\ps@readmargin#1,,,,\@nil}
+\psset[pstricks]{margin=0pt}
+%
+\newcount\ps@imagectr
+\ps@imagectr=0
+%\newif\ifPst@findcoor
+%\Pst@findcoorfalse
+%
+
\def\pspicture{\begingroup\pst@ifstar\pst@picture}
\def\pst@picture{\@ifnextchar[{\pst@@picture}{\pst@@picture[]}}
-\def\pst@@picture[#1]{\@ifnextchar({\pst@@picture@i[#1]}{\pst@@picture@i[#1](10,10)}}%
+\def\pst@@picture[#1]{\@ifnextchar({\pst@@picture@i[#1]}{\pst@@picture@@i[#1]}}%
+\def\pst@@picture@@i[#1]{%
+ \gdef\pscoor{(10,10)}%
+ \ifPst@calcframe
+ \typeout{>>>Check for file \jobname-\the\numexpr\ps@imagectr+1.psaux}%
+ \IfFileExists{\jobname-\the\numexpr\ps@imagectr+1.psaux}{\input{\jobname-\the\numexpr\ps@imagectr+1.psaux}}{}%
+ % \typeout{>>>\pscoor}%
+ \fi
+ \edef\@temp{[\noexpand#1]\pscoor}%
+ \expandafter\pst@@picture@i\@temp}
+%
\def\pst@@picture@i[#1]#2(#3,#4){\@ifnextchar(% ignore anything between [] and ()
{\pst@@@picture[#1](#3,#4)}%
{\pst@@@picture[#1](0,0)(#3,#4)}}
@@ -4106,11 +4152,57 @@ pop
\ifshowgrid\ifnum\showgridp@s=0\psgrid[style=gridstyle]\fi\fi
% ----------- 1.10/12 end hv -------------------
\ignorespaces% % 2008-12-07
+ \ifPst@calcframe\pstVerb{ .trackbbox }\global\advance\ps@imagectr by 1 \fi
\ifPst@pgffunctions\pstVerb{ pgffunctions }\fi% hv 2013-04-17
}
\def\pic@coor{(0,0)(0,0)(10,10)}
\def\endpspicture{%
+ \ifPst@calcframe
+ \ifPSTlualatex
+ \pstVerb{
+ .trackedbbox % xmin ymin xmax ymax
+ % Die Koordinaten sind relativ zur Seite, also verschieben wir sie
+ % zum aktuellen Punkt.
+ currentpoint matrix translate dup invertmatrix dup 4 1 roll
+ transform
+ /YMAX exch def /XMAX exch def
+ transform
+ /YMIN exch def /XMIN exch def
+ % Now we have all absolute coordinates
+ \ifPst@showframe
+ % Um jetzt an diesen Koordinaten zu zeichnen, ist das natürlich
+ % ungünstig und wir müssen zurück schieben... (Oder den Code
+ % umordnen, aber warum einfach wenns auch kompliziert geht ;P)
+ XMIN YMIN XMAX XMIN sub YMAX YMIN sub % lower left, width, height
+ 4 copy
+ gsave
+ currentpoint translate newpath rectstroke
+ newpath 0 0 moveto % x0 y0 x1 y1
+ \ps@margin@top\space add \ps@margin@bottom\space add 4 1 roll % y1 x0 y0 x1
+ \ps@margin@right\space add \ps@margin@left\space add 4 1 roll % x1 y1 x0 y0
+ \ps@margin@bottom\space sub 4 1 roll % y0 x1 y1 x0
+ \ps@margin@left\space sub 4 1 roll % x0 y0 x1 y1
+ [3 3] 0 setdash rectstroke
+ grestore
+ \fi
+ (\jobname-\the\ps@imagectr.psaux) (w) file /CoorFile exch def
+ (\\gdef\\pscoor{\string\() CoorFile exch writestring
+ XMIN \ps@margin@left\space sub 20 string cvs CoorFile exch writestring
+ (pt, ) CoorFile exch writestring
+ YMIN \ps@margin@bottom\space sub 20 string cvs CoorFile exch writestring
+ (pt\string\)\string\() CoorFile exch writestring
+ XMAX \ps@margin@right\space add 20 string cvs CoorFile exch writestring
+ (pt, ) CoorFile exch writestring
+ YMAX \ps@margin@top\space add 20 string cvs CoorFile exch writestring
+ (pt\string\)}\% ) CoorFile exch writestring
+ CoorFile closefile
+ }%
+ \else
+ \global\Pst@calcframefalse
+ \PackageError{PSTricks}{You need to run lualatex for calculating the bounding box or set calcframe=false}{}%\@ehpa
+ \fi
+ \fi
\ifshowgrid\ifnum\showgridp@s>0
\psgrid[xunit=\sh@wgridXunit,yunit=\sh@wgridYunit,style=gridstyle]\fi\fi
\pst@killglue
diff --git a/Master/texmf-dist/tex/latex/pstricks/pstricks.sty b/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
index b671da75805..f0062e953c2 100644
--- a/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
+++ b/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
@@ -1,4 +1,4 @@
-% $Id: pstricks.sty 263 2021-09-24 17:58:30Z herbert $
+% $Id: pstricks.sty 363 2021-12-28 14:08:58Z herbert $
%%
%% This is file `pstricks.sty'.
%%
@@ -17,6 +17,7 @@
\NeedsTeXFormat{LaTeX2e}
+
\ProvidesPackage{pstricks}[2021/08/23 v0.71 LaTeX wrapper for `PSTricks' (RN,HV)]
%
\def\documentclass{%