texlive[61445] Master/texmf-dist: pstricks (30dec21)
commits+karl at tug.org
commits+karl at tug.org
Thu Dec 30 22:18:55 CET 2021
Revision: 61445
http://tug.org/svn/texlive?view=revision&revision=61445
Author: karl
Date: 2021-12-30 22:18:55 +0100 (Thu, 30 Dec 2021)
Log Message:
-----------
pstricks (30dec21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/generic/pstricks/README
trunk/Master/texmf-dist/doc/generic/pstricks/pst-news21.pdf
trunk/Master/texmf-dist/doc/generic/pstricks/pst-news21.tex
trunk/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
trunk/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
Modified: trunk/Master/texmf-dist/doc/generic/pstricks/README
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pstricks/README 2021-12-30 17:48:23 UTC (rev 61444)
+++ trunk/Master/texmf-dist/doc/generic/pstricks/README 2021-12-30 21:18:55 UTC (rev 61445)
@@ -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.
Modified: trunk/Master/texmf-dist/doc/generic/pstricks/pst-news21.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/generic/pstricks/pst-news21.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pstricks/pst-news21.tex 2021-12-30 17:48:23 UTC (rev 61444)
+++ trunk/Master/texmf-dist/doc/generic/pstricks/pst-news21.tex 2021-12-30 21:18:55 UTC (rev 61445)
@@ -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 @@
The dot part is now in an own file \texttt{pstricks-dots.tex}.
+
+
+
+
%--------------------------------------------------------------------------------------
\section{\texttt{pstricks.sty}}
%--------------------------------------------------------------------------------------
@@ -45,9 +49,99 @@
%--------------------------------------------------------------------------------------
-\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:
Modified: trunk/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pstricks/pstricks.tex 2021-12-30 17:48:23 UTC (rev 61444)
+++ trunk/Master/texmf-dist/tex/generic/pstricks/pstricks.tex 2021-12-30 21:18:55 UTC (rev 61445)
@@ -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 at addfams{pstricks}
%
%\define at 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 at tempc{#2}%
\expandafter\errhelp\expandafter{\pst at tempc}%
@@ -1520,6 +1520,7 @@
\ignorespaces}
%
\def\pst at code{}%
+%
\def\init at pscode{%
\addto at pscode{%
\pst at number\pslinewidth SLW
@@ -1526,6 +1527,7 @@
\pst at usecolor\pslinecolor}%
}
\def\addto at pscode#1{\xdef\pst at code{\pst at code#1\space}}
+%
\def\use at pscode{%
\pstverb{
\pst at dict
@@ -4052,7 +4054,9 @@
}
\define at key[psset]{pstricks}{showgrid}[b]{\expandafter\pst@@showgrid#1!!\@nil}
-\psset[pstricks]{showgrid=f}
+\define at boolkey[psset]{pstricks}[Pst@]{showframe}[true]{}
+\define at boolkey[psset]{pstricks}[Pst@]{calcframe}[true]{}
+\psset[pstricks]{showgrid=f,showframe=false,calcframe=false}
\define at boolkey[psset]{pstricks}[Pst@]{pgffunctions}[true]{}
\psset[pstricks]{pgffunctions=false}
@@ -4072,9 +4076,51 @@
%
%------------------------------- pspicture ------------------------------
%
+\def\ps at readmargin#1,#2,#3,#4,#5\@nil{%
+ \ifx\\#2\\
+% \typeout{>>> Case 1 para}%
+ \pst at getlength{#1}\ps at margin@left
+ \let\ps at margin@right\ps at margin@left
+ \let\ps at margin@top\ps at margin@left
+ \let\ps at margin@bottom\ps at margin@left
+ \else
+ \ifx\\#3\\%
+% \typeout{>>> Case 2 para: #1,#2}%
+ \pst at getlength{#1}\ps at margin@left
+ \def\ps at margin@right{0}%
+ \pst at getlength{#2}\ps at margin@bottom
+ \def\ps at margin@top{0}
+ \else
+% \typeout{>>> Case 4 para: #1,#2,#3,#4}%
+ \pst at getlength{#1}\ps at margin@left
+ \pst at getlength{#2}\ps at margin@bottom
+ \pst at getlength{#3}\ps at margin@right
+ \pst at getlength{#4}\ps at margin@top
+ \fi\fi
+%\typeout{>>>>>>>>>\ps at margin@left,\ps at margin@bottom,\ps at margin@right,\ps at margin@top}%
+}%
+\define at key[psset]{pstricks}{margin}[0pt]{\ps at readmargin#1,,,,\@nil}
+\psset[pstricks]{margin=0pt}
+%
+\newcount\ps at imagectr
+\ps at imagectr=0
+%\newif\ifPst at findcoor
+%\Pst at findcoorfalse
+%
+
\def\pspicture{\begingroup\pst at ifstar\pst at picture}
\def\pst at picture{\@ifnextchar[{\pst@@picture}{\pst@@picture[]}}
-\def\pst@@picture[#1]{\@ifnextchar({\pst@@picture at i[#1]}{\pst@@picture at i[#1](10,10)}}%
+\def\pst@@picture[#1]{\@ifnextchar({\pst@@picture at i[#1]}{\pst@@picture@@i[#1]}}%
+\def\pst@@picture@@i[#1]{%
+ \gdef\pscoor{(10,10)}%
+ \ifPst at calcframe
+ \typeout{>>>Check for file \jobname-\the\numexpr\ps at imagectr+1.psaux}%
+ \IfFileExists{\jobname-\the\numexpr\ps at imagectr+1.psaux}{\input{\jobname-\the\numexpr\ps at imagectr+1.psaux}}{}%
+ % \typeout{>>>\pscoor}%
+ \fi
+ \edef\@temp{[\noexpand#1]\pscoor}%
+ \expandafter\pst@@picture at i\@temp}
+%
\def\pst@@picture at 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 @@
\ifshowgrid\ifnum\showgridp at s=0\psgrid[style=gridstyle]\fi\fi
% ----------- 1.10/12 end hv -------------------
\ignorespaces% % 2008-12-07
+ \ifPst at calcframe\pstVerb{ .trackbbox }\global\advance\ps at imagectr by 1 \fi
\ifPst at pgffunctions\pstVerb{ pgffunctions }\fi% hv 2013-04-17
}
\def\pic at coor{(0,0)(0,0)(10,10)}
\def\endpspicture{%
+ \ifPst at 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 at 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 at margin@top\space add \ps at margin@bottom\space add 4 1 roll % y1 x0 y0 x1
+ \ps at margin@right\space add \ps at margin@left\space add 4 1 roll % x1 y1 x0 y0
+ \ps at margin@bottom\space sub 4 1 roll % y0 x1 y1 x0
+ \ps at margin@left\space sub 4 1 roll % x0 y0 x1 y1
+ [3 3] 0 setdash rectstroke
+ grestore
+ \fi
+ (\jobname-\the\ps at imagectr.psaux) (w) file /CoorFile exch def
+ (\\gdef\\pscoor{\string\() CoorFile exch writestring
+ XMIN \ps at margin@left\space sub 20 string cvs CoorFile exch writestring
+ (pt, ) CoorFile exch writestring
+ YMIN \ps at margin@bottom\space sub 20 string cvs CoorFile exch writestring
+ (pt\string\)\string\() CoorFile exch writestring
+ XMAX \ps at margin@right\space add 20 string cvs CoorFile exch writestring
+ (pt, ) CoorFile exch writestring
+ YMAX \ps at margin@top\space add 20 string cvs CoorFile exch writestring
+ (pt\string\)}\% ) CoorFile exch writestring
+ CoorFile closefile
+ }%
+ \else
+ \global\Pst at calcframefalse
+ \PackageError{PSTricks}{You need to run lualatex for calculating the bounding box or set calcframe=false}{}%\@ehpa
+ \fi
+ \fi
\ifshowgrid\ifnum\showgridp at s>0
\psgrid[xunit=\sh at wgridXunit,yunit=\sh at wgridYunit,style=gridstyle]\fi\fi
\pst at killglue
Modified: trunk/Master/texmf-dist/tex/latex/pstricks/pstricks.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pstricks/pstricks.sty 2021-12-30 17:48:23 UTC (rev 61444)
+++ trunk/Master/texmf-dist/tex/latex/pstricks/pstricks.sty 2021-12-30 21:18:55 UTC (rev 61445)
@@ -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{%
More information about the tex-live-commits
mailing list.