summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pstricks/pst-news18.tex
blob: ac3ec7c4a4cfe0ad931de5fe8dea3b6fe3721d5d (plain)
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
%% $Id: pst-news18.tex 4 2020-06-09 08:32:19Z herbert $
\documentclass[11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small,
    headinclude=false,footinclude=false,twoside]{pst-doc}
\listfiles
\let\Lfile\LFile
\usepackage{pstricks,pst-node}
\let\pstnodeFV\fileversion
\let\pstnodeFD\filedate
\usepackage{pst-plot}
\usepackage{pst-solides3d}
\usepackage{pst-node}
\usepackage{pst-calculate}
\usepackage{pstricks-add}
\usepackage{xkvview}
\renewcommand\bgImage{\psscalebox{15}{\color{blue!20}\the\year}}
\def\textat{\char064}
\usepackage{dtk-logos}
\usepackage{biblatex}
\addbibresource{PSTricks.bib}

\lstset{explpreset={pos=l,width=-99pt,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={}},
    escapechar=?}
\begin{document}

%\psset{PstDebug=1}
\title{\texttt{News -- \the\year}\\ \Large new macros and bugfixes for the
basic package \nxLFile{pstricks}}
\author{Herbert Voß}
\date{\today}

\maketitle

\clearpage
\tableofcontents

\clearpage
\part{\texttt{pstricks} -- package}

%--------------------------------------------------------------------------------------
\section{\texttt{pstricks.sty} -- \texttt{pstricks-pdf.sty}}
%--------------------------------------------------------------------------------------

There is now a new optional argument for the package: \Loption{ckeckengine}, which will
be used in later versions. 
 
%--------------------------------------------------------------------------------------
\section{\texttt{pstricks-tex.tex}}
%--------------------------------------------------------------------------------------
This package collects all additional latex macros which must be definied
when running PSTricks with tex.  They all moved from the base \texttt{pstricks.tex} into
this new file.


%--------------------------------------------------------------------------------------
\section{\texttt{pstricks.tex} (v. 2.89 -- 2018/12/16)}
%--------------------------------------------------------------------------------------

Use the \Lcs{long} definition for \Lcs{@fornoop} to be compatible to the latest
changes in \LaTeX.

In old versions the macro \Lcs{rput} can't be used with the key-value setting. The latest version
of \Lfile{pstricks.tex} defines a modified \Lcs{rput} which ckecks first if a following
optional argument has the old behaviour, eg \Lcs{rput}\texttt{[lb]\{...\}} or 
a key/value setting like \Lcs{rput}\texttt{[ref=lb,rot=...](...)}. However, there should be no
change in the output and, of course, it makes no sense to mix the old and new setting in \emph{one}
\Lcs{rput} macro. The setting refers only to the optional arguments which are valid for \Lcs{rput}:

\begin{LTXexample}[width=6cm]
\begin{pspicture}[showgrid](6,5)
\rput[ref=rt](3,2){%
  \psframe[linecolor=red](3,3)}
\rput[lb](0,0){\psframe(3,3)}
\rput{45}(3,0.5){\psframe(3,3)}
\end{pspicture}
\end{LTXexample}

\subsection{PostScript Fonts}
This version of PSTricks uses the Ghostscript fonts from URW instead of the
original base 14 fonts of PostScript. For example: instead of Helvetica we use
NimbusSanL-Regu. The URW fonts are always embedded in the created ps or pdf output.
This is not the default for the PostScript fonts. You change this setting with the optional
argument to \LPack{pstricks.sty}.


\subsection{Error message}

Using PSTricks with \Lprog{pdflatex} will work only when using package
\LPack{auto-pst-pdf} and running the \TeX-file with

\begin{verbatim}
pdflatex -shell-escape <file>
\end{verbatim}

otherwise you'll get an error message which was misleading in the past:

\begin{verbatim}
[...]
! Undefined control sequence.
<recently read> \c@lor@to@ps 
\end{verbatim}

This changes now to 


