1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
|
%% $Id: pst-news09.tex 62 2008-11-25 19:52:07Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
headexclude,footexclude,oneside]{pst-doc}
\listfiles
\usepackage[utf8]{inputenc}
\usepackage{pst-plot}
\let\pstplotFV\fileversion
\let\pstplotFD\filedate
\usepackage{pst-node}
\let\pstnodeFV\fileversion
\let\pstnodeFD\filedate
\usepackage{pst-tree}
\let\psttreeFV\fileversion
\let\psttreeFD\filedate
\usepackage{pst-eucl}
\renewcommand\bgImage{\psscalebox{15}{\color{blue!20}2009}}
\begin{document}
%\psset{PstDebug=1}
\title{\texttt{News -- 2009}\\ \Large new macros and bugfixes for the
basic packages \nxLFile{pstricks}, \nxLFile{pst-plot}, and \nxLFile{pst-node}}
\author{Herbert Voß}
\date{\today}
\maketitle
\clearpage
\tableofcontents
\clearpage
\part{\texttt{pstricks} -- package}
\section{General}
There exists a new document class \LClass{pst-doc} for writing PSTricks documentations,
like this news document. It depends on the KOMA-Script document class \LClass{scrartcl}.
\LClass{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.
%--------------------------------------------------------------------------------------
\section{\texttt{pstricks.sty}}
%--------------------------------------------------------------------------------------
\subsection{New optional argument}
With the new optional argument \Lkeyval{97} \LPack{pstricks} has the old behaviour of the
version of 1997. The \Lenv{pspicture} environment then has only a value as
optional argument, which shifts the box in vertical direction. The new options
\Lkeyword{shift} and \Lkeyword{showgrid} do not work in this case.
The support of transparency colors is also disabled.
\subsection{file list}
You should always use the \Lcs{listfile} to get a list of all loaded packages and
font files and the end of your log file:
\begin{verbatim}
*File List*
pst-doc.cls 2009/09/27 v 0.10 PSTricks documentation class (hv)
scrartcl.cls 2009/07/24 v3.04a KOMA-Script document class (article)
scrkbase.sty 2009/07/24 v3.04a KOMA-Script package (KOMA-Script-dependent ba
sics and keyval usage)
[ ... ]
pstricks.sty 2008/11/26 v0.40 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex 2009/10/25 v1.30 `PSTricks' (tvz,hv)
pstricks.pro 2009/01/30 v. 1.06, PostScript prologue file (hv)
pst-dots.pro 2006/12/19 v. 2.00, PostScript prologue file (hv)
pst-algparser.pro 2008/01/01 v. 0.01, PostScript prologue file (hv)
[ ... ]
pst-plot.sty 2004/07/15 package wrapper for pst-plot.tex
pst-plot.tex 2009/06/08 1.04 `pst-plot' (tvz)
pst-node.sty 2006/01/01 package wrapper for pst-node.tex
pst-node.tex 2008/11/26 1.01 `pst-node' (tvz)
pst-node.pro 2009/01/30 v. 1.02, PostScript prologue file (hv)
pst-tree.sty 2009/01/25 package wrapper for pst-tree.tex
pst-tree.tex 2009/09/17 1.11 `pst-tree' (tvz,hv)
pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
pst-eucl.sty 2005/05/14 package wrapper for PSTricks pst-eucl.tex
pst-eucl.tex 2008/11/21 v1.35 `PST-eucl' (dr)
pst-eucl.pro
ts1cmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
ltcaption.sty 2008/03/28 v1.2 longtable captions (AR)
pst-news09.out
pst-news09.out
t1fvs.fd 2004/09/07 scalable font definitions for T1/fvs.
t1fvm.fd 2004/09/07 scalable font definitions for T1/fvm.
umsa.fd 2009/06/22 v3.00 AMS symbols A
umsb.fd 2009/06/22 v3.00 AMS symbols B
lstlang1.sty 2004/09/05 1.3 listings language file (modified 2009-08-23 Nm)
lstlang2.sty 2004/09/05 1.3 listings language file
lstlang3.sty 2004/09/05 1.3 listings language file
pst-news09.ind
***********
\end{verbatim}
This can be depending on your document a very long list. With the new version of \LFile{pstricks.sty}
the \Lext{pro} files are also listed.
%--------------------------------------------------------------------------------------
\section{\texttt{pstricks.tex} (\pstricksFV -- \pstricksFD)}
%--------------------------------------------------------------------------------------
\subsection{Makro \nxLcs{next}}
To prevent problems with other packages which also define a \Lcs{next}
macro, it is now renamed to \Lcs{ps@next}. This should be not important
for the user, because it is used only by the base system itself.
\subsection{Makro \nxLcs{psDEBUG}}
\LPack{pstricks} defines the option \texttt{PstDebug=0|1}, which can be used for
debugging. The new macro \Lcs{psDEBUG} makes it easier to write some \Index{debugging}
information into the package files. The macro is only valid, if \Lkeyword{PstDebug}=1
is set, otherwise the macro does nothing.
\begin{BDef}
\Lcs{psDEBUG}\OptArgs\Largb{text}
\end{BDef}
\Lcs{psDEBUG} writes the argument \Larg{text} into the log file.
Without an optional argument the word \Larg{pstricks} is used. The following output
of the log file
\begin{lstlisting}
...
<key:xticksize>: setting ticksize to max
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line 26.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 26.
<pst@@hlabels>: xticksizeC=0.0pt
...
\end{lstlisting}
was possible with \Lcs{psset}\Largb{\Lkeyword{PstDebug}}=1\footnote{Can also be used locally for a
macro when used as optional argument
in the usual way.}
and inside of \LPack{pstricks-add} with
(only the first for example):
\begin{lstlisting}
...
\psDEBUG[key:ticksize]{setting ticksize}
...
\end{lstlisting}
\subsection{Special Coordinates}
The macros \Lcs{SpecialCoor} and the corresponding \Lcs{NormalCoor} can now be used for
the \Index{radius} of \Index{arc}s and \Index{circle}s. With a preceeding \Lnotation{!} character the length can
be of any PostScript expression and will be taken with the unit pt in user coordinates:
\begin{LTXexample}[width=6cm]
\begin{pspicture}[showgrid=true](-3,-3)(3,3)
\pscircle[linecolor=red](0,0){1cm}
\SpecialCoor
\pscircle[linecolor=blue](0,0){!3 sqrt}
\NormalCoor
\psarc[linewidth=2pt](0,0){2cm}{90}{270}
\SpecialCoor
\psarc[linecolor=green](0,0){! 60 sin dup add }{90}{270}
\end{pspicture}
\end{LTXexample}
\SpecialCoor
\subsection{\nxLcs{psarcAB} and \nxLcs{psarcnAB}}
\begin{BDef}
\Lcs{psarcAB}\OptArgs\OptArg*{\Largb{arrows}}\coord{C}\coord{A}\coord{B}\\
\Lcs{psarcnAB}\OptArgs\OptArg*{\Largb{arrows}}\coord{C}\coord{A}\coord{B}
\end{BDef}
$(x_C, y_C)$ is the center and $(x_A, y_A)$ $(x_B, y_B)$ are two given points of the
\Index{circle}. The angles for the \Index{arc} are calculated by \TeX. The arc is drawn from the first
to the second point. The radius is the distance from the center to the first point.
The second point can have another distance, it is only used for calculating the angle.
The following examples needs the package \LPack{pst-eucl}.
\begin{LTXexample}[width=6cm]
\begin{pspicture}(-3,-3)(3,3)
\pstTriangle[PosAngle={180,0,90}](-3,0){A}(3,0){B}(0,3){C}
\pstCircleOA{I}{A}
\pstMiddleAB{A}{B}{Iab}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=blue!50]{%
\psarcAB(C)(A)(B)
\psarcnAB(Iab)(B)(A)}
\pstMiddleAB{A}{C}{Iac}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=red!50]{%
\psarcnAB(I)(A)(C)
\psarcAB(Iac)(C)(A)}
\pstMiddleAB{B}{C}{Ibc}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=green!50]{%
\psarcAB(I)(B)(C)
\psarcnAB(Ibc)(C)(B)}
\end{pspicture}
\end{LTXexample}
\subsection{Makro \nxLcs{psPline}}
\begin{BDef}
\Lcs{psPline}\OptArgs\coord1\coord2\coord3
\end{BDef}
The first point P1 is a projection onto the line of $\overline{P_2P_3}$
and connected with drawing a line similiar to \Lcs{psline}. This macro
has three mandatory arguments for the three points.
\begin{LTXexample}[pos=t]
\psset{unit=3}
\begin{pspicture}[showgrid=true](3,2)
\pspolygon(0,1)(3,2)(2.5,0)
\psPline[linestyle=dashed,arrowscale=2]{->}(0,1)(3,2)(2.5,0)
\psPline[linestyle=dashed,arrowscale=2]{->}(3,2)(2.5,0)(0,1)
\psPline[linestyle=dashed,arrowscale=2]{->}(2.5,0)(0,1)(3,2)
\end{pspicture}
\end{LTXexample}
%--------------------------------------------------------------------------------------
\section{The PostScript header files}
\subsection{\nxLFile{pstricks.pro}}
Only cosemetic changes to the code to make it more readable.
%--------------------------------------------------------------------------------------
\subsection{\nxLFile{pst-node.pro}}
Only cosemetic changes to the code to make it more readable.
\part{\nxLPack{pst-node} -- package}
\section{\nxLFile{pst-node.tex} (\pstnodeFV -- \pstnodeFD)}
There was a bug in \Lcs{fnode}. It is now fixed.
foo
z \quad
\pnode{testL1}
\fnode[linecolor=lightgray,framesize=6pt 50pt](0,.5ex){eqL}
\pnode(0,2ex){testL2}
\quad
=
\quad%
\pnode{testR1}
\fnode[linecolor=lightgray,framesize=6pt 50pt](0,.5ex){eqR}
\pnode(0,2ex){testR2}
\quad
z
\ncline[linecolor=red]{testL1}{testR1}
\ncline[linecolor=blue]{testL2}{testR2}
bar
\bigskip now with an aligned node
\psset{nodealign=true}
foo
z \quad
\pnode{testL1}
\fnode[linecolor=lightgray,framesize=6pt 50pt](0,.5ex){eqL}
\pnode(0,2ex){testL2}
\quad
=
\quad%
\pnode{testR1}
\fnode[linecolor=lightgray,framesize=6pt 50pt](0,.5ex){eqR}
\pnode(0,2ex){testR2}
\quad
z
\ncline[linecolor=red]{testL1}{testR1}
\ncline[linecolor=blue]{testL2}{testR2}
bar
\begin{lstlisting}
foo
z \quad
\pnode{testL1}
\fnode[linecolor=lightgray,framesize=6pt 50pt](0,.5ex){eqL}
\pnode(0,2ex){testL2}
\quad
=
\quad%
\pnode{testR1}
\fnode[linecolor=lightgray,framesize=6pt 50pt](0,.5ex){eqR}
\pnode(0,2ex){testR2}
\quad
z
\ncline[linecolor=red]{testL1}{testR1}
\ncline[linecolor=blue]{testL2}{testR2}
bar
\bigskip now with an aligned node
\psset{nodealign=true}
foo
z \quad
\pnode{testL1}
\fnode[linecolor=lightgray,framesize=6pt 50pt](0,.5ex){eqL}
\pnode(0,2ex){testL2}
\quad
=
\quad%
\pnode{testR1}
\fnode[linecolor=lightgray,framesize=6pt 50pt](0,.5ex){eqR}
\pnode(0,2ex){testR2}
\quad
z
\ncline[linecolor=red]{testL1}{testR1}
\ncline[linecolor=blue]{testL2}{testR2}
bar
\end{lstlisting}
\part{\nxLPack{pst-plot} -- package}
\section{\nxLFile{pst-plot.tex} (\pstplotFV -- \pstplotFD)}
To be more consistent to other macro names there are now the names
\Lcs{psparametricplot}, \Lcs{psfileplot}, \Lcs{pslistplot}, and
\Lcs{psdataplot}. The old macros without the preceeding \verb+ps+
still work!
There is now a new \PS boolean variable which can control loops.
With setting \texttt{/\Lps{ps@Exit} true def} you can leave a loop
for plotting a function with \Lcs{psplot} and \Lcs{psparametricplot}.
\part{\nxLPack{pst-tree} -- package}
\section{\nxLFile{pst-tree.tex} (\psttreeFV -- \psttreeFD)}
The package \LPack{pst-tree} now uses the advanced key handling from \LPack{xkeyval}. The reason
why it moved from the base into the contrib sections, where all packages uses \LPack{xkeyval}.
\nocite{*}
\bibliographystyle{plain}
\bibliography{PSTricks}
\printindex
\end{document}
|