From 54c2f79f29cc81b5e93d3b4e73f3062811276058 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 20 Dec 2009 23:16:59 +0000 Subject: pst-poly 1.61 (20dec09) git-svn-id: svn://tug.org/texlive/trunk@16460 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/pst-poly/Changes | 6 +- Master/texmf-dist/doc/generic/pst-poly/README | 17 +- .../doc/generic/pst-poly/pst-poly-doc.bib | 164 ++ .../doc/generic/pst-poly/pst-poly-doc.pdf | Bin 0 -> 184120 bytes .../doc/generic/pst-poly/pst-poly-doc.tex | 621 ++++++++ .../texmf-dist/doc/generic/pst-poly/pst-poly.pdf | Bin 139994 -> 0 bytes .../texmf-dist/doc/generic/pst-poly/tst-poly.pdf | Bin 52823 -> 0 bytes .../texmf-dist/doc/generic/pst-poly/tst-poly.tex | 332 ---- Master/texmf-dist/source/generic/pst-poly/Makefile | 70 + .../texmf-dist/source/latex/pst-poly/pst-poly.dtx | 1679 -------------------- .../texmf-dist/source/latex/pst-poly/pst-poly.ins | 38 - .../texmf-dist/tex/generic/pst-poly/pst-poly.tex | 389 +++-- Master/texmf-dist/tex/latex/pst-poly/pst-poly.sty | 48 +- Master/tlpkg/bin/tlpkg-ctan-check | 2 +- 14 files changed, 1051 insertions(+), 2315 deletions(-) create mode 100644 Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.bib create mode 100644 Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.pdf create mode 100644 Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.tex delete mode 100644 Master/texmf-dist/doc/generic/pst-poly/pst-poly.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-poly/tst-poly.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-poly/tst-poly.tex create mode 100644 Master/texmf-dist/source/generic/pst-poly/Makefile delete mode 100644 Master/texmf-dist/source/latex/pst-poly/pst-poly.dtx delete mode 100644 Master/texmf-dist/source/latex/pst-poly/pst-poly.ins (limited to 'Master') diff --git a/Master/texmf-dist/doc/generic/pst-poly/Changes b/Master/texmf-dist/doc/generic/pst-poly/Changes index b36a45fafaa..353b7cf3748 100644 --- a/Master/texmf-dist/doc/generic/pst-poly/Changes +++ b/Master/texmf-dist/doc/generic/pst-poly/Changes @@ -1,5 +1,7 @@ -1.60 2004/11/20 new macro \pspolygonbox, - using pst-xkey (hv) +1.61 2009/12/20 - use \NormalCoor for IntemediatePoint setting + - allow \SpecialCoor for a length + - updated documentation +1.60 2004/11/20 new macro \pspolygonbox, using pst-xkey (hv) 1.50 2001/02/08 Standard packaging (.ins + .dtx files). 1.40 1998/07/09 Define `PolyRotation' parameter as a real number and not as an angle, to allow to use the macro diff --git a/Master/texmf-dist/doc/generic/pst-poly/README b/Master/texmf-dist/doc/generic/pst-poly/README index ce8fe97b08a..d4eccbee649 100644 --- a/Master/texmf-dist/doc/generic/pst-poly/README +++ b/Master/texmf-dist/doc/generic/pst-poly/README @@ -1,12 +1,9 @@ ---------------------------------------------------- -| pst-poly: PSTricks package for polygons | ---------------------------------------------------- +Save the files pst-poly.sty|tex in a directory, +which is part of your local TeX tree. +Then do not forget to run texhash to update this tree. -* Run "tex" on pst-poly.ins and copy pst-poly.tex and pst-poly.sty - in one of your TeX input directories +For more information see the documentation of your LaTeX distribution +on installing packages into your local TeX system or read the +TeX Frequently Asked Questions: +(http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages). -* Run "latex" on pst-poly.dtx to generate the documentation - -* This is a PSTricks (PostScript Tricks) package, which won't - run with pdftex. In this case go to http://PSTricks.de/ - for some help. diff --git a/Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.bib b/Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.bib new file mode 100644 index 00000000000..032e9914720 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.bib @@ -0,0 +1,164 @@ +yy%% -*-bibtex-*- +@STRING{tugboat = {TUGboat} } +@STRING{beiprogramm = {{\TeX}-Beiprogramm} } +@STRING{bretter = {Bretter, die die Welt bedeuten} } +@STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} } +@STRING{editorial = {Editorial} } +@STRING{fremdebuehne = {Von fremden B{\"u}hnen} } +@STRING{fundus = {Aus dem Fundus} } +@STRING{hinterbuehne = {Hinter der B{\"u}hne} } +@STRING{leserbrief = {Leserbrief(e)} } +@STRING{magazin = {Magazin} } +@STRING{rezension = {Rezensionen} } +@STRING{schonimmer = {Was Sie schon immer {\"u}ber {\TeX} wissen wollten \dots} } +@STRING{theaterkasse = {Von der Theaterkasse} } +@STRING{theatertage = {{\TeX}-Theatertage} } + +@Book{PSTricks2, + author = {Herbert Vo\ss}, + title = {{\PST} {G}rafik f\"ur \TeX{} und \LaTeX}, + edition = {fifth}, + publisher = {DANTE -- Lob.media}, + year = {2008}, + address = {Heidelberg/Hamburg} +} + +@Book{companion04, + author = {Frank Mittelbach and Michel Goosens et al}, + title = {The {\LaTeX} {C}ompanion}, + edition = {second}, + publisher = {Addison-Wesley Publishing Company}, + year = {2004}, + address = {Boston} +} + +@Book{unbound, + author = {Alan Hoenig}, + title = {\TeX{} {U}nbound: \LaTeX{} \& \TeX{} {S}trategies, {F}onts, {G}raphics, and {M}ore}, + publisher = {Oxford University Press}, + year = {1998}, + address = {London} +} +@Article{ dtk02.2:jackson.voss:plot-funktionen, + author = {Laura E. Jackson and Herbert Vo{\ss}}, + title = {Die Plot-Funktionen von {\texttt{pst-plot}}}, + journal = dtk, + year = 2002, + volume = {2/02}, + altvolume = 2, + altnumber = 14, + month = jun, + pages = {27--34}, + annote = bretter, + keywords = {}, + abstract = { Im letzten Heft wurden die mathematischen Funktionen von + \PS~im Zusammenhang mit dem {\LaTeX}-Paket + \texttt{pst-plot} zum Zeichnen von Funktionen beschrieben + und durch Beispiele erl{\"a}utert. In diesem Teil werden + die bislang nur erw{\"a}hnten Plot-Funktionen f{\"u}r + externe Daten behandelt. } +} + +@Article{ dtk02.1:voss:mathematischen, + author = {Herbert Vo{\ss}}, + title = {Die mathematischen {F}unktionen von {P}ost{S}cript}, + journal = dtk, + year = 2002, + volume = {1/02}, + altvolume = 1, + altnumber = 14, + month = mar, + pages = {}, + annote = bretter, + keywords = {}, + abstract = { \PS, faktisch genauso alt wie {\TeX}, ist im + Verh{\"a}ltnis dazu allgemein noch weniger bekannt, wenn es + darum geht zu beurteilen, was es denn nun im eigentlichen + Sinne ist. Au{\ss}erdem wird h{\"a}ufig vergessen, dass + sich mit den \PS-Funktionen viele Dinge erledigen lassen, + bei denen sonst auf externe Programme zur{\"u}ckgegriffen + wird. Dies wird im Folgenden f{\"u}r die mathematischen + Funktionen im Zusammenhang mit dem Paket \texttt{pst-plot} + gezeigt. } +} + +@Book{tlgc2, + author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Vo{\ss}}, + title = {The {\LaTeX} {G}raphics {C}ompanion}, + publisher = {{Addison-Wesley Publishing Company}}, + edition = second, + year = {2007}, + address = {Reading, Mass.} +} + +@Article{girou:01:, + author = {Denis Girou}, + title = {Pr\'esentation de {PST}ricks}, + journal = {Cahier {GUT}enberg}, + year = 1994, + volume = {16}, + month = apr, + pages = {21-70} +} + +@Article{girou:02:, + author = {{Timothy Van} Zandt and Denis Girou}, + title = {Inside {PST}ricks}, + journal = TUGboat, + year = 1994, + volume = {15}, + month = sep, + pages = {239-246} +} + +@Book{PostScript, + Author = {Kollock, Nikolai G.}, + Title = {PostScript richtig eingesetzt: vom {K}onzept zum + praktischen {E}insatz}, + Publisher = {IWT}, + Address = {Vaterstetten}, + year = 1989, +} + +@Manual{pstricks, + Title = {PSTricks - {\PS} macros for generic {\TeX}}, + Author = {{Timothy Van} Zandt}, + Organization = {}, + Address = {\url{http://www.tug.org/application/PSTricks}}, + Note = {}, + year = 1993 +} + +@Manual{pst-plot, + Title = {\texttt{pst-plot}: Plotting two dimensional functions and data}, + Author = {{Timothy Van} Zandt}, + Organization = {}, + Address = {\url{CTAN:graphics/pstricks/generic/pst-plot.tex}}, + Note = {}, + year = 1999 +} + +@Manual{multido, + Title = {\texttt{multido.tex} - a loop macro, that supports fixed-point addition}, + Author = {{Timothy Van} Zandt}, + Organization = {}, + Address = {\url{CTAN:/graphics/pstricks/generic/multido.tex}}, + Note = {}, + year = 1997 +} + +@MISC{xkeyval, + author = {Hendri Adriaens}, + title = {xkeyval package}, + howpublished = {\url{CTAN:/macros/latex/contrib/xkeyval}}, + year = 2004 +} + +@book{voss:ref, + Title = {{\LaTeX} {Referenz}}, + Author = {Herbert Vo\ss}, + Publisher = {Lehmanns Media/DANTE}, + Edition= 2, + Address= {Berlin/Heidelberg}, + Year= {2010}, +} diff --git a/Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.pdf b/Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.pdf new file mode 100644 index 00000000000..e6549533721 Binary files /dev/null and b/Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.pdf differ diff --git a/Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.tex b/Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.tex new file mode 100644 index 00000000000..7c27442c6d9 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-poly/pst-poly-doc.tex @@ -0,0 +1,621 @@ +\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings + headexclude,footexclude,oneside]{pst-doc} +\usepackage[utf8]{inputenc} +\usepackage{pst-poly} +\let\pstDocFV\fileversion + +\def\bgImage{\PstPolygon[unit=3,linecolor=red,PolyOffset=2,linewidth=0.001, + PolyNbSides=72,PolyEpicycloid]} + +\lstset{explpreset={pos=t,width=-99pt,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={}}} +\begin{document} + +\title{\texttt{pst-poly}} +\subtitle{A PSTricks package for drawing polygons; v.\pstDocFV} +\author{Denis Girou\\Herbert Vo\ss} +%\docauthor{Herbert Vo\ss} +\date{\today} +\maketitle + +\tableofcontents + +\clearpage + +\begin{abstract} +\noindent +\LPack{pst-poly} allows to draw easily various kinds of regular or non regular +polygons, using the unique macro \Lcs{PstPolygon}, with various customization +parameters. +It is also a good example of the great power and flexibility of PSTricks, +as in fact it is a very short program (it body is only 100 lines long) but +nevertheless really powerful. + And last, it is also a good pedagogical example of how to design and +program high level graphic objects above PSTricks own ones. +\end{abstract} + +\clearpage + +\section{Introduction} +% +\LPack{pst-poly} offers a unique macro (plus some aliases to define +some often used polygons) with few parameters to interact on it. But we can +also use all the relevant PSTricks parameters to change the size, the +characteristics of lines, to add filling, etc. +The polygons are always drawn counter clockwise. +% +The syntax is simply: +\begin{BDef} +\LcsStar{PstPolygon}\OptArgs\\ +\Lcs{PstTriangle}\OptArgs\\ +\Lcs{PstSquare}\OptArgs\\ +\Lcs{PstPentagon}\OptArgs\\ +\Lcs{PstHexagon}\OptArgs\\ +\Lcs{PstHeptagon}\OptArgs\\ +\Lcs{PstOctogon}\OptArgs\\ +\Lcs{PstNonagon}\OptArgs\\ +\Lcs{PstDecagon}\OptArgs\\ +\Lcs{PstDodecagon}\OptArgs\\% +\Lcs{PstStarFiveLines}\OptArgs\\ +\Lcs{PstStarFive}\OptArgs\\ +\Lcs{pspolygonbox}\OptArgs\Largb{Text}\\ +\end{BDef} + +As for PSTricks closed objects, the \texttt{*} version uses a solid style +to fill the polygon, use the line color for fill color and set the linewidth +to 0. + +By default the polygons are set with a radius of 1 unit for the outer circle. + +\bigskip +\begin{LTXexample}[pos=l,width=0.3\linewidth] +\begin{pspicture}[showgrid=true](-1,-1)(1,1) + \PstPolygon[PstPicture=false] + \pscircle[linestyle=dashed]{1} +\end{pspicture} +\end{LTXexample} + +There is no special optional argument for this radius, the polygon can +be scaled by using the key \Lkeyword{unit}. With \Lkeyword{unit}=1.5, the outer +radius will be of 1.5cm when the current unit is set to 1cm. + + +\section{Optional arguments} +% +There are eight specific optional arguments defined to change the way the +polygons are defined: + +\begin{compactdesc} + \item [\Lkeyword{PstPicture}] (boolean): to define or not a \Lenv{pspicture} + environment for the polygon. We have to define this parameter to + \false\ if we want to mix the polygon with other PSTricks objects + --- see examples later + (\emph{Default:~\true} --- which is not the case for basic PSTricks + objects). With \Lkeyset{PstPicture=false} the image doesn't reserve + any space, it overwrites the text. The resulting box has a width and a height of 0pt. + +\bigskip +\begin{LTXexample}[pos=t] + foo\PstPolygon bar\hfill foo\PstPolygon[PstPicture=false] bar +\end{LTXexample} + +\bigskip + \item [\Lkeyword{PolyRotation}] (real): rotation angle applied to the polygon + (\emph{Default:~0} --- no rotation). + +\bigskip +\begin{LTXexample}[pos=t] + \PstPolygon\hfill + \PstPolygon[PolyRotation=18]\hfill + \PstPolygon[PolyRotation=36]\hfill + \PstPolygon[PolyRotation=45] +\end{LTXexample} + +\bigskip + \item [\Lkeyword{PolyNbSides}] (integer): number of sides of the polygon + (\emph{Default:~5}). + +\bigskip +\begin{LTXexample}[pos=t] + \PstPolygon\hfill + \PstPolygon[PolyNbSides=3]\hfill + \PstPolygon[PolyNbSides=4]\hfill + \PstPolygon[PolyNbSides=5]\hfill + \PstPolygon[PolyNbSides=8]\hfill + \PstPolygon[PolyNbSides=50] +\end{LTXexample} + +\bigskip + \item [\Lkeyword{PolyOffset}] (integer): number of nodes to bypass to obtain each + time the next one (\emph{Default:~1} --- no node bypassed). + +\bigskip +\begin{LTXexample}[pos=t] + \PstPolygon + \PstPolygon[PolyOffset=2] + \PstPolygon[PolyOffset=3] + \PstPolygon[PolyNbSides=7,PolyOffset=2] + \PstPolygon[PolyNbSides=9,PolyOffset=4] + \PstPolygon[PolyNbSides=17,PolyOffset=6] +\end{LTXexample} + +\bigskip + \item [\Lkeyword{PolyIntermediatePoint}] (real): position of the intermediate point + used to join each time the next node (\emph{Default:~empty} --- not used). + +\bigskip +\begin{LTXexample}[pos=t] + \PstPolygon + \PstPolygon[PolyIntermediatePoint=0.38] + \PstPolygon[PolyIntermediatePoint=0.2] + \PstPolygon[PolyIntermediatePoint=1.2] + \PstPolygon[PolyNbSides=7,PolyOffset=2, + PolyIntermediatePoint=0.38] + \PstPolygon[PolyNbSides=21,PolyOffset=2, + PolyIntermediatePoint=-1.25] +\end{LTXexample} + +\bigskip + \item [\Lkeyword{PolyCurves}] (boolean): boolean value to choose between straight + line and curve to join each time the next node (\emph{Default:~\false} --- straight lines). + +\bigskip +\begin{LTXexample}[pos=t] + \psset{PolyCurves=true} + \PstPolygon[PolyNbSides=7,PolyIntermediatePoint=0.38]\hfill + \PstPolygon[PolyNbSides=11,PolyIntermediatePoint=0.6]\hfill + \PstPolygon[PolyNbSides=7,PolyIntermediatePoint=0.2, + PolyOffset=2]\hfill + \PstPolygon[PolyNbSides=9,PolyIntermediatePoint=0.1]\hfill + \PstPolygon[PolyNbSides=15,PolyIntermediatePoint=1.2] +\end{LTXexample} + +\bigskip + \item [\Lkeyword{PolyEpicycloid}] (boolean): boolean value to choose between + polygon and epicycloid (\emph{Default:~\false} --- polygon). + +\bigskip +\begin{LTXexample}[pos=t] + \psset{linewidth=0.001,PolyNbSides=72,PolyEpicycloid=true} +% Epicycloid of factor 1 is cardioid and of factor 2 nephroid + \multido{\i=2+1}{4}{\PstPolygon[PolyOffset=\i]\hfill} + \PstPolygon[PolyOffset=72]\hfill% Epicycloid of factor 71 + \PstPolygon[PolyOffset=73] % Epicycloid of factor 72 +\end{LTXexample} + +\bigskip + \item [\Lkeyword{PolyName}] (string): name of the polygon, useful to have different + names for the nodes of different polygons (\emph{Default:~empty} --- no name). + + The center of the polygon has name \texttt{PolyName0} and the nodes +(vertices) have names \texttt{PolyName1} to \texttt{PolyNameN}. + With this parameter, we can connect as we want nodes of different polygons: + +\bigskip +\begin{LTXexample}[pos=l,width=0.3\linewidth,pos=l] + \psset{PstPicture=false} + \begin{pspicture}(-1,-1)(1,1) + \PstPolygon[unit=0.8,PolyName=A,PolyNbSides=6] + \PstPolygon[unit=1.2,PolyName=B,PolyNbSides=12] + \end{pspicture} + \multido{\i=1+2}{6}{% + \ncline{A\the\multidocount}{B\i}} +\end{LTXexample} + +It is also a way (limited in fact...) to define three dimensional objects in perspective: + +\bigskip +\begin{LTXexample}[pos=l,width=0.3\linewidth,pos=l] +\psset{unit=0.8} +\begin{pspicture}(3,2.5) +% \PstSquare is described later + \rput[lb](0,0){\PstSquare[PolyName=A]} + \rput[lb](2.5,2){\PstSquare[unit=0.5,PolyName=B]} + \multido{\i=1+1}{4}{\ncline{A\i}{B\i}} + \end{pspicture} +\end{LTXexample} + +\end{compactdesc} + +\bigskip + Of course, we can mix specific parameters of \LPack{pst-poly} with +relevant PSTricks ones and combine it with other generic macros +(for repetitions, projection in the 3d space, etc.) + + +\begin{LTXexample}[pos=t] + \PstPolygon[unit=1.5] + \PstPolygon[linewidth=1mm] + \PstPolygon[fillstyle=crosshatch,PolyNbSides=6] + \PstPolygon[linecolor=red,fillstyle=solid,fillcolor=yellow, + PolyRotation=18,PolyOffset=2] + \PstPolygon*[linecolor=cyan,PolyNbSides=7,PolyOffset=2] +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=5+2}{6}{% + \PstPolygon[PolyNbSides=\i,PolyCurves=true, + PolyIntermediatePoint=0.1,PolyOffset=3]} +\end{LTXexample} + + +\section{Pre-defined polygons} +% + Some often used polygons and other related geometric objects are +pre-defined, for immediate usage : + +\begin{LTXexample}[pos=t] + \PstTriangle + \PstSquare + \PstPentagon[unit=0.5,linestyle=dotted] + \PstHexagon[fillstyle=hlines,hatchangle=90] + \PstHeptagon[fillstyle=vlines] + \PstOctogon*[unit=0.8,linecolor=red] + \PstNonagon[unit=0.5] + \PstDecagon + \PstDodecagon[linecolor=green] \par + \PstStarFiveLines + \PstStarFive +\end{LTXexample} + + +\section{Non regular polygons} + +Until now, we have described only the so-called \emph{regular} polygons, +which are from far the most useful ones (all of them have equal edges and +angles). Nevertheless, it is not so difficult to extend these polygon to +\emph{non regular} ones, using a different value for horizontal and vertical +units (nevertheless, the code is more tricky, as we must do all the +trigonometry explicitely...) +% +\begin{LTXexample}[pos=t] + \PstPentagon[xunit=0.5]\hfill + \PstHexagon[yunit=0.5]\hfill + \PstStarFive[xunit=0.5,yunit=1.5]\hfill + \PstPolygon[xunit=0.8,yunit=1.5,PolyNbSides=9,PolyOffset=2, + PolyIntermediatePoint=0.1,PolyCurves=true] +\end{LTXexample} +% +\section{Nodes (vertices)} +% +And another powerful possibility is to define a command +\Lcs{PstPolygonNode} which will be excuted at each node (\emph{Default:~empty} --- nothing executed). +The counter name for nodes is \Lctr{INode}, starting from 0. The \Lcs{multidocount} counter, from the +\Lcs{multido} command, start itself from 1. + +\begin{LTXexample}[width=0.3\linewidth,pos=l] + \providecommand{\PstPolygonNode}{% + \psdots[dotsize=0.2,linecolor=cyan](1;\INode)} + \PstPentagon +\end{LTXexample} +% +\begin{LTXexample}[width=0.3\linewidth,pos=l] + \newcounter{Letter} + \providecommand{\PstPolygonNode}{% + \setcounter{Letter}{\the\multidocount}% + \rput*{*0}(1;\INode){\small\Alph{Letter}}} + \PstHeptagon[PolyOffset=3] +\end{LTXexample} +% +\begin{LTXexample}[pos=l,width=0.3\linewidth] + \providecommand{\PstPolygonNode}{% + \psdots[dotstyle=o,dotsize=0.2](1;\INode) + \psline[linecolor=red]{->}(0.9;\INode)} + \PstPolygon[PolyNbSides=8] +\end{LTXexample} +% +\vspace{3mm} + It is also a way to nest polygons: +\vspace{3mm} +% +\begin{LTXexample}[pos=l,width=0.3\linewidth] + \newbox{\Star} + \savebox{\Star}{% + \PstStarFive*[unit=0.15,linecolor=red]} + \providecommand{\PstPolygonNode}{% + \rput{*0}(1;\INode){\usebox{\Star}}} + \shortstack{\PstNonagon\\[5mm] + \PstDodecagon[linestyle=none]} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \psset{unit=2,PstPicture=false} + \begin{pspicture}(-1.6,-1.6)(1.6,1.6) +% Just to name the nodes, to be able to join some of them. +% by solid curves. We can't draw the polygons now, +% as the node numbers must erase the solid curves... + \PstHexagon[unit=0.8,linestyle=none,PolyName=H]\PstDodecagon[unit=1.2,linestyle=none,PolyName=D] + {\SpecialCoor + \psset{linewidth=0.4pt,border=2pt,nodesep=0.45} + \psccurve(H1)(H4)(D8)([angle=-30]D9)(D11)\psccurve(D3)(H3)(H6)(D12)([angle=90]D1) + \psccurve(D4)(H2)(H5)(D7)([angle=90]D6)} + \psset{linestyle=dotted,framesep=1pt} + \PstTriangle[unit=0.23] + \providecommand{\PstPolygonNode}{\rput*{*0}(1;\INode){\small\the\multidocount}} + \PstHexagon[unit=0.8] \PstDodecagon[unit=1.2] \PstDodecagon[unit=1.6] + \end{pspicture} +\end{LTXexample} +% +\section{Polygonbox} + +The valid options with the predefined values are \Lkeyword{PolyNbSides}=3 and \Lkeyword{PolyRotation}=0 + +\begin{compactitem} +\item There maybe some problems with linearcs and rounding errors. +\item To rotate the text inside the box, one can use the \Lcs{rotatebox} macro from + the \LPack{rotating} package (see examples). +\end{compactitem} + +\begin{LTXexample}[pos=t] + \multido{\nA=3+1}{8}{% + \pspolygonbox[PolyNbSides=\nA,framesep=3mm]{Text}~} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\nA=3+1}{8}{\pspolygonbox[PolyNbSides=\nA,% + framesep=2mm,doubleline=true]{Text}~} +\end{LTXexample} + + +\begin{LTXexample}[pos=t] + \psset{PolyNbSides=4} + \multido{\nA=0+60}{8}{\pspolygonbox[PolyRotation=\nA,% + framesep=2mm,doubleline=true,% + linecolor=red,doublecolor=blue]{\magenta Text}~} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\nA=0+60,\nB=45+60}{8}{\pspolygonbox% + [PolyRotation=\nA,framesep=2mm,doubleline=true,% + linecolor=red,doublecolor=blue,linearc=0.4]% + {\rotatebox{\nB}{\blue Text}}~}\\[1cm] +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\nA=3+1}{8}{% + \pspolygonbox[PolyNbSides=\nA,rot=60,framesep=2pt,% + doubleline=true,linearc=0.2]{Text}~} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\nA=3+1}{8}{% + \pspolygonbox[PolyNbSides=\nA,framesep=10pt,% + fillstyle=solid,fillcolor=cyan,linearc=0.2]{Text}~} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\nA=-5+5}{8}{\pspolygonbox[framesep=\nA pt,% + PolyRotation=90]{\Huge\red T}~} +\end{LTXexample} + +\vspace{1cm} +\begin{LTXexample}[pos=t] + \multido{\nA=-5+5}{7}{\pspolygonbox[framesep=\nA pt,% + PolyRotation=90,boxsep=false]{\Huge\red T}~}\par + \rule{0pt}{1cm} +\end{LTXexample} + +\section{Some more examples} + +\begin{LTXexample}[pos=t] + \multido{\i=3+1}{6}{% + \PstPolygon[PolyNbSides=\i]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=3+2}{6}{% + \PstPolygon[PolyOffset=2,PolyNbSides=\i]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=3+1}{10}{% + \PstPolygon[PolyOffset=3,PolyNbSides=\i]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=5+1}{10}{% + \PstPolygon[PolyOffset=4,PolyNbSides=\i]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=5+2}{10}{% + \PstPolygon[PolyOffset=5,PolyNbSides=\i]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=5+2}{10}{% + \PstPolygon[PolyOffset=7,PolyNbSides=\i]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=5+2}{10}{% + \PstPolygon[PolyOffset=8,PolyNbSides=\i]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=1+1}{10}{% + \PstPolygon[PolyOffset=\i,PolyNbSides=5]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=1+1}{10}{% + \PstPolygon[PolyOffset=\i,PolyNbSides=7]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=5+1}{10}{% + \PstPolygon[PolyCurves,PolyIntermediatePoint=0.1,PolyNbSides=\i] + \hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=5+1}{10}{% + \PstPolygon[PolyCurves,PolyIntermediatePoint=0.2, + PolyOffset=2,PolyNbSides=\i]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\i=5+2}{10}{% + \PstPolygon[PolyCurves,PolyIntermediatePoint=0.1, + PolyOffset=3,PolyNbSides=\i]\hspace{5mm}} +\end{LTXexample} + +% Second serie + +\begin{LTXexample}[pos=t] + \multido{\n=-1.4+0.5}{10}{% + \PstPolygon[PolyNbSides=3,PolyOffset=2,PolyIntermediatePoint=\n] + \hspace{5mm}}\par + \vspace{0pt}{2cm} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\n=-1.4+0.5}{6}{% + \PstPolygon[PolyNbSides=5,PolyOffset=2,PolyIntermediatePoint=\n] + \hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\n=-1.4+0.5}{6}{% + \PstPolygon[PolyNbSides=13,PolyOffset=2,PolyIntermediatePoint=\n] + \hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \multido{\n=-1.4+0.5}{6}{% + \PstPolygon[PolyNbSides=21,PolyOffset=2,PolyIntermediatePoint=\n] + \hspace{5mm}} +\end{LTXexample} + +% Third serie + +\begin{LTXexample}[pos=t] + \psset{unit=1.4,linewidth=0.001,PolyNbSides=72,PolyEpicycloid} + \multido{\i=2+1}{4}{% + % Epicycloid of factor 1 is cardioid and of factor 2 nephroid + \PstPolygon[PolyOffset=\i]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + % Epicycloid of factor 10 + \PstPolygon[unit=2,linewidth=0.003, + PolyEpicycloid,PolyNbSides=72,PolyOffset=11] +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + % Epicycloid of factor 22 + \PstPolygon[unit=2,linewidth=0.003, + PolyEpicycloid,PolyNbSides=72,PolyOffset=23] +\end{LTXexample} + +\begin{LTXexample}[pos=t] + \psset{unit=1.9,linewidth=0.001,PolyNbSides=72,PolyEpicycloid} + \multido{\i=71+1}{3}{% + \PstPolygon[PolyOffset=\i]\hspace{5mm}} +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + % Epicycloid of factor 100 + \PstPolygon[unit=2,linewidth=0.003, + PolyEpicycloid,PolyNbSides=72,PolyOffset=101] +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + % Epicycloid of factor 153 + \PstPolygon[unit=2,linewidth=0.003, + PolyEpicycloid,PolyNbSides=72,PolyOffset=154] +\end{LTXexample} + +% Fourth serie + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + \providecommand{\PstPolygonNode}{% + \psdots[dotsize=0.2,linecolor=cyan](1;\INode)} + \PstPentagon[unit=2] +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + \providecommand{\PstPolygonNode}{% + \rput{*0}(1.2;\INode){\small\the\multidocount}} + \PstPolygon[unit=2,PolyNbSides=7,PolyOffset=2] +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + \providecommand{\PstPolygonNode}{% + \rput*{*0}(1;\INode){\small\the\multidocount}} + \PstHeptagon[unit=2,PolyOffset=2] +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] +% \newcounter{Letter} + \providecommand{\PstPolygonNode}{% + \setcounter{Letter}{\the\multidocount}% + \rput*{*0}(1;\INode){\small\Alph{Letter}}} + \PstHeptagon[unit=2,PolyOffset=3] +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + \providecommand{\PstPolygonNode}{% + \SpecialCoor + \degrees[3] + \rput{0.5}(0.5;\INode){% + \pspolygon*(0.5;0.5)(0.5;1.5)(0.5;2.5)}} + \PstTriangle +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + \providecommand{\PstPolygonNode}{% + \psdots[dotstyle=o,dotsize=0.2](1;\INode) + \psline[linecolor=red]{->}(0.9;\INode)} + \PstPolygon[unit=2,PolyNbSides=8] +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + \providecommand{\PstPolygonNode}{% + \psline[linewidth=0.1mm,doubleline=true, + linecolor=green]{<->}(0;0)(1;\INode)} + \PstHexagon[unit=2] +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=0.3\linewidth] + \newbox{\Star} + \savebox{\Star}{% + \PstStarFive*[unit=0.15,linecolor=red]} + \providecommand{\PstPolygonNode}{% + \rput{*0}(1;\INode){\usebox{\Star}}} + \shortstack{% + \PstNonagon\\[5mm] + \PstDodecagon[linestyle=none]} +\end{LTXexample} + +\begin{LTXexample}[pos=l,width=5cm] +%\newcounter{Letter}% if not defined +\setcounter{Letter}{\the\multidocount}% +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\PstPolygon[PolyName=A,fillstyle=solid,fillcolor=lightgray,linewidth=2pt,PolyNbSides=5,unit=0.5,PstPicture=false] +\PstPolygon[PolyName=B,PolyNbSides=5,linewidth=2pt,PstPicture=false,unit=2.5] +\multido{\iA=1+1,\iB=2+1}{5}{% + \setcounter{Letter}{\the\multidocount}% + \ncline{A\iA}{B\iA}\ncput*{\bf\alph{Letter}}% + \ifnum\iB>5 \def\iB{1}\fi% + \pcline[linestyle=none](B\iA)(B\iB)\ncput*{\bf\iA}} +\end{pspicture} +\end{LTXexample} + +\clearpage +\section{List of all optional arguments for \texttt{pst-poly}} + +\xkvview{family=pst-poly,columns={key,type,default}} + + +\nocite{*} +\bgroup +\RaggedRight +\bibliographystyle{plain} +\bibliography{pst-poly-doc} +\egroup + +\printindex + +\end{document} + + diff --git a/Master/texmf-dist/doc/generic/pst-poly/pst-poly.pdf b/Master/texmf-dist/doc/generic/pst-poly/pst-poly.pdf deleted file mode 100644 index 2fb8ab805d9..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-poly/pst-poly.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-poly/tst-poly.pdf b/Master/texmf-dist/doc/generic/pst-poly/tst-poly.pdf deleted file mode 100644 index 347fffd9ff8..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-poly/tst-poly.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-poly/tst-poly.tex b/Master/texmf-dist/doc/generic/pst-poly/tst-poly.tex deleted file mode 100644 index a48032e31c0..00000000000 --- a/Master/texmf-dist/doc/generic/pst-poly/tst-poly.tex +++ /dev/null @@ -1,332 +0,0 @@ -%% -%% This is file `tst-poly.tex', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% pst-poly.dtx (with options: `tst-poly') -%% -%% IMPORTANT NOTICE: -%% -%% For the copyright see the source file. -%% -%% Any modified versions of this file must be renamed -%% with new filenames distinct from tst-poly.tex. -%% -%% For distribution of the original source see the terms -%% for copying and modification in the file pst-poly.dtx. -%% -%% This generated file may be distributed as long as the -%% original source files, as listed above, are part of the -%% same distribution. (The sources need not necessarily be -%% in the same archive or directory.) -%% -%% Package `pst-poly.dtx' -%% -%% Denis Girou (CNRS/IDRIS - France) -%% Herbert Voss -%% -%% Novermber 20, 2004 -%% -%% This program can be redistributed and/or modified under the terms -%% of the LaTeX Project Public License Distributed from CTAN archives -%% in directory macros/latex/base/lppl.txt. -%% -%% DESCRIPTION: -%% `pst-poly' is a PSTricks package to draw easily various kinds of regular -%% or non regular polygons, with various customizations. -%% -%% `pst-poly' test file. -%% -\documentclass{article} - -\usepackage{fancyvrb} -\usepackage[width=18cm]{geometry} -\usepackage{pstricks} -\usepackage{pst-poly} - - -\makeatletter - - -\def\HLEmphasize#1{\textit{#1}} -\newcommand{\BS}{\texttt{\symbol{`\\}}} -\def\HLMacro#1{\BS{}def\HLMacro@i#1\@nil} -\def\HLMacro@i#1def#2\@nil{\HLReverse{#2}} -\def\HLReverse#1{{\setlength{\fboxsep}{1pt}\HLReverse@i{#1}}} -\def\HLReverse@i#1{\colorbox{black}{\textcolor{white}{\textbf{#1}}}} - -\def\Example{\FV@Environment{}{Example}} -\def\endExample{% -\end{VerbatimOut} -\Below@Example{\jobname.tmp} -\endgroup} - -\def\CenterExample{\FV@Environment{}{Example}} -\def\endCenterExample{% -\end{VerbatimOut} -\begin{center} -\Below@Example{\jobname.tmp} -\end{center} -\endgroup} - -\def\SideBySideExample{\FV@Environment{}{Example}} -\def\endSideBySideExample{% -\end{VerbatimOut} -\SideBySide@Example{\jobname.tmp} -\endgroup} - -\def\FVB@Example{% -\begingroup -\FV@UseKeyValues -\parindent=0pt -\multiply\topsep by 2 -\VerbatimEnvironment -\begin{VerbatimOut}[gobble=2,codes={\catcode`\Z=12}]{\jobname.tmp}} - -\def\Below@Example#1{% -\VerbatimInput[commentchar=Z,commandchars=/?_,frame=single, - numbers=left,numbersep=3pt]{#1} -\catcode`\%=14\relax -\catcode`\Z=9\relax -\catcode`/=0\relax -\catcode`?=1\relax -\catcode`_=2\relax -\def\HLEmphasize##1{##1}% -\def\HLMacro##1{##1}% -\def\HLReverse##1{##1}% -\input{#1}\par} - -\def\SideBySide@Example#1{% -\vskip 1mm -\@tempdimb=\FV@XRightMargin -\advance\@tempdimb -5mm -\begin{minipage}[c]{\@tempdimb} - \fvset{xrightmargin=0pt} - \catcode`\%=14\relax - \catcode`\Z=9\relax - % We suppress the effect of the highlighting macros - \catcode`/=0\relax - \catcode`?=1\relax - \catcode`_=2\relax - \def\HLEmphasize##1{##1}% - \def\HLMacro##1{##1}% - \def\HLReverse##1{##1}% - \input{#1} -\end{minipage}% -\@tempdimb=\textwidth -\advance\@tempdimb -\FV@XRightMargin -\advance\@tempdimb 5mm -\begin{minipage}[c]{\@tempdimb} - \VerbatimInput[commentchar=Z,commandchars=/?_, - frame=single,numbers=left,numbersep=3pt, - xleftmargin=5mm,xrightmargin=0pt]{#1} -\end{minipage} -\vskip 1mm} - -\makeatother - - -\begin{document} - - -\begin{CenterExample} - \multido{\i=3+1}{6}{% - \PstPolygon[PolyNbSides=\i]\hspace{5mm}} - \PstPolygon[PolyNbSides=30] -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=3+2}{6}{% - \PstPolygon[PolyOffset=2,PolyNbSides=\i]\hspace{5mm}} - \PstPolygon[PolyOffset=2,PolyNbSides=31] -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=3+1}{7}{% - \PstPolygon[PolyOffset=3,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=5+1}{7}{% - \PstPolygon[PolyOffset=4,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=5+2}{7}{% - \PstPolygon[PolyOffset=5,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\clearpage -\begin{CenterExample} - \multido{\i=5+2}{7}{% - \PstPolygon[PolyOffset=7,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=5+2}{7}{% - \PstPolygon[PolyOffset=8,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=1+1}{7}{% - \PstPolygon[PolyOffset=\i,PolyNbSides=5]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=1+1}{7}{% - \PstPolygon[PolyOffset=\i,PolyNbSides=7]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=5+1}{7}{% - \PstPolygon[PolyCurves,PolyIntermediatePoint=0.1,PolyNbSides=\i] - \hspace{5mm}} -\end{CenterExample} - -\clearpage -\begin{CenterExample} - \multido{\i=5+1}{7}{% - \PstPolygon[PolyCurves,PolyIntermediatePoint=0.2, - PolyOffset=2,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=5+2}{7}{% - \PstPolygon[PolyCurves,PolyIntermediatePoint=0.1, - PolyOffset=3,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - - -\begin{CenterExample} - \multido{\n=-1.4+0.5}{7}{% - \PstPolygon[PolyNbSides=3,PolyOffset=2,PolyIntermediatePoint=\n] - \hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\n=-1.4+0.5}{7}{% - \PstPolygon[PolyNbSides=5,PolyOffset=2,PolyIntermediatePoint=\n] - \hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\n=-1.4+0.5}{7}{% - \PstPolygon[PolyNbSides=13,PolyOffset=2,PolyIntermediatePoint=\n] - \hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\n=-1.4+0.5}{7}{% - \PstPolygon[PolyNbSides=21,PolyOffset=2,PolyIntermediatePoint=\n] - \hspace{5mm}} -\end{CenterExample} - - -\begin{CenterExample} - \psset{unit=1.4,linewidth=0.001,PolyNbSides=72,PolyEpicycloid} - \multido{\i=2+1}{4}{% - % Epicycloid of factor 1 is cardioid and of factor 2 nephroid - \PstPolygon[PolyOffset=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{SideBySideExample}[xrightmargin=5cm] - % Epicycloid of factor 10 - \PstPolygon[unit=2,linewidth=0.003, - PolyEpicycloid,PolyNbSides=72,PolyOffset=11] -\end{SideBySideExample} - -\begin{SideBySideExample}[xrightmargin=5cm] - % Epicycloid of factor 22 - \PstPolygon[unit=2,linewidth=0.003, - PolyEpicycloid,PolyNbSides=72,PolyOffset=23] -\end{SideBySideExample} - -\clearpage -\begin{CenterExample} - \psset{unit=1.9,linewidth=0.001,PolyNbSides=72,PolyEpicycloid} - \multido{\i=71+1}{3}{% - \PstPolygon[PolyOffset=\i]\hspace{5mm}} -\end{CenterExample} - -\fvset{xrightmargin=5cm} % 5cm reserved for the graphic - -\begin{SideBySideExample} - % Epicycloid of factor 100 - \PstPolygon[unit=2,linewidth=0.003, - PolyEpicycloid,PolyNbSides=72,PolyOffset=101] -\end{SideBySideExample} - -\begin{SideBySideExample}[xrightmargin=5cm] - % Epicycloid of factor 153 - \PstPolygon[unit=2,linewidth=0.003, - PolyEpicycloid,PolyNbSides=72,PolyOffset=154] -\end{SideBySideExample} - -\clearpage - - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \psdots[dotsize=0.2,linecolor=cyan](1;\INode)} - \PstPentagon[unit=2] -\end{SideBySideExample} - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \rput{*0}(1.2;\INode){\small\the\multidocount}} - \PstPolygon[unit=2,PolyNbSides=7,PolyOffset=2] -\end{SideBySideExample} - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \rput*{*0}(1;\INode){\small\the\multidocount}} - \PstHeptagon[unit=2,PolyOffset=2] -\end{SideBySideExample} - -\begin{SideBySideExample} - \newcounter{Letter} - \providecommand{\PstPolygonNode}{% - \setcounter{Letter}{\the\multidocount}% - \rput*{*0}(1;\INode){\small\Alph{Letter}}} - \PstHeptagon[unit=2,PolyOffset=3] -\end{SideBySideExample} - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \SpecialCoor - \degrees[3] - \rput{0.5}(0.5;\INode){% - \pspolygon*(0.5;0.5)(0.5;1.5)(0.5;2.5)}} - \PstTriangle -\end{SideBySideExample} - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \psdots[dotstyle=o,dotsize=0.2](1;\INode) - \psline[linecolor=red]{->}(0.9;\INode)} - \PstPolygon[unit=2,PolyNbSides=8] -\end{SideBySideExample} - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \psline[linewidth=0.1mm,doubleline=true, - linecolor=green]{<->}(0;0)(1;\INode)} - \PstHexagon[unit=2] -\end{SideBySideExample} - -\begin{SideBySideExample} - \newbox{\Star} - \savebox{\Star}{% - \PstStarFive*[unit=0.15,linecolor=red]} - \providecommand{\PstPolygonNode}{% - \rput{*0}(1;\INode){\usebox{\Star}}} - \shortstack{% - \PstNonagon\\[5mm] - \PstDodecagon[linestyle=none]} -\end{SideBySideExample} - -\end{document} -\endinput -%% -%% End of file `tst-poly.tex'. diff --git a/Master/texmf-dist/source/generic/pst-poly/Makefile b/Master/texmf-dist/source/generic/pst-poly/Makefile new file mode 100644 index 00000000000..f5e96d6e155 --- /dev/null +++ b/Master/texmf-dist/source/generic/pst-poly/Makefile @@ -0,0 +1,70 @@ + +# `Makefile' for `pst-poly.pdf', hv, 2009/12/08 + +.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps + +PACKAGE = pst-poly + +MAIN = $(PACKAGE)-doc + +LATEX = latex + +ARCHNAME = $(MAIN)-$(shell date +%y%m%d) + +ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Changes Makefile + +TDS = ~/PSTricks/PSTricks-TDS + +all : doc clean +doc: $(MAIN).pdf + +$(MAIN).pdf : $(MAIN).ps + GS_OPTIONS=-dAutoRotatePages=/None ps2pdf $< + +$(MAIN).ps : $(MAIN).dvi + dvips $< + +$(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 $<) + $(LATEX) $< + $(LATEX) $< + +clean : + $(RM) $(addprefix $(MAIN), .log .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out .blg .bbl) + $(RM) $(addprefix $(MAIN), .dvi .ps .eps) + +veryclean : clean + $(RM) $(addprefix $(MAIN), .pdf .bbl .blg) + +arch : + zip $(ARCHNAME).zip $(ARCHFILES) + +tds: + cp -u Changes $(TDS)/doc/generic/$(PACKAGE)/ + cp -u README $(TDS)/doc/generic/$(PACKAGE)/ + cp -u $(MAIN).pdf $(TDS)/doc/generic/$(PACKAGE)/ +# + cp -u Changes $(TDS)/tex/latex/$(PACKAGE)/ + cp -u $(PACKAGE).sty $(TDS)/tex/latex/$(PACKAGE)/ +# + cp -u Changes $(TDS)/tex/generic/$(PACKAGE)/ + cp -u $(PACKAGE).tex $(TDS)/tex/generic/$(PACKAGE)/ +# +# cp -u Changes $(TDS)/dvips/$(PACKAGE)/ +# cp -u $(PACKAGE).pro $(TDS)/dvips/$(PACKAGE)/ +# + cp -u Changes $(TDS)/source/$(PACKAGE)/ + cp -u $(MAIN).tex $(TDS)/source/$(PACKAGE)/ + cp -u $(MAIN).bib $(TDS)/source/$(PACKAGE)/ + cp -u Makefile $(TDS)/source/$(PACKAGE)/ + + +# EOF diff --git a/Master/texmf-dist/source/latex/pst-poly/pst-poly.dtx b/Master/texmf-dist/source/latex/pst-poly/pst-poly.dtx deleted file mode 100644 index 5b3d427240b..00000000000 --- a/Master/texmf-dist/source/latex/pst-poly/pst-poly.dtx +++ /dev/null @@ -1,1679 +0,0 @@ -% \iffalse meta-comment, etc. -%% -%% Package `pst-poly.dtx' -%% -%% Denis Girou (CNRS/IDRIS - France) -%% Herbert Voss -%% -%% Novermber 20, 2004 -%% -%% This program can be redistributed and/or modified under the terms -%% of the LaTeX Project Public License Distributed from CTAN archives -%% in directory macros/latex/base/lppl.txt. -%% -%% DESCRIPTION: -%% `pst-poly' is a PSTricks package to draw easily various kinds of regular -%% or non regular polygons, with various customizations. -%% -% \fi -% -% \changes{v1.60}{2004/11/20}{new macro pspolygonbox, -% using pst-xkey} -% \changes{v1.50}{2001/02/08}{Standard packaging (.ins + .dtx files).} -% \changes{v1.40}{1998/07/09}{Define `PolyRotation' parameter as a real number -% and not as an angle, to allow to use the macro -% `degrees' before to draw a polygon.} -% \changes{v1.30}{1998/02/06}{Rename `PsPicture' parameter to `PstPicture' for -% consistancy.} -% \changes{v1.20}{1997/06/27}{First public release.} -% -% \DoNotIndex{\\,\%,\@} -% \DoNotIndex{\@eha,\@empty,\@ifnextchar,\@nameuse,\@nil,\@pstrickserr} -% \DoNotIndex{\@tempdimb,\@undefined} -% \DoNotIndex{\advance,\Alph,\begin,\begingroup,\Below@Example,\BS} -% \DoNotIndex{\catcode,\CenterExample,\changes,\clearpage,\CodelineIndex} -% \DoNotIndex{\colorbox,\csname} -% \DoNotIndex{\def,\define@key,\degrees,\divide,\DocInput,\documentclass} -% \DoNotIndex{\edef,\else,\EnableCrossrefs,\end,\endCenterExample} -% \DoNotIndex{\endcsname,\endExample,\endgroup,\endinput,\endpspicture} -% \DoNotIndex{\endSideBySideExample,\Example} -% \DoNotIndex{\fboxsep,\fi,\filedate,\fileversion,\FV@Environment} -% \DoNotIndex{\FV@UseKeyValues,\FV@XRightMargin,\FVB@Example,\fvset} -% \DoNotIndex{\GetFileInfo} -% \DoNotIndex{\hbadness,\hfuzz,\HLEmphasize,\HLMacro,\HLMacro@i} -% \DoNotIndex{\HLReverse,\HLReverse@i,\hspace} -% \DoNotIndex{\i,\if@star,\ifnum,\ifodd,\ifx,\input,\jobname} -% \DoNotIndex{\let,\lineto,\makeatletter,\makeatother,\message,\moveto} -% \DoNotIndex{\multido,\multidocount,\MultidoLoaded,\multiply} -% \DoNotIndex{\n,\newbox,\newcommand,\newcounter,\newdimen,\newif} -% \DoNotIndex{\OnlyDescription} -% \DoNotIndex{\par,\parindent,\pnode,\providecommand,\ProvidesPackage} -% \DoNotIndex{\pscurve,\pscustom,\psdots,\psline,\pspicture,\pspolygon} -% \DoNotIndex{\psset,\pssetlength,\pst@cnta,\pst@getint,\pst@ifstar} -% \DoNotIndex{\PstAtCode,\PSTricksLoaded,\psxunit,\psyunit} -% \DoNotIndex{\RecordChanges,\relax,\rput} -% \DoNotIndex{\savebox,\setcounter,\setlength,\shortstack} -% \DoNotIndex{\SideBySide@Example,\SideBySideExample,\small,\solid@star} -% \DoNotIndex{\space,\SpecialCoor,\Star,\symbol} -% \DoNotIndex{\textbf,\textcolor,\textit,\texttt,\textwidth,\the,\topsep,\tw@} -% \DoNotIndex{\usebox,\usepackage} -% \DoNotIndex{\VerbatimEnvironment,\VerbatimInput,\vskip,\Z} -% -% \setcounter{IndexColumns}{2} -% -% \newcommand{\KeyValPackage}{`\textsf{keyval}'} -% \newcommand{\PstPolygonPackage}{`\textsf{pst-poly}'} -% \newcommand{\PstPolygonMacro}{\cs{PstPolygon}} -% \newcommand{\PstPolygonNodeMacro}{\cs{PstPolygonNode}} -% \newcommand{\XYpic}{% -% \leavevmode\hbox{\kern-.1em X\kern-.3em\lower.4ex\hbox{Y\kern-.15em}-pic}} -% -% ^^A From ltugboat.cls -% -% ^^A Typeset the name of an environment -% \providecommand\env[1]{\textsf{#1}} -% \providecommand\clsname[1]{\textsf{#1}} -% \providecommand\pkgname[1]{\textsf{#1}} -% \providecommand\optname[1]{\textsf{#1}} -% \providecommand\progname[1]{\textsf{#1}} -% -% ^^A A list of options for a package/class -% \newenvironment{optlist}{\begin{description}% -% \renewcommand\makelabel[1]{% -% \descriptionlabel{\mdseries\optname{##1}}}% -% \itemsep0.25\itemsep}% -% {\end{description}} -% -% \makeatletter -% -% ^^A For the references -% \newcommand\acro[1]{\textsc{#1}\@} -% \def\CTAN{\acro{CTAN}} -% \let\texttub\textsl -% \def\TUB{\texttub{TUGboat}} -% -% ^^A From the `ctandir' package from the `ltugboat' package -% ^^A (`ltubguid' on 1997/06/12) -% ^^A Experimental CTAN location information macros for use with Donald -% ^^A Arseneau's |url.sty| -% -% \newcommand\CTANdirectory[1]{\expandafter\urldef -% \csname CTAN@#1\endcsname\path} -% -% ^^A Use the standard label-referencing mechanism to get the warning for -% ^^A an undefined label -% \newcommand\CTANref[1]{\expandafter\@setref\csname CTAN@#1\endcsname -% \relax{#1}} -% -% ^^A Utility macros -% -% ^^A Example macros - adapted from the `fvrb-ex' package -% ^^A --------------------------------------------------- -% -% ^^A Take care that we use here the four /?_Z characters as escape -% ^^A characters, so we can't use these characters in the examples! -% -% ^^A To highlight some verbatim sequences (comments, macro names, etc.) -% \def\HLEmphasize#1{\textit{#1}} -% \newcommand{\BS}{\texttt{\symbol{`\\}}} -% \def\HLMacro#1{\BS{}def\HLMacro@i#1\@nil} -% \def\HLMacro@i#1def#2\@nil{\HLReverse{#2}} -% \def\HLReverse#1{{\setlength{\fboxsep}{1pt}\HLReverse@i{#1}}} -% \def\HLReverse@i#1{\colorbox{black}{\textcolor{white}{\textbf{#1}}}} -% -% \def\Example{\FV@Environment{}{Example}} -% \def\endExample{% -% \end{VerbatimOut} -% \Below@Example{\input{\jobname.tmp}} -% \endgroup} -% -% \def\CenterExample{\FV@Environment{}{Example}} -% \def\endCenterExample{% -% \end{VerbatimOut} -% \begin{center} -% \Below@Example{\input{\jobname.tmp}} -% \end{center} -% \endgroup} -% -% \def\SideBySideExample{\FV@Environment{}{Example}} -% \def\endSideBySideExample{% -% \end{VerbatimOut} -% \SideBySide@Example{\input{\jobname.tmp}} -% \endgroup} -% -% \def\FVB@Example{% -% \begingroup -% \FV@UseKeyValues -% \parindent=0pt -% \multiply\topsep by 2 -% \VerbatimEnvironment -% \begin{VerbatimOut}[gobble=4,codes={\catcode`\Z=12}]{\jobname.tmp}} -% -% \def\Below@Example#1{% -% \VerbatimInput[gobble=0,commentchar=Z,commandchars=/?_,frame=single, -% numbers=left,numbersep=3pt]{\jobname.tmp} -% \catcode`\%=14\relax -% \catcode`\Z=9\relax -% ^^A We suppress the effect of the highlighting macros -% \catcode`/=0\relax -% \catcode`?=1\relax -% \catcode`_=2\relax -% \def\HLEmphasize##1{##1}% -% \def\HLMacro##1{##1}% -% \def\HLReverse##1{##1}% -% #1 -% \par} -% -% \def\SideBySide@Example#1{% -% \vskip 1mm -% \@tempdimb=\FV@XRightMargin -% \advance\@tempdimb -5mm -% \begin{minipage}[c]{\@tempdimb} -% \fvset{xrightmargin=0pt} -% \catcode`\%=14\relax -% \catcode`\Z=9\relax -% ^^A We suppress the effect of the highlighting macros -% \catcode`/=0\relax -% \catcode`?=1\relax -% \catcode`_=2\relax -% \def\HLEmphasize##1{##1}% -% \def\HLMacro##1{##1}% -% \def\HLReverse##1{##1}% -% #1 -% \end{minipage}% -% \@tempdimb=\textwidth -% \advance\@tempdimb -\FV@XRightMargin -% \advance\@tempdimb 5mm -% \begin{minipage}[c]{\@tempdimb} -% \VerbatimInput[gobble=0,commentchar=Z,commandchars=/?_, -% frame=single,numbers=left,numbersep=3pt, -% xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp} -% \end{minipage} -% \vskip 1mm} -% -% \makeatother -% -% ^^A End of example macros from `fvrb-ex' -% -% ^^A Define CTAN addresses using the commands of the |ctandir| package -% \CTANdirectory{pstricks}{graphics/pstricks} -% \CTANdirectory{xypic}{macros/generic/diagrams/xypic} -% -% ^^A For the possible index and changes log -% \setlength{\columnseprule}{0.6pt} -% -% ^^A Beginning of the documentation itself -% -% \title{The \PstPolygonPackage{} package\\A PSTricks package for polygons} -% \author{Denis \textsc{Girou}\thanks{CNRS/IDRIS --- -% Centre National de la Recherche Scientifique / -% Institut du D\'eveloppement et des Ressources en Informatique -% Scientifique --- Orsay --- France --- -% \mbox{\texttt{}}.}} -% \date{\today\\ -% {\small Documentation revised November 20, 2004\\ -% by Herbert Voss}} -% -% \maketitle -% -% \begin{abstract} -% This package allow to draw easily various kinds of regular or non -% regular polygons, using the unique macro \PstPolygonMacro, with various -% customization parameters. -% -% It is also a good example of the great power and flexibility of -% PSTricks, as in fact it is a very short program (it body is only 100~lines -% long) but nevertheless really powerful. -% -% And last, it is also a good pedagogical example of how to design and -% program \emph{high level graphic objects} above PSTricks own ones. -% \end{abstract} -% -% \tableofcontents -% -% \section{Introduction} -% -% \PstPolygonPackage{} offer a unique macro (plus some aliases to define -% some often used polygons) with few parameters to interact on it. But we can -% also use all the relevant PSTricks parameters to change the size, the -% characteristics of lines, to add filling, etc. -% -% The polygons are always drawn counter clockwise. -% -% \vspace{1mm} -% The syntax is simply: -% \fbox{\PstPolygonMacro\texttt{*[optional\_parameters]}} -% -% \vspace{1mm} -% As for PSTricks closed objects, the \texttt{*} version use a solid style -% to fill the polygon, use the line color for fill color and set the linewidth -% to 0. -% -% A preliminary version, limited to \emph{regular} polygons, was shown at -% TUG'95 conference, St Petersburg, Florida, as part of my talk -% \emph{Building high level objects in PSTricks} \cite{Girou95}. -% -% \emph{Note}: You can take advantage to look also at the polygon feature of -% the \XYpic{} package \cite{XYpic}, \cite{LGC97}. -% -% \section{Usage} -% -% \subsection{Parameters} -% -% There are \textbf{eight} specific parameters defined to change the way the -% polygons are defined: -% -% \begin{optlist} -% \item [PstPicture (boolean)]: to define or not a \texttt{pspicture} -% environment for the polygon. We have to define this parameter to -% \emph{false} if we want to mix the polygon with other PSTricks objects -% --- see examples later -% (\emph{Default:~true} --- which is not the case for basic PSTricks -% objects). -% \end{optlist} -% -% \begin{optlist} -% \item [PolyRotation (real)]: rotation angle applied to the polygon -% (\emph{Default:~0} --- no rotation). -% \end{optlist} -% -% \begin{CenterExample} -% \PstPolygon\hfill -% \PstPolygon[/HLEmphasize?PolyRotation_=/HLReverse?18_]\hfill -% \PstPolygon[/HLEmphasize?PolyRotation_=/HLReverse?36_]\hfill -% \PstPolygon[/HLEmphasize?PolyRotation_=/HLReverse?45_] -% \end{CenterExample} -% -% \begin{optlist} -% \item [PolyNbSides (integer)]: number of sides of the polygon -% (\emph{Default:~5}). -% \end{optlist} -% -% \begin{CenterExample} -% \PstPolygon -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?3_] -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?4_] -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?5_] -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?8_] -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?50_] -% \end{CenterExample} -% -% \begin{optlist} -% \item [PolyOffset (integer)]: number of nodes to bypass to obtain each -% time the next one -% (\emph{Default:~1} --- no node bypassed). -% \end{optlist} -% -% \begin{CenterExample} -% \PstPolygon -% \PstPolygon[/HLEmphasize?PolyOffset_=/HLReverse?2_] -% \PstPolygon[/HLEmphasize?PolyOffset_=/HLReverse?3_] -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?7_,/HLEmphasize?PolyOffset_=/HLReverse?2_] -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?9_,/HLEmphasize?PolyOffset_=/HLReverse?4_] -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?17_,/HLEmphasize?PolyOffset_=/HLReverse?6_] -% \end{CenterExample} -% -% \begin{optlist} -% \item [PolyIntermediatePoint (real)]: position of the intermediate point -% used to join each time the next node -% (\emph{Default:~empty} --- not used). -% \end{optlist} -% -% \begin{CenterExample} -% \PstPolygon -% \PstPolygon[/HLEmphasize?PolyIntermediatePoint_=/HLReverse?0.38_] -% \PstPolygon[/HLEmphasize?PolyIntermediatePoint_=/HLReverse?0.2_] -% \PstPolygon[/HLEmphasize?PolyIntermediatePoint_=/HLReverse?1.2_] -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?7_,/HLEmphasize?PolyOffset_=/HLReverse?2_, -% /HLEmphasize?PolyIntermediatePoint_=/HLReverse?0.38_] -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?21_,/HLEmphasize?PolyOffset_=/HLReverse?2_, -% /HLEmphasize?PolyIntermediatePoint_=/HLReverse?-1.25_] -% \end{CenterExample} -% -% \begin{optlist} -% \item [PolyCurves (boolean)]: boolean value to choose between straight -% line and curve to join each time the next node -% (\emph{Default:~false} --- straight lines). -% \end{optlist} -% -% \begin{CenterExample} -% \psset{/HLEmphasize?PolyCurves_=/HLReverse?true_} -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?7_,/HLEmphasize?PolyIntermediatePoint_=/HLReverse?0.38_]\hfill -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?11_,/HLEmphasize?PolyIntermediatePoint_=/HLReverse?0.6_]\hfill -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?7_,/HLEmphasize?PolyIntermediatePoint_=/HLReverse?0.2_, -% /HLEmphasize?PolyOffset_=/HLReverse?2_]\hfill -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?9_,/HLEmphasize?PolyIntermediatePoint_=/HLReverse?0.1_]\hfill -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?15_,/HLEmphasize?PolyIntermediatePoint_=/HLReverse?1.2_] -% \end{CenterExample} -% -% \begin{optlist} -% \item [PolyEpicycloid (boolean)]: boolean value to choose between -% polygon and epicycloid -% (\emph{Default:~false} --- polygon). -% \end{optlist} -% -% \begin{CenterExample} -% \psset{linewidth=0.001,/HLEmphasize?PolyNbSides_=/HLReverse?72_,/HLEmphasize?PolyEpicycloid_=/HLReverse?true_} -% % /HLEmphasize?Epicycloid of factor 1 is cardioid and of factor 2 nephroid_ -% \multido{\i=2+1}{4}{\PstPolygon[/HLEmphasize?PolyOffset_=/HLReverse?\i_]\hfill} -% \PstPolygon[/HLEmphasize?PolyOffset_=/HLReverse?72_]\hfill % /HLEmphasize?Epicycloid of factor 71_ -% \PstPolygon[/HLEmphasize?PolyOffset_=/HLReverse?73_] % /HLEmphasize?Epicycloid of factor 72_ -% \end{CenterExample} -% -% \begin{optlist} -% \item [PolyName (string)]: name of the polygon, useful to have different -% names for the nodes of different polygons -% (\emph{Default:~empty} --- no name). -% \end{optlist} -% -% The center of the polygon has name \texttt{PolyName0} and the nodes -% (vertices) have names \texttt{PolyName1} to \texttt{PolyNameN}. -% -% With this parameter, we can connect as we want nodes of different polygons: -% -% \begin{SideBySideExample}[xrightmargin=3cm] -% \psset{PstPicture=false} -% \begin{pspicture}(-1,-1)(1,1) -% \PstPolygon[unit=0.8,/HLEmphasize?PolyName_=/HLReverse?A_,/HLEmphasize?PolyNbSides_=/HLReverse?6_] -% \PstPolygon[unit=1.2,/HLEmphasize?PolyName_=/HLReverse?B_,/HLEmphasize?PolyNbSides_=/HLReverse?12_] -% \end{pspicture} -% \multido{\i=1+2}{6}{% -% \ncline{A\the\multidocount}{B\i}} -% \end{SideBySideExample} -% -% It is also a way (limited in fact...) to define three dimensional objects -% in perspective (this was used first in \cite{XYpic}): -% -% \begin{SideBySideExample}[xrightmargin=3cm] -% \psset{unit=0.8} -% \begin{pspicture}(3,2.5) -% % /HLEmphasize?\PstSquare is described later_ -% \rput[lb](0,0){\PstSquare[/HLEmphasize?PolyName_=/HLReverse?A_]} -% \rput[lb](2.5,2){\PstSquare[unit=0.5, -% /HLEmphasize?PolyName_=/HLReverse?B_]} -% \multido{\i=1+1}{4}{\ncline{A\i}{B\i}} -% \end{pspicture} -% \end{SideBySideExample} -% -% Of course, we can mix specific \PstPolygonPackage{} parameters with -% relevant PSTricks ones and combine it with other generic macros -% (for repetitions, projection in the 3d space, etc.) -% -% \begin{CenterExample} -% \PstPolygon[unit=/HLReverse?1.5_,linestyle=/HLReverse?dashed_] -% \PstPolygon[linewidth=/HLReverse?1mm_] -% \PstPolygon[fillstyle=/HLReverse?crosshatch_,/HLEmphasize?PolyNbSides_=/HLReverse?6_] -% \PstPolygon[linecolor=/HLReverse?red_,fillstyle=/HLReverse?solid_,fillcolor=/HLReverse?yellow_, -% /HLEmphasize?PolyRotation_=/HLReverse?18_,/HLEmphasize?PolyOffset_=/HLReverse?2_] -% \PstPolygon*[linecolor=/HLReverse?cyan_,/HLEmphasize?PolyNbSides_=/HLReverse?7_,/HLEmphasize?PolyOffset_=/HLReverse?2_] -% \end{CenterExample} -% -% \begin{CenterExample} -% \multido{\i=5+2}{6}{% -% \PstPolygon[/HLEmphasize?PolyNbSides_=/HLReverse?\i_,/HLEmphasize?PolyCurves_=/HLReverse?true_, -% /HLEmphasize?PolyIntermediatePoint_=/HLReverse?0.1_,/HLEmphasize?PolyOffset_=/HLReverse?3_]} -% \end{CenterExample} -% -% \subsection{Pre-defined polygons} -% -% Some often used polygons and other related geometric objects are -% pre-defined, for immediate usage : -% -% \begin{CenterExample} -% \PstTriangle -% \PstSquare -% \PstPentagon[unit=0.5,linestyle=dotted] -% \PstHexagon[fillstyle=hlines,hatchangle=90] -% \PstHeptagon[fillstyle=vlines] -% \PstOctogon*[unit=0.8,linecolor=red] -% \PstNonagon[unit=0.5] -% \PstDecagon -% \PstDodecagon[linecolor=green] -% \PstStarFiveLines -% \PstStarFive -% \end{CenterExample} -% -% \subsection{Non regular polygons} -% -% Until now, we have described only the so-called \emph{regular} polygons, -% which are from far the most useful ones (all of them have equal edges and -% angles). Nevertheless, it is not so difficult to extend these polygon to -% \emph{non regular} ones, using a different value for horizontal and vertical -% units (nevertheless, the code is more tricky, as we must do all the -% trigonometry explicitely...) -% -% \begin{CenterExample} -% \PstPentagon[xunit=/HLReverse?0.5_]\hfill -% \PstHexagon[yunit=/HLReverse?0.5_]\hfill -% \PstStarFive[xunit=/HLReverse?0.5_,yunit=/HLReverse?1.5_]\hfill -% \PstPolygon[xunit=/HLReverse?0.8_,yunit=/HLReverse?1.5_,/HLEmphasize?PolyNbSides_=/HLReverse?9_,/HLEmphasize?PolyOffset_=/HLReverse?2_, -% /HLEmphasize?PolyIntermediatePoint_=/HLReverse?0.1_,/HLEmphasize?PolyCurves_=/HLReverse?true_] -% \end{CenterExample} -% -% \subsection{Nodes (vertices)} -% -% And another powerful possibility is to define a command -% \PstPolygonNodeMacro{} which will be excuted at each node -% (\emph{Default:~empty} --- nothing executed). The counter name for nodes is -% \cs{INode}, starting from 0. The \cs{multidocount} counter, from the -% \cs{multido} command, start itself from 1. -% -% \begin{SideBySideExample}[xrightmargin=3cm] -% \providecommand{\PstPolygonNode}{% -% /HLReverse?\psdots[dotsize=0.2,linecolor=cyan](1;\INode)_} -% \PstPentagon -% \end{SideBySideExample} -% -% \begin{SideBySideExample}[xrightmargin=3cm] -% \newcounter{Letter} -% \providecommand{\PstPolygonNode}{% -% /HLReverse?\setcounter{Letter}{\the\multidocount}_% -% /HLReverse?\rput*{*0}(1;\INode){\small\Alph{Letter}}_} -% \PstHeptagon[PolyOffset=3] -% \end{SideBySideExample} -% -% \begin{SideBySideExample}[xrightmargin=3cm] -% \providecommand{\PstPolygonNode}{% -% /HLReverse?\psdots[dotstyle=o,dotsize=0.2](1;\INode)_ -% /HLReverse?\psline[linecolor=red]{->}(0.9;\INode)_} -% \PstPolygon[PolyNbSides=8] -% \end{SideBySideExample} -% -% \vspace{3mm} -% It is also a way to nest polygons: -% \vspace{3mm} -% -% \begin{SideBySideExample}[xrightmargin=3cm] -% \newbox{\Star} -% \savebox{\Star}{% -% \PstStarFive*[unit=0.15,linecolor=red]} -% \providecommand{\PstPolygonNode}{% -% /HLReverse?\rput{*0}(1;\INode){\usebox{\Star}}_} -% \shortstack{\PstNonagon\\[5mm] -% \PstDodecagon[linestyle=none]} -% \end{SideBySideExample} -% -% \vspace{3mm} -% Here we redraw one of the polygon examples built with the \XYpic{} package -% in \cite[example 5-5-34, page 203]{LGC97}: -% -% \begin{CenterExample} -% \psset{unit=2,PstPicture=false} -% \begin{pspicture}(-1.6,-1.6)(1.6,1.6) -% % /HLEmphasize?Just to name the nodes, to be able to join some of them._ -% % /HLEmphasize?by solid curves. We can't draw the polygons now,_ -% % /HLEmphasize?as the node numbers must erase the solid curves..._ -% \PstHexagon[unit=0.8,linestyle=none,PolyName=H] -% \PstDodecagon[unit=1.2,linestyle=none,PolyName=D] -% {\SpecialCoor -% \psset{linewidth=0.4pt,border=2pt,nodesep=0.45} -% \psccurve(H1)(H4)(D8)([angle=-30]D9)(D11) -% \psccurve(D3)(H3)(H6)(D12)([angle=90]D1) -% \psccurve(D4)(H2)(H5)(D7)([angle=90]D6)} -% \psset{linestyle=dotted,framesep=1pt} -% \PstTriangle[unit=0.23] -% \providecommand{\PstPolygonNode}{% -% \rput*{*0}(1;\INode){\small\the\multidocount}} -% \PstHexagon[unit=0.8] -% \PstDodecagon[unit=1.2] -% \PstDodecagon[unit=1.6] -% \end{pspicture} -% \end{CenterExample} -% -% \section[Polygonbox]{Polygonbox\protect\footnote{written by Herbert Vo\ss.}} -% The valid options with the predefined values are -% \begin{verbatim} -% PolyNbSides =3 -% PolyRotation=0 -% \end{verbatim} -% -% \begin{itemize} -% \item There are some problems with linearcs and rounding errors, which are seen in the -% following examples for \verb+PolyNbSides=7+. -% \item To rotate the text inside the box, one can use the \verb+\rotatebox+ macro from -% the \verb+rotating+ package (see examples). -% \end{itemize} -% -% \begin{CenterExample} -% \multido{\nA=3+1}{8}{% -% \pspolygonbox[PolyNbSides=\nA,framesep=3mm]{Text}~} -% \end{CenterExample} -% -% \begin{CenterExample} -% \multido{\nA=3+1}{8}{\pspolygonbox[PolyNbSides=\nA,% -% framesep=2mm,doubleline=true]{Text}~} -% \end{CenterExample} -% -% -% \begin{CenterExample} -% \psset{PolyNbSides=4} -% \multido{\nA=0+60}{8}{\pspolygonbox[PolyRotation=\nA,% -% framesep=2mm,doubleline=true,% -% linecolor=red,doublecolor=blue]{\magenta Text}~} -% \end{CenterExample} -% -% \begin{CenterExample} -% \multido{\nA=0+60,\nB=45+60}{8}{\pspolygonbox% -% [PolyRotation=\nA,framesep=2mm,doubleline=true,% -% linecolor=red,doublecolor=blue,linearc=0.4]% -% {\rotatebox{\nB}{\blue Text}}~}\\[1cm] -% \end{CenterExample} -% -% \begin{CenterExample} -% \multido{\nA=3+1}{8}{% -% \pspolygonbox[PolyNbSides=\nA,rot=60,framesep=2pt,% -% doubleline=true,linearc=0.2]{Text}~} -% \end{CenterExample} -% -% \begin{CenterExample} -% \multido{\nA=3+1}{8}{% -% \pspolygonbox[PolyNbSides=\nA,framesep=10pt,% -% fillstyle=solid,fillcolor=cyan,linearc=0.2]{Text}~} -% \end{CenterExample} -% -% \begin{CenterExample} -% \multido{\nA=-5+5}{8}{\pspolygonbox[framesep=\nA pt,% -% PolyRotation=90]{\Huge\red T}~} -% \end{CenterExample} -% -% -% \begin{CenterExample} -% \multido{\nA=-5+5}{8}{\pspolygonbox[framesep=\nA pt,% -% PolyRotation=90,boxsep=false]{\Huge\red T}~} -% \end{CenterExample} -% -% -% ^^A Bibliography -% \begin{thebibliography}{9} -% \bibitem{Girou94} Denis Girou, Pr\'esentation de PSTricks, -% \emph{Cahiers GUTenberg}, Number~16, pages 21--70, -% February~1994 (in french). -% -% \bibitem{Girou95} Denis Girou, Building high level objects in PSTricks, -% TUG'95, St Petersburg, Florida, 1995. Available at -% {\url{http://www.tug.org/applications/PSTricks/TUG95-PSTricks_4.ps.gz}} -% -% \bibitem{LGC97} Michel Goossens, Sebastian Rahtz and Frank Mittelbach, -% \emph{The \LaTeX{} Graphics Companion}, Addison-Wesley, 1997. -% -% \bibitem{Hoenig98} Alan Hoenig, \emph{\TeX{} Unbound: \LaTeX{} \& \TeX{} -% Strategies, Fonts, Graphics, and More}, -% Oxford University Press, 1998. -% -% \bibitem{voss04} Herbert Vo\ss, PSTricks -- Grafik mit {P}ost{S}cript f\"ur \TeX{} -% und \LaTeX{}, Lehmanns, July 2004 (in german). -% -% \bibitem{XYpic} Kristoffer~H. Rose and Ross Moore, \XYpic. Polygon feature, -% available from \CTAN, 1991-1998, \CTANref{xypic}. -% -% \bibitem{vanZandt93} Timothy van Zandt, PSTricks. PostScript macros for -% Generic \TeX, available from \CTAN, 1993, -% \CTANref{pstricks}. -% -% \bibitem{vanZandtGirou94} Timothy van Zandt and Denis Girou, Inside PSTricks, -% \emph{\TUB}, Volume~15, Number~3, pages 239--246, -% September 1994. -% \end{thebibliography} -% -% -% \StopEventually{} -% -% ^^A .................... End of the documentation part .................... -% -% \section{Driver file} -% -% The next bit of code contains the documentation driver file for \TeX{}, -% i.e., the file that will produce the documentation you are currently -% reading. It will be extracted from this file by the \texttt{docstrip} -% program. -% -% \begin{macrocode} -%<*driver> -\documentclass{ltxdoc} -\GetFileInfo{pst-poly.dtx} -\usepackage{fancyvrb} -\usepackage{pstricks} -\usepackage{pst-poly} -\usepackage{rotating} -\usepackage{url} -\EnableCrossrefs -\CodelineIndex -\RecordChanges -\OnlyDescription % Comment it for implementation details -\hbadness=7000 % Over and under full box warnings -\hfuzz=3pt -\begin{document} - \DocInput{pst-poly.dtx} -\end{document} -% -% \end{macrocode} -% -% \section{\PstPolygonPackage{} \LaTeX{} wrapper} -% -% \begin{macrocode} -%<*latex-wrapper> -\RequirePackage{pstricks} -\ProvidesPackage{pst-poly}[2004/11/20 package wrapper for - pst-poly.tex (hv)] -\input{pst-poly.tex} -\ProvidesFile{pst-poly.tex} - [\filedate\space v\fileversion\space `PST-poly' (DG)] -% -% \end{macrocode} -% -% \section{\PstPolygonPackage{} code} -% -% As it is a general and very powerful way to build \emph{high level graphic -% objects} above PSTricks own ones, we will comment precisely the code, -% focusing these comments on the case of \emph{regular} polygons, which is -% enough to show all useful major technics. In fact, all real difficulties -% in the code of \PstPolygonPackage{} are for the \emph{non regular} case, -% which involve some trigonometry. -% -% \begin{macrocode} -%<*pst-poly> -% \end{macrocode} -% -% \subsection{Preambule} -% -% Who we are. -% -% \begin{macrocode} -% -\def\fileversion{1.60} -\def\filedate{2004/11/20} -\message{`PST-Polygon' v\fileversion, \filedate\space (DG/hv)} -\csname PSTPolygonLoaded\endcsname -\let\PSTPolygonLoaded\endinput -% -% \end{macrocode} -% -% Require the PSTricks, `\textsf{pst-node}' and `\textsf{multido}' packages. -% -% \begin{macrocode} -% -\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi -\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi -\ifx\MultidoLoaded\endinput\else\input multido.tex\fi -% -% \end{macrocode} -% -% \begin{macrocode} -\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi -% \end{macrocode} -% -% Catcodes changes. -% -% \begin{macrocode} -% -\edef\PstAtCode{\the\catcode`\@} -\catcode`\@=11\relax -\pst@addfams{pst-poly} -% -% \end{macrocode} -% -% \subsection{Definition of the parameters} -% -% \texttt{PstPicture} will define if the polygon must be set inside a -% \texttt{pspicture} environment or not. It is a \emph{boolean} value, so we -% define a new \cs{if} \TeX{} variable. The \texttt{true} value specified -% will give the default to used when no value is affected to this parameter -% (so \texttt{PstPicture} will be equivalent to \texttt{PstPicture=true}). -% Take care that it is not the default value for the parameter itself (we -% will see later that here we choose \texttt{false} as default value...). -% We don't prefix this parameter name by \texttt{Poly} because it is not -% specific to polygons. Note also that \texttt{psset} is for the -% \KeyValPackage{} package the generic name for all PSTricks parameters. -% -% \begin{macrocode} -\newif\ifPst@PstPicture -\define@key[psset]{pst-poly}{PstPicture}[true]{\@nameuse{Pst@PstPicture#1}} -% \end{macrocode} -% -% \texttt{PolyRotation} will be the rotation angle to apply to the -% polygon. It is a \emph{real} value used as an \emph{angle}. -% -% \begin{macrocode} -\define@key[psset]{pst-poly}{PolyRotation}{\edef\PstPoly@Rotation{#1}} -% \end{macrocode} -% -% \texttt{PolyNbSides} will be the number of sides (edges) of the polygon. -% It is an \emph{integer} value and we store it into a \TeX{} macro (in this -% way, we can define a lot of integer parameters without having the risk to -% exhaust \TeX{} limitations of numbers of counters). -% -% \begin{macrocode} -\define@key[psset]{pst-poly}{PolyNbSides}{\pst@getint{#1}{\PstPoly@NbSides}} -% \end{macrocode} -% -% \texttt{PolyOffset} will be the offset to obtain the next vertice to -% connect, for each one of the polygon. It is an \emph{integer} value. -% -% \begin{macrocode} -\define@key[psset]{pst-poly}{PolyOffset}{\pst@getint{#1}{\PstPoly@Offset}} -% \end{macrocode} -% -% \texttt{PolyIntermediatePoint} will be the position of an intermediate -% point to used between the current vertice and the next one, for each edge. -% It will defined a \emph{relative} position, which will be the same for -% each edge. As it is a \emph{real} value on which we will have to make some -% computations, we use here a dimension register. -% -% \begin{macrocode} -\newdimen\PstPoly@IntermediatePointDim -\define@key[psset]{pst-poly}{PolyIntermediatePoint}{\edef\PstPoly@IntermediatePoint{#1}} -% \end{macrocode} -% -% \texttt{PolyName} will be the name assigned to the polygon, which will be -% useful if we would like to connect edges of different polygons. It is a -% \texttt{string} that we store in a macro. -% -% \begin{macrocode} -\define@key[psset]{pst-poly}{PolyName}{\edef\PstPoly@Name{#1}} -% \end{macrocode} -% -% \texttt{PolyCurves} will define if the edges are lines or curves. It is a -% \emph{boolean value}. And logically, there will be no effect of it if there -% is no intermediate point defined. -% -% \begin{macrocode} -\newif\ifPstPoly@Curves -\define@key[psset]{pst-poly}{PolyCurves}[true]{\@nameuse{PstPoly@Curves#1}} -% \end{macrocode} -% -% \texttt{PolyEpicycloid} will define if we will draw a polygon or an -% epicycloid (which is of course not a polygon, but this was a functionality -% very easy to add to this package!) It is a \emph{boolean} value. -% -% \begin{macrocode} -\newif\ifPstPoly@Epicycloid -\define@key[psset]{pst-poly}{PolyEpicycloid}[true]{\@nameuse{PstPoly@Epicycloid#1}} -% \end{macrocode} -% -% Next, we set the default values for all these new parameters. -% We choose to have no rotation, five sides, no offset (so a value of 1), -% no intermediate point, no name, connections by lines (so no curved ones) -% and polygons (so no epicycloids). -% -% \begin{macrocode} -\psset{% - PstPicture=true,PolyRotation=0,PolyNbSides=5,PolyOffset=1, - PolyIntermediatePoint=,PolyName=,PolyCurves=false,PolyEpicycloid=false} -% -% \end{macrocode} -% -% \subsection{Main macro} -% -% The general \cs{PstPolygon} macro to draw polygons. -% -% First we look if the \texttt{*} convention is used, as for many PSTricks -% macros, to fill the graphic object using the current color of the line. -% -% \begin{macro}{\PstPolygon} -% \begin{macrocode} -% -\def\PstPolygon{\pst@ifstar{\@ifnextchar[{\PstPolygon@i}{\PstPolygon@i[]}}} -% \end{macrocode} -% \end{macro} -% -% Then we define the auxiliary macro which will handle the parameters if -% some are used. Note also the usage of the double \verb+{{+ to have only -% changes of parameter values for this specific object, as redefinitions -% of them must be local. -% -% \begin{macro}{\PstPolygon@i} -% \begin{macrocode} -\def\PstPolygon@i[#1]{{% -% \end{macrocode} -% -% After that, we can set the values of local parameters if defined and -% take account of the \texttt{*} convention if used. -% -% \begin{macrocode} -\psset{#1}% -\if@star\solid@star\fi -% \end{macrocode} -% -% For security, we make some checks on the validity of the parameters. -% -% \begin{macrocode} -\ifnum\PstPoly@NbSides<3 - \@pstrickserr{PolyNbSides must be greater than 2 - (and not `\PstPoly@NbSides')}{\@eha}% -\fi -\ifnum\PstPoly@NbSides>200 - \@pstrickserr{PolyNbSides must be less than 201 - (and not `\PstPoly@NbSides')}{\@eha}% -\fi -\ifnum\PstPoly@Offset<1 - \@pstrickserr{PolyOffset must be greater than 0 - (and not `\PstPoly@Offset')}{\@eha}% -\fi -% \end{macrocode} -% -% And now, we can start the \emph{real} code. First we affect a special -% value for the case where an offset will be used. There are only two cases, -% as the offset can be \emph{odd} or \emph{even}. -% -% \begin{macrocode} -\ifodd\PstPoly@Offset - \def\PstPoly@Decimal{.5}% -\else - \def\PstPoly@Decimal{}% -\fi -% \end{macrocode} -% -% We must say to use non cartesian coordinates (we will used polar ones -% --- and special ones computed by trigonometry and defined in PostScript -% for \emph{non} regular polygons). -% -% \begin{macrocode} -% -\SpecialCoor -% \end{macrocode} -% -% We look at the definition of a ``\texttt{pspicture}'' environment or not. -% -% \begin{macrocode} -\ifPst@PstPicture\pspicture(-1,-1)(1,1)\fi -% \end{macrocode} -% -% We rotate the polygon if necessary (if not, we will use a rotation of -% angle 0, which will have of course no effect). -% -% \begin{macrocode} -\rput{\PstPoly@Rotation}(0,0){% -% \end{macrocode} -% -% We will used polar coordinates, with a unit given by the number of sides -% of the polygon. -% -% \begin{macrocode} - \degrees[\PstPoly@NbSides] -% \end{macrocode} -% -% We must recompute it here if the unit has changed after assignation -% (for instance \verb+\psset{PolyIntermediatePoint=0.38}\PstPolygon[unit=2]+) -% -% \begin{macrocode} - \pssetlength{\PstPoly@IntermediatePointDim}{\PstPoly@IntermediatePoint} -% \end{macrocode} -% -% If there is a name for this polygon, we assign this name followed by 0 -% to the center of it, and different names to all vertices, indexed by the -% number of the vertice. -% -% \begin{macrocode} - \ifx\PstPoly@Name\@empty - \else - \pnode(0,0){\PstPoly@Name 0} - \ifnum\psxunit=\psyunit - \def\PstPoly@Node{\pnode(1;\i)}% - \else - \def\PstPoly@Node{% - \pnode(! \i\space 360 \PstPoly@NbSides\space div mul cos - \i\space 360 \PstPoly@NbSides\space div mul sin)}% - \fi - \multido{\i=0+1}{\PstPoly@NbSides}{% - \PstPoly@Node{\PstPoly@Name\the\multidocount}} - \fi -% \end{macrocode} -% -% Now we are ready to draw the polygon. We use a \cs{pscustom} environment. -% -% \begin{macrocode} - \pscustom{% -% \end{macrocode} -% -% First, the case of epicycloids. We must only join each vertice to the -% opposite one, using the defined offset as gap. -% -% \begin{macrocode} - \ifPstPoly@Epicycloid - \pst@cnta=\PstPoly@NbSides - \divide\pst@cnta\tw@ - \multido{\i=0+1}{\PstPoly@NbSides}{% - \moveto(1;\i) - \lineto(1;\the\pst@cnta) - \advance\pst@cnta\PstPoly@Offset} -% \end{macrocode} -% -% Now, we can see the case of polygons. First, we move to the starting point. -% -% \begin{macrocode} - \else - \ifnum\psxunit=\psyunit - \moveto(1,0) - \else - \moveto(! 1 0) - \fi -% \end{macrocode} -% -% If there is no intermediate point, we must only have a loop to join all -% vertices, according to the number of edges. And we use each time the -% defined value of the offset to obtain the next vertice. -% -% \begin{macrocode} - \ifx\PstPoly@IntermediatePoint\@empty - \ifnum\psxunit=\psyunit - \def\PstPoly@Junction{\lineto(1;\i)}% - \else - \def\PstPoly@Junction{\lineto% - (! \i\space 360 \PstPoly@NbSides\space div mul cos - \i\space 360 \PstPoly@NbSides\space div mul sin)}% - \fi - \multido{\i=\PstPoly@Offset+\PstPoly@Offset}{\PstPoly@NbSides}{% - \PstPoly@Junction} -% \end{macrocode} -% -% If there is an intermediate point, first we see if vertices will be joined -% by lines or curves. -% -% \begin{macrocode} - \else - \ifPstPoly@Curves - \let\PstPoly@JunctionType\pscurve - \else - \let\PstPoly@JunctionType\psline - \fi - \ifnum\psxunit=\psyunit - \def\PstPoly@Junction{\PstPoly@JunctionType% - (\PstPoly@IntermediatePointDim;\the\pst@cnta\PstPoly@Decimal) - (1;\i)}% - \else - \def\PstPoly@Junction{\PstPoly@JunctionType% - (! \PstPoly@IntermediatePoint\space - \the\pst@cnta\PstPoly@Decimal\space 360 - \PstPoly@NbSides\space div mul cos mul - \PstPoly@IntermediatePoint\space - \the\pst@cnta\PstPoly@Decimal\space 360 - \PstPoly@NbSides\space div mul sin mul) - (! \i\space 360 \PstPoly@NbSides\space div mul cos - \i\space 360 \PstPoly@NbSides\space div mul sin)}% - \fi -% \end{macrocode} -% -% We compute half of the value of the offset. We use a counter for that, -% which is an integer, so we will add the value of the \cs{PstPoly@Decimal} -% macro defined above, which has value 0.5 if the offset is an odd number. -% -% \begin{macrocode} - \pst@cnta=\PstPoly@Offset - \divide\pst@cnta\tw@ -% \end{macrocode} -% -% Now, we can execute the main loop: for each vertice we join the current -% one to the next, using each time the intermediate point defined. -% -% \begin{macrocode} - \multido{\i=\PstPoly@Offset+\PstPoly@Offset}{\PstPoly@NbSides}{% - \PstPoly@Junction - \advance\pst@cnta\PstPoly@Offset} -% \end{macrocode} -% -% Now, we can close the opened \emph{if} structures and the -% \texttt{pscustom} environment. -% -% \begin{macrocode} - \fi - \fi} -% \end{macrocode} -% -% In the case where there is a special macro of name \cs{PstPolygonNode} -% defined, we execute it at each node, and we close the rotation command. -% The counter used is \cs{INode}. -% -% \begin{macrocode} - \ifx\PstPolygonNode\@undefined - \else - \multido{\INode=\z@+\PstPoly@Offset}{\PstPoly@NbSides}{% - \PstPolygonNode} - \fi} -% \end{macrocode} -% -% Then we close the ``\texttt{pspicture}'' environment, if defined, -% and the \cs{PstPolygon@i} macro. -% -% \begin{macrocode} -\ifPst@PstPicture - \endpspicture -\fi}} -% \end{macrocode} -% \end{macro} -% -% \subsection{Pre-defined polygons} -% -% Triangle (three sides). -% -% \begin{macro}{\PstTriangle} -% \begin{macrocode} -\def\PstTriangle{% -\pst@ifstar{\@ifnextchar[{\PstTriangle@i}{\PstTriangle@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstTriangle@i} -% \begin{macrocode} -\def\PstTriangle@i[#1]{{% -\psset{PolyNbSides=3,PolyRotation=90}% For triangle (360/3*(3/4)) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% Square (four sides). -% -% \begin{macro}{\PstSquare} -% \begin{macrocode} -\def\PstSquare{% -\pst@ifstar{\@ifnextchar[{\PstSquare@i}{\PstSquare@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstSquare@i} -% \begin{macrocode} -\def\PstSquare@i[#1]{{% -\psset{PolyNbSides=4,PolyRotation=45}% For square (360/4/2) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% Pentagon (five sides). -% -% \begin{macro}{\PstPentagon} -% \begin{macrocode} -\def\PstPentagon{% -\pst@ifstar{\@ifnextchar[{\PstPentagon@i}{\PstPentagon@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstPentagon@i} -% \begin{macrocode} -\def\PstPentagon@i[#1]{{% -\psset{PolyNbSides=5,PolyRotation=18}% For pentagon (360/5/4) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% Hexagon (six sides). -% -% \begin{macro}{\PstHexagon} -% \begin{macrocode} -\def\PstHexagon{% -\pst@ifstar{\@ifnextchar[{\PstHexagon@i}{\PstHexagon@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstHexagon@i} -% \begin{macrocode} -\def\PstHexagon@i[#1]{{% -\psset{PolyNbSides=6}% -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% Heptagon (seven sides). -% -% \begin{macro}{\PstHeptagon} -% \begin{macrocode} -\def\PstHeptagon{% -\pst@ifstar{\@ifnextchar[{\PstHeptagon@i}{\PstHeptagon@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstHeptagon@i} -% \begin{macrocode} -\def\PstHeptagon@i[#1]{{% -\psset{PolyNbSides=7,PolyRotation=38.57}% For heptagon (360/7*(3/4)) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% Octogon (height sides). -% -% \begin{macro}{\PstOctogon} -% \begin{macrocode} -\def\PstOctogon{% -\pst@ifstar{\@ifnextchar[{\PstOctogon@i}{\PstOctogon@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstOctogon@i} -% \begin{macrocode} -\def\PstOctogon@i[#1]{{% -\psset{PolyNbSides=8,PolyRotation=22.5}% For octogon (360/8/2) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% Nonagon (nine sides). -% -% \begin{macro}{\PstNonagon} -% \begin{macrocode} -\def\PstNonagon{% -\pst@ifstar{\@ifnextchar[{\PstNonagon@i}{\PstNonagon@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstNonagon@i} -% \begin{macrocode} -\def\PstNonagon@i[#1]{{% -\psset{PolyNbSides=9,PolyRotation=10}% For nonagon (360/9/4) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% Decagon (ten sides). -% -% \begin{macro}{\PstDecagon} -% \begin{macrocode} -\def\PstDecagon{% -\pst@ifstar{\@ifnextchar[{\PstDecagon@i}{\PstDecagon@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstDecagon@i} -% \begin{macrocode} -\def\PstDecagon@i[#1]{{% -\psset{PolyNbSides=10}% -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% Dodecagon (twelve sides). -% -% \begin{macro}{\PstDodecagon} -% \begin{macrocode} -\def\PstDodecagon{% -\pst@ifstar{\@ifnextchar[{\PstDodecagon@i}{\PstDodecagon@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstDodecagon@i} -% \begin{macrocode} -\def\PstDodecagon@i[#1]{{% -\psset{PolyNbSides=12,PolyRotation=15}% For dodecagon (360/12/2) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% Star with five leaves, with internal lines. -% -% \begin{macro}{\PstStarFiveLines} -% \begin{macrocode} -\def\PstStarFiveLines{% -\pst@ifstar{\@ifnextchar[{\PstStarFiveLines@i}{\PstStarFiveLines@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstStarFiveLines@i} -% \begin{macrocode} -\def\PstStarFiveLines@i[#1]{{% -\psset{PolyOffset=2,PolyRotation=18}% -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% Star with five leaves. -% -% \begin{macro}{\PstStarFive} -% \begin{macrocode} -\def\PstStarFive{% -\pst@ifstar{\@ifnextchar[{\PstStarFive@i}{\PstStarFive@i[]}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PstStarFive@i} -% \begin{macrocode} -\def\PstStarFive@i[#1]{{% -\psset{PolyIntermediatePoint=0.38,PolyRotation=18}% -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\pspolygonbox} -% \begin{macrocode} -\newdimen\pst@dimm -\newdimen\pst@dimn -\newdimen\pst@dimo -\newdimen\pst@dimp -\def\pspolygonbox{\pst@object{pspolygonbox}}% voss 2004-11-20 -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\pspolygonbox@i} -% \begin{macrocode} -\def\pspolygonbox@i{\pst@makebox\pspolygonbox@ii} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\pspolygonbox@ii} -% \begin{macrocode} -% -\def\pspolygonbox@ii{{% - \begingroup% - \pst@useboxpar% - \pst@dima=\pslinewidth% - \ifpsdoubleline% - \advance\pst@dima by \psdoublesep\pslinewidth% - \advance\pst@dima by \pslinewidth% - \fi% - \advance\pst@dima by \psframesep% - \pst@dimc=\wd\pst@hbox% - \pst@dimp=\pst@dimc\advance\pst@dimp by 2\pst@dima% - \pst@dimb=\dp\pst@hbox\pst@dimo=\pst@dimb% - \pst@dimd=\ht\pst@hbox\advance\pst@dimo by \pst@dimd% totalheight - \pst@pyth\pst@dimp\pst@dimo\pst@dimm% - \divide\pst@dimm by 2% Radius - \setbox\pst@hbox=\hbox{% - \ifpsboxsep\kern\pst@dima\fi% left side - \begin@ClosedObj% - \addto@pscode{% - /framesep \pst@number\pst@dima def - /boxdepth \pst@number\pst@dimb framesep add def - /boxheight0 \pst@number\pst@dimd def - /boxheight boxheight0 framesep add def - /boxwidth \pst@number\pst@dimc def - /radius \pst@number\pst@dimm def - /order \PstPoly@NbSides\space def - /dAlpha 360 order div def - /alpha \PstPoly@Rotation\space def - \pst@cp - \tx@polygonB - \psline@iii -%% \tx@Line - \tx@Polygon - }% - \def\pst@linetype{1}% - \showpointsfalse% - \end@ClosedObj% - \box\pst@hbox% - \ifpsboxsep\kern\pst@dima\fi%% right side - }% - \ifpsboxsep% - \pst@dimn=-.5\pst@dimo\advance\pst@dimn by \pst@dimb% - \advance\pst@dimn by 0.809\pst@dimm% - \dp\pst@hbox=\pst@dimn% - \pst@dimn=\pst@dimm\advance\pst@dimn by 0.5\pst@dimo% - \advance\pst@dimn by -\pst@dimb% - \ht\pst@hbox=\pst@dimn\fi% - \leavevmode% - \box\pst@hbox% - \endgroup% -}\ignorespaces} -% -% -% \begin{macro}{polygonB} -% \begin{macrocode} -% -\pst@def{polygonB}<{% - /x1 framesep neg def - /x2 boxwidth framesep add def - /y1 boxdepth framesep add neg def - /y2 boxheight framesep add def - x2 x1 add 2 div y2 y1 add 2 div translate - [ - alpha cos radius mul - alpha sin radius mul - order { /alpha alpha dAlpha add def - radius alpha cos mul - radius alpha sin mul - } repeat -}> -% \end{macrocode} -% \end{macro} -% -% \end{macrocode} -% \end{macro} -% -% \subsection{Closing} -% -% Catcodes restoration. -% -% \begin{macrocode} -\catcode`\@=\PstAtCode\relax -% \end{macrocode} -% -% \begin{macrocode} -% -% \end{macrocode} -% -% \section{\PstPolygonPackage{} test file} -% -% \begin{macrocode} -%<*tst-poly> -%% `pst-poly' test file. -%% -\documentclass{article} - -\usepackage{fancyvrb} -\usepackage[width=18cm]{geometry} -\usepackage{pstricks} -\usepackage{pst-poly} - -% Example macros - adapted from the `fvrb-ex' package -% --------------------------------------------------- - -\makeatletter - -% Take care that we use here the four /?_Z characters as escape -% characters, so we can't use these characters in the examples! - -% To highlight some verbatim sequences (comments, macro names, etc.) -\def\HLEmphasize#1{\textit{#1}} -\newcommand{\BS}{\texttt{\symbol{`\\}}} -\def\HLMacro#1{\BS{}def\HLMacro@i#1\@nil} -\def\HLMacro@i#1def#2\@nil{\HLReverse{#2}} -\def\HLReverse#1{{\setlength{\fboxsep}{1pt}\HLReverse@i{#1}}} -\def\HLReverse@i#1{\colorbox{black}{\textcolor{white}{\textbf{#1}}}} - -\def\Example{\FV@Environment{}{Example}} -\def\endExample{% -\end{VerbatimOut} -\Below@Example{\jobname.tmp} -\endgroup} - -\def\CenterExample{\FV@Environment{}{Example}} -\def\endCenterExample{% -\end{VerbatimOut} -\begin{center} -\Below@Example{\jobname.tmp} -\end{center} -\endgroup} - -\def\SideBySideExample{\FV@Environment{}{Example}} -\def\endSideBySideExample{% -\end{VerbatimOut} -\SideBySide@Example{\jobname.tmp} -\endgroup} - -\def\FVB@Example{% -\begingroup -\FV@UseKeyValues -\parindent=0pt -\multiply\topsep by 2 -\VerbatimEnvironment -\begin{VerbatimOut}[gobble=2,codes={\catcode`\Z=12}]{\jobname.tmp}} - -\def\Below@Example#1{% -\VerbatimInput[commentchar=Z,commandchars=/?_,frame=single, - numbers=left,numbersep=3pt]{#1} -\catcode`\%=14\relax -\catcode`\Z=9\relax -% We suppress the effect of the highlighting macros -\catcode`/=0\relax -\catcode`?=1\relax -\catcode`_=2\relax -\def\HLEmphasize##1{##1}% -\def\HLMacro##1{##1}% -\def\HLReverse##1{##1}% -\input{#1}\par} - -\def\SideBySide@Example#1{% -\vskip 1mm -\@tempdimb=\FV@XRightMargin -\advance\@tempdimb -5mm -\begin{minipage}[c]{\@tempdimb} - \fvset{xrightmargin=0pt} - \catcode`\%=14\relax - \catcode`\Z=9\relax - % We suppress the effect of the highlighting macros - \catcode`/=0\relax - \catcode`?=1\relax - \catcode`_=2\relax - \def\HLEmphasize##1{##1}% - \def\HLMacro##1{##1}% - \def\HLReverse##1{##1}% - \input{#1} -\end{minipage}% -\@tempdimb=\textwidth -\advance\@tempdimb -\FV@XRightMargin -\advance\@tempdimb 5mm -\begin{minipage}[c]{\@tempdimb} - \VerbatimInput[commentchar=Z,commandchars=/?_, - frame=single,numbers=left,numbersep=3pt, - xleftmargin=5mm,xrightmargin=0pt]{#1} -\end{minipage} -\vskip 1mm} - -\makeatother - -% End of example macros from `fvrb-ex' - -\begin{document} - -% First serie - -\begin{CenterExample} - \multido{\i=3+1}{6}{% - \PstPolygon[PolyNbSides=\i]\hspace{5mm}} - \PstPolygon[PolyNbSides=30] -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=3+2}{6}{% - \PstPolygon[PolyOffset=2,PolyNbSides=\i]\hspace{5mm}} - \PstPolygon[PolyOffset=2,PolyNbSides=31] -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=3+1}{7}{% - \PstPolygon[PolyOffset=3,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=5+1}{7}{% - \PstPolygon[PolyOffset=4,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=5+2}{7}{% - \PstPolygon[PolyOffset=5,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\clearpage -\begin{CenterExample} - \multido{\i=5+2}{7}{% - \PstPolygon[PolyOffset=7,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=5+2}{7}{% - \PstPolygon[PolyOffset=8,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=1+1}{7}{% - \PstPolygon[PolyOffset=\i,PolyNbSides=5]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=1+1}{7}{% - \PstPolygon[PolyOffset=\i,PolyNbSides=7]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=5+1}{7}{% - \PstPolygon[PolyCurves,PolyIntermediatePoint=0.1,PolyNbSides=\i] - \hspace{5mm}} -\end{CenterExample} - -\clearpage -\begin{CenterExample} - \multido{\i=5+1}{7}{% - \PstPolygon[PolyCurves,PolyIntermediatePoint=0.2, - PolyOffset=2,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\i=5+2}{7}{% - \PstPolygon[PolyCurves,PolyIntermediatePoint=0.1, - PolyOffset=3,PolyNbSides=\i]\hspace{5mm}} -\end{CenterExample} - -% Second serie - -\begin{CenterExample} - \multido{\n=-1.4+0.5}{7}{% - \PstPolygon[PolyNbSides=3,PolyOffset=2,PolyIntermediatePoint=\n] - \hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\n=-1.4+0.5}{7}{% - \PstPolygon[PolyNbSides=5,PolyOffset=2,PolyIntermediatePoint=\n] - \hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\n=-1.4+0.5}{7}{% - \PstPolygon[PolyNbSides=13,PolyOffset=2,PolyIntermediatePoint=\n] - \hspace{5mm}} -\end{CenterExample} - -\begin{CenterExample} - \multido{\n=-1.4+0.5}{7}{% - \PstPolygon[PolyNbSides=21,PolyOffset=2,PolyIntermediatePoint=\n] - \hspace{5mm}} -\end{CenterExample} - -% Third serie - -\begin{CenterExample} - \psset{unit=1.4,linewidth=0.001,PolyNbSides=72,PolyEpicycloid} - \multido{\i=2+1}{4}{% - % Epicycloid of factor 1 is cardioid and of factor 2 nephroid - \PstPolygon[PolyOffset=\i]\hspace{5mm}} -\end{CenterExample} - -\begin{SideBySideExample}[xrightmargin=5cm] - % Epicycloid of factor 10 - \PstPolygon[unit=2,linewidth=0.003, - PolyEpicycloid,PolyNbSides=72,PolyOffset=11] -\end{SideBySideExample} - -\begin{SideBySideExample}[xrightmargin=5cm] - % Epicycloid of factor 22 - \PstPolygon[unit=2,linewidth=0.003, - PolyEpicycloid,PolyNbSides=72,PolyOffset=23] -\end{SideBySideExample} - -\clearpage -\begin{CenterExample} - \psset{unit=1.9,linewidth=0.001,PolyNbSides=72,PolyEpicycloid} - \multido{\i=71+1}{3}{% - \PstPolygon[PolyOffset=\i]\hspace{5mm}} -\end{CenterExample} - -\fvset{xrightmargin=5cm} % 5cm reserved for the graphic - -\begin{SideBySideExample} - % Epicycloid of factor 100 - \PstPolygon[unit=2,linewidth=0.003, - PolyEpicycloid,PolyNbSides=72,PolyOffset=101] -\end{SideBySideExample} - -\begin{SideBySideExample}[xrightmargin=5cm] - % Epicycloid of factor 153 - \PstPolygon[unit=2,linewidth=0.003, - PolyEpicycloid,PolyNbSides=72,PolyOffset=154] -\end{SideBySideExample} - -\clearpage - -% Fourth serie - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \psdots[dotsize=0.2,linecolor=cyan](1;\INode)} - \PstPentagon[unit=2] -\end{SideBySideExample} - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \rput{*0}(1.2;\INode){\small\the\multidocount}} - \PstPolygon[unit=2,PolyNbSides=7,PolyOffset=2] -\end{SideBySideExample} - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \rput*{*0}(1;\INode){\small\the\multidocount}} - \PstHeptagon[unit=2,PolyOffset=2] -\end{SideBySideExample} - -\begin{SideBySideExample} - \newcounter{Letter} - \providecommand{\PstPolygonNode}{% - \setcounter{Letter}{\the\multidocount}% - \rput*{*0}(1;\INode){\small\Alph{Letter}}} - \PstHeptagon[unit=2,PolyOffset=3] -\end{SideBySideExample} - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \SpecialCoor - \degrees[3] - \rput{0.5}(0.5;\INode){% - \pspolygon*(0.5;0.5)(0.5;1.5)(0.5;2.5)}} - \PstTriangle -\end{SideBySideExample} - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \psdots[dotstyle=o,dotsize=0.2](1;\INode) - \psline[linecolor=red]{->}(0.9;\INode)} - \PstPolygon[unit=2,PolyNbSides=8] -\end{SideBySideExample} - -\begin{SideBySideExample} - \providecommand{\PstPolygonNode}{% - \psline[linewidth=0.1mm,doubleline=true, - linecolor=green]{<->}(0;0)(1;\INode)} - \PstHexagon[unit=2] -\end{SideBySideExample} - -\begin{SideBySideExample} - \newbox{\Star} - \savebox{\Star}{% - \PstStarFive*[unit=0.15,linecolor=red]} - \providecommand{\PstPolygonNode}{% - \rput{*0}(1;\INode){\usebox{\Star}}} - \shortstack{% - \PstNonagon\\[5mm] - \PstDodecagon[linestyle=none]} -\end{SideBySideExample} - -\end{document} -% -% \end{macrocode} -% -% -% \Finale -% \PrintIndex -% \PrintChanges -% -\endinput -%% -%% End of file `pst-poly.dtx' diff --git a/Master/texmf-dist/source/latex/pst-poly/pst-poly.ins b/Master/texmf-dist/source/latex/pst-poly/pst-poly.ins deleted file mode 100644 index 881fbeaca83..00000000000 --- a/Master/texmf-dist/source/latex/pst-poly/pst-poly.ins +++ /dev/null @@ -1,38 +0,0 @@ -%% `pst-poly.ins' -%% -%% Docstrip installation instruction file for docstyle `pst-poly' -%% -%% Denis Girou (CNRS/IDRIS - France) -%% -%% February 19, 2001 - -\def\batchfile{pst-poly.ins} -\input docstrip.tex -\keepsilent -\Msg{*** Generating the `pst-poly' package ***} -\askforoverwritefalse -\generate{\file{pst-poly.tex}{\from{pst-poly.dtx}{pst-poly}}} -\generate{\file{pst-poly.sty}{\from{pst-poly.dtx}{latex-wrapper}}} -\generate{\file{tst-poly.tex}{\from{pst-poly.dtx}{tst-poly}}} - -\ifToplevel{% -\Msg{***********************************************************} -\Msg{*} -\Msg{* To finish the installation you have to move the files} -\Msg{* pst-poly.sty and pst-poly.tex in a directory/folder searched by TeX.} -\Msg{*} -\Msg{* To produce the documentation, run the file `pst-poly.dtx'} -\Msg{* through LaTeX.} -\Msg{*} -\Msg{* If you require the commented code, desactivating the} -\Msg{* OnlyDescription macro, you must recompile, execute:} -\Msg{* `makeindex -s gind.ist pst-poly'} -\Msg{* `makeindex -s gglo.ist -o pst-poly.gls pst-poly.glo'} -\Msg{* and recompile.} -\Msg{*} -\Msg{***********************************************************} -} - -\endinput -%% -%% End of file `pst-poly.ins' diff --git a/Master/texmf-dist/tex/generic/pst-poly/pst-poly.tex b/Master/texmf-dist/tex/generic/pst-poly/pst-poly.tex index 43e4e714961..9720ab84087 100644 --- a/Master/texmf-dist/tex/generic/pst-poly/pst-poly.tex +++ b/Master/texmf-dist/tex/generic/pst-poly/pst-poly.tex @@ -1,32 +1,14 @@ +%% $Id: pst-poly.tex 187 2009-12-20 12:44:24Z herbert $ %% %% This is file `pst-poly.tex', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% pst-poly.dtx (with options: `pst-poly') %% %% IMPORTANT NOTICE: %% -%% For the copyright see the source file. -%% -%% Any modified versions of this file must be renamed -%% with new filenames distinct from pst-poly.tex. -%% -%% For distribution of the original source see the terms -%% for copying and modification in the file pst-poly.dtx. -%% -%% This generated file may be distributed as long as the -%% original source files, as listed above, are part of the -%% same distribution. (The sources need not necessarily be -%% in the same archive or directory.) -%% -%% Package `pst-poly.dtx' -%% +%% (C) %% Denis Girou (CNRS/IDRIS - France) -%% Herbert Voss +%% Herbert Voss %% -%% Novermber 20, 2004 +%% december 20, 2009 %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -36,209 +18,193 @@ %% `pst-poly' is a PSTricks package to draw easily various kinds of regular %% or non regular polygons, with various customizations. %% -\def\fileversion{1.60} -\def\filedate{2004/11/20} -\message{`PST-Polygon' v\fileversion, \filedate\space (DG/hv)} +% \csname PSTPolygonLoaded\endcsname \let\PSTPolygonLoaded\endinput \ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi \ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi -\ifx\MultidoLoaded\endinput\else\input multido.tex\fi -\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi +\ifx\MultidoLoaded\endinput\else \input multido.tex\fi +\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi +% +\def\fileversion{1.61} +\def\filedate{2009/12/20} +\message{`PST-Polygon' v\fileversion, \filedate\space (DG/hv)} +% \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax \pst@addfams{pst-poly} -\newif\ifPst@PstPicture -\define@key[psset]{pst-poly}{PstPicture}[true]{\@nameuse{Pst@PstPicture#1}} -\define@key[psset]{pst-poly}{PolyRotation}{\edef\PstPoly@Rotation{#1}} -\define@key[psset]{pst-poly}{PolyNbSides}{\pst@getint{#1}{\PstPoly@NbSides}} -\define@key[psset]{pst-poly}{PolyOffset}{\pst@getint{#1}{\PstPoly@Offset}} +\define@boolkey[psset]{pst-poly}[Pst@]{PstPicture}[true]{} +\define@key[psset]{pst-poly}{PolyRotation}[0]{\def\PstPoly@Rotation{#1}} +\define@key[psset]{pst-poly}{PolyNbSides}[5]{\pst@getint{#1}{\PstPoly@NbSides}% + \ifnum\PstPoly@NbSides<3 + \@pstrickserr{PolyNbSides must be greater than 2 + (and not `\PstPoly@NbSides')}{\@eha}% + \fi% + \ifnum\PstPoly@NbSides>200 + \@pstrickserr{PolyNbSides must be less than 201 + (and not `\PstPoly@NbSides')}{\@eha}% + \fi} +\define@key[psset]{pst-poly}{PolyOffset}[1]{\pst@getint{#1}{\PstPoly@Offset}% + \ifnum\PstPoly@Offset<1 + \@pstrickserr{PolyOffset must be greater than 0 + (and not `\PstPoly@Offset')}{\@eha}% + \fi} \newdimen\PstPoly@IntermediatePointDim -\define@key[psset]{pst-poly}{PolyIntermediatePoint}{\edef\PstPoly@IntermediatePoint{#1}} -\define@key[psset]{pst-poly}{PolyName}{\edef\PstPoly@Name{#1}} -\newif\ifPstPoly@Curves -\define@key[psset]{pst-poly}{PolyCurves}[true]{\@nameuse{PstPoly@Curves#1}} -\newif\ifPstPoly@Epicycloid -\define@key[psset]{pst-poly}{PolyEpicycloid}[true]{\@nameuse{PstPoly@Epicycloid#1}} +\define@key[psset]{pst-poly}{PolyIntermediatePoint}[]{\def\PstPoly@IntermediatePoint{#1}} +\define@key[psset]{pst-poly}{PolyName}[]{\def\PstPoly@Name{#1}} +\define@boolkey[psset]{pst-poly}[Pst@]{PolyCurves}[true]{} +\define@boolkey[psset]{pst-poly}[Pst@]{PolyEpicycloid}[true]{} \psset{% PstPicture=true,PolyRotation=0,PolyNbSides=5,PolyOffset=1, PolyIntermediatePoint=,PolyName=,PolyCurves=false,PolyEpicycloid=false} -\def\PstPolygon{\pst@ifstar{\@ifnextchar[{\PstPolygon@i}{\PstPolygon@i[]}}} -\def\PstPolygon@i[#1]{{% -\psset{#1}% -\if@star\solid@star\fi -\ifnum\PstPoly@NbSides<3 - \@pstrickserr{PolyNbSides must be greater than 2 - (and not `\PstPoly@NbSides')}{\@eha}% -\fi -\ifnum\PstPoly@NbSides>200 - \@pstrickserr{PolyNbSides must be less than 201 - (and not `\PstPoly@NbSides')}{\@eha}% -\fi -\ifnum\PstPoly@Offset<1 - \@pstrickserr{PolyOffset must be greater than 0 - (and not `\PstPoly@Offset')}{\@eha}% -\fi -\ifodd\PstPoly@Offset - \def\PstPoly@Decimal{.5}% -\else - \def\PstPoly@Decimal{}% -\fi +% \SpecialCoor -\ifPst@PstPicture\pspicture(-1,-1)(1,1)\fi -\rput{\PstPoly@Rotation}(0,0){% - \degrees[\PstPoly@NbSides] - \pssetlength{\PstPoly@IntermediatePointDim}{\PstPoly@IntermediatePoint} - \ifx\PstPoly@Name\@empty - \else - \pnode(0,0){\PstPoly@Name 0} - \ifnum\psxunit=\psyunit - \def\PstPoly@Node{\pnode(1;\i)}% - \else - \def\PstPoly@Node{% - \pnode(! \i\space 360 \PstPoly@NbSides\space div mul cos - \i\space 360 \PstPoly@NbSides\space div mul sin)}% - \fi - \multido{\i=0+1}{\PstPoly@NbSides}{% - \PstPoly@Node{\PstPoly@Name\the\multidocount}} - \fi - \pscustom{% - \ifPstPoly@Epicycloid - \pst@cnta=\PstPoly@NbSides - \divide\pst@cnta\tw@ - \multido{\i=0+1}{\PstPoly@NbSides}{% - \moveto(1;\i) - \lineto(1;\the\pst@cnta) - \advance\pst@cnta\PstPoly@Offset} +% +\def\PstPolygon{\pst@object{PstPolygon}} +\def\PstPolygon@i{{% + \use@par% + \if@star\solid@star\fi + \ifodd\PstPoly@Offset\def\PstPoly@Decimal{.5}\else\def\PstPoly@Decimal{}\fi + \ifPst@PstPicture\pspicture(-1,-1)(1,1)\fi + \rput{\PstPoly@Rotation}(0,0){% + \degrees[\PstPoly@NbSides] + \NormalCoor + \pssetlength{\PstPoly@IntermediatePointDim}{\PstPoly@IntermediatePoint} + \SpecialCoor + \ifx\PstPoly@Name\@empty \else + \pnode(0,0){\PstPoly@Name 0} \ifnum\psxunit=\psyunit - \moveto(1,0) + \def\PstPoly@Node{\pnode(1;\i)}% \else - \moveto(! 1 0) + \def\PstPoly@Node{% + \pnode(! \i\space 360 \PstPoly@NbSides\space div mul cos + \i\space 360 \PstPoly@NbSides\space div mul sin)}% \fi - \ifx\PstPoly@IntermediatePoint\@empty - \ifnum\psxunit=\psyunit - \def\PstPoly@Junction{\lineto(1;\i)}% - \else - \def\PstPoly@Junction{\lineto% - (! \i\space 360 \PstPoly@NbSides\space div mul cos - \i\space 360 \PstPoly@NbSides\space div mul sin)}% - \fi - \multido{\i=\PstPoly@Offset+\PstPoly@Offset}{\PstPoly@NbSides}{% - \PstPoly@Junction} + \multido{\i=0+1}{\PstPoly@NbSides}{% + \PstPoly@Node{\PstPoly@Name\the\multidocount}} + \fi + \pscustom{% + \ifPst@PolyEpicycloid + \pst@cnta=\PstPoly@NbSides + \divide\pst@cnta\tw@ + \multido{\i=0+1}{\PstPoly@NbSides}{% + \moveto(1;\i) + \lineto(1;\the\pst@cnta) + \advance\pst@cnta\PstPoly@Offset} \else - \ifPstPoly@Curves - \let\PstPoly@JunctionType\pscurve - \else - \let\PstPoly@JunctionType\psline - \fi - \ifnum\psxunit=\psyunit - \def\PstPoly@Junction{\PstPoly@JunctionType% - (\PstPoly@IntermediatePointDim;\the\pst@cnta\PstPoly@Decimal) - (1;\i)}% + \ifnum\psxunit=\psyunit \moveto(1,0)\else\moveto(! 1 0)\fi + \ifx\PstPoly@IntermediatePoint\@empty + \ifnum\psxunit=\psyunit + \def\PstPoly@Junction{\lineto(1;\i)}% + \else + \def\PstPoly@Junction{\lineto% + (! \i\space 360 \PstPoly@NbSides\space div mul cos + \i\space 360 \PstPoly@NbSides\space div mul sin)}% + \fi + \multido{\i=\PstPoly@Offset+\PstPoly@Offset}{\PstPoly@NbSides}{\PstPoly@Junction} \else - \def\PstPoly@Junction{\PstPoly@JunctionType% - (! \PstPoly@IntermediatePoint\space - \the\pst@cnta\PstPoly@Decimal\space 360 + \ifPst@PolyCurves\let\PstPoly@JunctionType\pscurve\else\let\PstPoly@JunctionType\psline\fi + \ifnum\psxunit=\psyunit + \def\PstPoly@Junction{\PstPoly@JunctionType% + (\PstPoly@IntermediatePointDim;\the\pst@cnta\PstPoly@Decimal)(1;\i)}% + \else + \def\PstPoly@Junction{\PstPoly@JunctionType% + (! \PstPoly@IntermediatePoint\space \the\pst@cnta\PstPoly@Decimal\space 360 \PstPoly@NbSides\space div mul cos mul - \PstPoly@IntermediatePoint\space - \the\pst@cnta\PstPoly@Decimal\space 360 + \PstPoly@IntermediatePoint\space \the\pst@cnta\PstPoly@Decimal\space 360 \PstPoly@NbSides\space div mul sin mul) - (! \i\space 360 \PstPoly@NbSides\space div mul cos - \i\space 360 \PstPoly@NbSides\space div mul sin)}% + (! \i\space 360 \PstPoly@NbSides\space div mul cos \i\space 360 \PstPoly@NbSides\space div mul sin)}% + \fi + \pst@cnta=\PstPoly@Offset + \divide\pst@cnta\tw@ + \multido{\i=\PstPoly@Offset+\PstPoly@Offset}{\PstPoly@NbSides}{% + \PstPoly@Junction + \advance\pst@cnta\PstPoly@Offset} \fi - \pst@cnta=\PstPoly@Offset - \divide\pst@cnta\tw@ - \multido{\i=\PstPoly@Offset+\PstPoly@Offset}{\PstPoly@NbSides}{% - \PstPoly@Junction - \advance\pst@cnta\PstPoly@Offset} - \fi - \fi} - \ifx\PstPolygonNode\@undefined - \else - \multido{\INode=\z@+\PstPoly@Offset}{\PstPoly@NbSides}{% - \PstPolygonNode} - \fi} -\ifPst@PstPicture - \endpspicture -\fi}} -\def\PstTriangle{% -\pst@ifstar{\@ifnextchar[{\PstTriangle@i}{\PstTriangle@i[]}}} -\def\PstTriangle@i[#1]{{% -\psset{PolyNbSides=3,PolyRotation=90}% For triangle (360/3*(3/4)) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -\def\PstSquare{% -\pst@ifstar{\@ifnextchar[{\PstSquare@i}{\PstSquare@i[]}}} -\def\PstSquare@i[#1]{{% -\psset{PolyNbSides=4,PolyRotation=45}% For square (360/4/2) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -\def\PstPentagon{% -\pst@ifstar{\@ifnextchar[{\PstPentagon@i}{\PstPentagon@i[]}}} -\def\PstPentagon@i[#1]{{% -\psset{PolyNbSides=5,PolyRotation=18}% For pentagon (360/5/4) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -\def\PstHexagon{% -\pst@ifstar{\@ifnextchar[{\PstHexagon@i}{\PstHexagon@i[]}}} -\def\PstHexagon@i[#1]{{% -\psset{PolyNbSides=6}% -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -\def\PstHeptagon{% -\pst@ifstar{\@ifnextchar[{\PstHeptagon@i}{\PstHeptagon@i[]}}} -\def\PstHeptagon@i[#1]{{% -\psset{PolyNbSides=7,PolyRotation=38.57}% For heptagon (360/7*(3/4)) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -\def\PstOctogon{% -\pst@ifstar{\@ifnextchar[{\PstOctogon@i}{\PstOctogon@i[]}}} -\def\PstOctogon@i[#1]{{% -\psset{PolyNbSides=8,PolyRotation=22.5}% For octogon (360/8/2) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -\def\PstNonagon{% -\pst@ifstar{\@ifnextchar[{\PstNonagon@i}{\PstNonagon@i[]}}} -\def\PstNonagon@i[#1]{{% -\psset{PolyNbSides=9,PolyRotation=10}% For nonagon (360/9/4) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -\def\PstDecagon{% -\pst@ifstar{\@ifnextchar[{\PstDecagon@i}{\PstDecagon@i[]}}} -\def\PstDecagon@i[#1]{{% -\psset{PolyNbSides=10}% -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -\def\PstDodecagon{% -\pst@ifstar{\@ifnextchar[{\PstDodecagon@i}{\PstDodecagon@i[]}}} -\def\PstDodecagon@i[#1]{{% -\psset{PolyNbSides=12,PolyRotation=15}% For dodecagon (360/12/2) -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -\def\PstStarFiveLines{% -\pst@ifstar{\@ifnextchar[{\PstStarFiveLines@i}{\PstStarFiveLines@i[]}}} -\def\PstStarFiveLines@i[#1]{{% -\psset{PolyOffset=2,PolyRotation=18}% -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} -\def\PstStarFive{% -\pst@ifstar{\@ifnextchar[{\PstStarFive@i}{\PstStarFive@i[]}}} -\def\PstStarFive@i[#1]{{% -\psset{PolyIntermediatePoint=0.38,PolyRotation=18}% -\psset{#1}% -\if@star\solid@star\fi -\PstPolygon}} + \fi} + \ifx\PstPolygonNode\@undefined + \else\multido{\INode=\z@+\PstPoly@Offset}{\PstPoly@NbSides}{\PstPolygonNode}\fi} + \ifPst@PstPicture\endpspicture\fi% +}} +% +\def\PstTriangle{\pst@object{PstTriangle}} +\def\PstTriangle@i{{% + \addto@par{PolyNbSides=3,PolyRotation=90}% For triangle (360/3*(3/4)) + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% +\def\PstSquare{\pst@object{PstSquare}} + \def\PstSquare@i{{% + \addto@par{PolyNbSides=4,PolyRotation=45}% For square (360/4/2) + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% +\def\PstPentagon{\pst@object{PstPentagon}} + \def\PstPentagon@i{{% + \addto@par{PolyNbSides=5,PolyRotation=18}% For pentagon (360/5/4) + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% +\def\PstHexagon{\pst@object{PstHexagon}} +\def\PstHexagon@i{{% + \addto@par{PolyNbSides=6}% + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% +\def\PstHeptagon{\pst@object{PstHeptagon}} +\def\PstHeptagon@i{{% + \addto@par{PolyNbSides=7,PolyRotation=38.57}% For heptagon (360/7*(3/4)) + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% +\def\PstOctogon{\pst@object{PstOctogon}} +\def\PstOctogon@i{{% + \addto@par{PolyNbSides=8,PolyRotation=22.5}% For octogon (360/8/2) + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% +\def\PstNonagon{\pst@object{PstNonagon}} +\def\PstNonagon@i{{% + \addto@par{PolyNbSides=9,PolyRotation=10}% For nonagon (360/9/4) + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% +\def\PstDecagon{\pst@object{PstDecagon}} +\def\PstDecagon@i{{% + \addto@par{PolyNbSides=10}% + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% +\def\PstDodecagon{\pst@object{PstDodecagon}} +\def\PstDodecagon@i{{% + \addto@par{PolyNbSides=12,PolyRotation=15}% For dodecagon (360/12/2) + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% +\def\PstStarFiveLines{\pst@object{PstStarFiveLines}} +\def\PstStarFiveLines@i{{% + \addto@par{PolyOffset=2,PolyRotation=18}% + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% +\def\PstStarFive{\pst@object{PstStarFive}} +\def\PstStarFive@i{{% + \addto@par{PolyIntermediatePoint=0.38,PolyRotation=18}% + \use@par% + \if@star\solid@star\fi + \PstPolygon}} +% \newdimen\pst@dimm \newdimen\pst@dimn \newdimen\pst@dimo @@ -247,6 +213,7 @@ \def\pspolygonbox@i{\pst@makebox\pspolygonbox@ii} \def\pspolygonbox@ii{{% \begingroup% + \addbefore@par{boxsep=true}% \pst@useboxpar% \pst@dima=\pslinewidth% \ifpsdoubleline% @@ -263,21 +230,21 @@ \setbox\pst@hbox=\hbox{% \ifpsboxsep\kern\pst@dima\fi% left side \begin@ClosedObj% - \addto@pscode{% + \addto@pscode{ /framesep \pst@number\pst@dima def - /boxdepth \pst@number\pst@dimb framesep add def + /boxdepth \pst@number\pst@dimb framesep add def /boxheight0 \pst@number\pst@dimd def /boxheight boxheight0 framesep add def /boxwidth \pst@number\pst@dimc def /radius \pst@number\pst@dimm def /order \PstPoly@NbSides\space def /dAlpha 360 order div def - /alpha \PstPoly@Rotation\space def + /alpha \PstPoly@Rotation\space def \pst@cp - \tx@polygonB - \psline@iii + \tx@polygonB + \psline@iii %% \tx@Line - \tx@Polygon + \tx@Polygon }% \def\pst@linetype{1}% \showpointsfalse% @@ -296,6 +263,7 @@ \box\pst@hbox% \endgroup% }\ignorespaces} +% \pst@def{polygonB}<{% /x1 framesep neg def /x2 boxwidth framesep add def @@ -310,6 +278,7 @@ radius alpha sin mul } repeat }> +% \catcode`\@=\PstAtCode\relax \endinput %% diff --git a/Master/texmf-dist/tex/latex/pst-poly/pst-poly.sty b/Master/texmf-dist/tex/latex/pst-poly/pst-poly.sty index 3b8931ada7d..0945714a207 100644 --- a/Master/texmf-dist/tex/latex/pst-poly/pst-poly.sty +++ b/Master/texmf-dist/tex/latex/pst-poly/pst-poly.sty @@ -1,47 +1,9 @@ -%% -%% This is file `pst-poly.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% pst-poly.dtx (with options: `latex-wrapper') -%% -%% IMPORTANT NOTICE: -%% -%% For the copyright see the source file. -%% -%% Any modified versions of this file must be renamed -%% with new filenames distinct from pst-poly.sty. -%% -%% For distribution of the original source see the terms -%% for copying and modification in the file pst-poly.dtx. -%% -%% This generated file may be distributed as long as the -%% original source files, as listed above, are part of the -%% same distribution. (The sources need not necessarily be -%% in the same archive or directory.) -%% -%% Package `pst-poly.dtx' -%% -%% Denis Girou (CNRS/IDRIS - France) -%% Herbert Voss -%% -%% Novermber 20, 2004 -%% -%% This program can be redistributed and/or modified under the terms -%% of the LaTeX Project Public License Distributed from CTAN archives -%% in directory macros/latex/base/lppl.txt. -%% -%% DESCRIPTION: -%% `pst-poly' is a PSTricks package to draw easily various kinds of regular -%% or non regular polygons, with various customizations. -%% +%% $Id: pst-poly.sty 187 2009-12-20 12:44:24Z herbert $ \RequirePackage{pstricks} -\ProvidesPackage{pst-poly}[2004/11/20 package wrapper for - pst-poly.tex (hv)] +\ProvidesPackage{pst-poly}[2009/12/20 package wrapper for + pst-poly.tex (dg,hv)] \input{pst-poly.tex} \ProvidesFile{pst-poly.tex} - [\filedate\space v\fileversion\space `PST-poly' (DG)] + [\filedate\space v\fileversion\space `PST-poly' (dg,hv)] \endinput -%% -%% End of file `pst-poly.sty'. + diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index d1536ee1b18..4c0047726bd 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -215,7 +215,7 @@ my @WorkingTLP = qw( pst-gantt pst-geo pst-grad pst-infixplot pst-jtree pst-knot pst-labo pst-lens pst-light3d pst-math pst-mirror pst-ob3d pst-optexp pst-optic - pst-osci pst-pad pst-pdf pst-pdgr pst-qtree + pst-osci pst-pad pst-poly pst-pdf pst-pdgr pst-qtree pst-sigsys pst-solides3d pst-soroban pst-spectra pst-slpe pst-stru pst-support pst-text pst-thick pst-tree pst-uml pst-vowel pst-vue3d -- cgit v1.2.3