\begin{verbatim}
[...]
! Undefined control sequence.
\c@lor@to@ps ->\PSTricks 
                         _Not_Configured_For_This_Format
\end{verbatim}

\subsection{Random colors}
There are now four predefined random ''colors``:

\begin{verbatim}
  \definecolor[ps]{randomgray}{gray}{Rand}%
  \definecolor[ps]{randomrgb}{rgb}{Rand Rand Rand}%
  \definecolor[ps]{randomcmyk}{cmyk}{Rand Rand Rand Rand}%
  \definecolor[ps]{randomhsb}{hsb}{Rand Rand Rand}%
\end{verbatim}

\begin{LTXexample}[pos=t]
\begin{pspicture}(10,5)
\multido{\rA=0.0+0.1}{50}{\psline[linecolor=randomgray,linewidth=1mm](0,\rA)(10,\rA)}
\end{pspicture}
\end{LTXexample}

\begin{LTXexample}[pos=t]
\begin{pspicture}(10,5)
\multido{\rA=0.0+0.1}{50}{\psline[linecolor=randomrgb,linewidth=1mm](0,\rA)(10,\rA)}
\end{pspicture}
\end{LTXexample}


\begin{LTXexample}[pos=t]
\begin{pspicture}(10,5)
\multido{\rA=0.0+0.1}{50}{\psline[linecolor=randomcmyk,linewidth=1mm](0,\rA)(10,\rA)}
\end{pspicture}
\end{LTXexample}


\begin{LTXexample}[pos=t]
\begin{pspicture}(10,5)
\multido{\rA=0.0+0.1}{50}{\psline[linecolor=randomhsb,linewidth=1mm](0,\rA)(10,\rA)}
\end{pspicture}
\end{LTXexample}


The random counter can be initialized with \verb|\pstVerb{rrand srand}|.


\subsection{Optional argument \texttt{xetex}}
The output driver \Lprog{xdvipdfmx} for using \XeTeX\  or  \XeLaTeX\ is not fully
compatible to \Lprog{dvips}. Especially some node operations will not work. If the
\LaTeX\  package detects a programm run with \XeLaTeX\ it automatically loads the file
\Lfile{pstricks-xetex.def} which defines some macros with a new name to keep the existing
ones. By now there is only
\Lcs{NCput}, which is the same as \Lcs{ncput}, but works with \XeLaTeX.

If someone wants to use these macros though he/she runs not \XeLaTeX\ then these macros are
available too by using the optional argument \Loption{xetex}:

\begin{verbatim}
\usepackage[xetex]{pstricks}
\end{verbatim}






%--------------------------------------------------------------------------------------
\section{\texttt{pstricks.pro}}
%--------------------------------------------------------------------------------------

A full circle has by default an angle of 360 degrees. 
Setting the circle with \Lcs{degrees}\Largs{17} to another value doesn't work for the 
PostScript function \texttt{PtoC} (Polat to Cartesian -- $(r,\phi)\rightarrow (x,y)$).
Now there is a \texttt{PtoCrel} for the new definition 
which now takes
the setting of \Lcs{pst@angleunit}  into account.

\bigskip
\begin{LTXexample}[pos=t]
\degrees[16]
\begin{pspicture}[showgrid](-2,-2)(2,2)
\psline[linecolor=blue](!1.8 2 PtoCrel)%  45 degrees
\end{pspicture}
\end{LTXexample}

The command \Lcs{framed} was build by clockwise line sequence. Now it is the
other way round to get the same  behaviour as for all other commands
with closed lines.


There are some new PS functions

\begin{verbatim}
/AnytoDeg { pst@angleunit } def 
/DegtoAny { 1 pst@angleunit div} def
/AnytoRad { AnytoDeg DegtoRad } def 
/RadtoAny { RadtoDeg DegtoAny } def
\end{verbatim}

See \LPack{pst-node} documentation for an example.


\clearpage
\nocite{*}
\printbibliography

\printindex


\end{document}