\documentclass[12pt]{article} \listfiles \usepackage{filecontents} \begin{filecontents*}{demo0.dat} 0.1414 0.0052 0.2828 0.0217 0.4243 0.0480 0.5657 0.0890 0.7071 0.1375 0.8485 0.1906 0.9899 0.2663 1.1314 0.3580 1.2728 0.4644 1.4142 0.5801 1.5556 0.7033 1.6971 0.8899 1.8385 1.1143 1.9799 1.2593 2.1213 1.5692 2.2627 3.2331 2.4042 4.4097 2.5456 5.8186 2.6870 7.4441 2.8284 8.2287 \end{filecontents*} \begin{filecontents*}{demo1.dat} 1 99447169 2 110351058 3 123557238 4 138346129 5 145050826 6 160363212 7 174000394 8 183856559 9 189128691 10 197634845 11 213257357 12 216899512 13 230152738 14 224144907 15 247410024 16 261168438 17 252920343 18 326153799 19 319442110 20 310351522 21 381919943 22 438043888 23 357527766 24 603304997 \end{filecontents*} \begin{filecontents*}{demo2.dat} 1989 3.08 1990 3.84 1991 4.08 1992 3.21 1993 5.23 1994 2.97 1995 2.53 1996 2.8 1997 2.78 1998 3.15 1999 2.32 2000 2.4 2001 2.46 \end{filecontents*} \begin{filecontents*}{demo3.dat} 1989 3.08 1990 3.1 1991 3.08 1992 3.21 1993 5.0 1994 2.27 1995 3.53 1996 3.8 1997 2.8 1998 4.15 1999 3.32 2000 1.4 2001 2.46 \end{filecontents*} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{pamathx} \usepackage[scaled]{luximono} %\usepackage{mathptmx} \usepackage[lmargin=2.5cm,bmargin=3cm]{geometry} \usepackage{tabularx} \usepackage{graphicx,ragged2e} \usepackage{xkvview} \usepackage[svgnames,dvipsnames,table]{pstricks} \usepackage{framed,xspace,multirow,caption} \usepackage{pst-eucl,pst-fun} \usepackage{pstricks-add} \let\pstricksaddFV\fileversion \def\PST{\texttt{PSTricks}} \newcommand*\PostScript{\textsf{PostScript}\xspace} % % \usepackage{longtable} \usepackage{pifont} \def\textat{\protect\makeatletter\texttt{@}\protect\makeatother} \makeatletter \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.5em}} \renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}} \renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} \renewcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}} \renewcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}} \makeatother \let\psEllipticArc\psellipticarc \let\psEllipticArcN\psellipticarcn \let\psWedgeEllipse\psellipticwedge %\parindent=0pt \newcommand\verbI[1]{{\small\texttt{#1}}} \newcommand\CMD[1]{{\texttt{\textbackslash#1}}} \let\param\texttt % \newcommand{\pstEllipse}[5][]{% \psset{#1} \parametricplot{#4}{#5}{#2\space t cos mul #3\space t sin mul}% } % \newcommand{\pstEllipseWedge}[5][]{% \psset{#1} \pscustom{% \parametricplot{#4}{#5}{#2\space t cos mul #3\space t sin mul}% \psline(! #2\space #5\space cos mul #3\space #5\space sin mul)% (0,0)% (! #2\space #4\space cos mul #3\space #4\space sin mul)% }% } % \psset{subgriddiv=0,griddots=5,gridlabels=7pt} % \DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}} \def\PS{PostScript} % %\renewcommand{\ttdefault}{ul9}% Luxi Mono \parindent=0pt \parskip=1ex plus 5pt \usepackage[colorlinks,linktocpage]{hyperref} \makeatletter \def\verbatim@font{\small\normalfont\ttfamily} \makeatother \usepackage{showexpl} \lstset{preset=\RaggedRight} \lstdefinestyle{syntax}{backgroundcolor=\color{blue!20},numbers=none,xleftmargin=0pt,xrightmargin=0pt, frame=single} \usepackage{amsmath} \newdimen\fullWidth \makeatletter \renewcommand\ON{% \gdef\lst@alloverstyle##1{% \fboxrule=0pt \fboxsep=0pt \fcolorbox{DarkBlue}{DarkBlue}{\textcolor{white}{\bfseries\strut##1}}% }} \renewcommand\OFF{% \xdef\lst@alloverstyle##1{##1}% } \makeatother \lstset{escapechar=§} \begin{document} \fullWidth=\linewidth \advance\fullWidth by \marginparsep \advance\fullWidth by \marginparwidth \title{\texttt{pstricks-add}\\additionals Macros for \texttt{pstricks}% %\thanks{% % This document was written with \texttt{Kile: 1.7 (Qt: 3.1.1; KDE: 3.3;} % \url{http://sourceforge.net/projects/kile/}) and the PDF output % was build with VTeX/Free (\url{http://www.micropress-inc.com/linux})} \\ \small v.\pstricksaddFV} \author{Dominique Rodriguez and Herbert Vo\ss} \date{\today} \maketitle \begin{abstract} This version of \verb+pstricks-add+ needs \verb+pstricks.tex+ version >1.04 from June 2004, otherwise the additional macros may not work as espected. The ellipsis material and the option \verb+asolid+ (renamed to \verb+eofill+) are \index{fillstyle!eofill@\texttt{eofill}} now part of the new \verb+pstricks.tex+ package, available at CTAN or at \url{http://perce.de/LaTeX/}. \verb+pstricks-add+ will for ever be an experimental and dynamical package, try it at your own risk. \begin{itemize} \item It is important to load \verb+pstricks-add+ as \textbf{last} PSTricks related package, otherwise a lot of the macros won't work in the expected way. \item \verb+pstricks-add+ uses the extended version of the keyval package. So be sure, that you have installed \verb+pst-xkey+ which is part of the \verb+xkeyval+-package and that all packages, that uses the old keyval interface are loaded \textbf{before} the \verb+xkeyval+.\cite{xkeyval} \item the option \verb+tickstyle+ from \verb+pst-plot+ is no more supported, use \verb+ticksize+ instead. \item the option \verb+xyLabel+ is no more supported, use the option \verb+labelFontSize+ instead. \end{itemize} \end{abstract} \clearpage \tableofcontents \clearpage %-------------------------------------------------------------------------------------- \part{\texttt{pstricks}} %-------------------------------------------------------------------------------------- %-------------------------------------------------------------------------------------- \section{Numeric functions} %-------------------------------------------------------------------------------------- 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{lstlisting}[style=syntax] \makeatletter \let\pstdivide\pst@divide \makeatother \end{lstlisting} or put the macro inside of the \verb+\makeatletter+ -- \verb+\makeatother+ sequence. %-------------------------------------------------------------------------------------- \subsection{\CMD{pst\textat{}divide}} %-------------------------------------------------------------------------------------- \verb+pstricks+ itself has its own divide macro, called \verb+\pst@divide+ which can divide two lengthes and saves the quotient as a floating point number: \index{Division} % \begin{lstlisting}[style=syntax] \pst@divide{}{}{} \end{lstlisting} \begin{LTXexample}[width=2cm] \makeatletter \pst@divide{34pt}{6pt}\quotient \quotient\\ \pst@divide{-6pt}{34pt}\quotient \quotient \makeatother \end{LTXexample} \noindent this gives the output $5.66666$. The result is not a length! %-------------------------------------------------------------------------------------- \subsection{\CMD{pst\textat{}mod}} %-------------------------------------------------------------------------------------- \verb+pstricks-add+ defines an additional numeric function for the modulus: \index{Modulus} \begin{lstlisting}[style=syntax] \pst@mod{}{}{} \end{lstlisting} \begin{LTXexample}[width=2cm] \makeatletter \pst@mod{34}{6}\modulo \modulo\\ \pst@mod{25}{-6}\modulo \modulo \makeatother \end{LTXexample} \noindent this gives the output $4$. Using this internal numeric functions in documents requires a setting inside the \verb+makeatletter+ and \verb+makeatother+ environment. It makes some sense to define a new macroname in the preamble to use it throughou, e.g. \verb+\let\modulo\pst@mod+. %-------------------------------------------------------------------------------------- \subsection{\CMD{pst\textat{}max}} %-------------------------------------------------------------------------------------- \begin{lstlisting}[style=syntax] \pst@max{}{}{} \end{lstlisting} \begin{LTXexample}[width=2cm] \newcount\maxNo \makeatletter \pst@max{-34}{-6}\maxNo \the\maxNo\\ \pst@max{0}{11}\maxNo \the\maxNo \makeatother \end{LTXexample} %-------------------------------------------------------------------------------------- \subsection{\CMD{pst\textat{}maxdim}} %-------------------------------------------------------------------------------------- \begin{lstlisting}[style=syntax] \pst@maxdim{}{}{} \end{lstlisting} \begin{LTXexample}[width=2cm] \newdimen\maxDim \makeatletter \pst@maxdim{34cm}{1234pt}\maxDim \the\maxDim\\ \pst@maxdim{34cm}{123pt}\maxDim \the\maxDim \makeatother \end{LTXexample} %-------------------------------------------------------------------------------------- \subsection{\CMD{pst\textat{}abs}} %-------------------------------------------------------------------------------------- \begin{lstlisting}[style=syntax] \pst@abs{}{} \end{lstlisting} \begin{LTXexample}[width=2cm] \newcount\absNo \makeatletter \pst@abs{-34}\absNo \the\absNo\\ \pst@abs{4}\absNo \the\absNo \makeatother \end{LTXexample} %-------------------------------------------------------------------------------------- \subsection{\CMD{pst\textat{}absdim}} %-------------------------------------------------------------------------------------- \begin{lstlisting}[style=syntax] \pst@absdim{}{} \end{lstlisting} \begin{LTXexample}[width=2cm] \newdimen\absDim \makeatletter \pst@absdim{-34cm}\absDim \the\absDim\\ \pst@absdim{4sp}\absDim \the\absDim \makeatother \end{LTXexample} %-------------------------------------------------------------------------------------- \section{Dashed Lines} %-------------------------------------------------------------------------------------- Tobias Nähring implemented an enhanced feature for dashed lines. The number of arguments is no more limited. \begin{lstlisting}[style=syntax] dash=value1[unit] value2[unit] ... \end{lstlisting} \begin{LTXexample}[width=0.4\linewidth] \psset{linewidth=2.5pt,unit=0.6} \begin{pspicture}(-5,-4)(5,4) \psgrid[subgriddiv=0,griddots=10,gridlabels=0pt] \psset{linestyle=dashed} \pscurve[dash=5mm 1mm 1mm 1mm,linewidth=0.1](-5,4)(-4,3)(-3,4)(-2,3) \psline[dash=5mm 1mm 1mm 1mm 1mm 1mm 1mm 1mm 1mm 1mm](-5,0.9)(5,0.9) \psccurve[linestyle=solid](0,0)(1,0)(1,1)(0,1) \psccurve[linestyle=dashed,dash=5mm 2mm 0.1 0.2,linetype=0](0,0)(-2.5,0)(-2.5,-2.5)(0,-2.5) \pscurve[dash=3mm 3mm 1mm 1mm,linecolor=red,linewidth=2pt](5,-4)(5,2)(4.5,3.5)(3,4)(-5,4) \end{pspicture} \end{LTXexample} %-------------------------------------------------------------------------------------- \section{\CMD{rmultiput}: a multiple \CMD{rput}} %-------------------------------------------------------------------------------------- \verb+PSTricks+ already knows a \verb+multirput+, which puts a box n times with 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{lstlisting}[style=syntax] \rmultiput[]{}(x1,y1)(x2,y2) ... (xn,yn) \rmultiput*[]{}(x1,y1)(x2,y2) ... (xn,yn) \end{lstlisting} \begin{LTXexample}[width=6.2cm] \psset{unit=0.75} \begin{pspicture}(-4,-4)(4,4) \rmultiput[rot=45]{\red\psscalebox{3}{\ding{250}}}% (-2,-4)(-2,-3)(-3,-3)(-2,-1)(0,0)(1,2)(1.5,3)(3,3) \rmultiput[rot=90,ref=lC]{\blue\psscalebox{2}{\ding{253}}}% (-2,2.5)(-2,2.5)(-3,2.5)(-2,1)(1,-2)(1.5,-3)(3,-3) \psgrid[subgriddiv=0,gridcolor=lightgray] \end{pspicture} \end{LTXexample} %-------------------------------------------------------------------------------------- \section{\CMD{psrotate}: Rotating objects} %-------------------------------------------------------------------------------------- \CMD{rput} also has an optional argument for rotating objects, but always 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{lstlisting}[style=syntax] \psrotate[options](x,y){rot angle}{} \end{lstlisting} \begin{LTXexample}[width=0.4\linewidth] \psset{unit=0.75} \begin{pspicture}(-0.5,-3.5)(8.5,4.5) \psaxes{->}(0,0)(-0.5,-3)(8.5,4.5) \psdots[linecolor=red,dotscale=1.5](2,1) \psarc[linecolor=red,linewidth=0.4pt,showpoints=true] {->}(2,1){3}{0}{60} \pspolygon[linecolor=green,linewidth=1pt](2,1)(5,1.1)(6,-1)(2,-2) \psrotate(2,1){60}{% \pspolygon[linecolor=blue,linewidth=1pt](2,1)(5,1.1)(6,-1)(2,-2)} \end{pspicture} \end{LTXexample} \begin{LTXexample}[width=6cm] \def\canne{% Idea by Manuel Luque \psgrid[subgriddiv=0](-1,0)(1,5) \pscustom[linewidth=2mm]{\psline(0,4)\psarcn(0.3,4){0.3}{180}{360}}% \pscircle*(0.6,4){0.1}\pstriangle*(0,0)(0.2,-0.3)} \def\Object{} \begin{pspicture}(-1,-1)(3,6) \canne \psrotate(0.3,4){45}{\psset{linecolor=red!50}\canne} \psrotate(0.3,4){90}{\psset{linecolor=blue!50}\canne} \psrotate(0.3,4){360}{\psset{linecolor=cyan!50}\canne} \psdot[linecolor=red](0.3,4) \end{pspicture} \end{LTXexample} \begin{LTXexample}[pos=t,wide] \def\majorette{\psline[linewidth=0.5mm](0,2)% Idea by Manuel Luque \pscircle[fillstyle=solid]{0.1} \pscircle[fillstyle=solid](0,2){0.1}} \begin{pspicture}(0,-6)(15,5) \psaxes[linewidth=0.5pt]{->}(0,0)(0,-5)(15,5) \pstVerb{/V0 10 def /Alpha 45 def}% vitesse initiale, angle de lancement \multido{\nT=0.0+0.05,\iA=0+40}{41}{% \pstVerb{/nT \nT\space def}% \rput(!V0 Alpha cos mul nT mul -9.81 2 div nT dup mul mul V0 Alpha sin mul nT mul add){% \psrotate(0,1){\iA}{\majorette\psdot[linecolor=red](0,1)\psdot[linecolor=green](0,2)}}} \parametricplot[linecolor=red]{0}{2}{% trajectoire du milieu V0 Alpha cos mul t mul -9.81 2 div t dup mul mul V0 Alpha sin mul t mul add 1 add} \parametricplot[linecolor=green,plotpoints=360]{0}{2}{% d'une extrémité V0 Alpha cos mul t mul 800 t mul sin sub % x(t) -9.81 2 div t dup mul mul V0 Alpha sin mul t mul add 1 add 800 t mul cos add }%y(t) \end{pspicture} \end{LTXexample} \clearpage %-------------------------------------------------------------------------------------- \section{\CMD{psHomothetie}: central dilatation} %-------------------------------------------------------------------------------------- \begin{lstlisting}[style=syntax] \psHomothetie[](
){}{} \end{lstlisting} \begin{LTXexample}[width=9cm] \begin{pspicture}[showgrid=true](-5,-4)(4,8) \psBill% needs package pst-fun \psHomothetie[linecolor=blue](4,-3){2}{\psBill} \psdots[dotsize=3pt,linecolor=red](4,-3) \pstVerb{ /m -3 -0.85 sub 4 0.6 sub div def } \psplot[linestyle=dashed,linecolor=red]{-5}{4}{ m x mul m 4 mul sub 3 sub } \psHomothetie[linecolor=green](4,-3){-0.2}{\psBill} \end{pspicture} \end{LTXexample} \clearpage %-------------------------------------------------------------------------------------- \section{\CMD{psbrace}} %-------------------------------------------------------------------------------------- \subsection{Syntax} \begin{lstlisting}[style=syntax] \psbrace[]()(){} \psbrace*[]()(){} \end{lstlisting} \begin{LTXexample}[width=4.5cm] \begin{pspicture}(4,4) \psgrid[subgriddiv=0,griddots=10] \pnode(0,0){A} \pnode(4,4){B} \psbrace[linecolor=red,ref=lC](A)(B){Text I} \psbrace*[linecolor=blue,ref=lC](3,4)(0,1){Text II} \psbrace[fillcolor=white](3,0)(3,4){III} \end{pspicture} \end{LTXexample} \bigskip The option \verb|\specialCoor| is enabled, so that all types of coordinates are possible, (nodename), ($x,y$), ($nodeA|nodeB$), \ldots The star version fills the inner of the brace with the current linecolor. With the fillcolor \verb+white+ or any other background color the brace can be "`unfilled"'. %-------------------------------------------------------------------------------------- \subsection{Options} %-------------------------------------------------------------------------------------- Additional to all other available options from \verb|pstricks| or the other related packages, there are two new option, named \verb|braceWidth| and \verb|bracePos|. All important ones are shown in the following graphics and table. \begin{center} \begin{pspicture}[showgrid=true](10,5) \psbrace[braceWidth=1cm,braceWidthInner=1cm, braceWidthOuter=1cm,bracePos=0.6,fillcolor=white, nodesepA=10mm,nodesepB=10mm](0,5)(10,5){\fbox{Label}} \pcline{<->}(3,3)(3,4)\ncput*{\footnotesize\ttfamily braceWidth} \pcline{<->}(3,4)(3,5)\ncput*{\footnotesize\ttfamily braceWidthInner} \pcline{<->}(3,2)(3,3)\ncput*{\footnotesize\ttfamily braceWidthOuter} \pcline{<->}(6,1)(6,2)\ncput{\footnotesize\ttfamily nodesepB} \pcline{<->}(6,1)(7,1)\ncput*{\footnotesize\ttfamily A} \pcline{<->}(0,0.5)(6,0.5)\ncput*{\footnotesize\ttfamily bracePos} \psdot[dotscale=2](0,5)\uput[0](0,5){\textbf{A}} \psdot[dotscale=2](10,5)\uput[180](10,5){\textbf{B}} \end{pspicture} \end{center} A positive value for \verb+nodesepA+ and \verb+B+ shifts the label to the right (\verb+nodesepA+) and down (\verb+nodesepB+). This does not depends the the value for the rotating of the label! \begin{center} \begin{tabular}{l|l} name & meaning\\\hline \verb|braceWidth| & default is \verb+2\pslinewidth+\\ \verb|braceWidthInner| & default is \verb+10\pslinewidth+\\ \verb|braceWidthOuter| & default is \verb+10\pslinewidth+\\ \verb|bracePos| & relative position (default is $0.5$)\\ \verb|nodesepA| & x-separation (default is $0pt$)\\ \verb|nodesepB| & y-separation (default is $0pt$)\\ \verb|rot| & additional rotating for the text (default is $0$)\\ \verb|ref| & reference point for the text (default is c)\\ \verb|fillcolor| & default is black \end{tabular} \end{center} By default the text is written perpedicular to the brace line and can be changed with the \verb|pstricks| option \verb|rot=...|. The text parameter can take any object and may also be empty. The reference point can be any value of the combination of \verb|l| (left) or \verb|r| (right) and \verb|b| (bottom) or \verb|B| (Baseline) or \verb|C| (center) or \verb|t| (top), where the default is \verb|c|, the center of the object. %-------------------------------------------------------------------------------------- %\subsection{Examples} %-------------------------------------------------------------------------------------- \begin{LTXexample} \begin{pspicture}(8,2.5) \psbrace(0,0)(0,2){\fbox{Text}}% \psbrace[nodesepA=10pt](2,0)(2,2){\fbox{Text}} \psbrace[ref=lC](4,0)(4,2){\fbox{Text}} \psbrace[ref=lt,rot=90,nodesepB=-15pt](6,0)(6,2){\fbox{Text}} \psbrace[ref=lt,rot=90,nodesepA=-5pt,nodesepB=15pt](8,2)(8,0){\fbox{Text}} \end{pspicture} \end{LTXexample} \begin{LTXexample} \def\someMath{$\int\limits_1^{\infty}\frac{1}{x^2}\,dx=1$} \begin{pspicture}(8,2.5) \psbrace[ref=lC](0,0)(0,2){\someMath}% \psbrace[rot=90](2,0)(2,2){\someMath} \psbrace[ref=lC](4,0)(4,2){\someMath} \psbrace[ref=lt,rot=90,nodesepB=-30pt](6,0)(6,2){\someMath} \psbrace[ref=lt,rot=90,nodesepB=30pt](8,2)(8,0){\someMath} \end{pspicture} \end{LTXexample} %$ \begin{LTXexample} \begin{pspicture}(\linewidth,5) \psbrace(0,0.5)(\linewidth,0.5){\fbox{Text}}% \psbrace[bracePos=0.25,nodesepB=10pt,rot=90](0,2)(\linewidth,2){\fbox{Text}} \psbrace[ref=lC,nodesepA=-3.5cm,nodesepB=15pt,rot=90](0,4)(\linewidth,4){% \fbox{some very, very long wonderful Text}} \end{pspicture} \end{LTXexample} \begin{LTXexample}[width=8cm,wide] \psset{unit=0.8} \begin{pspicture}(10,11) \psgrid[subgriddiv=0,griddots=10] \pnode(0,0){A} \pnode(4,6){B} \psbrace[ref=lC](A)(B){One} \psbrace[rot=180,nodesepA=-5pt,ref=rb](B)(A){Two} \psbrace[linecolor=blue,bracePos=0.25,ref=lB](8,1)(1,7){Three} \psbrace[braceWidth=-1mm,rot=180,ref=rB](8,1)(1,7){Four} \psbrace*[linearc=0.5,linecolor=red,linewidth=3pt,braceWidth=1.5pt, bracePos=0.25,ref=lC](8,1)(8,9){A} \psbrace(4,9)(6,9){} \psbrace(6,9)(6,7){} \psbrace(6,7)(4,7){} \psbrace(4,7)(4,9){} \psset{linecolor=red} \psbrace*[ref=lb](7,10)(3,10){I} \psbrace*[ref=lb,bracePos=0.75](3,10)(3,6){II} \psbrace*[ref=lb](3,6)(7,6){III} \psbrace*[ref=lb](7,6)(7,10){IV} \end{pspicture} \end{LTXexample} %$ \begin{LTXexample}[wide,width=5cm] \[ \begin{pmatrix} \Rnode[vref=2ex]{A}{~1} \\ & \ddots \\ && \Rnode[href=2]{B}{1} \\ &&& \Rnode[vref=2ex]{C}{0} \\ &&&& \ddots \\ &&&&& \Rnode[href=2]{D}{0}~ \\ \end{pmatrix} \] \psbrace[rot=-90,nodesepB=-0.5,nodesepA=-0.2](B)(A){\small n times} \psbrace[rot=-90,nodesepB=-0.5,nodesepA=-0.2](D)(C){\small n times} \end{LTXexample} \clearpage It is also possible to put a vertical brace around a default paragraph. This works with setting two invisible nodes at the beginning and the end of the paragraph. Inentation is possible with a minipage. \begin{framed} Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. \noindent\rnode{A}{} \vspace*{-1ex} Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. \vspace*{-2ex}\noindent\rnode{B}{}\psbrace*[linecolor=red](A)(B){} Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. \medskip\hfill\begin{minipage}{0.95\linewidth} \noindent\rnode{A}{} \vspace*{-1ex} Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. \vspace*{-2ex} \noindent\rnode{B}{}\psbrace[linecolor=red](A)(B){} \end{minipage} \end{framed} \begin{lstlisting} \begin{framed} Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. \noindent\rnode{A}{} \vspace*{-1ex} Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. \vspace*{-2ex}\noindent\rnode{B}{}\psbrace[linecolor=red](A)(B){} Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. \medskip\hfill\begin{minipage}{0.95\linewidth} \noindent\rnode{A}{} \vspace*{-1ex} Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. Some nonsense text, which is nothing more than nonsense. \vspace*{-2ex}\noindent\rnode{B}{}\psbrace[linecolor=red](A)(B){} \end{minipage} \end{framed} \end{lstlisting} \clearpage %-------------------------------------------------------------------------------------- \section{Random dots} %-------------------------------------------------------------------------------------- The syntax of the new macro \verb+\psRandom+ is: \begin{lstlisting}[style=syntax] \psRandom[