PSTricks

News – 2013

new macros and bugfixes for the basic package pstricks

May 22, 2013 Package author(s): Herbert Voß

Contents

I. pstricks – package 3

1. pstricks.sty 3 1.1. RGB to gray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2. CMYK to gray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2. pstricks.tex (2.43– 2013/05/12) 3 2.1. labelsep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2. Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.3. Fillstyle dots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.4. New macro \psRing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.5. New macros \pssetMonochrome, \pssetGrayscale, and \psresetColor . 4

3. The PostScript header files 5 3.1. pstricks.pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

II. Other packages 6

4. pst-node – version 1.45 | 2013/04/29 6

References 7

Part I.

pstricks – package

1. pstricks.sty

There are new optional arguments monochrome and grayscale to convert all RGB and CMYK colors into black and white or grayscale. The equations are:

1.1. RGB to gray

gray = 0.07red + 0.71green + 0.21blue

1.2. CMYK to gray

c = c(1 − k) + k
m = m(1 − k) + k
y = y(1 − k) + k
r, g, b = (1 − c), (1 − m), (1 − y)
gray = 0.299r + 0.587g + 0.114b

See also section 2.5 on the following page for a local change of the color output.

2. pstricks.tex (2.43– 2013/05/12)

There is a new optional argument pgffunctions for the environment pspicture. With this option one can force the loading of the special pgf PostScript function which in some cases are missing, when using the package auto-pst-pdf and another package which uses pgf macros.

\begin {pspicture }[ pgffunctions ,...](...)  (...)

2.1. labelsep

The labelsep is the first – optional – argument of \uput. It is now possible to use the PostScript notation for this length, eg {! 45 sin 3 mul}. Then the unit which is active when \uput is active is used. With a unit the PS notation ist not allowed and leads to an error!

2.2. Coordinates

Additionally to the special pair of coordinates (*x f(x)) where x must be a value in PostScript notation and f(x) in algebaric noatation, there is now a (+{x}, {f(x)}). Both expressions must be in algebraic notation and {x} must expand to a value or an expression which uses known system or user defined PostScript functions.

1 \begin {pspicture }[ showgrid ](3,2)
2 \pnode (+{ sqrt ( Pi ) },{1.5*( sin ( x) ^2+ cos ( x) ^2) }) {A}
3 \psdot ( A)
4 \psline [ arrowscale =1.5]{->}( A)
5 \end {pspicture }

2.3. Fillstyle dots

A fix for the fill style dots to make it work again:

1 \pspicture (4,3)
2 \psframe [ fillstyle  =dots ](4,3)
3 \endpspicture

2.4. New macro \psRing

\psRing * [Options] (x,y){Inner Radius}{Outer Radius}

1 \begin {pspicture }[ showgrid ](4,4)
2 \psRing [ linecolor =red ](2,2) {0.3}{0.8}
3 \psRing *[ opacity =0.5](2,2) {1}{2}
4 \psdot (2,2)
5 \end {pspicture }

2.5. New macros \pssetMonochrome, \pssetGrayscale, and \psresetColor

\pssetMonochrome \pssetGrayscale \psresetColor

1 \begin {pspicture }[ showgrid ](4,4)
2 \pssetMonochrome
3 \psRing [ linecolor =red ](2,2) {0.3}{0.8}
4 \psRing *[ opacity =0.5](2,2) {1}{2}
5 \psresetColor
6 \psdot [ linecolor =red , dotscale =3](2,2)
7 \end {pspicture }

1 \begin {pspicture }[ showgrid ](4,4)
2 \pssetGrayscale
3 \psRing [ linecolor =red ](2,2) {0.3}{0.8}
4 \psRing *[ opacity =0.5](2,2) {1}{2}
5 \psresetColor
6 \psdot [ linecolor =red , dotscale =3](2,2)
7 \end {pspicture }

3. The PostScript header files

3.1. pstricks.pro

Part II.

Other packages

4. pst-node – version 1.45 | 2013/04/29

1.27 2013-04-12 - added macro \Cnodeput which takes radius=... into account 1.26 2013-04-09 - added macros \psncurve and \psnccurve for a sequence of nodes created by \curvepnodes 1.25 2012-09-21 - Global node coordinates only with saveNodeCoors

References

[1] Michel Goosens, Frank Mittelbach, Sebastian Rahtz, Denis Roegel, and Herbert Voß. The L^{A}TEX Graphics Companion. Addison-Wesley Publishing Company, Reading, 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ß. L^{A}TEX Referenz. DANTE – lehmanns media, Heidelberg/Hamburg, 2. edition, 2010.

[7] Herbert Voß. PSTricks – Grafik für TEX und L^{A}TEX. DANTE – Lehmanns Media, Heidelberg/Hamburg, 6. edition, 2010.

[8] Herbert Voß. L^{A}TEX Quick Reference. UIT, Cambridge/UK, 1. edition, 2011.

[9] Herbert Voß. PSTricks – Graphics for L^{A}TEX. 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

auto-pst-pdf, 3

\Cnodeput, 6 \curvepnodes, 6

dots, 4

Environment pspicture, 3

grayscale, 3

Keyvalue

dots, 4 Keyword

grayscale, 3 labelsep, 3 monochrome, 3 pgffunctions, 3

labelsep, 3

Macro \Cnodeput, 6 \curvepnodes, 6 \psnccurve, 6 \psncurve, 6 \psresetColor, 4 \psRing*, 4 \pssetGrayscale, 4 \pssetMonochrome, 4 \uput, 3

monochrome, 3

Package

auto-pst-pdf, 3 pgffunctions, 3 \psnccurve, 6 \psncurve, 6 pspicture, 3 \psresetColor, 4 \psRing*, 4 \pssetGrayscale, 4 \pssetMonochrome, 4

\uput, 3