summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-tools
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-10-02 21:58:12 +0000
committerKarl Berry <karl@freefriends.org>2017-10-02 21:58:12 +0000
commitf3d0235a07baa8c6f8430bddcaa95ba3ad6de5ee (patch)
treeb3b2a6d4460d6a5f5c75e4a314db604a8cc705df /Master/texmf-dist/doc/generic/pst-tools
parent08f4fdc740a25d49aa543ac6694453cd84aacfd4 (diff)
pst-tools (1oct17)
git-svn-id: svn://tug.org/texlive/trunk@45451 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-tools')
-rw-r--r--Master/texmf-dist/doc/generic/pst-tools/Changes1
-rw-r--r--Master/texmf-dist/doc/generic/pst-tools/README11
-rw-r--r--Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdfbin80617 -> 99637 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.tex61
4 files changed, 64 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-tools/Changes b/Master/texmf-dist/doc/generic/pst-tools/Changes
index f6e774fbe38..d9f2277fe93 100644
--- a/Master/texmf-dist/doc/generic/pst-tools/Changes
+++ b/Master/texmf-dist/doc/generic/pst-tools/Changes
@@ -1,4 +1,5 @@
..... pst-tools.tex
+0.08 2017-10-02 - new macro \psGetElement
0.07 2017-08-23 - use always URW fonts instead of PostScript, eg Helvetica-NimbusSanL
0.06 2017-05-12 - added style mmpaper
0.05 2014-05-12 - new optional arguments for printing values
diff --git a/Master/texmf-dist/doc/generic/pst-tools/README b/Master/texmf-dist/doc/generic/pst-tools/README
index e25e9ec1b92..eea7ff0347c 100644
--- a/Master/texmf-dist/doc/generic/pst-tools/README
+++ b/Master/texmf-dist/doc/generic/pst-tools/README
@@ -1,6 +1,6 @@
pst-tools: helper functions
--- psPrintValue
-
+-- psPrintValue on PostScript level
+-- \psGetElement of a comma separated list
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/
@@ -10,11 +10,16 @@ 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).
-pst-func needs pst-plot (pstricks-add) and pstricks, which should
+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
PSTricks is PostScript Tricks, the documentation cannot be run
with pdftex, use the sequence latex->dvips->ps2pdf.
+%% 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.
+
+
%% $Id: README 286 2010-02-11 09:40:41Z herbert $
diff --git a/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf b/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf
index 2a2b9490ecc..42823552b56 100644
--- a/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.tex b/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.tex
index 7202cec324d..17db1dd5597 100644
--- a/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-tools/pst-tools-doc.tex
@@ -1,21 +1,23 @@
-%% $Id: pst-tools-doc.tex 527 2017-08-23 14:14:45Z herbert $
+%% $Id: pst-tools-doc.tex 607 2017-10-02 17:56:55Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,
smallheadings, headexclude,footexclude,oneside]{pst-doc}
\usepackage[utf8]{inputenc}
\usepackage{pst-tools}
\let\pstToolsFV\fileversion
-\usepackage{ltablex}
+\usepackage{xltabular}
+\usepackage{pst-plot}
\renewcommand\bgImage{}
\lstset{language=PSTricks,
morekeywords={psPrintValue},basicstyle=\footnotesize\ttfamily}
%
+\usepackage{biblatex}
\addbibresource{pst-tools-doc.bib}
\begin{document}
\title{\texttt{pst-tools}}
\subtitle{Helper functions; v.\pstToolsFV}
-\author{Herbert Vo\ss}
+\author{Herbert Voß}
\docauthor{}
\date{\today}
\maketitle
@@ -56,7 +58,7 @@ space.
There are the following valid options for \Lcs{psPrintValue}:
\noindent\medskip
-\begin{tabularx}{\linewidth}{@{}l|>{\ttfamily}l>{\ttfamily}lX@{}}
+\begin{xltabular}{\linewidth}{@{}l|>{\ttfamily}l>{\ttfamily}lX@{}}
\textrm{name} & \textrm{value} & \textrm{default}\\\hline
\endhead
\Lkeyword{PSfont} & PS font name & Times & only valid \PS\ font names are possible, e.g.
@@ -74,7 +76,7 @@ may vary on different operating systems.\\
\Lkeyword{algebraic} & <boolean> & false & function in algebraic notation.\\
\Lkeyword{VarName} & <string> & \{\} & saves the value in /<VarName> for further use\\
\Lkeyword{comma} & <boolean> & false & comma instead of the dor for decimals\\
-\end{tabularx}
+\end{xltabular}
\begin{center}
\psset{fontscale=12}
@@ -157,6 +159,39 @@ foo \makebox[3.5em][l]{\psPrintValue[PSfont=StandardSymL,decimals=6,
+\section{\nxLcs{psGetElement}}\label{sec:getElement}
+The macro returns the n-th Element of a comma separated list into the
+user definied Macro \Lcs{\Larga{Element}}.
+
+\begin{BDef}
+\Lcs{psGetElement}\Largb{Index}\Largb{value list}\nxLcs{\Larga{Element}}\\
+\end{BDef}
+
+
+\begin{lstlisting}
+\def\ColorList{,violet,blue,green,red}% Index starts at 0
+\begin{pspicture}(-7,-4)(7,5)
+\psaxes(0,0)(-6.5,-4)(6.5,5)
+\psset{plotpoints=400,algebraic}
+\psforeach{\iA}{1,2,3,4}{%
+ \psGetElement{\iA}{\ColorList}\foo
+ \psplot[linecolor=\foo]{-6.28}{6.28}{\iA*sin(\iA*x)}}
+\end{pspicture}
+\end{lstlisting}
+
+\def\ColorList{,violet,blue,green,red}% Index starts at 0
+\begin{pspicture}(-7,-4)(7,5)
+\psaxes(0,0)(-6.5,-4)(6.5,5)
+\psset{plotpoints=400,algebraic}
+\psforeach{\iA}{1,2,3,4}{%
+ \psGetElement{\iA}{\ColorList}\foo
+ \psplot[linecolor=\foo]{-6.28}{6.28}{\iA*sin(\iA*x)}}
+\end{pspicture}
+
+
+
+
+
@@ -181,4 +216,18 @@ foo \makebox[3.5em][l]{\psPrintValue[PSfont=StandardSymL,decimals=6,
\end{document}
-
+\def\psGetElement#1#2{% #1 natural number; #2 comma separated list
+ \pst@cnto=0\relax
+ \pst@cntp=#1\relax
+ \expandafter\psGetElement@i#2,,\@nil
+}
+\iftrue
+\def\psGetElement@i#1,#2,#3\@nil{%
+ \ifnum\the\pst@cnto<\pst@cntp\relax
+ \advance\pst@cnto by \@ne
+ \def\ps@next{\psGetElement@i#2,#3\@nil}%
+ \else
+ \def\ps@next{#1}%
+ \fi
+ \ps@next
+}