summaryrefslogtreecommitdiff
path: root/graphics/pstricks/base/doc/pst-news19.tex
blob: c670a6697d5dee0a44029978c900000c3188acb6 (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
217
%% $Id: pst-news19.tex 4 2020-06-09 08:32:19Z herbert $
\PassOptionsToPackage{useCalc}{pstricks}
\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}
\let\pstnodeFV\fileversion
\let\pstnodeFD\filedate
\usepackage{pst-node}
\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.98 -- 2019/05/16)}
%--------------------------------------------------------------------------------------

\subsection{Plotting multilines}

There is a new macro called \Lcs{psLine} (uppercase L!) which can have
only one or two pairs of coordinates. Remember that \Lcs{psline} can have more.
With \Lcs{psLine} and an defined arrow you'll get nothing for something
like \verb|\psLine{->}{1,1)(1,1)|, whereas \Lcs{psline} will output the arrowtip!
This behaviour of \Lcs{psLine} maybe helpful for animations where a speedvector
or a vector
is  shown with its components and one do not really knows the coordinates.

\begin{BDef}
\Lcs{psLine}\OptArgs\OptArg{\Largr{$x_0,y_0$}}\Largr{$x_1,y_1$}\\
\Lcs{psLineSegments}\OptArgs\Largr{$x_0,y_0$}\Largr{$x_1,y_1$}\ldots\Largr{$x_{n-1},y_{n-1}$}\Largr{$x_n,y_n$}
\end{BDef}

If $P_0$ is missing for \Lcs{psLine} then $(0,0)$ as first point is assumed. \Lcs{psLineSegments} expects always
pairwise coordinates.


\begin{LTXexample}[width=7cm]
\psset{unit=2cm}
\begin{pspicture}(-1,-1)(1,1)
\degrees[12]
 \pscircle{1}
  \multido{\iA=0+1,\iB=3+1}{12}{%
    \pnode(1;\iA){R}
    \psLine[linecolor=gray,linestyle=dashed,
       linewidth=0.4pt](R)
    \psset{arrows=->,arrowscale=1.5,linewidth=1.5pt}
    \rput(R){%
      \psLine[linecolor=blue]({1;\iB}|0,0)
      \psLine[linecolor=red](0,0|{1;\iB})
      \psLine(1;\iB)}%
}
\end{pspicture}
\end{LTXexample}


\begin{LTXexample}[width=4cm]
\psset{unit=0.5cm}
\begin{pspicture}(6,6)
\psLineSegments[linecolor=blue]{->}(0,0)(0,1)(0,2)(0,3)(0,4)(1,4)%
     (3,4)(4,4)(4,3)(4,1)(4,0)(2,0)
\end{pspicture}
\end{LTXexample}


\iffalse
There is a new experimental feature, which allows algebraic notation for
coordinates. It needs

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

\begin{LTXexample}[width=5.5cm]
\begin{pspicture}[showgrid](5,5)
\psline[linecolor=blue]{->}%
    (0,4/3*0.5)(0.6*sqrt{33}, sqrt{20+0.3})
\end{pspicture}
\end{LTXexample}

\fi
%$

\subsection{Relative coordinates -- experimental}

All objects which can have at least two pairs of coordinates
can use the »+«-operator to mark relative coordinates:

\begin{BDef}
\Lcs{psline}\OptArgs\OptArg{\Largr{$x_0,y_0$}}\Largr{$x_1,y_1$}+\Largr{$x_2,y_2$}\ldots\\
\end{BDef}

\begin{LTXexample}[width=5.5cm]
\begin{pspicture}[showgrid](5,5)
\psline[linecolor=blue]{->}%
    (1,1)+(3,4)+(-2,-3)
\end{pspicture}
\end{LTXexample}


\begin{LTXexample}[width=5.5cm]
\begin{pspicture}[showgrid](-1,-2)(4,3)
\psaxes[labels=none]{->}(0,0)(-1,-2)(4,3)
\psbezier%
  (!0.8 -95 PtoC 1 sub)+(8.5;85)+(5;-100)(2,1)%
 +(1;-70)+(0.5;-110)(3,2)%
 +(1;-80)+(0.5;95)(3.4,-0.8)
\end{pspicture}
\end{LTXexample}




\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{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}}
%--------------------------------------------------------------------------------------



\clearpage
\nocite{*}
\printbibliography

\printindex


\end{document}