diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-05-17 14:28:18 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-05-17 14:28:18 +0000 |
commit | 5bb3d3a90123ee043d1502d4bc9d8d50b063904c (patch) | |
tree | da549deeb84d609f06fdb70d197ebab09c440bea /Master | |
parent | ec1024d29e6ef9979eff704128f6dba53e72987e (diff) |
pstricks-add v 3.02 2008-04-25
git-svn-id: svn://tug.org/texlive/trunk@8190 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/Changes | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf | bin | 1653269 -> 1669809 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex | 90 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro | 7 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/pstricks-add/Makefile | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex | 115 |
7 files changed, 209 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/Changes b/Master/texmf-dist/doc/generic/pstricks-add/Changes index 6849ace2dd5..9a0b34faa3e 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/Changes +++ b/Master/texmf-dist/doc/generic/pstricks-add/Changes @@ -1,4 +1,4 @@ -%% $Id: Changes 20 2008-04-15 18:40:18Z herbert $ +%% $Id: Changes 23 2008-05-15 21:51:18Z herbert $ %% pstricks-add.pro ----------- (Dominik Rodriguez/hv) v 0.20 2008-01-12 - moved the AlgParser into pst-algparser.pro @@ -33,6 +33,9 @@ pstricks-add.sty ----------- (hv) pstricks-add.tex ----------- (Dominik Rodriguez/hv) + v 3.02 2008-04-25 - set correct labelFontSize for math mode + - add macro \psPie with some additional + optional arguments v 3.01 2008-04-15 - import changes from pst-plot in \ps@axisiv new option mathLabel for setting labels in text or math mode diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib index 3b2d2e236e0..d7ec06279cf 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib @@ -38,7 +38,7 @@ edition = {zweite}, publisher = {Pearson Education}, year = {2005}, - address = {Mnchen} + address = {M\"unchen} } @Book{unbound, @@ -176,6 +176,6 @@ Author = {Herbert Vo\ss}, Publisher = {Franzis Verlag}, Edition= {first}, - Address= {Mnchen}, + Address= {M\"unchen}, Year= {2006}, } diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf Binary files differindex 8ccd6bdec9a..e672d042e3d 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex index be94d8f35e6..ccfe20c18ea 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex @@ -1333,8 +1333,98 @@ macro. \end{pspicture} \end{LTXexample} + \clearpage %-------------------------------------------------------------------------------------- +\section{\CMD{psPie}: a pie chart} +%-------------------------------------------------------------------------------------- + +\begin{lstlisting}[style=syntax] +\psPie[<options>]{comma separated value list}{comma separated value list}{radius} +\end{lstlisting} + +The special optional arguments for the \CMD{psPie} macro are as follows: + +\begin{tabularx}{\linewidth}{@{}>{\ttfamily}lX>{\ttfamily}l@{}} +\textrm{\emph{name}} & \textrm{\emph{description}} & \textrm{\emph{default}}\\\hline +pieSep & distance from the pie chart center center to an outraged pie piece & 10pt\\ +pieColor & gray or colored pie (values are: \texttt{gray} or \texttt{color})& gray\\ +userColor & a comma separated list of user defined colors for the pie & \{\} +\end{tabularx} + +\bigskip +The first mandatory argument is the list of the values and may not be empty. The second +one is a list of outraged pieces, numbered consecutively from 1 to up the total number +of values. The list of user defined colors must be enclosed in braces! + +The macro \CMD{psPie} defines for every value three nodes at the half angle and +in distances from 0.75, 1, and 1.25 times of the radius from the origin. The nodes +are named as \verb+psPieI?+, \verb+psPie?+, and \verb+psPieO?+, where ? is the number of +the pie. The letter I leads to the inner node and the letter O to the outer node. The +other one is the node on the circle line. +The +origin is by default \texttt{(0,0)}. Moving the pie to another position can be done as +usual with the \CMD{rput}-macro. The used colors are named internally as \verb+pieFillColor?+ +and can be used by the user for coloring lines or text. + + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-3)(3,3) +\psPie{ 23, 29, 3, 26, 28, 14 }{}{2} +\multido{\iA=1+1}{6}{% + \psdot(psPie\iA)\psdot(psPieI\iA)\psdot(psPieO\iA)% + \psline[linestyle=dashed,linecolor=white](psPie\iA) + \psline[linestyle=dashed](psPie\iA)(psPieO\iA)} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-3)(3,3) +\psPie[pieColor=color]{ 45, 90 }{ 1 }{2} +\ncline[linecolor=-pieFillColor1, + nodesepB=-20pt]{psPieO1}{psPie1} +\rput[l](psPieO1){% + \textcolor{pieFillColor1}{pie no 1}} +\ncline[linecolor=-pieFillColor2, + nodesepB=-20pt]{psPieO2}{psPie2} +\rput[lt](psPieO2){% + \textcolor{pieFillColor2}{pie no 2}} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=7.5cm] +\psframebox[fillcolor=black!20, + fillstyle=solid]{% +\begin{pspicture}(-3.5,-3.5)(4.25,3.5) +\psPie[pieColor=color]% + {23, 29, 3, 26, 28, 14, 17, 4, 9}{}{2} +\multido{\iA=1+1}{9}{% + \ncline[linecolor=-pieFillColor\iA, + nodesepB=-10pt]{psPieO\iA}{psPie\iA} + \rput[l](psPieO\iA){% + \textcolor{pieFillColor\iA}{pie no \iA}}} +\end{pspicture}} +\end{LTXexample} + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-3)(3,3) +\psPie[userColor={red!30,green!30, + blue!40,gray,magenta!60,cyan}]% + { 23, 29, 3, 26, 28, 14 }{1,4}{2} +\end{pspicture} +\end{LTXexample} + + + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-3)(3,3) +\psPie{ 23, 29, 3, 26, 28, 14 }{}{2} +\multido{\iA=1+1}{6}{\rput*(psPieI\iA){\iA}} +\end{pspicture} +\end{LTXexample} + + +%-------------------------------------------------------------------------------------- \section{\CMD{psHomothetie}: central dilatation} %-------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro b/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro index a44011e326b..43bce4de57c 100644 --- a/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro +++ b/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro @@ -1,4 +1,4 @@ -%% $Id: pstricks-add.pro 6 2007-12-29 21:41:43Z herbert $ +%% $Id: pstricks-add.pro 23 2008-05-15 21:51:18Z herbert $ % PostScript prologue for pstricks-add.tex. % Version 0.20, 2008/01/01 % For distribution, see pstricks.tex. @@ -72,8 +72,8 @@ } def % %% convertisseur longueur d'onde ->R,G,B Manuel Luque -%% lambda max=780 nanomtres -%% lambda min=380 nanomtres +%% lambda max=780 nanometres +%% lambda min=380 nanometres %% adaptation de : %% http://www.physics.sfasu.edu/astro/color.html %% www.efg2.com/lab @@ -163,6 +163,7 @@ >> shfill end } bind def +% end % % END pstricks-add.pro diff --git a/Master/texmf-dist/source/generic/pstricks-add/Makefile b/Master/texmf-dist/source/generic/pstricks-add/Makefile index 6c6fa4e95d5..23f8a938ded 100644 --- a/Master/texmf-dist/source/generic/pstricks-add/Makefile +++ b/Master/texmf-dist/source/generic/pstricks-add/Makefile @@ -13,8 +13,7 @@ ARCHNAME = $(MAIN)-$(shell date +%y%m%d) ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Changes Makefile -all : doc -# clean +all : doc clean doc: $(MAIN).pdf $(MAIN).pdf : $(MAIN).ps @@ -37,6 +36,7 @@ $(MAIN).dvi : $(MAIN).tex $(LATEX) $< clean : + $(RM) *.dat $(RM) $(addprefix $(MAIN), .log .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out ) $(RM) $(addprefix $(MAIN), .dvi .ps) diff --git a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex index ab07c6579c2..80095342963 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -1,4 +1,4 @@ -%% $Id: pstricks-add.tex 20 2008-04-15 18:40:18Z herbert $ +%% $Id: pstricks-add.tex 23 2008-05-15 21:51:18Z herbert $ %% %% %% This is file `pstricks-add.tex', @@ -29,8 +29,8 @@ \ifx\MultidoLoaded\endinput\else \input multido \fi \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % -\def\fileversion{3.01} -\def\filedate{2008/01/26} +\def\fileversion{3.02} +\def\filedate{2008/05/16} \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -38,6 +38,7 @@ \pst@addfams{pstricks-add} % %% prologue for postcript +\pstheader{ps.pro}% \pstheader{pstricks-add.pro}% %\pstheader{pst-algparser.pro}% done by pstricks.tex % @@ -1359,8 +1360,8 @@ \define@key[psset]{pstricks-add}{labelFontSize}{\def\psk@labelFontSize{#1}}% \define@boolkey[psset]{pstricks-add}[Pst@]{mathLabel}[true]{% \ifPst@mathLabel - \def\pshlabel##1{\psk@labelFontSize$##1$}% - \def\psvlabel##1{\psk@labelFontSize$##1$} + \def\pshlabel##1{$\psk@labelFontSize##1$}% + \def\psvlabel##1{$\psk@labelFontSize##1$} \else \def\pshlabel##1{\psk@labelFontSize##1}% \def\psvlabel##1{\psk@labelFontSize##1} @@ -1486,8 +1487,11 @@ %% #2 decimals %% #3 dot \def\@stripDecimals#1.#2.#3\@nil{% - \def\dummy{#1}% - \ifx\dummy\@empty\the\@zero\else#1\fi% the integer part +\typeout{1: #1} +\typeout{2: #2} +\typeout{3: #3} + \def\pst@dummy{#1}% + \ifx\pst@dummy\@empty\the\@zero\else#1\fi% the integer part } % \def\pst@@@vlabel#1{% @@ -2392,7 +2396,7 @@ \pst@number\psyunit mul exch \pst@number\psxunit mul exch } def}% - \else + \else% polarplot % D.G. modification end \addto@pscode{% \psplot@init @@ -2607,6 +2611,7 @@ \end@SpecialObj% } % +% % LSM Least Square Method 2006-03-13 (hv) \def\psLSM@ii{\addto@pscode{false \tx@NArray \psLSM@iii}} \def\psLSM@iii{% @@ -3116,6 +3121,100 @@ \ignorespaces% } % +\newdimen\pie@ColorIndex +\newdimen\pie@ColorStep +\newcount\pie@Toggle +\newif\if@pieSep +\newif\if@pieUserColor +% +\define@key[psset]{pstricks-add}{pieColor}{\pst@expandafter\psk@@pieColor{#1}\@nil} +\def\psk@@pieColor#1#2\@nil{% + \ifx#1r\def\psk@pieColor{2}\else + \ifx#1c\def\psk@pieColor{380}\else\def\psk@pieColor{0}\fi\fi} +\psset[pstricks-add]{pieColor=gray}% gray, color, randomColor +% +\define@key[psset]{pstricks-add}{pieSep}{\pst@getlength{#1}\psk@pieSep} +\psset[pstricks-add]{pieSep=10pt} +% +\define@key[psset]{pstricks-add}{userColor}{% + \pie@Toggle=0 + \def\pie@option{#1} + \ifx\pie@option\@empty\@pieUserColorfalse + \else + \@pieUserColortrue + \expandafter\psk@@pieUserColor#1,,\@nil + \fi} +\def\psk@@pieUserColor#1,#2,#3\@nil{% + \advance\pie@Toggle by \@ne% + \xglobal\colorlet{pieFillColor\the\pie@Toggle}{#1}% + \typeout{pie:colorlet:pieFillColor\the\pie@Toggle=#1} + \def\pie@option{#2} + \ifx\pie@option\@empty\else\psk@@pieUserColor#2,#3,\@nil\fi}% +\psset[pstricks-add]{userColor={}} + +\def\psPie{\pst@object{psPie}} +\def\psPie@i#1#2#3{% #1:values #2:separated pies #3:radius + \pst@killglue + \begingroup + \pst@dimm=0pt\pst@cnta=1% + \psforeach{\pie@tempA}{#1}{% + \global\advance\pst@cnta by \@ne % no of entries + \global\advance\pst@dimm by \pie@tempA pt} + \addbefore@par{dimen=outer}% + \begin@SpecialObj% + \pst@getlength{#3}\pie@Radius + \ifnum\psk@pieColor>0 + \pie@ColorStep=400\p@\else\pie@ColorStep=\p@\fi % the "numerical color" + \divide\pie@ColorStep by \pst@cnta% % step =1/no or 400/no +% \typeout{psPie:colorStep: \pst@number\pie@ColorStep}% + \pie@ColorIndex=\psk@pieColor pt% % the start color (gray or wave) + \degrees[\pst@number\pst@dimm]% % instead of 360 degrees + \def\pie@alpha{0}% + \pst@dimm=0pt\pst@dimn=0pt\pst@dimo=0pt\pst@cnta=0% + \global\pie@Toggle=1 + \psforeach{\pie@tempA}{#1}{% + \global\advance\pst@dimm by \pie@tempA pt% + \global\advance\pst@dimn by \pie@alpha pt% + \def\pst@tempB{\pst@number\pie@ColorIndex}% +% \typeout{psPie:wave:color: \pst@tempB}% + \global\advance\pst@cnta by \@ne% + \if@pieUserColor\else + \def\pie@FillColor{pieFillColor\the\pst@cnta} + \ifnum\psk@pieColor>0 \xglobal\definecolor{\pie@FillColor}{wave}{\pst@tempB}% + \else\xglobal\definecolor{\pie@FillColor}{gray}{\pst@tempB}\fi% + \fi + \pst@dimo=0.5\pst@dimn\advance\pst@dimo by 0.5\pst@dimm% half angle of the pie + \global\@pieSepfalse% + \psforeach{\pie@tempC}{#2}{\ifnum\pie@tempC=\the\pst@cnta + \global\@pieSeptrue\fi}% + \if@pieSep + \pswedge[linecolor={pieFillColor\the\pst@cnta},fillstyle=solid,fillcolor={pieFillColor\the\pst@cnta}]% + (\psk@pieSep pt;\pst@number\pst@dimo){#3}{\pst@number\pst@dimn}{\pst@number\pst@dimm}% + \pst@dima=\pie@Radius pt \advance\pst@dima by \psk@pieSep pt + \pnode(\pst@dima;\pst@number\pst@dimo){psPie\the\pst@cnta}% + \pnode(.75\pst@dima;\pst@number\pst@dimo){psPieI\the\pst@cnta}% + \pnode(1.5\pst@dima;\pst@number\pst@dimo){psPieO\the\pst@cnta}% + \else + \pswedge[linecolor={pieFillColor\the\pst@cnta},fillstyle=solid,fillcolor={pieFillColor\the\pst@cnta}]% + {#3}{\pst@number\pst@dimn}{\pst@number\pst@dimm} + \pnode(#3;\pst@number\pst@dimo){psPie\the\pst@cnta}% + \pst@dima=\pie@Radius pt + \pnode(.75\pst@dima;\pst@number\pst@dimo){psPieI\the\pst@cnta}% + \pnode(1.5\pst@dima;\pst@number\pst@dimo){psPieO\the\pst@cnta}% + \fi% + \global\let\pie@alpha\pie@tempA% + \global\advance\pie@Toggle by \@ne + \ifnum\pie@Toggle<3 + \global\advance\pie@ColorIndex by 2\pie@ColorStep + \else + \global\pie@Toggle=0 + \global\advance\pie@ColorIndex by -\pie@ColorStep% + \fi% + }% end foreach + \end@SpecialObj% + \endgroup% + \ignorespaces% +} \def\resetOptions{% \@zero=0% \def\pst@linetype{0}% |