diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-25 17:41:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-25 17:41:22 +0000 |
commit | c37f8dff2993909bf786eeac757115b0027e3ed9 (patch) | |
tree | 374f091c2e913c34f296ab6da9001fe42528e0fe /Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex | |
parent | c8bac3012e23bdd0b9f0d776c73da394ecb3ac76 (diff) |
pstricks-add update (24sep07)
git-svn-id: svn://tug.org/texlive/trunk@5034 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex | 316 |
1 files changed, 164 insertions, 152 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex index 25a3ff2df72..3cf252acc0b 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex @@ -91,7 +91,8 @@ \usepackage[lmargin=2.5cm,bmargin=3cm]{geometry} \usepackage{tabularx} \usepackage{graphicx,ragged2e} -\usepackage[svgnames,dvipsnames]{pstricks} +\usepackage{xkvview} +\usepackage[svgnames,dvipsnames,table]{pstricks} \usepackage{framed,xspace,multirow,caption} \usepackage{pst-eucl,pst-fun} \usepackage{pstricks-add} @@ -149,6 +150,8 @@ \makeatother \usepackage{showexpl} \lstset{preset=\RaggedRight} +\lstdefinestyle{syntax}{backgroundcolor=\color{blue!20},numbers=none,xleftmargin=0pt,xrightmargin=0pt, + frame=single} \usepackage{amsmath} \newdimen\fullWidth @@ -220,11 +223,11 @@ packages, that uses the old keyval interface are loaded \textbf{before} the \ver All macronames contain a \textat{} in their name, because they are only for internal use, but it is no problem to use it as the other macros. One can define another name without a \textat{}: -\begin{verbatim} +\begin{lstlisting}[style=syntax] \makeatletter \let\pstdivide\pst@divide \makeatother -\end{verbatim} +\end{lstlisting} or put the macro inside of the \verb+\makeatletter+ -- \verb+\makeatother+ sequence. @@ -236,9 +239,9 @@ or put the macro inside of the \verb+\makeatletter+ -- \verb+\makeatother+ seque can divide two lengthes and saves the quotient as a floating point number: \index{Division} % -\begin{verbatim} +\begin{lstlisting}[style=syntax] \pst@divide{<dividend>}{<divisor>}{<result as a macro>} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=2cm] \makeatletter @@ -255,9 +258,9 @@ can divide two lengthes and saves the quotient as a floating point number: \verb+pstricks-add+ defines an additional numeric function for the modulus: \index{Modulus} -\begin{verbatim} +\begin{lstlisting}[style=syntax] \pst@mod{<integer>}{<integer>}{<result as a macro>} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=2cm] \makeatletter @@ -275,9 +278,9 @@ It makes some sense to define a new macroname in the preamble to use it througho \subsection{\CMD{pst\textat{}max}} %-------------------------------------------------------------------------------------- -\begin{verbatim} +\begin{lstlisting}[style=syntax] \pst@max{<integer>}{<integer>}{<result as count register>} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=2cm] \newcount\maxNo @@ -292,9 +295,9 @@ It makes some sense to define a new macroname in the preamble to use it througho \subsection{\CMD{pst\textat{}maxdim}} %-------------------------------------------------------------------------------------- -\begin{verbatim} +\begin{lstlisting}[style=syntax] \pst@maxdim{<dimension>}{<dimension>}{<result as dimension register>} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=2cm] \newdimen\maxDim @@ -308,9 +311,9 @@ It makes some sense to define a new macroname in the preamble to use it througho \subsection{\CMD{pst\textat{}abs}} %-------------------------------------------------------------------------------------- -\begin{verbatim} +\begin{lstlisting}[style=syntax] \pst@abs{<integer>}{<result as a count register>} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=2cm] \newcount\absNo @@ -324,9 +327,9 @@ It makes some sense to define a new macroname in the preamble to use it througho \subsection{\CMD{pst\textat{}absdim}} %-------------------------------------------------------------------------------------- -\begin{verbatim} +\begin{lstlisting}[style=syntax] \pst@absdim{<dimension>}{<result as a dimension register>} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=2cm] \newdimen\absDim @@ -342,9 +345,9 @@ It makes some sense to define a new macroname in the preamble to use it througho Tobias Nähring implemented an enhanced feature for dashed lines. The number of arguments is no more limited. -\begin{verbatim} +\begin{lstlisting}[style=syntax] dash=value1[unit] value2[unit] ... -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=0.4\linewidth] \psset{linewidth=2.5pt,unit=0.6} @@ -366,10 +369,10 @@ dash=value1[unit] value2[unit] ... a difference of $dx$ and $dy$ relativ to each other. It is not possible to put it with a different distance from one point to the next one. This is possible with \verb+rmultiput+: -\begin{verbatim} +\begin{lstlisting}[style=syntax] \rmultiput[<options>]{<any material>}(x1,y1)(x2,y2) ... (xn,yn) \rmultiput*[<options>]{<any material>}(x1,y1)(x2,y2) ... (xn,yn) -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=6.2cm] \psset{unit=0.75} @@ -390,9 +393,9 @@ depending to the \CMD{rput} coordinates. With \CMD{psrotate} the rotating center can be placed anywhere. The rotation is done with \verb+\pscustom+, all optional arguments are only valid if they are part of the \verb+\pscustom+ macro. -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psrotate[options](x,y){rot angle}{<object>} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=0.4\linewidth] \psset{unit=0.75} @@ -448,9 +451,9 @@ macro. \section{\CMD{psHomothetie}: central dilatation} %-------------------------------------------------------------------------------------- -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psHomothetie[<options>](<center>){<factor>}{<object>} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=9cm] \begin{pspicture}[showgrid=true](-5,-4)(4,8) @@ -471,10 +474,10 @@ macro. \section{\CMD{psbrace}} %-------------------------------------------------------------------------------------- \subsection{Syntax} -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psbrace[<options>](<A>)(<B>){<text>} \psbrace*[<options>](<A>)(<B>){<text>} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=4.5cm] @@ -715,12 +718,12 @@ Some nonsense text, which is nothing more than nonsense. %-------------------------------------------------------------------------------------- The syntax of the new macro \verb+\psRandom+ is: -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psRandom[<option>]{} \psRandom[<option>]{<clip path>} \psRandom[<option>](<xMax,yMax>){<clip path>} \psRandom[<option>](<xMin,yMin>)(<xMax,yMax>){<clip path>} -\end{verbatim} +\end{lstlisting} If there is no area for the dots defined, then \verb+(0,0)(1,1)+ in the actual scale is used for placing the dots. This area should be greater than the clipping @@ -870,9 +873,9 @@ name & default\\\hline You can also mix and match, e.g., \verb/->/, \verb/*-)/ and \verb/[->/ are all valid values of the \verb|arrows| parameter. The parameter can be set with -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psset{arrows=<type>} -\end{verbatim} +\end{lstlisting} \noindent or for some macros with a special option, like\\[5pt] \noindent\verb|\psline[<general options>]{<arrow type>}(A)(B)|\\ @@ -956,9 +959,9 @@ $e_b:S$ & 1 & & 1 & 0 \\ This is another type of an arrow and abbreviated with \verb+H+. The length and width of the hook is set by the new options \verb+hooklength+ and \verb+hookwidth+, which are by default set to % -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psset{hooklength=3mm,hookwidth=1mm} -\end{verbatim} +\end{lstlisting} % If the line begins with a right hook then the line ends with a left hook and vice versa: @@ -1552,44 +1555,11 @@ With the option \verb|intSeparator| the symbol can be changed to any any non-num %-------------------------------------------------------------------------------------- \subsection{Transparent colors} %-------------------------------------------------------------------------------------- -With the new defined fillstyle \verb|transparent| -\index{transparent@\texttt{transparent}} -\index{fillstyle!transparent@\texttt{transparent}} -and running the \verb|ps2pdf14| script to create the \verb|pdf| document, one can use the -\verb+transpalpha+ keyword to define a value for the alpha channel to get a transparent -color. Possible values are $0\le\mathrm{transpalpha}\le1$ which is a range from -totally transparent and not transparent. Without using the \verb|pdf14| format -it is not possible to get the transparency effect. The following example shows -the transparency effect for the values \verb|transpalpha=0.4| and \verb|transpalpha=0.8|. - -% run through latex -> dvips -> ps2pdf14(!) and view -% with Acrobat >= 5.0 - -\vfill -\begin{center} -\bgroup -\psset{fillstyle=transparent,linestyle=none} -\multido{\rA=0.4+0.4}{2}{ - \begin{pspicture}(-3.25,-3.25)(3.25,3.25) - \pscircle[fillcolor=green,transpalpha=\rA](2;135){2cm} - \pscircle[fillcolor=red,transpalpha=\rA](2;45){2cm} - \pscircle[fillcolor=blue,transpalpha=\rA](1;-90){2cm} - \end{pspicture} -} -\egroup -\end{center} +Transparency ist now part of the main \texttt{pstricks} package. But pay attention, +the names and syntax changed and you need to run \verb+ps2pdf+ with the option +\verb+-dCompatibilityLevel=1.4+. -\begin{lstlisting} -\psset{fillstyle=transparent,linestyle=none} -\multido{\rA=0.4+0.4}{2}{ - \begin{pspicture}(-3.25,-3.25)(3.25,3.25) - \pscircle[fillcolor=green,transpalpha=\rA](2;135){2cm} - \pscircle[fillcolor=red,transpalpha=\rA](2;45){2cm} - \pscircle[fillcolor=blue,transpalpha=\rA](1;-90){2cm} - \end{pspicture} -} -\end{lstlisting} %-------------------------------------------------------------------------------------- \subsection{,,Manipulating Transparent colors''} @@ -1633,9 +1603,9 @@ They are used as \PST styles and not as colors: \subsection{Calculated colors} %-------------------------------------------------------------------------------------- The \verb+xcolor+ package (version 2.6) has a new feature for defining colors: -\begin{verbatim} +\begin{lstlisting}[style=syntax] \definecolor[ps]{<name>}{<model>}{< PS code >} -\end{verbatim} +\end{lstlisting} \verb+model+ can be one of the color models, which PostScript will understand, e.g. \verb+rgb+. With this definition the color is calculated on PostScript side. @@ -1790,9 +1760,9 @@ of calculating lighting for each pixel. The technique was first presented by Hen PostScript level 3 supports this kind of shading and it could only be seen with Acroread 7 or younger. Die Syntax is easy: -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psGTriangle(x1,y1)(x2,y2)(x3,y3){color1}{color2}{color3} -\end{verbatim} +\end{lstlisting} \psset{unit=0.75cm} @@ -1861,10 +1831,10 @@ is only a static \verb|armA|, the second one \verb|armB| is calculated when an a \verb|lineAngle| is defined. This angle is the gradient of the intermediate line between the two arms. The syntax of \verb|ncdiag| is -\begin{verbatim} +\begin{lstlisting}[style=syntax] \ncdiag[<options>]{<Node A>}{<Node B>} \pcdiag[<options>](<Node A>)(<Node B>) -\end{verbatim} +\end{lstlisting} \begin{tabularx}{\linewidth}{l|X} @@ -1952,10 +1922,10 @@ This is nearly the same than \verb+\ncdiag+ except that \verb+armB=0+ and the \v value is computed by the macro, so that the line ends at the node with an angle like a \verb+\pcdiagg+ line. The syntax of \verb|ncdiagg|/\verb+pcdiagg+ is -\begin{verbatim} +\begin{lstlisting}[style=syntax] \ncdiag[<options>]{<Node A>}{<Node B>} \pcdiag[<options>](<Node A>)(<Node B>) -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=5cm] \begin{pspicture}(4,6) @@ -2056,14 +2026,15 @@ symmetrical to the distance of the two nodes. \end{LTXexample} %-------------------------------------------------------------------------------------- -\section{\CMD{psRelNode}} +\section{\CMD{psRelNode} and \CMD{psDefPSPNodes}} %-------------------------------------------------------------------------------------- -With this macro it is possible to put a node relative to a given line. Parameter are +With these macros it is possible to put a node relative to a given line or given +\verb+pspicture+-environment. In the frist case the parameters are the angle and the length factor: -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psRelNode(<P0>)(<P1>){<length factor>}{<end node name>} \psRelLine[<options>](<P0>)(<P1>){<length factor>}{<end node name>} -\end{verbatim} +\end{lstlisting} The length factor depends to the distance of $\overline{P_0P_1}$ and the end node name must be a valid nodename and shouldn't contain any of the special PostScript characters. There are @@ -2089,18 +2060,50 @@ mathematical one, which respect the scaling factors \verb+xunit+ and \verb+yunit \end{pspicture} \end{LTXexample} +In the second case the new macro \verb+\psDefPSPNodes+ defines nine nodes that corresponds to +nine particular points (namely bottom left, bottom center, +bottom right, center left, center center, center right, top left, +top center, top right) of the \verb+pspicture+ box. + +\begin{LTXexample}[width=6cm,wide=false] +\begin{pspicture}[showgrid=true](-1,-1)(4,4) + \psDefPSPNodes + \psdots(PSPbl)(PSPbc)(PSPbr) + (PSPcl)(PSPcc)(PSPcr)(PSPtl)(PSPtc)(PSPtr) + \uput[90](PSPbl){PSPbl} \uput[90](PSPbc){PSPbc} + \uput[90](PSPbr){PSPbr} \uput[90](PSPcl){PSPcl} + \uput[90](PSPcc){PSPcc} \uput[90](PSPcr){PSPcr} + \uput[90](PSPtl){PSPtl} \uput[90](PSPtc){PSPtc} + \uput[90](PSPtr){PSPtr} +\end{pspicture} +\end{LTXexample} + +The name of the nodes are predefined as: + +\begin{lstlisting}[style=syntax] +\psset[pst-PSPNodes]{blName=PSPbl,bcName=PSPbc,brName=PSPbr, + clName=PSPcl,ccName=PSPcc,crName=PSPcr,tlName=PSPtl,tcName=PSPtc,trName=PSPtr} +\end{lstlisting} + +and can be modified in the same way. +%I guess you modified the family to have the pstricks-add one so the +%\xkvview would have to be adapted. + + + %-------------------------------------------------------------------------------------- \section{\CMD{psRelLine}} %-------------------------------------------------------------------------------------- With this macro it is possible to plot lines relative to a given one. Parameter are the angle and the length factor: -\begin{verbatim} + +\begin{lstlisting}[style=syntax] \psRelLine(<P0>)(<P1>){<length factor>}{<end node name>} \psRelLine{<arrows>}(<P0>)(<P1>){<length factor>}{<end node name>} \psRelLine[<options>](<P0>)(<P1>){<length factor>}{<end node name>} \psRelLine[<options>]{<arrows>}(<P0>)(<P1>){<length factor>}{<end node name>} -\end{verbatim} +\end{lstlisting} The length factor depends to the distance of $\overline{P_0P_1}$ and the end node name must be a valid nodename and shouldn't contain any of the special PostScript characters. There are @@ -2255,12 +2258,13 @@ and \verb+angle+. %-------------------------------------------------------------------------------------- With this macro it is possible to plot lines relative to a given one, which is parallel. There is no special parameter here. -\begin{verbatim} + +\begin{lstlisting}[style=syntax] \psParallelLine(<P0>)(<P1>)(<P2>){<length>}{<end node name>} \psParallelLine{<arrows>}(<P0>)(<P1>)(<P2>){<length>}{<end node name>} \psParallelLine[<options>](<P0>)(<P1>)(<P2>){<length>}{<end node name>} \psParallelLine[<options>]{<arrows>}(<P0>)(<P1>)(<P2>){<length>}{<end node name>} -\end{verbatim} +\end{lstlisting} The line starts at $P_2$, is parallel to $\overline{P_0P_1}$ and the length of this parallel line depends to the length factor. The end node name must @@ -2288,9 +2292,9 @@ be a valid nodename and shouldn't contain any of the special PostScript characte %-------------------------------------------------------------------------------------- This macro calculates the intersection point of two lines, given by the four coordinates. There is no special parameter here. -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psIntersectionPoint(<P0>)(<P1>)(<P2>)(<P3>){<node name>} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=5.5cm] \psset{unit=0.5cm} @@ -2315,9 +2319,9 @@ There is no special parameter here. \CMD{psLNode} interpolates the Line $\overline{AB}$ by the given value and sets a node at this point. The syntax is % -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psLNode(P1)(P2){value}{Node name} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=5cm] \begin{pspicture}(5,5) @@ -2340,9 +2344,9 @@ vectors and stores the end of the new vector as a node. All vectors start at $(0,0)$, so a \verb+\rput+ maybe appropriate. The syntax is % -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psLCNode(P1){value 1}(P2){value 2}{Node name} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=5cm] \begin{pspicture}(5,5) @@ -2371,10 +2375,10 @@ node. The syntax is different to the other node connection makros. It uses internally the macro \CMD{psLDNode} which places a node absolute to two given points, starting from the first one. -\begin{verbatim} +\begin{lstlisting}[style=syntax] \nlput[options](A)(B){distance}{text} \psLDNode[options](A)(B){distance}{node name} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=5cm] @@ -2403,9 +2407,9 @@ two given points, starting from the first one. The axes macro has now two additional optional arguments for placing labels at the end of the axes: -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psaxes[settings]{arrows}(x0,y0)(x1,y1)(x2,y2)[Xlabel,Xangle][Ylabel,Yangle] -\end{verbatim} +\end{lstlisting} It has now four optional arguments, one for the setting, one for the arrows, one for the x-label and one for the y-label. If you want only a y-label, then leave the @@ -2420,6 +2424,7 @@ package, because everything can be set by the \verb+ticksize+ option. When using shouldn't be redefined, because the package does it itself in these cases. { \ttfamily +\rowcolors{0}{blue!20}{red!30} \begin{longtable}{lll} \caption{All new parameters for \texttt{pst-plot}}\\[-5pt] \textrm{Name} & \textrm{Type} & \textrm{Default}\\\hline @@ -2497,7 +2502,7 @@ ChangeOrder & false|true & false\\ This option sets the horizontal \textbf{and} vertical font size for the labels. It will be overwritten when another package or a user defines -\begin{lstlisting} +\begin{lstlisting}[style=syntax] \def\pshlabel#1{...} \def\psvlabel#1{...} \end{lstlisting} @@ -2619,6 +2624,7 @@ For the \verb+\parametricplot+ the two parts must be divided by the \verb+|+ cha +\clearpage %-------------------------------------------------------------------------------------- \subsubsection{Using the \texttt{Sum} function} %-------------------------------------------------------------------------------------- @@ -2732,9 +2738,9 @@ big number for \verb+plotpoints+. \subsection{\texttt{comma}} %-------------------------------------------------------------------------------------- Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] comma=false|true -\end{verbatim} +\end{lstlisting} Setting this option to true gives labels with a comma as a decimal separator instead of the dot. \verb|comma| and \verb|comma=true| is the same. @@ -2753,11 +2759,11 @@ of the dot. \verb|comma| and \verb|comma=true| is the same. \subsection{\texttt{xyAxes}, \texttt{xAxis} and \texttt{yAxis}} %-------------------------------------------------------------------------------------- Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] xyAxes=true|false xAxis=true|false yAxis=true|false -\end{verbatim} +\end{lstlisting} Sometimes there is only a need for one axis with ticks. In this case you can set one of the following options to false. The \verb+xyAxes+ makes only sense, when you want @@ -2792,11 +2798,11 @@ short and therefore invisible x-axis (right example). \subsection{\texttt{xyDecimals}, \texttt{xDecimals} and \texttt{yDecimals}} %-------------------------------------------------------------------------------------- Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] xyDecimals=<number> xDecimals=<any> yDecimals=<any> -\end{verbatim} +\end{lstlisting} By default the labels of the axes get numbers with or without decimals, just depending to the numbers. With these options \verb|??Decimals| it is possible to determine the decimals, where the option \verb|xyDecimals| sets this identical for both axes. @@ -2825,9 +2831,9 @@ The default setting \verb|{}| means, that you'll get the standard behaviour. \subsection{\texttt{ticks}} %-------------------------------------------------------------------------------------- Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] ticks=all|x|y|none -\end{verbatim} +\end{lstlisting} This option is also already in the \verb+pst-plot+ package and only mentioned here for some completness. @@ -2859,10 +2865,10 @@ some completness. Single ticks can be set with the two macros % -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psxTick[options](x value){label} \psyTick[options](y value){label} -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=.5\linewidth] @@ -2876,9 +2882,9 @@ Single ticks can be set with the two macros \subsection{\texttt{labels}} %-------------------------------------------------------------------------------------- Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] labels=all|x|y|none -\end{verbatim} +\end{lstlisting} This option is also already in the \verb+pst-plot+ package and only mentioned here for some completness. @@ -2917,14 +2923,14 @@ With this new option the recent \verb+tickstyle+ option of \verb+pst-plot+ is ob and no more supported by \verb+pstricks-add+. Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] ticksize=value[unit] ticksize=value[unit] value[unit] xticksize=value[unit] xticksize=value[unit] value[unit] yticksize=value[unit] yticksize=value[unit] value[unit] -\end{verbatim} +\end{lstlisting} \verb+ticksize+ sets both values. The first one is left/below and the optional second one is right/above of the coordinate axis. The old setting \verb+tickstyle=bottom+ is @@ -2960,9 +2966,9 @@ A grid is also possible by setting the values to the max/min coordinates. \subsection{\texttt{subticks}} %-------------------------------------------------------------------------------------- Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] subticks=<number> -\end{verbatim} +\end{lstlisting} By default subticks cannot have labels. @@ -2997,11 +3003,11 @@ By default subticks cannot have labels. %-------------------------------------------------------------------------------------- Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] subticksize=value xsubticksize=value ysubticksize=value -\end{verbatim} +\end{lstlisting} \verb+subticksize+ sets both values, which are relative to the ticksize length and can have any number. 1 sets it to the same length as the main ticks. @@ -3021,14 +3027,14 @@ can have any number. 1 sets it to the same length as the main ticks. \subsection{\texttt{tickcolor}, \texttt{subtickcolor}} %-------------------------------------------------------------------------------------- Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] tickcolor=<color> xtickcolor=<color> ytickcolor=<color> subtickcolor=<color> xsubtickcolor=<color> ysubtickcolor=<color> -\end{verbatim} +\end{lstlisting} \verb+tickcolor+ and \verb+subtickcolor+ set both for the x- and the y-Axis. @@ -3055,14 +3061,14 @@ ysubtickcolor=<color> \subsection{\texttt{ticklinestyle} and \texttt{subticklinestyle}} %-------------------------------------------------------------------------------------- Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] ticklinestyle=solid|dashed|dotted|none xticklinestyle=solid|dashed|dotted|none yticklinestyle=solid|dashed|dotted|none subticklinestyle=solid|dashed|dotted|none xsubticklinestyle=solid|dashed|dotted|none ysubticklinestyle=solid|dashed|dotted|none -\end{verbatim} +\end{lstlisting} \verb+ticklinestyle+ and \verb+subticklinestyle+ set both values for the x and y axis. The value \verb+none+ doesn't really makes sense, because it is the same to @@ -3084,9 +3090,9 @@ value \verb+none+ doesn't really makes sense, because it is the same to \subsection{\texttt{loglines}} %-------------------------------------------------------------------------------------- Syntax: -\begin{verbatim} +\begin{lstlisting}[style=syntax] loglines=all|x|y -\end{verbatim} +\end{lstlisting} \begin{LTXexample}[width=5.5cm] \pspicture(0,-1)(5,5) @@ -3328,6 +3334,7 @@ This is only a demonstration that the default option \verb|logBase={}| still wor \psaxes[yAxis=false,subticks=0,tickcolor=red]{->}(0,0)(5,5)(-5,-5) \end{lstlisting} +\clearpage \vspace*{4cm} \begin{center} \psset{arrowscale=3} @@ -3458,7 +3465,6 @@ of the value. \pstScalePoints(1,1){}{}% reset \end{LTXexample} -\clearpage %-------------------------------------------------------------------------------------- \subsection{Plot style \texttt{bar} and option \texttt{barwidth}} %-------------------------------------------------------------------------------------- @@ -3539,7 +3545,7 @@ With the option \verb+trigLabels=true+ the labels on the x axis are trigonometri The option \verb+trigLabelBase+ set the demoninator of fraction. The default value of 0 is the same as no fraction. The following constants are are defined in the package: -\begin{lstlisting} +\begin{lstlisting}[style=syntax] \def§\ON§\psPiFour§\OFF§{12.566371} \def§\ON§\psPiTwo§\OFF§{6.283185} \def§\ON§\psPi§\OFF§{3.14159265} @@ -3938,9 +3944,9 @@ Name & Default setting\\\hline These new options are only available for the \verb|\listplot| macro, which is not a real limitation, because all data records can be read from a file with the \verb|\readdata| macro (see example files or \cite{dtk02.2:jackson.voss:plot-funktionen}): -\begin{verbatim} +\begin{lstlisting}[style=syntax] \readdata[nStep=10]{\data}{/home/voss/data/data1.dat} -\end{verbatim} +\end{lstlisting} The use \verb|nStep| and \verb|xStep| options make only real sense when also using the option \verb|plotstyle=dots|. Otherwise the coordinates are connected by a line as usual. Also the \verb|xStep| option needs increasing x values. @@ -4105,18 +4111,18 @@ possible to have a kind of a zoom to the original graphic. %-------------------------------------------------------------------------------------- By default the plot macros expect \verb+x|y+ data records, but when having data files with multiple values for y, like: -\begin{verbatim} +\begin{lstlisting}[style=syntax] x y1 y2 y3 y4 ... yMax x y1 y2 y3 y4 ... yMax ... -\end{verbatim} +\end{lstlisting} you can select the y value which should be plotted. The option \verb+plotNo+ marks the plotted value (default $1$) and the option \verb+plotNoMax+ tells \verb+pst-plot+ how many $y$ values are present. There are no real restrictions in the maximum number for \verb+plotNoMax+. We have the following data file: -\begin{verbatim} +\begin{lstlisting}[style=syntax] [% file examples/data.dat 0 0 3.375 0.0625 10 5.375 7.1875 4.5 @@ -4132,7 +4138,7 @@ We have the following data file: 110 6.8125 -2.75 -4.75 120 5.25 2.875 -0.75 ]% -\end{verbatim} +\end{lstlisting} \noindent which holds data records for multiple plots (\verb+x y1 y2 y3+). This can be plotted without any modification to the data file: @@ -4296,16 +4302,16 @@ and \verb+xEnd+-values. With the option \verb+polarplot=false|true+ it is possible to use \verb+\psplot+ in polar mode: -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psplot[polarplot=true,...]{<start angle>}{<end angle>}{<r(alpha)>} -\end{verbatim} +\end{lstlisting} The equation in PostScript code is interpreted as a function $r=f(\alpha)$, e.g. for the circle with radius 1 as $r=\sqrt{\sin^2x+\cos^2x}$: -\begin{verbatim} +\begin{lstlisting}[style=syntax] x sin dup mul x cos dup mul add sqrt -\end{verbatim} +\end{lstlisting} \medskip @@ -4369,9 +4375,9 @@ x sin dup mul x cos dup mul add sqrt \section{\CMD{pstScalePoints}} %-------------------------------------------------------------------------------------- The syntax is -\begin{verbatim} +\begin{lstlisting}[style=syntax] \pstScalePoints(xScale,xScale){xPS}{yPS} -\end{verbatim} +\end{lstlisting} \verb+xScale,yScale+ are decimal values as scaling factors, the \verb+xPs+ and \verb+yPS+ are additional PostScript code to the x- and y-values of the data records. This macro @@ -4401,9 +4407,9 @@ Changes with \verb+\pstScalePoints+ are always global to all following \verb+\li macros. This is the reason why it is a good idea to reset the values at the end of the \verb+pspicture+ environment. -\begin{verbatim} +\begin{lstlisting}[style=syntax] \pstScalePoints(1,1){}{} -\end{verbatim} +\end{lstlisting} %-------------------------------------------------------------------------------------- @@ -4416,7 +4422,7 @@ macros. This is the reason why it is a good idea to reset the values at the end This new environment does the scaling, it expects as parameter the values (without units!) for the coordinate system and the values of the physical width and height (with units!). The syntax is: -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psgraph[<axes options>]{<arrows>}% (xOrig,yOrig)(xMin,yMin)(xMax,yMax){xLength}{yLength} ... @@ -4426,7 +4432,7 @@ coordinate system and the values of the physical width and height (with units!). (xOrig,yOrig)(xMin,yMin)(xMax,yMax){xLength}{yLength} ... \end{psgraph} -\end{verbatim} +\end{lstlisting} where the options are valid \textbf{only} for the the \verb+\psaxes+ macro. The first two arguments have the usual \verb+PSTricks+ behaviour. @@ -5699,9 +5705,9 @@ where $y$ is a function of $x$. We define some vectors $Y=[y, y', \cdots , y^{( und $Y^\prime=[y^\prime, y^{\prime\prime}, \cdots , y^{n}]$, depending to the order $n$. The syntax of the macro is -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psplotDiffEqn[options]{x0}{x1}{y0}{f(x,y,y',...)} -\end{verbatim} +\end{lstlisting} \begin{itemize}\setlength\itemsep{0pt}\setlength\parsep{0pt}\setlength\parskip{0pt} \item \verb+options+: the \verb+\psplotDiffEqn+ specific options and all other of PSTricks, which @@ -6139,22 +6145,22 @@ with $y_0=1$: For the initial value $y(0)=1$ the exact solution is $y(x)=\displaystyle\frac{t+\sqrt{4-t^2}}{2}$. The function $f$ described in PostScript code is like (y ist still on the stack): -\begin{verbatim} +\begin{lstlisting}[style=syntax] x %% y x mul %% x*y 2 exch sub %% 2-x*y 4 x dup mul %% 2-x*y 4 x^2 sub %% 2-x*y 4-x^2 div %% (2-x*y)/(4-x^2) -\end{verbatim} +\end{lstlisting} \noindent The following example uses $y_0=1$. -\begin{verbatim} +\begin{lstlisting}[style=syntax] \newcommand{\InitCond}{1} \newcommand{\Func}{x mul 2 exch sub 4 x dup mul sub div} \newcommand{\FuncAlg}{(2-x*y[0])/(4-x^2)} -\end{verbatim} +\end{lstlisting} \begin{center} \bgroup @@ -6464,9 +6470,9 @@ Pour des faibles oscillations $\sin(y)\simeq y$: The function $f$ is writen in PostScript code: -\begin{verbatim} +\begin{lstlisting}[style=syntax] exch RadtoDeg sin -9.8 mul %% y' -gsin(y) -\end{verbatim} +\end{lstlisting} \begin{center} \bgroup @@ -6514,14 +6520,14 @@ Pour $y_0=5$ et $y'_0=0$ la solution est : \iffalse La fonction $f$ est d�rite par le code PostScript suivant : -\begin{verbatim} +\begin{lstlisting}[style=syntax] dup %% y y' y' 3 1 roll %% y' y y' -4 div %% y' y y'/-4 exch %% y' y'/-4 y 2 mul %% y' y'/-4 2y sub %% y' y'/-4-2y -\end{verbatim} +\end{lstlisting} \fi \begin{center} @@ -6666,7 +6672,7 @@ est remarquable. This macro allows to visualize a matrix. The datafile must be defined as a PostScript matrix named \verb+/dotmatrix+: -\begin{verbatim} +\begin{lstlisting}[style=syntax] /dotmatrix [ % <------------ important line 0 1 1 0 0 0 0 1 1 1 0 1 1 0 1 1 1 0 1 0 @@ -6679,13 +6685,13 @@ named \verb+/dotmatrix+: 1 1 0 0 0 0 1 0 0 1 1 0 1 0 0 1 1 1 0 0 ] def % <------------ important line -\end{verbatim} +\end{lstlisting} Important is only the value 0, in this case there happens nothing and for all other cases a dot is printed. The syntax of the macro is: -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psMatrixPlot[options]{rows}{columns}{data file} -\end{verbatim} +\end{lstlisting} The matrix is scanned line by line from the the first one to the last. In general it looks vice versa than the above listed matrix, the first row $0\,1\,1\,0\,0\,0\,0\,1\,1\,1$ @@ -6727,9 +6733,9 @@ the above view. The macro \CMD{psforeach} allows a loop with an individuell increment. -\begin{verbatim} +\begin{lstlisting}[style=syntax] \psforeach{variable}{value list}{action} -\end{verbatim} +\end{lstlisting} \begin{LTXexample} \begin{pspicture}[showgrid=true](5,5) @@ -6789,6 +6795,12 @@ PostScript uses the stack system and the LIFO system, "'Last In, First Out"`. \end{table} +\clearpage +\section{List of all optional arguments for \texttt{pstricks-add}} + +\xkvview{family=pstricks-add,columns={key,type,default}} + + %-------------------------------------------------------------------------------------- \section{Credits} %-------------------------------------------------------------------------------------- |