PST News12
PST News12
News - 2012
new macros and bugfixes for the basic package pstricks
2012
Package author(s):
Herbert Voß
Contents 2
Contents
I. pstricks – package 3
1. General 3
References 9
3
Part I.
pstricks – package
1. General
There exists a new document class pst-doc for writing PSTricks documentations, like
this news document. It depends on the KOMA-Script document class scrartcl. 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 pdflatex the title page is created with boxes and inserted with the
macro \AddToShipoutPicture from the package eso-pic. It inserts the background
title page image pst-doc-pdf to use directly pdflatex. When running latex the title
page is created with PSTricks macros.This allows to use the Perl script pst2pdf or
the package pst-pdf or auto-pst-pdf or any other program/package which supports
PostScript code in the document.
2.1. \psellipticarc
There was a bug with the star version of \psellipticarc, which filled the path in the
same way as \psellipticwedge* does. It is now fixed:
4
3
1 \begin{pspicture}[showgrid](4,4)
2 \psellipticarc*(2,0)(2,4){0}{130}
2
3 \psdot(2,0)
4 \end{pspicture}
1
0 b
4 0 1 2 3 4
3
1 \begin{pspicture}[showgrid](4,4)
2 \psellipticarc*[correctAngle=false,
showpoints](2,0)(2,4){0}{130} 2
3 \psdot(2,0)
4 \end{pspicture} 1
0 b
0 1 2 3 4
2.2. Grid 4
2.2. Grid
The optional argument showgrid can have the values bottom, true, false, and top,
where false is the default and true the same as bottom. With the latter it is set
first and with top it is set at the end of the pspitcure environment.
The optional argument symbol for a linestyle can now be set with a negative symbolstep
for a computed width of the steps:
y
llll
l l
l l
l l
l l
l
l
l
l
l
l
l
x
1 \psset{unit=0.75cm}
2 \begin{pspicture}(8,8)
3 \psaxes[labels=none,ticks=none]{->}(0,0)(8,8)[$x$,0][$y$,0]
4 \pscurve(1,1)(3,4)(6,6)(8,4)
5 \pscurve[linestyle=symbol,symbolStep=-20,symbol=l](1,1)(3,4)(6,6)(8,4)
6 \end{pspicture}
Instead of setting a symbol it is possible to set ticks on the curve with curveticks.
They can be set by a fixed width or a computed width if the symbolStep is set by a
negative number without a unit.
2.4. Fill style eohlines and eovlines 5
x
1 \psset{unit=0.75cm}
2 \begin{pspicture}(8,8)
3 \psaxes[labels=none,ticks=none]{->}(0,0)(8,8)[$x$,0][$y$,0]
4 \pscurve(1,1)(3,4)(6,6)(8,4)
5 \pscurve[linestyle=symbol,symbolStep=12.25pt,
6 curveticks,startAngle=60](1,1)(3,4)(6,6)(8,4)
7 \end{pspicture}
x
1 \psset{unit=0.75cm}
2 \begin{pspicture}(8,8)
3 \psaxes[labels=none,ticks=none]{->}(0,0)(8,8)[$x$,0][$y$,0]
4 \pscurve(1,1)(3,4)(6,6)(8,4)
5 \pscurve[linestyle=symbol,symbolStep=-12,
6 curveticks,startAngle=60](1,1)(3,4)(6,6)(8,4)
7 \end{pspicture}
6 6
5 5
4 4
3 3
2 2
1 1
0 0
0 1 2 3 4 5 6 0 1 2 3 4 5 6
1 \begin{pspicture}[showgrid](6,6)
2 \pscustom[fillstyle=eovlines,fillcolor=green]{
3 \pscircle(3,3){3}
4 \psline[liftpen=2](1,2)(5,2)(3,5)(1,2)
5 }
6 \end{pspicture}\quad
7 \begin{pspicture}[showgrid](6,6)
8 \pscustom[fillstyle=eovlines*,fillcolor=blue!50]{
9 \pscircle(3,3){3}
10 \psline[liftpen=2](1,2)(5,2)(3,5)(1,2)}
11 \end{pspicture}
The valid optional arguments are penroseA, hatchcolor, dartcolor, and kitecolor
1 \begin{pspicture}(3,3)
2 \psframe[fillstyle=penroseA](3,3)
3 \end{pspicture} \qquad
4 \begin{pspicture}(3,3)
5 \psframe[fillstyle=penroseA,psscale=0.5,hatchcolor=white](3,3)
6 \end{pspicture} \qquad
7 \begin{pspicture}(3,3)
8 \psccurve[fillstyle=penroseA,kitecolor=yellow,dartcolor=blue!30](0,1.5)(1.5,3)(3,1.5)
(1.5,0)
9 \end{pspicture}
4. List of all optional arguments for pstricks 7
3.1. pstricks.pro
Part II.
Other packages
5. pst-node – version 1.43 | 2012/11/17
The command \pnode now knows an optional argument for an offset, which expects two
values (x,y) separated by a comma:
2 E
b
1 \begin{pspicture}[showgrid](0,-2)(6,2)
1 2 \pnode{A}\psdot(A)\uput[90](A){A}
3 \pnode[0,-2]{B}\psdot(B)\uput[90](B){B}
C \pnode(2,0){C}\psdot(C)\uput[90](C){C}
0A
4
b b
5 \pnode[1,-2](2,0){D}\psdot(D)\uput[90](D){D}
6 \pnode[2,2](3.5,0){E}\psdot(E)\uput[90](E){E
-1 }
7 \end{pspicture}
-2Bb D
b
0 1 2 3 4 5 6
References 9
References
[1] Michel Goosens, Frank Mittelbach, Sebastian Rahtz, Denis Roegel, and Herbert
Voß. The LATEX Graphics Companion. Addison-Wesley Publishing Company, Read-
ing, Mass., 2007.
[2] Laura E. Jackson and Herbert Voß. Die Plot-Funktionen von pst-plot. Die
TEXnische Komödie, 2/02:27–34, June 2002.
[3] Nikolai G. Kollock. PostScript richtig eingesetzt: vom Konzept zum praktischen
Einsatz. IWT, Vaterstetten, 1989.
[4] Herbert Voß. Die mathematischen Funktionen von Postscript. Die TEXnische
Komödie, 1/02:40–47, March 2002.
[7] Herbert Voß. PSTricks – Grafik für TEX und LATEX. DANTE – Lehmanns Media,
Heidelberg/Hamburg, 6. edition, 2010.
[8] Herbert Voß. LATEX Quick Reference. UIT, Cambridge/UK, 1. edition, 2011.
[9] Herbert Voß. PSTricks – Graphics for LATEX. UIT, Cambridge/UK, 1. edition, 2011.
[10] Michael Wiedmann and Peter Karp. References for TEX and Friends. http://www.
miwie.org/tex-refs/, 2003.
Index
\AddToShipoutPicture, 3 eso-pic, 3
auto-pst-pdf, 3 pst-pdf, 3
pdflatex, 3
bottom, 4 \pnode, 8
PostScript
Class
clip, 5
pst-doc, 3
eoclip, 5
scrartcl, 3
Program
clip, 5
latex, 3
curveticks, 4
pdflatex, 3
Environment pst2pdf, 3
pspitcure, 4 \psellipticarc, 3
eoclip, 5 \psellipticwedge*, 3
eso-pic, 3 pspitcure, 4
pst-doc, 3
false, 4 pst-doc-pdf, 3
false is the default, 4 pst-pdf, 3
File pst-tools.pro, 7
pst-doc-pdf, 3 pst2pdf, 3
pst-tools.pro, 7
scrartcl, 3
Keyvalue showgrid, 4
bottom, 4 symbol, 4
false, 4 symbolStep, 4
false is the default, 4 symbolstep, 4
showgrid, 4
top, 4 top, 4
true, 4 true, 4
Keyword
curveticks, 4
symbol, 4
symbolStep, 4
symbolstep, 4
latex, 3
Macro
\AddToShipoutPicture, 3
\pnode, 8
\psellipticarc, 3
\psellipticwedge*, 3
Package
auto-pst-pdf, 3
10