From 836f497d5ba479fdc19164951941f051cdd804d0 Mon Sep 17 00:00:00 2001 From: Manuel Pégourié-Gonnard Date: Sat, 21 Jun 2008 14:42:14 +0000 Subject: pstricks update git-svn-id: svn://tug.org/texlive/trunk@8901 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/generic/pstricks/Changes.dvips | 33 + Master/texmf-dist/doc/generic/pstricks/Makefile | 105 +- .../texmf-dist/doc/generic/pstricks/defaults.pst | 149 +++ Master/texmf-dist/doc/generic/pstricks/psd-3d.tex | 12 + .../texmf-dist/doc/generic/pstricks/psd-basi.tex | 648 ++++++++++ .../texmf-dist/doc/generic/pstricks/psd-cove.tex | 108 ++ .../texmf-dist/doc/generic/pstricks/psd-cust.tex | 406 +++++++ .../texmf-dist/doc/generic/pstricks/psd-esse.tex | 392 ++++++ .../texmf-dist/doc/generic/pstricks/psd-fill.tex | 12 + .../texmf-dist/doc/generic/pstricks/psd-help.tex | 332 +++++ .../texmf-dist/doc/generic/pstricks/psd-node.tex | 1279 ++++++++++++++++++++ .../texmf-dist/doc/generic/pstricks/psd-para.tex | 345 ++++++ .../texmf-dist/doc/generic/pstricks/psd-pict.tex | 500 ++++++++ .../texmf-dist/doc/generic/pstricks/psd-spec.tex | 500 ++++++++ .../texmf-dist/doc/generic/pstricks/psd-text.tex | 260 ++++ .../texmf-dist/doc/generic/pstricks/psd-tree.tex | 816 +++++++++++++ .../texmf-dist/doc/generic/pstricks/pst-user.cls | 1111 +++++++++++++++++ .../texmf-dist/doc/generic/pstricks/pst-user.ist | 7 + .../texmf-dist/doc/generic/pstricks/pst-user.tex | 87 ++ .../texmf-dist/doc/generic/pstricks/pst-user.tgz | Bin 76080 -> 0 bytes 20 files changed, 7074 insertions(+), 28 deletions(-) create mode 100644 Master/texmf-dist/doc/generic/pstricks/Changes.dvips create mode 100644 Master/texmf-dist/doc/generic/pstricks/defaults.pst create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-3d.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-basi.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-cove.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-cust.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-esse.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-fill.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-help.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-node.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-para.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-pict.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-spec.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-text.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/psd-tree.tex create mode 100644 Master/texmf-dist/doc/generic/pstricks/pst-user.cls create mode 100644 Master/texmf-dist/doc/generic/pstricks/pst-user.ist create mode 100644 Master/texmf-dist/doc/generic/pstricks/pst-user.tex delete mode 100644 Master/texmf-dist/doc/generic/pstricks/pst-user.tgz (limited to 'Master/texmf-dist/doc/generic/pstricks') diff --git a/Master/texmf-dist/doc/generic/pstricks/Changes.dvips b/Master/texmf-dist/doc/generic/pstricks/Changes.dvips new file mode 100644 index 00000000000..70c6a76dbe0 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/Changes.dvips @@ -0,0 +1,33 @@ +---- pstricks.pro +1.04 2008-05-11 - added Rand for a real random 0<=Rand<=1 +1.03 2008-04-15 - only some cosmetics to the code +1.02 2008-01-01 - added the arrowtype D>, sides as curves (ArrowD) + - added the whole algebraic parser stuff + - added function tan := sin cos div + - added function Tan := sin cos Div + - added Pyth2 for 2 points given by xA yA xB yB + - change variable names from x,y to xOrig, yOrig for + EllipticArcArrow + - move font setting for \psgrid into pstricks.tex +1.01 2006-01-11 (vg) fix a bug with ArcAdjust when both angles ares negative + add Sqrt sunction +1.00 2005-09-19 move the code for arcs of an ellipse from + the main pstricks.tex into this pro +97, patch 7 2005-09-11 added new fillstyles +97, patch 6 2005-05-17 added some helper stuff + RadtoDeg, DegtoRad, Pi, TwoPi, ATAN +97, patch 5 2005-03-08 bugfix for DashLine + + +---- pst-text.pro +1.00 2005-11-29 add a patch for japanese text (hv) + + +---- pst-dots.pro +2.02 2008-04-19 add octogon symbol (hv) +2.01 2008-04-18 add some comments to the code (hv) +2.00 2006-12-19 add more dot symbols from Etienne Riga (hv) + + +---- pst-alpparser.pro +0.01 2008-01-01 initial version (hv) diff --git a/Master/texmf-dist/doc/generic/pstricks/Makefile b/Master/texmf-dist/doc/generic/pstricks/Makefile index 38c4f089a4f..ce772c9e8cd 100644 --- a/Master/texmf-dist/doc/generic/pstricks/Makefile +++ b/Master/texmf-dist/doc/generic/pstricks/Makefile @@ -1,48 +1,97 @@ -# `Makefile' for `pst-3dplot.pdf', hv, 2007/03/17 +# Rolf Niepraschk, niepraschk@ptb.de, 2003-02-23 -.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps +.SUFFIXES : .tex .dvi .ps .pdf .eps -PACKAGE = pst-news2008 - -MAIN = $(PACKAGE) +MAIN = pst-user +# D.G. modification begin - Feb. 28, 2003 +#LATEX = elatex LATEX = latex +# D.G. modification end +PDFLATEX = pdfelatex +PS2PDF = ps2pdf -ARCHNAME = $(MAIN)-$(shell date +%y%m%d) +# D.G. modification begin - Feb. 28, 2003 +PS2PDF_OPT1 = -sPAPERSIZE=letter +#PS2PDF_OPT1 = -sPAPERSIZE=a4 +# D.G. modification end +PS2PDF_OPT2 = -sPAPERSIZE=letter -ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Changes Makefile +DVIPSFLAGS1 = -Ppdf -G0 +DVIPSFLAGS2 = -Pwww -E +#GSOPT = GS_OPTIONS=-dAutoRotatePages=/None +GSOPT = GS_OPTIONS=-dPDFSETTINGS=/prepress -all : doc clean -doc: $(MAIN).pdf +PICS := $(PICS:.eps=.pdf) -$(MAIN).pdf : $(MAIN).ps - GS_OPTIONS=-dAutoRotatePages=/None ps2pdf $< +# D.G. modification begin - Mar. 7, 2003 +#ADDINPUTS = pst-user.cls defaults.pst +ADDINPUTS = pst-user.cls defaults.pst \ + psd-cove.tex psd-esse.tex psd-basi.tex psd-para.tex psd-cust.tex \ + psd-pict.tex psd-text.tex psd-node.tex psd-tree.tex psd-fill.tex \ + psd-3d.tex psd-spec.tex psd-help.tex +# D.G. modification end -$(MAIN).ps : $(MAIN).dvi - dvips $< +ARCHNAME = $(MAIN)-$(shell date +%y%m%d).zip -$(MAIN).dvi : $(MAIN).tex - $(LATEX) $< - $(LATEX) $< - if ! test -f $(basename $<).glo ; then touch $(basename $<).glo; fi - if ! test -f $(basename $<).idx ; then touch $(basename $<).idx; fi - makeindex -s gglo.ist -t $(basename $<).glg -o $(basename $<).gls \ - $(basename $<).glo - makeindex -t $(basename $<).ilg -o $(basename $<).ind \ - $(basename $<).idx - bibtex $(basename $<) +# D.G. modification begin - Mar. 7, 2003 +TARNAME = $(MAIN)-$(shell date +%y%m%d).tar +# D.G. modification end + +# D.G. modification begin - Feb. 28, 2003 +#all : $(MAIN).pdf $(MAIN)-old.pdf +all : $(MAIN).pdf +# D.G. modification end + + +$(MAIN).dvi : $(MAIN).tex $(ADDINPUTS) $(LATEX) $< +# D.G. modification begin - Feb. 28, 2003 +# makeindex -t $(basename $<).ilg $(basename $<) +# D.G. modification end + makeindex -t $(basename $<).ilg -s pst-user.ist $(basename $<) $(LATEX) $< +$(MAIN).pdf : $(MAIN).ps + $(PS2PDF) $(PS2PDF_OPT1) $< $@ + +%.ps : %.dvi + dvips $(DVIPSFLAGS1) $< -o $@ + +pst-user-old.pdf : pst-user-old.tex pst-usr1.pdf pst-usr2.pdf pst-usr3.pdf \ + pst-usr4.pdf + $(PDFLATEX) $< + +pst-usr%.pdf : pst-usr%.ps.gz + zcat $< | $(PS2PDF) $(PS2PDF_OPT2) - > $@ + clean : - $(RM) $(addprefix $(MAIN), .log .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out .blg .Roessler .bbl ) - $(RM) $(addprefix $(MAIN), .dvi .ps) + $(RM) $(addprefix $(MAIN), .aux .ilg .ind .idx .log .out .tmp .toc) +# D.G. modification begin - Mar. 7, 2003 +# $(RM) $(addprefix $(MAIN)-old, .log .aux) +# $(RM) pst-usr?.pdf +# D.G. modification end veryclean : clean - $(RM) $(addprefix $(MAIN), .pdf .bbl .blg) + $(RM) $(addprefix $(MAIN), .ps .dvi .pdf) +# D.G. modification begin - Mar. 7, 2003 +# $(RM) $(MAIN)-old.pdf + $(RM) *.aux +# D.G. modification end arch : - zip $(ARCHNAME).zip $(ARCHFILES) + zip $(ARCHNAME) $(MAIN).tex $(ADDINPUTS) pst-user-old.tex Makefile + @ echo ; echo $(ARCHNAME) ; echo -# EOF +# D.G. modification begin - Mar. 7, 2003 +tar: + tar -cf $(TARNAME) $(MAIN).tex $(ADDINPUTS) \ + pst-user.ist pst-user.idx \ + CHANGES VERSIONS TODO \ + Makefile artistic.txt defaults.pst \ + pstricks.tex pst-eps.tex pst-node.tex pst-tree.tex \ + *.sty pst-user.pdf + gzip --force $(TARNAME) + ls -l $(TARNAME).gz +# D.G. modification end diff --git a/Master/texmf-dist/doc/generic/pstricks/defaults.pst b/Master/texmf-dist/doc/generic/pstricks/defaults.pst new file mode 100644 index 00000000000..4e3ba5f27f2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/defaults.pst @@ -0,0 +1,149 @@ +%% defaults.pst +%% Created with unix shell commands: +%% grep ^.psset\@ pstricks.tex > defaults.pst +%% grep ^.psset\@ pst-node.tex >> defaults.pst +%% grep ^.psset\@ pst-grad.tex >> defaults.pst +%% grep ^.psset\@ pst-coil.tex >> defaults.pst +%% grep ^.psset\@ pst-eps.tex >> defaults.pst +%% grep ^.psset\@ pst-plot.tex >> defaults.pst +%% grep ^.psset\@ pst-tree.tex >> defaults.pst +%% Input by pst-user.tex +\psset@swapaxes{false} +\psset@showpoints{false} +\psset@border{0pt} +\psset@bordercolor{white} +\psset@doubleline{false} +\psset@doublesep{1.25\pslinewidth} +\psset@doublecolor{white} +\psset@shadow{false} +\psset@shadowsize{3pt} +\psset@shadowangle{-45} +\psset@shadowcolor{darkgray} +\psset@linewidth{.8pt} +\psset@linecolor{black} +\psset@dash{5pt 3pt} +\psset@dashadjust{true} +\psset@dotsep{3pt} +\psset@linestyle{solid} +\psset@fillcolor{white} +\psset@hatchwidth{.8pt} +\psset@hatchsep{4pt} +\psset@hatchcolor{black} +\psset@hatchangle{45} +\psset@fillstyle{none} +\psset@arrowscale{1} +\psset@arrowsize{1.5pt 2} +\psset@arrowlength{1.4} +\psset@arrowinset{.4} +\psset@tbarsize{2pt 5} +\psset@bracketlength{.15} +\psset@rbracketlength{.15} +\psset@arrows{-} +\psset@liftpen{0} +\psset@linetype{0} +\psset@gangle{0} +\psset@curvature{1 .1 0} +\psset@dotsize{2pt 2} +\psset@dotscale{1} +\psset@dotangle{0} +\psset@dotstyle{*} +\psset@linearc{0pt} +\psset@framearc{0} +\psset@cornersize{relative} +\psset@dimen{outer} +\psset@gridwidth{.8pt} +\psset@griddots{0} +\psset@gridcolor{black} +\psset@subgridwidth{.4pt} +\psset@subgridcolor{gray} +\psset@subgriddots{0} +\psset@subgriddiv{5} +\psset@gridlabels{10pt} +\psset@gridlabelcolor{black} +\psset@framesep{3pt} +\psset@boxsep{true} +\psset@trimode{U} +\psset@arcsep{0} +\psset@radius{.25cm} +\psset@ref{c} +\psset@rot{0} +\psset@labelsep{5pt} +\psset@refangle{0} +\psset@nodealign{false} +\psset@href{0} +\psset@vref{.7ex} +\psset@framesize{10pt} +\psset@nodesep{0pt} +\psset@arm{10pt} +\psset@offset{0pt} +\psset@angle{0} +\psset@arcangle{8} +\psset@ncurv{.67} +\psset@loopsize{1cm} +\psset@boxsize{.4cm} +\psset@nrot{0} +\psset@npos{} +\psset@tpos{.5} +\psset@shortput{none} +\psset@colsep{1.5cm} +\psset@rowsep{1.5cm} +\psset@mcol{c} +\psset@mnodesize{-1pt} +\psset@mnode{R} +\psset@emnode{none} +\psset@gradbegin{gradbegin} +\psset@gradend{gradend} +\psset@gradlines{500} +\psset@gradmidpoint{.9} +\psset@gradangle{0} +\psset@coilwidth{1cm} +\psset@coilheight{1} +\psset@coilarm{.5cm} +\psset@coilaspect{45} +\psset@coilinc{10} +\psset@bbllx{0pt} +\psset@bblly{0pt} +\psset@bburx{0pt} +\psset@bbury{0pt} +\psset@headers{none} +\psset@checkfile{true} +\psset@makeeps{new} +\psset@headerfile{} +\psset@plotstyle{line} +\psset@plotpoints{50} +\psset@ticksize{3pt} +\psset@tickstyle{full} +\psset@ticks{all} +\psset@labels{all} +\psset@Ox{0} +\psset@Dx{1} +\psset@dx{0} +\psset@Oy{0} +\psset@Dy{1} +\psset@dy{0} +\psset@showorigin{true} +\psset@axesstyle{axes} +\psset@treemode{D} +\psset@treeflip{false} +\psset@root{\TC} +\psset@treesep{.75cm} +\psset@xtreesep{0pt} +\psset@treenodesize{-1pt} +\psset@treefit{tight} +\psset@treerep{1} +\psset@showbbox{false} +\psset@levelsep{2cm} +\psset@varlevelsep{false} +\psset@treeshift{0} +\psset@skiplevels{0} +\psset@unary{middle} +\psset@leafalign{false} +\psset@edge{\ncline} +\psset@skipedge{} +\psset@fansize{1cm} +\psset@tnsep{} +\psset@tnyref{} +\psset@tnheight{\ht\strutbox} +\psset@tndepth{\dp\strutbox} +\psset@tnpos{} +\endinput diff --git a/Master/texmf-dist/doc/generic/pstricks/psd-3d.tex b/Master/texmf-dist/doc/generic/pstricks/psd-3d.tex new file mode 100644 index 00000000000..9837db6e91f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/psd-3d.tex @@ -0,0 +1,12 @@ +%% BEGIN psd-3d.tex + +\part{Three Dimensional Graphics\label{P-threeD}} + +\Section{Overview} + +\File{pst-3d} +The... + +\endinput + +%% END psd-3d.tex diff --git a/Master/texmf-dist/doc/generic/pstricks/psd-basi.tex b/Master/texmf-dist/doc/generic/pstricks/psd-basi.tex new file mode 100644 index 00000000000..0d9f5ccea8b --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/psd-basi.tex @@ -0,0 +1,648 @@ +%% BEGIN psd-basi.tex + +\part{Basic graphics objects\label{P-graphics}} + +\Section{Lines and polygons\label{S-lines}} + +The objects in this section also use the following parameters: +\begin{description} + \pitem[linearc=dim] The radius of arcs drawn at the corners of lines by the + \n\psline{} and \n\pspolygon{} graphics objects. should be positive. + \pitem[framearc=num] In the \n\psframe{} and the related box framing macros, + the radius of rounded corners is set, by default, to one-half times + the width or height of the frame, whichever is less. should be between + 0 and 1. + \pitem[cornersize=relative/absolute] If \p{cornersize} is "relative", then + the \p{framearc} parameter determines the radius of the rounded corners for + \n\psframe, as described above (and hence the radius depends on the size of + the frame). If \p{cornersize} is "absolute", then the \p{linearc} parameter + determines the radius of the rounded corners for \n\psframe{} (and hence the + radius is of constant size). +\end{description} + + +Now here are the lines and polygons: +\begin{description} + +\oitem \psline`{arrows}(\x0,\y0)'(\x1,\y1)`\ldots(\x n,\y n)' + + This draws a line through the list of coordinates. For example: +\begin{MEx*}(4,2) + \psline[linewidth=2pt,linearc=.25]{->}(4,2)(0,1)(2,0) +\end{MEx*} + +\mitem \qline(coor0)(coor1) + + This is a streamlined version of \n\psline{} that does not pay attention to +the \p{arrows} parameter, and that can only draw a single line segment. Note +that both coordinates are obligatory, and there is no optional argument for +setting parameters (use \n\psset{} if you need to change the \p{linewidth}, or +whatever). For example: +\begin{MEx*}(2,1) + \qline(0,0)(2,1) +\end{MEx*} + +\oitem \pspolygon`(\x0,\y0)'(\x1,\y1)(\x2,\y2)`\ldots(\x n,\y n)' + + This is similar to \n\psline, but it draws a closed path. For example: +\begin{MEx*}(4,2) + \pspolygon[linewidth=1.5pt](0,2)(1,2) + \pspolygon*[linearc=.2,linecolor=darkgray](1,0)(1,2)(4,0)(4,2) +\end{MEx*} + +\oitem \psframe`(\x0,\y0)'(\x1,\y1) + + \n\psframe{} draws a rectangle with opposing corners \c0 and \c1. For +example: +\begin{MEx*}(4,2) + \psframe[linewidth=2pt,framearc=.3,fillstyle=solid, + fillcolor=lightgray](4,2) + \psframe*[linecolor=white](1,.5)(2,1.5) +\end{MEx*} + +\oitem \psdiamond`\c0'\c1 + + \n\psdiamond{} draws a diamond centered at \c0, and with the half width and +height equal to \x1\ and \y1, respectively. +\begin{MEx*}(4,2) + \psdiamond[framearc=.3,fillstyle=solid, + fillcolor=lightgray](2,1)(1.5,1) +\end{MEx*} + +The diamond is rotated about the center by +\begin{Ex} + \Par{gangle=gangle} +\end{Ex} + +\oitem \pstriangle`\c0'\c1 + + \n\pstriangle{} draws an isosceles triangle with the base centered at \c0, +and with width (base) and height equal to \x1{} and \y1, respectively. +\begin{MEx*}(4,2) + \pstriangle*[gangle=10](2,.5)(4,1) +\end{MEx*} + +\end{description} + +\Section{Arcs, circles and ellipses} + +\begin{description} + +\oitem \pscircle`(\x0,\y0)'{radius} + +This draws a circle whose center is at \c0 and that has radius . For +example: +\begin{MEx*}[-1,-1](2,2) + \pscircle[linewidth=2pt](.5,.5){1.5} +\end{MEx*} + +\mitem \qdisk(coor){radius} + + This is a streamlined version of \n{\pscircle*}. Note that the two arguments +are obligatory and there is no parameters arguments. To change the color of +the disks, you have to use \n\psset: +\begin{MEx}[1.9,2.9](2.1,3.1) + \psset{linecolor=gray} + \qdisk(2,3){4pt} +\end{MEx} + +\oitem \pswedge`(\x0,\y0)'{radius}{angle1}{angle2} + + This draws a wedge whose center is at \c0, that has radius , and +that extends counterclockwise from to . The angles must be +specified in degrees. For example: +\begin{MEx*}(2,2) + \pswedge[linecolor=gray,linewidth=2pt,fillstyle=solid]{2}{0}{70} +\end{MEx*} + +\oitem \psellipse`(\x0,\y0)'(\x1,\y1) + +\c0 is the center of the ellipse, and \x1 and \y1 are the horizontal and +vertical radii, respectively. For example: +% D.G. modification begin - Mar. 3, 2003 +%\begin{MEx*}[-1,-1.5](2,1) +% D.G. modification end +\begin{MEx*}[-1,-1](2,1) + \psellipse[fillcolor=lightgray](.5,0)(1.5,1) +\end{MEx*} + +\oitem \psarc`{arrows}\c~'{radius}{angleA}{angleB} + + This draws an arc from to , going counter clockwise, for a +circle of radius and centered at \c{}. You must include either the +{arrows} argument or the \c{} argument. For example: +\begin{MEx*}(3,2) + \psarc*[showpoints=true](1.5,1.5){1.5}{215}{0} +\end{MEx*} +See how \p{showpoints=true} draws a dashed line from the center to the arc; +this is useful when composing pictures. + +\n\psarc{} also uses the parameters: +\begin{description} + +\pitem[arcsepA=dim](0pt) + + is adjusted so that the arc would just touch a line of width +that extended from the center of the arc in the direction of . + +\pitem[arcsepB=dim](0pt) This is like \p{arcsepA}, but is adjusted. + +\pitem[arcsep=dim] This just sets both \p{arcsepA} and \p{arcsepB}. +\end{description} +These parameters make it easy to draw two intersecting lines and then use +\n\psarc{} with arrows to indicate the angle between them. For example: +\begin{MEx*}(4,3) + \SpecialCoor + \psline[linewidth=2pt](4;50)(0,0)(4;10) + \psarc[arcsepB=2pt]{->}{3}{10}{50} +\end{MEx*} + +\oitem \psarcn`{arrows}\c~'{radius}{angleA}{angleB} + + This is like \n\psarc, but the arc is drawn \emph{clockwise}. You can achieve +the same effect using \n\psarc{} by switching and and the +arrows.\footnote{% +However, with \n\pscustom{} graphics object, described in Part \ref{P-custom}, +\n\psarcn{} is not redundant.} + +\oitem \psellipticarc`{arrows}(\x0,\y0)'(\x1,\y1){angleA}{angleB} + + This draws an elliptic from to , going counter clockwise, +with \c0 the center of the ellipse and \x1 and \y1 the horizontal and +vertical radii, respectively. For example: +\begin{MEx*}[-1,-1](2,1) + \psellipticarc[showpoints=true,arrowscale=2]{->}(.5,0)(1.5,1){215}{0} +\end{MEx*} +See how \p{showpoints=true} draws a dashed line from the center to the arc; +this is useful when composing pictures. + +Like \n\psarc, \n\psellipticarc{} use the \p{arcsep}/\p{arcsepA}/\p{arcsepB} +parameters. + +Unlike \n\psarc, \n\psellipticarc use the +\p{dimen}=\p{inner}/\p{middle}/\p{outer} parameter. + +\oitem \psellipticarcn`{arrows}(\x0,\y0)'(\x1,\y1){angleA}{angleB} + + This is like \n\psellipticarc, but the arc is drawn \emph{clockwise}. You can +achieve the same effect using \n\psellipticarc{} by switching and + and the arrows.\footnote{% +However, with \n\pscustom{} graphics object, described in Part \ref{P-custom}, +\n\psellipticarcn{} is not redundant.} + +\end{description} + + +\Section{Curves} + +\begin{description} + +\oitem \psbezier`{arrows}(\x0,\y0)'(\x1,\y1)(\x2,\y2)(\x3,\y3) + + \n\psbezier{} draws a bezier curve with the four control points. The curve +starts at the first coordinate, tangent to the line connecting to the second +coordinate. It ends at the last coordinate, tangent to the line connecting to +the third coordinate. The second and third coordinates, in addition to +determining the tangency of the curve at the endpoints, also ``pull'' the +curve towards themselves. For example: +\begin{MEx}(4,4) + \psbezier[linewidth=2pt,showpoints=true]{->}(0,0)(1,4)(2,1)(4,3.5) +\end{MEx} +\p{showpoints=true} puts dots in all the control points, and connects them by +dashed lines, which is useful when adjusting your bezier curve. + +\oitem \parabola`{arrows}'\c0\c1 + + Starting at \c0, \n\parabola{} draws the parabola that passes through \c0 and +whose maximum or minimum is \c1. For example: +\begin{MEx*}(4,3) + \parabola*(1,1)(2,3) + \psset{xunit=.01} + \parabola{<->}(400,3)(200,0) +\end{MEx*} +\end{description} + +The next three graphics objects interpolate an open or closed curve through +the given points. The curve at each interior point is perpendicular to the +line bisecting the angle ABC, where B is the interior point, and A and C are +the neighboring points. Scaling the coordinates \emph{does not} cause the curve +to scale proportionately. + +The curvature is controlled by the following parameter: +\begin{description} +\pitem[curvature=num1 num2 num3] + + You have to just play around with this parameter to get what you want. +Individual values outside the range -1 to 1 are either ignored or are for +entertainment only. Below is an explanation of what each number does. A, B and +C refer to three consecutive points. + + Lower values of make the curve tighter. + + Lower values of tighten the curve where the angle ABC is greater than +45 degrees, and loosen the curve elsewhere. + + determines the slope at each point. If =0, then the curve is +perpendicular at B to the bisection of ABC. If =-1, then the curve at B +is parallel to the line AC. With this value (and only this value), scaling the +coordinates causes the curve to scale proportionately. However, positive +values can look better with irregularly spaced coordinates. Values less than +-1 or greater than 2 are converted to -1 and 2, respectively. +\end{description} + +Here are the three curve interpolation macros: +\begin{description} + +\oitem \pscurve`{arrows}'\c1`\ldots\cn' + + This interpolates an open curve through the points. For example: +\begin{MEx*}(4,2) + \pscurve[showpoints=true]{<->}(0,1.3)(0.7,1.8) + (3.3,0.5)(4,1.6)(0.4,0.4) +\end{MEx*} +Note the use of \p{showpoints=true} to see the points. This is helpful when +constructing a curve. + +\oitem \psecurve`{arrows}'\c1`\ldots\cn'] + + This is like \n\pscurve, but the curve is not extended to the first and last +points. This gets around the problem of trying to determine how the curve +should join the first and last points. The "e" has something to do with +``endpoints''. For example: +% D.G. modification begin - Mar. 3, 2003 +%\begin{MEx*}[0,-.9](4,4) +% D.G. modification end +\begin{MEx*}(4,4) + \psecurve[showpoints=true](.125,8)(.25,4)(.5,2) + (1,1)(2,.5)(4,.25)(8,.125) +\end{MEx*} + +\oitem \psccurve`{arrows}'\c1`\ldots\cn' + +This interpolates a closed curve through the points. "c" stands for +``closed''. For example: +\begin{MEx*}(4,1) + \psccurve[showpoints=true] + (.5,0)(3.5,1)(3.5,0)(.5,1) +\end{MEx*} +\end{description} + +\Section{Dots\label{S-dots}} + +The graphics objects +\begin{Ex} + \object \psdot`*[par](\x1,y1)' + \object \psdots`*[par]'(\x1,\y1)`(\x2,\y2)\ldots(\x n,\y n)' +\end{Ex} +put a dot at each coordinate. + +What a ``dot'' is depends on the value of the +\begin{Ex} + \Par{dotstyle=style} +\end{Ex} +parameter. This also determines the dots you get when \p{showpoints=true}. + +The dot styles are also pretty intuitive:% +\newbox\dottable +\setbox\dottable=\hbox{% + \psset{fillcolor=lightgray} + \def\mydots#1{% + \psdots[dotstyle=#1](.1,1ex)(.55,1ex)(1,1ex)(1.45,1ex)(1.9,1ex)}% + \hfill + \begin{tabular}{cl}% + \emph{Style} & \hbox to 2cm{\emph{Example}\hss} \\[2pt] + "*" & \mydots{*}\\ + "o" & \mydots{o}\\ + "Bo" & \mydots{Bo}\\ + "x" & \mydots{x}\\ + "+" & \mydots{+}\\ + "B+" & \mydots{B+}\\ + "asterisk" & \mydots{asterisk}\\ + "Basterisk" & \mydots{Basterisk}\\ + "oplus" & \mydots{oplus}\\ + "otimes" & \mydots{otimes}\\ + "|" & \mydots{|}\\ + "B|" & \mydots{B|} + \end{tabular}% + \hfill + \begin{tabular}{cl} + \emph{Style} & \hbox to 2cm{\emph{Example}\hss} \\[2pt] + "square" & \mydots{square}\\ + "Bsquare" & \mydots{Bsquare}\\ + "square*" & \mydots{square*}\\ + "diamond" & \mydots{diamond}\\ + "diamond*" & \mydots{diamond*}\\ + "triangle" & \mydots{triangle}\\ + "Btriangle" & \mydots{Btriangle}\\ + "triangle*" & \mydots{triangle*}\\ + "pentagon" & \mydots{pentagon}\\ + "Bpentagon" & \mydots{Bpentagon}\\ + "pentagon*" & \mydots{pentagon*}\\ + \end{tabular}% + \hfill}% +\addtoquickref{center}{% + {\large\textbf{Dot styles}}\par + \leavevmode\hbox to \hsize{\unhbox\dottable}} +\begin{center} + \leavevmode + \hbox to \hsize{\unhcopy\dottable}% +\end{center} + +Except for "diamond", the center of dot styles with a hollow center is colored +\p{fillcolor}. + +Here are the parameters for changing the size and orientation of the dots: +\begin{description} + +\pitem[dotsize=dim `num'] + The diameter of a circle or disc is plus times \p{linewidth} +(if the optional is included). The size of the other dots styles is +similar (except for the size of the "|" dot style, which is set by the +\p{tbarsize} parameter described on page \pageref{p+tbarsize}). + +\pitem[dotscale=num1 `num2'] +The dots are scaled horizontally by and vertically by . If you +only include , the arrows are scaled by in both directions. + +\pitem[dotangle=angle] + After setting the size and scaling the dots, the dots are rotated by . + +\end{description} + + +\Section{Grids\label{S-grids}} + +PSTricks has a powerful macro for making grids and graph paper: + \Mac \psgrid`(\x0,\y0)(\x1,\y1)(\x2,\y2)' +\n\psgrid{} draws a grid with opposing corners \c1 and \c2. The intervals are +numbered, with the numbers positioned at \x0 and \y0. The coordinates are +always interpreted as Cartesian coordinates. For example: +\begin{MEx}[-1,-1](3,2) + \psgrid(0,0)(-1,-1)(3,2) +\end{MEx} +(Note that the coordinates and label positioning work the same as with +\n\psaxes.) + +The main grid divisions occur on multiples of \p{xunit} and \p{yunit}. +Subdivisions are allowed as well. Generally, the coordinates would be given as +integers, without units. + +If the \c0 coordinate is omitted, \c1 is used. The default for \c1 is "(0,0)". +If you don't give any coordinates at all, then the coordinates of the current +\n\pspicture{} environment are used or a 10x10 grid is drawn. Thus, you can +include a \n\psgrid{} command without coordinates in a \n\pspicture\ +environment to get a grid that will help you position objects in the picture. + +The main grid divisions are numbered, with the numbers drawn next to the +vertical line at \x0 (away from \x2) and next to the horizontal line at \x1 +(away from \y2). \c1 can be any corner of the grid, as long as \c2 is the +opposing corner, you can position the labels on any side you want. For +example, compare +\begin{MEx}(4,1) + \psgrid(0,0)(4,1) +\end{MEx} +and +\begin{MEx}(4,1) + \psgrid(4,1)(0,0) +\end{MEx} + +The following parameters apply only to \n\psgrid: +\begin{description} + +\pitem[gridwidth=dim] + The width of grid lines. + +\pitem[gridcolor=color] + The color of grid lines. + +\pitem[griddots=num] + If is positive, the grid lines are dotted, with dots per +division. + +\pitem[gridlabels=dim] + The size of the numbers used to mark the grid. + +\pitem[gridlabelcolor=color] + The color of the grid numbers. + +\pitem[subgriddiv=int] + The number of grid subdivisions. + +\pitem[subgridwidth=dim] + The width of subgrid lines. + +\pitem[subgridcolor=color] + The color of subgrid lines. + +\pitem[subgriddots=num] + Like \p{griddots}, but for subdivisions. + +\end{description} + +Here is a familiar looking grid which illustrates some of the parameters: +\begin{MEx}[-1,-1](3,1) + \psgrid[subgriddiv=1,griddots=10,gridlabels=7pt](-1,-1)(3,1) +\end{MEx} + +Note that the values of \p{xunit} and \p{yunit} are important parameters for +\n\psgrid, because they determine the spacing of the divisions. E.g., if the +value of these is "1pt", and then you type +\begin{LVerb} + \psgrid(0,0)(10in,10in) +\end{LVerb} +you will get a grid with 723 main divisions and 3615 subdivisions! (Actually, +\n\psgrid{} allows at most 500 divisions or subdivisions, to limit the damage +done by this kind of mistake.) Probably you want to set \p{unit} to ".5in" or +"1in", as in +\begin{LVerb} + \psgrid[unit=.5in](0,0)(20,20) +\end{LVerb} + + +\Section{Plots} + +\File{pst-plot} +The plotting commands described in this part are defined in +"pst-plot.tex" / "pst-plot.sty", which you must load first. + +The \n\psdots, \n\psline, \n\pspolygon, \n\pscurve, \n\psecurve{} and +\n\psccurve{} graphics objects let you plot data in a variety of ways. However, +first you have to generate the data and enter it as coordinate pairs \c{}. +The plotting macros in this section give you other ways to get and use the +data. (Section \ref{S-axes} tells you how to generate axes.) + +To parameter +\begin{Ex} + \Par{plotstyle=style} +\end{Ex} +determines what kind of plot you get. Valid styles are "dots", "line", +"polygon", "curve", "ecurve", "ccurve". E.g., if the \p{plotstyle} is +"polygon", then the macro becomes a variant of the \n\pspolygon{} object. + +You can use arrows with the plot styles that are open curves, but there is no +optional argument for specifying the arrows. You have to use the \p{arrows} +parameter instead. + +\begin{Warning} +No PostScript error checking is provided for the data arguments. Read Appendix +\ref{S-raw} before including PostScript code in the arguments. + +There are system-dependent limits on the amount of data \TeX{} and PostScript +can handle. You are much less likely to exceed the PostScript limits when you +use the "line", "polygon" or "dots" plot style, with \p{showpoints=false}, +\p{linearc=0pt}, and no arrows. +\end{Warning} + +Note that the lists of data generated or used by the plot commands cannot +contain units. The values of \n\psxunit{} and \n\psyunit{} are used as the unit. + + +\begin{description} + +\oitem \fileplot{file} + +\n\fileplot{} is the simplest of the plotting functions to use. You just need a +file that contains a list of coordinates (without units), such as generated by +Mathematica or other mathematical packages. The data can be delimited by curly +braces "{"~"}", parentheses "("~")", commas, and/or white space. Bracketing +all the data with square brackets "[ ]" will significantly speed up the rate +at which the data is read, but there are system-dependent limits on how much +data \TeX{} can read like this in one chunk. (The "[" \emph{must} go at the +beginning of a line.) The file should not contain anything else (not even +"\endinput"), except for comments marked with "%". + +\n\fileplot{} only recognizes the "line", "polygon" and "dots" plot styles, and +it ignores the \p{arrows}, \p{linearc} and \p{showpoints} parameters. The +\n\listplot{} command, described below, can also plot data from file, without +these restrictions and with faster \TeX{} processing. However, you are less +likely to exceed PostScript's memory or operand stack limits with \n\fileplot. + +If you find that it takes \TeX{} a long time to process your \n\fileplot\ +command, you may want to use the \n\PSTtoEPS{} command described on page +\pageref{+PSTtoEPS}. This will also reduce \TeX's memory requirements. + +\oitem \dataplot{commands} + +\n\dataplot{} is also for plotting lists of data generated by other programs, +but you first have to retrieve the data with one of the following commands: +\begin{Ex} + \object \savedata{command}[data] + \object \readdata{command}{file} +\end{Ex} + or the data in should conform to the rules described above for +the data in \n\fileplot{} (with \n\savedata, the data must be delimited by +"["~"]", and with \n\readdata, bracketing the data with "["~"]" speeds things +up). You can concatenate and reuse lists, as in +\begin{LVerb} + \readdata{\foo}{foo.data} + \readdata{\bar}{bar.data} + \dataplot{\foo\bar} + \dataplot[origin={0,1}]{\bar} +\end{LVerb} + +The \n\readdata{} and \n\dataplot{} combination is faster than \n\fileplot{} +if you reuse the data. \n\fileplot{} uses less of \TeX's memory than +\n\readdata{} and \n\dataplot{} if you are also use \n\PSTtoEPS. + +Here is a plot of "Integral(sin(x))". The data was generated by Mathematica, +with +\begin{LVerb} + Table[{x,N[SinIntegral[x]]},{x,0,20}] +\end{LVerb} +and then copied to this document. +\begin{MEx}(4,3) + \psset{xunit=.2cm,yunit=1.5cm} + \savedata{\mydata}[ + {{0, 0}, {1., 0.946083}, {2., 1.60541}, {3., 1.84865}, {4., 1.7582}, + {5., 1.54993}, {6., 1.42469}, {7., 1.4546}, {8., 1.57419}, + {9., 1.66504}, {10., 1.65835}, {11., 1.57831}, {12., 1.50497}, + {13., 1.49936}, {14., 1.55621}, {15., 1.61819}, {16., 1.6313}, + {17., 1.59014}, {18., 1.53661}, {19., 1.51863}, {20., 1.54824}}] + \dataplot[plotstyle=curve,showpoints=true, + dotstyle=triangle]{\mydata} + \psline{<->}(0,2)(0,0)(20,0) +\end{MEx} + +\oitem \listplot{list} + +\n\listplot{} is yet another way of plotting lists of data. This time, +should be a list of data (coordinate pairs), delimited only by white space. + is first expanded by \TeX{} and then by PostScript. This means that + might be a PostScript program that leaves on the stack a list of data, +but you can also include data that has been retrieved with \n\readdata{} and +\n\dataplot. However, when using the "line", "polygon" or "dots" plotstyles +with \p{showpoints=false}, \p{linearc=0pt} and no arrows, \n\dataplot{} is much +less likely than \n\listplot{} to exceed PostScript's memory or stack limits. +In the preceding example, these restrictions were not satisfied, and so the +example is equivalent to when \n\listplot{} is used: +\begin{LVerb} + ... + \listplot[plotstyle=curve,showpoints=true, + dotstyle=triangle]{\mydata} + ... +\end{LVerb} + +\oitem \psplot{$x_!\min@$}{$x_!\max@$}{function} + + \n\psplot{} can be used to plot a function $f(x)$, if you know a little +PostScript. should be the PostScript code for calculating $f(x)$. +Note that you must use $x$ as the dependent variable. PostScript is not +designed for scientific computation, but \n\psplot{} is good for graphing +simple functions right from within \TeX. E.g., +\begin{LVerb} + \psplot[plotpoints=200]{0}{720}{x sin} +\end{LVerb} +plots $\sin(x)$ from 0 to 720 degrees, by calculating $\sin(x)$ roughly every +3.6 degrees and then connecting the points with \n\psline. Here are plots of +$\sin(x)\cos((x/2)^2)$ and $\sin^2(x)$: +\begin{MEx}[0,-1](4,1) + \psset{xunit=1.2pt} + \psplot[linecolor=gray,linewidth=1.5pt,plotstyle=curve]% + {0}{90}{x sin dup mul} + \psplot[plotpoints=100]{0}{90}{x sin x 2 div 2 exp cos mul} + \psline{<->}(0,-1)(0,1) + \psline{->}(100,0) +\end{MEx} + +\oitem \parametricplot{$t_!\min@$}{$t_!\max@$}{function} + +This is for a parametric plot of $(x(t),y(t))$. is the PostScript +code for calculating the pair $x(t)$ $y(t)$. + +For example, +\begin{MEx*}(3,3) + \parametricplot[plotstyle=dots,plotpoints=13]% + {-6}{6}{1.2 t exp 1.2 t neg exp} +\end{MEx*} +plots 13 points from the hyperbola $xy=1$, starting with $(1.2^{-6},1.2^6)$ +and ending with $(1.2^6,1.2^{-6})$. + +Here is a parametric plot of $(\sin(t),\sin(2t))$: +\begin{MEx}[-2,-1](2,1) + \psset{xunit=1.7cm} + \parametricplot[linewidth=1.2pt,plotstyle=ccurve]% + {0}{360}{t sin t 2 mul sin} + \psline{<->}(0,-1.2)(0,1.2) + \psline{<->}(-1.2,0)(1.2,0) +\end{MEx} + +\end{description} + +The number of points that the \n\psplot{} and \n\parametricplot{} commands +calculate is set by the +\begin{Ex} + \Par{plotpoints=int} +\end{Ex} +parameter. Using "curve" or its variants instead of "line" and increasing the +value of \p{plotpoints} are two ways to get a smoother curve. Both ways +increase the imaging time. Which is better depends on the complexity of the +computation. (Note that all PostScript lines are ultimately rendered as a +series (perhaps short) line segments.) Mathematica generally uses "lineto" to +connect the points in its plots. The default minimum number of plot points for +Mathematica is 25, but unlike \n\psplot{} and \n\parametricplot, Mathematica +increases the sampling frequency on sections of the curve with greater +fluctuation. + +\endinput + +%% END psd-basi.tex diff --git a/Master/texmf-dist/doc/generic/pstricks/psd-cove.tex b/Master/texmf-dist/doc/generic/pstricks/psd-cove.tex new file mode 100644 index 00000000000..177e0bff2c1 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/psd-cove.tex @@ -0,0 +1,108 @@ +%% BEGIN psd-cove.tex + +\begingroup +\evensidemargin \paperwidth\relax +\advance\evensidemargin -2in +\advance\evensidemargin -\textwidth +\divide\evensidemargin 2 +\oddsidemargin\evensidemargin + +\begin{titlepage} + +\let\footnotesize\small +\let\footnoterule\relax +\setcounter{page}{0} + +\null +\vfil +\vskip 25pt +\begin{center} + {\LARGE\textbf{PSTricks}}:\\[5pt] + {\large\textbf{PostScript macros for Generic TeX}.}\\ +\end{center} + +\bigskip\bigskip +\hbox to \hsize{% + \hss + \psset{unit=.4cm} + \begin{pspicture}(0,-2)(31,12) + \catcode`\<=12 + \rput(1.5,0){% + \psellipse[linewidth=1pt](8,7)(1,3) + \psframe[linecolor=white,fillstyle=solid,fillcolor=white] + (6.4,6.5)(8,7.5) + \psline[linearc=.3,linewidth=1pt](8,8)(8,7.5)(4,7.5) + \psbezier[linewidth=1pt](4,7.5)(3,7.5)(3,6.5)(3,5.5) + \psline[linearc=.3,linewidth=1pt](8,6)(8,6.5)(5,6.5) + \psbezier[linewidth=1pt](5,6.5)(4,6.5)(4,6.5)(4,5.5) + \psline[linewidth=1pt](3,5.5)(4,5.5) + \psline[linearc=.3,linewidth=1pt](5,7.5)(5,8)(6,8)(6,7.5) + \psframe[linewidth=1pt](5.3,8)(5.7,8.7) + \psframe[linewidth=1pt,framearc=1,fillstyle=solid, + fillcolor=white](4,8.7)(7,9) + \multirput(3.5,4.8)(0,-1){4}{% + \psbezier[linewidth=.5pt](0,0)(.25,-.4)(-.25,-.4)(0,0)} + \rput[t](5.5,0){Dripping Faucet}} + \rput(20,5){% + \pspolygon[linecolor=white,fillstyle=vlines, + fillcolor=darkgray,hatchsep=.2](1,4.5)(1,4)(4,4)(4,4.5) + \psline[linewidth=2pt](1,4)(4,4) + \psline[linewidth=1.5pt](2.5,4)(2.5,3.5)(2.9,3.3)(2.1,2.9) + (2.9,2.5)(2.1,2.1)(2.9,1.7)(2.1,1.3)(2.5,1.1)(2.5,0.6) + \psframe[linecolor=black,linewidth=1.5pt,fillstyle=solid, + fillcolor=lightgray](1.8,-1)(3.2,.6) + \rput(2.5,-.2){$M$} + \psline{<->}(3.7,-.9)(3.7,.5) + \psframe[linecolor=black,linewidth=1.5pt,fillstyle=solid, + fillcolor=lightgray](1.8,-3.5)(3.2,-1.9) + \rput(2.5,-2.7){$m$} + \psline{->}(5,1)(5,-1) + \rput[l](5.5,0){$g$} + \psline{->}(3.7,-2)(3.7,-3.4) + \rput[t](2.5,-4){Mathematical Model for} + \rput[t](2.5,-5){a Dripping Faucet} + \rput(-6,-2){% + \psset{linewidth=2pt} + \psline(0,.5)(2,.5) + \psline(0,-.5)(2,-.5) + \psline(1.5,1)(2.5,0)(1.5,-1)}} + \psframe[linewidth=2pt,framearc=.05,linecolor=gray](0,-2.5)(31,12) + \uput[l]{90}(0,4.75){\texttt{leecheng}} + \end{pspicture}% + \hss} +\bigskip +\bigskip + +\begin{center} +{\LARGE\textbf{User's Guide}}\par +\vskip 3em +{\large \lineskip .75em Timothy Van Zandt}\par +\vskip 1.5em +{\large \thefiledate\\[2pt] + Version \Version% + \footnote{Documentation edited and repacked at \today\ by Rolf Niepraschk + \url{niepraschk@gmx.de} + and Herbert Vo\ss\ \url{voss@pstricks.de}.}}\par +% \Verb[codes={\catcode`\<=12}]++ +% and Herbert Voß \Verb[codes={\catcode`\<=12}]++.}}\par +\end{center} +\vfil +\small +Author's address:\\ + Department of Economics and Political Science\\ + INSEAD\\ + Boulevard de Constance\\ + 77305 Fontainebleau Cedex\\ + France\\[3mm] + Internet: \Verb[codes={\catcode`\<=12}]++ +\end{titlepage} + +\endgroup + +\setcounter{footnote}{0} +\tableofcontents +\pagenumbering{arabic} + +\endinput + +%% END psd-cove.tex diff --git a/Master/texmf-dist/doc/generic/pstricks/psd-cust.tex b/Master/texmf-dist/doc/generic/pstricks/psd-cust.tex new file mode 100644 index 00000000000..03441baca4f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/psd-cust.tex @@ -0,0 +1,406 @@ +%% BEGIN psd-cust.tex + +\part{Custom graphics\label{P-custom}} + +\Section{The basics} + +PSTricks contains a large palette of graphics objects, but sometimes you need +something special. For example, you might want to shade the region between two +curves. The + \Mac \pscustom`*[par]'{commands} +command lets you ``roll you own'' graphics object. + +Let's review how PostScript handles graphics. A \emph{path} is a line, in the +mathematical sense rather than the visual sense. A path can have several +disconnected segments, and it can be open or closed. PostScript has various +operators for making paths. The end of the path is called the \emph{current +point}, but if there is no path then there is no current point. To turn the +path into something visual, PostScript can \emph{fill} the region enclosed by +the path (that is what \p{fillstyle} and such are about), and \emph{stroke} the +path (that is what \p{linestyle} and such are about). + +At the beginning of \n\pscustom, there is no path. There are various commands +that you can use in \n\pscustom{} for drawing paths. Some of these (the open +curves) can also draw arrows. \n\pscustom{} fills and strokes the path at the +end, and for special effects, you can fill and stroke the path along the way +using \n\fill{} and \n\stroke{} (see below). + +\begin{drivers} +\n\pscustom{} uses \n\pstverb{} and \n\pstunit. There are system-dependent +limits on how long the argument of "\special" can be. You may run into this +limit using \n\pscustom{} because all the PostScript code accumulated by +\n\pscustom{} is the argument of a single "\special" command. +\end{drivers} + +\Section{Parameters} + +You need to keep the separation between drawing, stroking and filling paths in +mind when setting graphics parameters. The \p{linewidth} and \p{linecolor} +parameters affect the drawing of arrows, but since the path commands do not +stroke or fill the paths, these parameters, and the \p{linestyle}, +\p{fillstyle} and related parameters, do not have any other effect (except +that in some cases \p{linewidth} is used in some calculations when drawing the +path). \n\pscustom{} and \n\fill{} make use of \p{fillstyle} and related +parameters, and \n\pscustom{} and \n\stroke{} make use of p{linestyle} and +related parameters. + +For example, if you include +\begin{LVerbatim} + \psline[linewidth=2pt,linecolor=blue,fillstyle=vlines]{<-}(3,3)(4,0) +\end{LVerbatim} +in \n\pscustom, then the changes to \p{linewidth} and \p{linecolor} will +affect the size and color of the arrow but not of the line when it is stroked, +and the change to \p{fillstyle} will have no effect at all. + +The \p{shadow}, \p{border}, \p{doubleline} and \p{showpoints} parameters are +disabled in \n\pscustom, and the \p{origin} and \p{swapaxes} parameters only +affect \n\pscustom{} itself, but there are commands (described below) that let +you achieve these special effects. + +The \p{dashed} and \p{dotted} line styles need to know something about the +path in order to adjust the dash or dot pattern appropriately. You can give +this information by setting the +\begin{Ex} + \Par{linetype=int} +\end{Ex} +parameter. If the path contains more than one disconnected segment, there is +no appropriate way to adjust the dash or dot pattern, and you might as well +leave the default value of \p{linetype}. Here are the values for simple paths: +\begin{center} +\begin{tabular}{cl} + \emph{Value} & \emph{Type of path}\\ + 0 & Open curve without arrows.\\ + -1 & Open curve with an arrow at the beginning.\\ + -2 & Open curve with an arrow at the end.\\ + -3 & Open curve with an arrow at both ends.\\ + 1 & Closed curve with no particular symmetry.\\ + $n$\textgreater 1 & Closed curve with $n$ symmetric segments. +\end{tabular} +\end{center} + +\Section{Graphics objects} + +You can use most of the graphics objects in \n\pscustom. These draw paths and +making arrows, but do not fill and stroke the paths. + +There are three types of graphics objects: +\begin{description} +\item[Special] + Special graphics objects include \n\psgrid, \n\psdots, \n\qline{} and +\n\qdisk. You cannot use special graphics objects in \n\pscustom. + +\item[Closed] + You are allowed to use closed graphics objects in \n\pscustom, but their +effect is unpredictable.\footnote{% +The closed objects never use the current point as an coordinate, but typically +they will close any existing paths, and they might draw a line between the +currentpoint and the closed curved.} +Usually you would use the open curves plus \n\closepath{} (see below) to draw +closed curves. + +\item[Open]The open graphics objects are the most useful commands for drawing +paths with \n\pscustom. By piecing together several open curves, you can draw +arbitrary paths. The rest of this section pertains to the open graphics +objects. +\end{description} + + By default, the open curves draw a straight line between the current point, +if it exists, and the beginning of the curve, except when the curve begins +with an arrow. For example +\begin{MEx*}(3,3) + \pscustom{% + \psarc(0,0){1.5}{5}{85} + \psarcn{->}(0,0){3}{85}{5}} +\end{MEx*} + +Also, the following curves make use of the current point, if it exists, as a +first coordinate: +\begin{quote} + \n\psline{} and \n\pscurve.\\ + The plot commands, with the "line" or "curve" \p{plotstyle}.\\ + \n\psbezier\, if you only include three coordinates.\\ +\end{quote} +For example: +\begin{MEx*}(4,3) + \pscustom[linewidth=1.5pt]{% + \psplot[plotstyle=curve]{.67}{4}{2 x div} + \psline(4,3)} +\end{MEx*} +We'll see later how to make that one more interesting. Here is another example +\begin{MEx*}(4,3) + \pscustom{% + \psline[linearc=.2]{|-}(0,2)(0,0)(2,2) + \psbezier{->}(2,2)(3,3)(1,0)(4,3)} +\end{MEx*} + +However, you can control how the open curves treat the current point with the +\begin{Ex} + \Par{liftpen=0/1/2} +\end{Ex} +parameter. + +If \p{liftpen=0}, you get the default behavior described above. For example +\begin{MEx*}(4,3) + \pscustom[linewidth=2pt,fillstyle=solid,fillcolor=gray]{% + \pscurve(0,2)(1,2.5)(2,1.5)(4,3) + \pscurve(4,1)(3,0.5)(2,1)(1,0)(0,.5)} +\end{MEx*} + +If \p{liftpen=1}, the curves do not use the current point as the first +coordinate (except \n\psbezier, but you can avoid this by explicitly including +the first coordinate as an argument). For example: +\begin{MEx*}(4,3) + \pscustom[linewidth=2pt,fillstyle=solid,fillcolor=gray]{% + \pscurve(0,2)(1,2.5)(2,1.5)(4,3) + \pscurve[liftpen=1](4,1)(3,0.5)(2,1)(1,0)(0,.5)} +\end{MEx*} + +If \p{liftpen=2}, the curves do not use the current point as the first +coordinate, and they do not draw a line between the current point and the +beginning of the curve. For example +\begin{MEx*}(4,3) + \pscustom[linewidth=2pt,fillstyle=solid,fillcolor=gray]{% + \pscurve(0,2)(1,2.5)(2,1.5)(4,3) + \pscurve[liftpen=2](4,1)(3,0.5)(2,1)(1,0)(0,.5)} +\end{MEx*} + +Later we will use the second example to fill the region between the two +curves, and then draw the curves. + +\Section{Safe tricks} + +The commands described under this heading, which can only be used in +\n\pscustom, do not run a risk of PostScript errors (assuming your document +compiles without \TeX{} errors). + +Let's start with some path, fill and stroke commands: +\begin{description} + +\mitem \newpath + +Clear the path and the current point. + +\mitem \moveto(coor) + + This moves the current point to \c{}. + +\mitem \closepath + + This closes the path, joining the beginning and end of each piece (there may +be more than one piece if you use \n\moveto).\footnote{% +Note that the path is automatically closed when the region is filled. Use +\n\closepath{} if you also want to close the boundary.} + +\mitem \stroke`[par]' + + This strokes the path (non-destructively). \n\pscustom{} automatically +strokes the path, but you might want to stroke it twice, e.g., to add a +border. Here is an example that makes a double line and adds a border (this +example is kept so simple that it doesn't need \n\pscustom{} at all): +\begin{MEx*}(4,3) + \psline(0,3)(4,0) + \pscustom[linecolor=white,linewidth=1.5pt]{% + \psline(0,0)(4,3) + \stroke[linewidth=5\pslinewidth] + \stroke[linewidth=3\pslinewidth,linecolor=black]} +\end{MEx*} + +\mitem \fill`[par]' + + This fills the region (non-destructively). \n\pscustom{} automatically fills +the region as well. + +\mitem \gsave + + This saves the current graphics state (i.e., the path, color, line width, +coordinate system, etc.) \n\grestore{} restores the graphics state. \n\gsave{} +and \n\grestore{} must be used in pairs, properly nested with respect to \TeX{} +groups. You can have have nested \n\gsave-\n\grestore{} pairs. + +\mitem \grestore + + See above. + +Here is an example that fixes an earlier example, using \n\gsave{} and +\n\grestore: +\begin{MEx}(4,3) + \psline{<->}(0,3)(0,0)(4,0) + \pscustom[linewidth=1.5pt]{ + \psplot[plotstyle=curve]{.67}{4}{2 x div} + \gsave + \psline(4,3) + \fill[fillstyle=solid,fillcolor=gray] + \grestore} +\end{MEx} +Observe how the line added by "\psline(4,3)" is never stroked, because it is +nested in "\gsave" and "\grestore". + +Here is another example: +\begin{MEx*}(4,3) + \pscustom[linewidth=1.5pt]{ + \pscurve(0,2)(1,2.5)(2,1.5)(4,3) + \gsave + \pscurve[liftpen=1](4,1)(3,0.5)(2,1)(1,0)(0,.5) + \fill[fillstyle=solid,fillcolor=gray] + \grestore} + \pscurve[linewidth=1.5pt](4,1)(3,0.5)(2,1)(1,0)(0,.5) +\end{MEx*} +Note how I had to repeat the second \n\pscurve{} (I could have repeated it +within \n\pscustom, with \p{liftpen=2}), because I wanted to draw a line +between the two curves to enclose the region but I didn't want this line to be +stroked. +\end{description} + +The next set of commands modify the coordinate system. +\begin{description} + +\mitem \translate(coor) + + Translate coordinate system by \c{}. This shifts everything that comes later +by \c{}, but doesn't affect what has already been drawn. + +\mitem \scale{num1 `num2'} + + Scale the coordinate system in both directions by , or horizontally by + and vertically by . + +\mitem \rotate{angle} + + Rotate the coordinate system by . + +\mitem \swapaxes + + Switch the x and y coordinates. This is equivalent to +\begin{LVerb} + \rotate{-90} + \scale{-1 1 scale} +\end{LVerb} + +\mitem \msave + + Save the current coordinate system. You can then restore it with +\n\mrestore. You can have nested \n\msave-\n\mrestore{} pairs. \n\msave{} and +\n\mrestore{} do not have to be properly nested with respect to \TeX{} groups or +\n\gsave{} and \n\grestore. However, remember that \n\gsave{} and \n\grestore +also affect the coordinate system. \n\msave-\n\mrestore{} lets you change the +coordinate system while drawing part of a path, and then restore the old +coordinate system without destroying the path. \n\gsave-\n\grestore, on the +other hand, affect the path and all other componments of the graphics state. + +\mitem \mrestore + + See above. +\end{description} + +And now here are a few shadow tricks: +\begin{description} +\mitem \openshadow`[par]' + +Strokes a replica of the current path, using the various shadow parameters. + +\mitem \closedshadow`[par]' + +Makes a shadow of the region enclosed by the current path as if it were opaque +regions. + +\mitem \movepath(coor) + +Moves the path by \c{}. Use \n\gsave-\n\grestore{} if you don't want to lose +the original path. +\end{description} + +\Section{Pretty safe tricks} + +The next group of commands are safe, \emph{as long as there is a current +point}! + +\begin{description} +\mitem \lineto(coor) + + This is a quick version of "\psline()". + +\mitem \rlineto(coor) + + This is like \n\lineto, but \c{} is interpreted relative to the current +point. + +\mitem \curveto\c1\c2\c3 + + This is a quick version of "\psbezier"\c1\c2\c3. + +\mitem \rcurveto\c1\c2\c3 + + This is like \n\curveto, but \c1, \c2 and \c3 are interpreted relative to +the current point. +\end{description} + +\Section{For hackers only} + +For PostScript hackers, there are a few more commands. Be sure to read +Appendix \ref{S-raw} before using these. Needless to say: +\begin{Warning} +Misuse of the commands in this section can cause PostScript errors. +\end{Warning} + + The PostScript environment in effect with \n\pscustom{} has one unit equal to +one \TeX{} "pt". + +\begin{description} + +\mitem \code{code} + Insert the raw PostScript code. + +\mitem \dim{dim} + + Convert the PSTricks dimension to the number of "pt"'s, and inserts it in +the PostScript code. + +\mitem \coor\c1`\c2...\cn' + +Convert one or more PSTricks coordinates to a pair of numbers (using "pt" +units), and insert them in the PostScript code. + +\mitem \rcoor\c1`\c2...\cn' + +Like \n\coor, but insert the coordinates in reverse order. + +\mitem \file{file} + + This is like \n\code, but the raw PostScript is copied verbatim (except +comments delimited by "%") from . + +\mitem \arrows{arrows} + + This defines the PostScript operators "ArrowA" and "ArrowB" so that +\begin{LVerb} + x2 y2 x1 y1 ArrowA + x2 y2 x1 y1 ArrowB +\end{LVerb} +each draws an arrow(head) with the tip at \c1 and pointing from \c2. "ArrowA" +leaves the current point at end of the arrowhead, where a connect line should +start, and leaves \c2 on the stack. "ArrowB" does not change the current +point, but leaves +\begin{LVerb} + x2 y2 x1' y1' +\end{LVerb} +on the stack, where \c{1'} is the point where a connecting line should join. +To give an idea of how this work, the following is roughly how PSTricks draws +a bezier curve with arrows at the end: +\begin{MEx*}(4,3) + \pscustom{ + \arrows{|->} + \code{ + 80 140 5 5 ArrowA + 30 -30 110 75 ArrowB + curveto}} +\end{MEx*} + +\mitem \setcolor{color} + + Set the color to . + +\end{description} + +\endinput + +%% END psd-cust.tex diff --git a/Master/texmf-dist/doc/generic/pstricks/psd-esse.tex b/Master/texmf-dist/doc/generic/pstricks/psd-esse.tex new file mode 100644 index 00000000000..a76636d0d3b --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/psd-esse.tex @@ -0,0 +1,392 @@ +%% BEGIN psd-esse.tex + +\part*{Welcome to PSTricks} + +PSTricks is a collection of PostScript-based \TeX{} macros that is compatible +with most \TeX{} macro packages, including Plain \TeX, \LaTeX{} and \ConTeXt, +PSTricks gives you color, graphics, rotation, trees and overlays. PSTricks +puts the icing (PostScript) on your cake (\TeX)! + +To install PSTricks, follow the instructions in the file "read-me.pst" that +comes with the PSTricks package. Even if PSTricks has already been installed +for you, give "read-me.pst" a look over. + +This \emph{User's Guide} verges on being a reference manual, meaning that it is +not designed to be read linearly. Here is a recommended strategy: Finish +reading this brief overview of the features in PSTricks. Then thumb through +the entire \emph{User's Guide} to get your own overview. Return to +Part~\ref{P-essentials} (Essentials) and read it carefully. Refer to the +remaining sections as the need arises. + +When you cannot figure out how to do something or when trouble arises, check +out the appendices (Help). You just might be lucky enough to find a solution. +There is also a \LaTeX{} file "samples.pst" of samples that is distributed with +PSTricks. Look to this file for further inspiration. + +This documentation is written with \LaTeX. Some examples use \LaTeX{} specific +constructs and some don't. However, there is nothing \LaTeX{} specific about +any of the macros, nor is there anything that does not work with \LaTeX. This +package has been tested with Plain \TeX, \LaTeX{} and \ConTeXt{} and +should work with other \TeX{} macro packages as well. + +\File{pstricks} +The main macro file is "pstricks.tex"/"pstricks.sty". Each of the PSTricks +macro files comes with a ".tex" extension and a ".sty" extension; these are +equivalent, but the ".sty" extension means that you can include the file name +as a \LaTeX{} package. + +There are numerous supplementary macro files. A file, like the one above and +the left, is used in this \emph{User's Guide} to remind you that you must input +a file before using the macros it contains. + +For most PSTricks macros, even if you misuse them, you will not get PostScript +errors in the output. However, it is recommended that you resolve any \TeX{} +errors before attempting to print your document. A few PSTricks macros pass on +PostScript errors without warning. Use these with care, especially if you are +using a networked printer, because PostScript errors can cause a printer to +bomb. Such macros are pointed out in strong terms, using a warning like this +one: + +\begin{Warning} +Use macros that do not check for PostScript errors with care. PostScript +errors can cause a printer to bomb! +\end{Warning} + +Keep in mind the following typographical conventions in this User's Guide. +\begin{itemize} + \item All literal input characters, i.e., those that should appear verbatim + in your input file, appear in upright "Helvetica" and {\UsageFont + Helvetica-Bold} fonts. + \item Meta arguments, for which you are supposed to substitute a value + (e.g., ) appear in slanted and + {\UsageFont\MetaFont Helvetica-BoldOblique} fonts. + \item The main entry for a macro or parameter that states its syntax appears + in a large bold font, \emph{except for the optional arguments, which are in + medium weight}. This is how you can recognize the optional arguments. + \item References to PSTricks commands and parameters within paragraphs are + set in {\UsageFont Helvetica-Bold}. + +\end{itemize} + +\part{The Essentials\label{P-essentials}} + + +\section{Arguments and delimiters} + +Here is some nitty-gritty about arguments and delimiters that is really +important to know. + +The PSTricks macros use the following delimiters: +\begin{center} +%% DG: to do +% Begin modification RN, 2002-12-29 +\iffalse +\begin{tabular}{rl} +Curly braces & "{}" \\ +Brackets (only for optional arguments) & "[]" \\ +Parentheses and commas for coordinates & \c{} \\ +"=" and "," for parameters & "=," \ldots\\ +\end{tabular} +\fi +\begin{tabular}{rl} +Curly braces & "{""}" \\ +Brackets (only for optional arguments) & "[""]" \\ +Parentheses and commas for coordinates & \c{} \\ +"=" and "," for parameters & "=""," \ldots\\ +\end{tabular} +% End modification RN +\end{center} +Spaces and commas are also used as delimiters within arguments, but in this +case the argument is expanded before looking for the delimiters. + +Always use a period rather than a comma to denote the decimal point, so that +PSTricks doesn't mistake the comma for a delimiter. + +The easiest mistake to make with the PSTricks macros is to mess up the +delimiters. This may generate complaints from \TeX{} or PSTricks about bad +arguments, or other unilluminating errors such as the following: +\begin{description}\itemsep=0pt\parsep=0pt +\item[] "! Use of \get@coor doesn't match its definition." +\item[] "! Paragraph ended before \pst@addcoor was complete." +\item[] +"! Forbidden control sequence found while scanning use of \check@arrow." +\item[] "! File ended while scanning use of \lput." +\end{description} +Delimiters are generally the first thing to check when you get errors with a +PSTricks macro. + +Since PSTricks macros can have many arguments, it is useful to know that you +can leave a space or new line between any arguments, except between arguments +enclosed in curly braces. If you need to insert a new line between arguments +enclosed in curly braces, put a comment character "%" at the end of the line. + +As a general rule, the first non-space character after a PSTricks macro should +not be a "[" or "(". Otherwise, PSTricks might think that the "[" or "(" is +actually part of the macro. You can always get around this by inserting a pair +"{}" of braces somewhere between the macro and the "[" or "(". + + +\Section{Color\label{S-color}} + +The grayscales +\begin{quote} + "black", "darkgray", "gray", "lightgray", and "white", +\end{quote} +and the colors +\begin{quote} + "red", "green", "blue", "cyan", "magenta", and "yellow" +\end{quote} +are predefined in PSTricks. + +This means that these names can be used with the graphics objects that are +described in later sections. This also means that the command \n\gray{} (or +\n\red, etc.) can be used much like "\rm" or "\tt", as in +\begin{Ex} + \gray\Large"{\gray This stuff should be gray.}" +\end{Ex} +The commands \n\gray, \n\red, etc. can be nested like the font commands as +well. There are a few important ways in which the color commands differ from +the font commands: +\begin{enumerate} + \item The color commands can be used in and out of math mode (there are no + restrictions, other than proper \TeX{} grouping). + \item The color commands affect whatever is in their scope (e.g., lines), + not simply characters. + \item The scope of the color commands does not extend across pages. + \item The color commands are not as robust as font commands when used inside + box macros. See page \pageref{colorboxproblems} for details. You can avoid + most problems by explicitly grouping color commands (e.g., enclosing the + scope in braces "{}") whenever these are in the argument of another + command.\footnote{% +However, this is not necessary with the PSTricks LR-box commands, expect when +\n\psverbboxtrue{} is in effect. See Section \ref{S-boxes}.} + +\end{enumerate} + +You can define or redefine additional colors and grayscales with the following +commands. In each case, is a number between 0 and 1. Spaces are used as +delimiters---don't add any extraneous spaces in the arguments. + +\begin{description} + +\mitem \newgray{color}{num} + + is the gray scale specification, to be set by PostScript's "setgray" +operator. 0 is black and 1 is white. For example: +\begin{LVerb} + \newgray{darkgray}{.25} +\end{LVerb} + +\mitem \newrgbcolor{color}{num1 num2 num3} + + is a \emph{red-green-blue} specification, to be set by +PostScript's "setrgbcolor" operator. For example, +\begin{LVerb} + \newrgbcolor{green}{0 1 0} +\end{LVerb} + +\mitem \newhsbcolor{color}{num1 num2 num3} + + is an \emph{hue-saturation-brightness} specification, to be +set by PostScript's "sethsbcolor" operator. For example, +\begin{LVerb} + \newhsbcolor{mycolor}{.3 .7 .9} +\end{LVerb} + +\mitem \newcmykcolor{color}{num1 num2 num3 num4} + + is a \emph{cyan-magenta-yellow-black} specification, to +be set by PostScript's "newcmykcolor" operator. For example, +\begin{LVerb} + \newcmykcolor{hercolor}{.5 1 0 .5} +\end{LVerb} + +\end{description} + +For defining new colors, the \emph{rbg} model is a sure thing. \emph{hsb} is not +recommended. \emph{cmyk} is not supported by all Level 1 implementations of +PostScript, although it is best for color printing. For more information on +color models and color specifications, consult the \emph{PostScript Language +Reference Manual}, 2nd Edition (Red Book), and a color guide. + +\begin{drivers} The command \n\pstVerb{} must be defined.\end{drivers} + + +\Section{Setting graphics parameters\label{S-par}} + +PSTricks uses a key-value system of graphics parameters to customize the +macros that generate graphics (e.g., lines and circles), or graphics combined +with text (e.g., framed boxes). You can change the default values of +parameters with the command \n\psset, as in +\begin{LVerb} + \psset{fillcolor=yellow} + \psset{linecolor=blue,framearc=.3,dash=3pt 6pt} +\end{LVerb} +The general syntax is: + \Mac \psset{par1=value1`,par2=value2,\ldots'} +As illustrated in the examples above, spaces are used as delimiters for some +of the values. Additional spaces are allowed only following the comma that +separates "=" pairs (which is thus a good place to start a new +line if there are many parameter changes). E.g., the first example is +acceptable, but the second is not: +\begin{LVerb} + \psset{fillcolor=yellow, linecolor=blue} + \psset{fillcolor= yellow,linecolor =blue } +\end{LVerb} +The parameters are described throughout this \emph{User's Guide}, as they are +needed. + +Nearly every macro that makes use of graphics parameters allows you to include +changes as an optional first argument, enclosed in square brackets. +For example, +\begin{LVerb} + \psline[linecolor=green,linestyle=dotted](8,7) +\end{LVerb} +draws a dotted, green line. It is roughly equivalent to +\begin{LVerb} + {\psset{linecolor=green,linestyle=dotted}\psline(8,7)} +\end{LVerb} + +For many parameters, PSTricks processes the value and stores it in a peculiar +form, ready for PostScript consumption. For others, PSTricks stores the value +in a form that you would expect. In the latter case, this \emph{User's Guide} +will mention the name of the command where the value is stored. This is so +that you can use the value to set other parameters. E.g., +\begin{LVerb} + \psset{linecolor=\psfillcolor,doublesep=.5\pslinewidth} +\end{LVerb} +However, even for these parameters, PSTricks may do some processing and +error-checking, and you should always set them using \n\psset{} or as optional +parameter changes, rather than redefining the command where the value is +stored. + +\Section{Dimensions, coordinates and angles\label{S-coor}} + +Whenever an argument of a PSTricks macro is a dimension, the unit is optional. +The default unit is set by the +\begin{Ex} + \Par{unit=dim} (1cm) +\end{Ex} +parameter. For example, with the default value of "1cm", the following are +equivalent: +\begin{LVerb} + \psset{linewidth=.5cm} + \psset{linewidth=.5} +\end{LVerb} +By never explicitly giving units, you can scale graphics by changing the value +of \p{unit}. + +You can use the default coordinate when setting non-PSTricks dimensions as +well, using the commands +\begin{Ex} + \object \pssetlength{cmd}{dim} + \object \psaddtolength{cmd}{dim} +\end{Ex} +where is a dimension register (in \LaTeX{} parlance, a ``length''), and + is a length with optional unit. These are analogous to \LaTeX's +"\setlength" and "\addtolength". + +Coordinate pairs have the form \c{}. The origin of the coordinate system is at +\TeX's currentpoint. The command \n\SpecialCoor{} lets you use polar +coordinates, in the form "(;)", where is the radius (a dimension) +and is the angle (see below). You can still use Cartesian coordinates. For +a complete description of \n\SpecialCoor, see Section \ref{S-SpecialCoor}. + +The \p{unit} parameter actually sets the following three parameters: +\begin{Ex} + \Par{xunit=dim} (1cm) + \Par{yunit=dim} (1cm) + \Par{runit=dim} (1cm) +\end{Ex} +These are the default units for x-coordinates, y-coordinates, and all other +coordinates, respectively. By setting these independently, you can scale the x +and y dimensions in Cartesian coordinate unevenly. After changing \p{yunit} to +"1pt", the two \n\psline's below are equivalent: +\begin{LVerb} + \psset{yunit=1pt} + \psline(0cm,20pt)(5cm,80pt) + \psline(0,20)(5,80) +\end{LVerb} + +The values of the \p{runit}, \p{xunit} and \p{yunit} parameters are stored in +the dimension registers \n\psunit{} (also \n\psrunit), \n\psxunit{} and +\n\psyunit. + +Angles, in polar coordinates and other arguments, should be a number giving +the angle in degrees, by default. You can also change the units used for +angles with the command + \Mac \degrees`[num]' + should be the number of units in a circle. For example, you might use +\begin{LVerb} + \degrees[100] +\end{LVerb} +to make a pie chart when you know the shares in percentages. \n\degrees{} +without the argument is the same as +\begin{LVerb} + \degrees[360] +\end{LVerb} +The command + \Mac \radians +is short for +\begin{Ex} + "\degrees[6.28319]" +\end{Ex} +\n\SpecialCoor{} lets you specify angles in other ways as well. + +\Section{Basic graphics parameters} + +The width and color of lines is set by the parameters: +\begin{Ex} + \Par{linewidth=dim} + \Par{linecolor=color} +\end{Ex} +The \p{linewidth} is stored in the dimension register \n\pslinewidth, and the +\p{linecolor} is stored in the command \n\pslinecolor. + +The regions delimited by open and closed curves can be filled, as determined +by the parameters: +\begin{Ex} + \p{fillstyle=