summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-09-14 03:03:34 +0000
committerNorbert Preining <norbert@preining.info>2021-09-14 03:03:34 +0000
commit1666f2f182d9f9fb45ef8aa275b477d3264ef1cb (patch)
tree1f0104d5a5a8d31e9bc6671f2c1e72ed27a36ad7 /graphics
parente403b5892f209477e44b123a10b5b35cc425d8e9 (diff)
CTAN sync 202109140303
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pstricks/contrib/pst-tools/Changes1
-rw-r--r--graphics/pstricks/contrib/pst-tools/README8
-rw-r--r--graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.bib2
-rw-r--r--graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.pdfbin128099 -> 151064 bytes
-rw-r--r--graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.tex37
-rw-r--r--graphics/pstricks/contrib/pst-tools/dvips/pst-tools.pro8
-rw-r--r--graphics/pstricks/contrib/pst-tools/latex/pst-tools.sty2
-rw-r--r--graphics/pstricks/contrib/pst-tools/tex/pst-tools.tex41
8 files changed, 64 insertions, 35 deletions
diff --git a/graphics/pstricks/contrib/pst-tools/Changes b/graphics/pstricks/contrib/pst-tools/Changes
index e5c3d94727..f741afb493 100644
--- a/graphics/pstricks/contrib/pst-tools/Changes
+++ b/graphics/pstricks/contrib/pst-tools/Changes
@@ -1,4 +1,5 @@
..... pst-tools.tex
+0.11 2021-09-13 - make it compatible to lualatex
0.10 2020-03-24 - added the random macros from random.tex which is no more
on TeXLive
0.09b 2017-12-03 - modified pro file
diff --git a/graphics/pstricks/contrib/pst-tools/README b/graphics/pstricks/contrib/pst-tools/README
index b1266c5b7f..e9f6540214 100644
--- a/graphics/pstricks/contrib/pst-tools/README
+++ b/graphics/pstricks/contrib/pst-tools/README
@@ -6,13 +6,11 @@ Save the files pst-tools.sty|pro|tex in a directory, which is part of your
local TeX tree. The pro file should go into $TEXMF/dvips/pstricks/
Then do not forget to run texhash to update this tree.
For more information see the documentation of your LATEX distribution
-on installing packages into your local TeX system or read the
-TeX Frequently Asked Questions:
-(http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages).
+on installing packages into your local TeX system
pst-tools needs pst-plot (pstricks-add) and pstricks, which should
be part of your local TeX installation, otherwise get it from a
-CTAN server, http://mirror.ctan.org
+CTAN server, https://mirror.ctan.org
PSTricks is PostScript Tricks, the documentation cannot be run
with pdftex, use the sequence latex->dvips->ps2pdf.
@@ -22,5 +20,5 @@ with pdftex, use the sequence latex->dvips->ps2pdf.
%% in directory macros/latex/base/lppl.txt.
-%% $Id: README 286 2010-02-11 09:40:41Z herbert $
+%% $Id: README 245 2021-09-13 18:56:41Z herbert $
hvoss@tug.org \ No newline at end of file
diff --git a/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.bib b/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.bib
index 99ed68ae72..f6ac03b8a0 100644
--- a/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.bib
+++ b/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.bib
@@ -1,4 +1,4 @@
-y%% -*-bibtex-*-
+%% -*-bibtex-*-
@STRING{tugboat = {TUGboat} }
@STRING{beiprogramm = {{\TeX}-Beiprogramm} }
@STRING{bretter = {Bretter, die die Welt bedeuten} }
diff --git a/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.pdf b/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.pdf
index 15cd40da5c..b37c59bca3 100644
--- a/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.pdf
+++ b/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.pdf
Binary files differ
diff --git a/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.tex b/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.tex
index 9296568bc3..a4c1897f1a 100644
--- a/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.tex
+++ b/graphics/pstricks/contrib/pst-tools/doc/pst-tools-doc.tex
@@ -1,7 +1,10 @@
-%% $Id: pst-tools-doc.tex 1163 2020-03-24 09:47:58Z herbert $
-\documentclass[11pt,english,BCOR=10mm,DIV=13,toc=bibliography,parskip=false,
- headings=small,headinclude=false,footinclude=false,oneside]{pst-doc}
-\usepackage[utf8]{inputenc}
+\RequirePackage{pdfmanagement-testphase}
+\DeclareDocumentMetadata{}
+%% $Id: pst-tools-doc.tex 245 2021-09-13 18:56:41Z herbert $
+\documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small,
+ headinclude=false,footinclude=false,oneside]{pst-doc}
+\listfiles
+\usepackage{pstricks}
\usepackage{pst-tools}
\let\pstToolsFV\fileversion
\usepackage{xltabular}
@@ -19,8 +22,7 @@
\subtitle{Helper functions; v.\pstToolsFV}
\author{Herbert Voß}
\docauthor{}
-\date{\today}
-\maketitle
+\settitle
\begin{abstract}
This package defines some tools which are useful for all packages not only the PSTricks like packages.
@@ -28,6 +30,8 @@ Since the version 0.10 it includes the macros from \texttt{random.tex}.
\vfill
\noindent
Thanks to:
+Marcel Krüger;
+Pablo Gonzáles Luengo;
Rolf Niepraschk;
\end{abstract}
@@ -76,7 +80,7 @@ There are the following valid options for \Lcs{psPrintValue}:
\Lkeyword{PSfont} & PS font name & Times & only valid \PS\ font names are possible, e.g.
\Lps{Times-Roman}, \Lps{Helvetica}, \Lps{Courier}, \Lps{Helvetica}, \Lps{Bookman}. If you want to embed the fonts
use always the URW names NimbusRomNo9L-Regu, NimbusSanL-Regu and NimbusMonL-Regu. However, the names
-may vary on different operating systems.\\
+may vary on different operating systems. If you leave the argument empty, it will choose the currently active font.\\
\Lkeyword{postString} & <string> & \{\} & will be appended to the number string\\
\Lkeyword{trimSpaces} & <boolean> & false & will strip spaces on the right\\
\Lkeyword{fontscale} & <number> & 10 & the font scale in pt\\
@@ -91,19 +95,23 @@ may vary on different operating systems.\\
\end{xltabular}
+
+
\begin{center}
\psset{fontscale=12}
\makebox[2em]{x(deg)} \makebox[5em]{$\sin x$} \makebox[4em]{$\cos x$}\hspace{1em}
\makebox[5em]{$\sqrt x$}\makebox[7em]{$\sin x+\cos x$}\makebox[6em]{$\sin^2 x+\cos^2 x$}\\[3pt]
-\multido{\iA=0+10}{18}{
+\multido{\iA=0+10}{18}{%
\makebox[1em]{\iA}
\makebox[5em]{\psPrintValue[PSfont=NimbusRomNo9L-Regu,xShift=-10]{\iA\space sin}}
- \makebox[4em][r]{\psPrintValue[PSfont=NimbusMonL-Regu,fontscale=10,decimals=3,xShift=-20]{\iA\space cos}}\hspace{1em}
+ \makebox[4em][r]{\psPrintValue[PSfont={},fontscale=10,decimals=3,xShift=-20]{\iA\space cos}}\hspace{1em}
\makebox[5em]{\psPrintValue[valuewidth=15,linecolor=blue,PSfont=NimbusSanL-Regu]{\iA\space sqrt}}
\makebox[7em]{\psPrintValue[comma,PSfont=NimbusRomNo9L-ReguItal]{\iA\space dup sin exch cos add}}
- \makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\iA\space dup sin dup mul exch cos dup mul add}}\\}
+ \makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\iA\space dup sin dup mul exch cos dup mul add}}\\
+}
\end{center}
+
\bigskip
\begin{lstlisting}
@@ -113,12 +121,15 @@ may vary on different operating systems.\\
\multido{\iA=0+10}{18}{
\makebox[1em]{\iA}
\makebox[5em]{\psPrintValue[PSfont=NimbusRomNo9L-Regu,xShift=-10]{\iA\space sin}}
- \makebox[4em][r]{\psPrintValue[PSfont=NimbusMonL-Regu,fontscale=10,decimals=3,xShift=-20]{\iA\space cos}}\hspace{1em}
+ \makebox[4em][r]{\psPrintValue[PSfont={},fontscale=10,decimals=3,xShift=-20]{\iA\space cos}}\hspace{1em}
\makebox[5em]{\psPrintValue[valuewidth=15,linecolor=blue,PSfont=NimbusSanL-Regu]{\iA\space sqrt}}
\makebox[7em]{\psPrintValue[comma,PSfont=NimbusRomNo9L-ReguItal]{\iA\space dup sin exch cos add}}
\makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\iA\space dup sin dup mul exch cos dup mul add}}\\}
\end{lstlisting}
+
+
+
With enabled \Lkeyword{algebraic} option there must be two arguments, separated by a comma.
The first one is the x value as a number, which can also be PostScript code, which leaves a
number on the stack. The second part is the function described in algebraic notation.
@@ -134,7 +145,7 @@ Pay attention, in algebraic notation angles must be in radian and not degrees.
\makebox[5em]{$\sqrt x$}\makebox[7em]{$\sin x+\cos x$}\makebox[6em]{$\sin^2 x+\cos^2 x$}\\[3pt]
\multido{\rA=0+0.1}{18}{\makebox[1em]{\rA}
\makebox[5em]{\psPrintValue[PSfont=NimbusSanL-Regu,xShift=-10]{\rA, sin(x)}}
- \makebox[4em][r]{\psPrintValue[PSfont=NimbusMonL-Regu,fontscale=10,decimals=3,xShift=-20]{\rA,cos(x)}}\hspace{1em}
+ \makebox[4em][r]{\psPrintValue[PSfont={},fontscale=10,decimals=3,xShift=-20]{\rA,cos(x)}}\hspace{1em}
\makebox[5em]{\psPrintValue[valuewidth=15,linecolor=blue,PSfont=NimbusSanL-Regu]{\rA,sqrt(x)}}
\makebox[7em]{\psPrintValue[comma,PSfont=NimbusRomNo9L-ReguItal]{\rA,sin(x)+cos(x)}}
\makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\rA,sin(x)^2+cos(x)^2}}\\}
@@ -148,7 +159,7 @@ Pay attention, in algebraic notation angles must be in radian and not degrees.
\makebox[5em]{$\sqrt x$}\makebox[7em]{$\sin x+\cos x$}\makebox[6em]{$\sin^2 x+\cos^2 x$}\\[3pt]
\multido{\rA=0+0.1}{18}{\makebox[1em]{\rA}
\makebox[5em]{\psPrintValue[PSfont=NimbusSanL-Regu,xShift=-10]{\rA, sin(x)}}
- \makebox[4em][r]{\psPrintValue[PSfont=NimbusMonL-Regu,fontscale=10,decimals=3,xShift=-20]{\rA,cos(x)}}\hspace{1em}
+ \makebox[4em][r]{\psPrintValue[PSfont={},fontscale=10,decimals=3,xShift=-20]{\rA,cos(x)}}\hspace{1em}
\makebox[5em]{\psPrintValue[valuewidth=15,linecolor=blue,PSfont=NimbusSanL-Regu]{\rA,sqrt(x)}}
\makebox[7em]{\psPrintValue[comma,PSfont=NimbusRomNo9L-ReguItal]{\rA,sin(x)+cos(x)}}
\makebox[6em]{\psPrintValue[PSfont=Palatino-Roman]{\rA,sin(x)^2+cos(x)^2}}\\}
diff --git a/graphics/pstricks/contrib/pst-tools/dvips/pst-tools.pro b/graphics/pstricks/contrib/pst-tools/dvips/pst-tools.pro
index 4b7ba7a8fd..bc059faafa 100644
--- a/graphics/pstricks/contrib/pst-tools/dvips/pst-tools.pro
+++ b/graphics/pstricks/contrib/pst-tools/dvips/pst-tools.pro
@@ -174,7 +174,7 @@
%% code de Bill Casselman
%% http://www.math.ubc.ca/people/faculty/cass/graphics/text/www/
/bubblesort { % on stack must be an array [ ... ]
-4 dict begin
+ 4 dict begin
/a exch def
/n a length 1 sub def
n 0 gt {
@@ -199,7 +199,7 @@
} repeat
} if
a % return the sorted array
-end
+ end
} def
%
/concatstringarray{ % [(a) (b) ... (z)] --> (ab...z) 20100422
@@ -211,12 +211,10 @@ end
} bind def
%
/concatstrings{ % (a) (b) -> (ab)
- 1 dict begin
exch dup length
2 index length add string
dup dup 4 2 roll copy length
4 -1 roll putinterval
- end
} def
%
/reversestring { % (aBC) -> (CBa)
@@ -254,6 +252,7 @@ end
} def
%
/rightTrim { % on stack the string and the character number to be stripped
+ 1 dict begin
/charNo exch def
dup
length 1 sub -1 0 {
@@ -261,6 +260,7 @@ end
} for
0 i 1 add getinterval
dup length string copy
+ end
} bind def % leaves the stripped string on the stack
/psStringwidth /stringwidth load def
diff --git a/graphics/pstricks/contrib/pst-tools/latex/pst-tools.sty b/graphics/pstricks/contrib/pst-tools/latex/pst-tools.sty
index 92dbf411c4..e5a241d231 100644
--- a/graphics/pstricks/contrib/pst-tools/latex/pst-tools.sty
+++ b/graphics/pstricks/contrib/pst-tools/latex/pst-tools.sty
@@ -9,4 +9,4 @@
\@addtofilelist{pst-tools.pro}}{}%
\endinput
-%% $Id: pst-tools.sty 680 2017-12-05 12:22:55Z herbert $
+%% $Id: pst-tools.sty 245 2021-09-13 18:56:41Z herbert $
diff --git a/graphics/pstricks/contrib/pst-tools/tex/pst-tools.tex b/graphics/pstricks/contrib/pst-tools/tex/pst-tools.tex
index 3b25402ba8..36b32ef8c0 100644
--- a/graphics/pstricks/contrib/pst-tools/tex/pst-tools.tex
+++ b/graphics/pstricks/contrib/pst-tools/tex/pst-tools.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-tools.tex 1163 2020-03-24 09:47:58Z herbert $
+%% $Id: pst-tools.tex 245 2021-09-13 18:56:41Z herbert $
%%
%% This is file `pst-tools.tex',
%%
@@ -26,8 +26,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-tools}
%
-\def\fileversion{0.10}
-\def\filedate{2020/03/24}
+\def\fileversion{0.11}
+\def\filedate{2021/09/13}
\message{`PST-tools' v\fileversion, \filedate\space (hv)}
%
\define@key[psset]{pst-tools}{decimalSeparator}[.]{\def\psk@decimalSeparator{#1}}%
@@ -38,11 +38,25 @@
\define@key[psset]{pst-tools}{yShift}[0]{\def\psk@yShift{#1}}
\define@key[psset]{pst-tools}{postString}[{}]{\def\psk@postString{#1}}
\define@key[psset]{pst-tools}{VarName}[]{\def\psk@VarName{#1 }}
-\define@key[psset]{pst-tools}{PSfont}[NimbusRomNo9L-Regu]{\def\psk@PSfont{/#1 }}
+\define@key[psset]{pst-tools}{PSfont}[NimbusRomNo9L-Regu]{%
+ \ifPSTlualatex
+ \ifx\relax#1\relax
+ \def\psk@printfont{ \fontid\font\space .findfontid }%
+ \else
+ \def\psk@printfont{ /#1 findfont }%
+ \fi
+ \else
+ \ifx\relax#1\relax
+ \def\psk@printfont{ /NimbusRomNo9L-Regu findfont }%
+ \else
+ \def\psk@printfont{ /#1 findfont }%
+ \fi
+ \fi
+}%
\define@key[psset]{pst-tools}{valuewidth}[10]{\pst@getint{#1}\psk@valuewidth }
\define@key[psset]{pst-tools}{fontscale}[10]{\pst@checknum{#1}\psk@fontscale }
\define@key[psset]{pst-tools}{decimals}[-1]{\pst@getint{#1}\psk@decimals }
-\psset[pst-tools]{PSfont=NimbusRomNo9L-Regu,fontscale=10,valuewidth=10,decimals=-1,
+\psset[pst-tools]{PSfont=Helvetica,fontscale=10,valuewidth=10,decimals=-1,
xShift=0,yShift=0,trimSpaces=false,postString={},VarName={},
comma=false,decimalSeparator=.}
%
@@ -56,23 +70,26 @@
\def\psPrintValue@ii#1,#2,#3\@nil{% #1,#2 only for algebraic code
\begin@SpecialObj
\addto@pscode{
- gsave \psk@PSfont findfont \psk@fontscale scalefont setfont
+ gsave \psk@printfont
+ \psk@fontscale scalefont setfont
\ifPst@algebraic
/x #1 def
/Func (#2) tx@AlgToPs begin AlgToPs end cvx def
Func
- \else #1 \fi
+ \else
+ #1
+ \fi
\ifx\relax\psk@VarName\relax\else dup \txG 10 string cvs /\psk@VarName\space exch def \etxG \fi
\psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul cvi exch div } if
\psk@valuewidth string cvs %/Output exch def % save output
-%/concatstringarray{ % [(a) (b) ... (z)] --> (ab...z) 20100422
+ %/concatstringarray % [(a) (b) ... (z)] --> (ab...z) 20100422
\ifx\relax\psk@postString\relax\else [ exch (\psk@postString) ] concatstringarray \fi
\ifPst@trimSpaces rightTrim \fi
\ifPst@comma dot2comma \fi % do we have to change dot to comma
\psk@xShift\space \psk@yShift\space moveto %Output
show grestore
}%
- \end@SpecialObj%
+ \end@SpecialObj
}
\define@boolkey[psset]{pst-tools}[Pst@]{round}[true]{}%
@@ -85,8 +102,10 @@
\def\psPrintValueNew@ii#1,#2,#3!!{% #1,#2 only for algebraic code
\begin@SpecialObj
\addto@pscode{ % thanks to Buddy Ledger
- /mfont { \psk@PSfont findfont \psk@fontscale scalefont setfont } bind def
- /mfontexp { \psk@PSfont findfont \psk@fontscale 1.2 div scalefont setfont } bind def
+ /mfont { \psk@printfont
+ \psk@fontscale scalefont setfont } bind def
+ /mfontexp { \psk@printfont
+ \psk@fontscale 1.2 div scalefont setfont } bind def
/s1 { /StandardSymL findfont \psk@fontscale scalefont setfont } bind def
\ifPst@algebraic
/x #1 def