0% found this document useful (0 votes)
14 views10 pages

PST News12

The document provides updates on the PSTricks package, including new macros and bug fixes as of December 21, 2012. It details various features and improvements, such as enhancements to the extbackslash psellipticarc command and new fill styles. Additionally, it introduces a new document class, pst-doc, for creating PSTricks documentation and lists optional arguments for the package.

Uploaded by

hammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views10 pages

PST News12

The document provides updates on the PSTricks package, including new macros and bug fixes as of December 21, 2012. It details various features and improvements, such as enhancements to the extbackslash psellipticarc command and new fill styles. Additionally, it introduces a new document class, pst-doc, for creating PSTricks documentation and lists optional arguments for the package.

Uploaded by

hammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

PSTricks

News - 2012
new macros and bugfixes for the basic package pstricks

December 21, 2012

2012
Package author(s):
Herbert Voß
Contents 2

Contents

I. pstricks – package 3

1. General 3

2. pstricks.tex (2.35– 2012/12/21) 3


2.1. \psellipticarc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2. Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3. Symbol line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4. Fill style eohlines and eovlines . . . . . . . . . . . . . . . . . . . . . . . 5
2.5. Fill style penroseA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3. The PostScript header files 7


3.1. pstricks.pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4. List of all optional arguments for pstricks 7

II. Other packages 8

5. pst-node – version 1.43 | 2012/11/17 8

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. pstricks.tex (2.35– 2012/12/21)

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.

2.3. Symbol line

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}

2.4. Fill style eohlines and eovlines

These fill stykes uses the PS function eoclip instead of clip.


2.5. Fill style penroseA 6

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}

2.5. Fill style penroseA

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. The PostScript header files

3.1. pstricks.pro

The file pst-tools.pro contains additional helper functions:


1 /factorial { % n on stack, returns n!
2 /MoverN { % m n on stack, returns the binomial coefficient m over n
3 /cxadd { % [a1 b1] [a2 b2] = [a1+a2 b1+b2]
4 /cxneg { % [a b]
5 /cxsub { cxneg cxadd } def % same as negative addition
6 /cxmul { % [a1 b1] [a2 b2]
7 /cxsqr { % [a b] square root
8 /cxsqrt { % [a b]
9 /cxarg { % [a b]
10 /cxlog { % [a b]
11 /cxnorm2 { % [a b]
12 /cxnorm { % [a b]
13 /cxconj { % conjugent complex
14 /cxre { 0 get } def % real value
15 /cxim { 1 get } def % imag value
16 /cxrecip { % [a b]
17 /cxmake1 { 0 2 array astore } def % make a complex number, real given
18 /cxmake2 { 2 array astore } def % dito, both given
19 /cxdiv { cxrecip cxmul } def
20 /cxrmul { % [a b] r
21 /cxrdiv { % [a b] r
22 /cxconv { % theta
23 /bubblesort { % on stack must be an array [ ... ]
24 /concatstringarray{ % [(a) (b) ... (z)] --> (ab...z) 20100422
25 /dot2comma {% on stack a string (...)

4. List of all optional arguments for pstricks

Key Type Default


8

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:

\pnode [hoffset i] (x , y ){hnode name i}

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.

[5] Herbert Voss. PSTricks Support for pdf. http://PSTricks.tug.org/main.cgi?


file=pdf/pdfoutput, 2002.

[6] Herbert Voß. LATEX Referenz. DANTE – lehmanns media, Heidelberg/Hamburg, 2.


edition, 2010.

[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

You might also like