summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-11-16 19:53:23 +0000
committerKarl Berry <karl@freefriends.org>2009-11-16 19:53:23 +0000
commita4d8f696b0807d001fa89b52b59552a669709a69 (patch)
tree461f99c441dd2bdf1aa58be15c6956a15754245d /Master
parentc3c4375bcba41f1430e538b13b1a11300a1a1a5f (diff)
pst-knot update
git-svn-id: svn://tug.org/texlive/trunk@16033 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/pst-knot/Changes3
-rw-r--r--Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.bib141
-rw-r--r--Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.pdfbin66578 -> 70632 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.tex40
-rw-r--r--Master/texmf-dist/dvips/pst-knot/pst-psm.pro6
-rw-r--r--Master/texmf-dist/source/generic/pst-knot/Makefile70
-rw-r--r--Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex66
7 files changed, 94 insertions, 232 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-knot/Changes b/Master/texmf-dist/doc/generic/pst-knot/Changes
index c3b8c07cf62..de5c36fe018 100644
--- a/Master/texmf-dist/doc/generic/pst-knot/Changes
+++ b/Master/texmf-dist/doc/generic/pst-knot/Changes
@@ -1,7 +1,10 @@
..... pst-knot.tex
+0.02 2009-11-08 - added \psBorromean
+ - better color handling
0.01 2009-11-07 initial version
..... pst-knot.pro
+0.02 2009-11-08 changes to color handling
0.01 2009-11-07 initial version
..... pst-fun.sty
diff --git a/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.bib b/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.bib
deleted file mode 100644
index aa2a55a632f..00000000000
--- a/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.bib
+++ /dev/null
@@ -1,141 +0,0 @@
-%% -*-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} }
-
-@Article{ dtk02.2:jackson.voss:plot-funktionen,
- author = {Laura E. Jackson and Herbert Vo{\ss}},
- title = {Die {P}lot-{F}unktionen 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{companion,
- 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 = 2,
- year = {2007},
- address = {Reading, Mass.}
-}
-
-@Book{PSTricks2,
- author = {Herbert Vo\ss},
- title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX},
- edition = {4.},
- publisher = {DANTE -- Lehmanns},
- year = {2007},
- address = {Heidelberg/Hamburg}
-}
-
-@Book{LaTeXRef,
- author = {Herbert Vo\ss},
- title = {\LaTeX\ Referenz},
- edition = {1.},
- publisher = {DANTE -- Lehmanns},
- year = {2007},
- address = {Heidelberg/Hamburg}
-}
-@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 = {Post{S}cript 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
-}
-
diff --git a/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.pdf b/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.pdf
index 252505e68a8..c72c6e2268e 100644
--- a/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.tex b/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.tex
index 3a96773f79d..ac0d7b37d06 100644
--- a/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-knot/pst-knot-doc.tex
@@ -25,8 +25,12 @@
\section{introduction}
This is the very first try of drawing knots. The package uses the \PS\
-subroutines from the file \LFile{psMath.pro} from Matthias Buch-Kromann.)
-Currentlx there is only one macro with two mandatory arguments, the origin
+subroutines of the file \LFile{psMath.pro} from Matthias Buch-Kromann.)
+Currently there are only two macros for knots.
+
+\section{\nxLcs{psKnot}}
+
+The macro \Lcs{psKnot} has one optional and two mandatory arguments, the origin
of the image and the knot type. The following list shows all available knot types.
\begin{BDef}
@@ -99,8 +103,8 @@ with the same value. The default is 1 1.
\end{LTXexample}
\subsection{Border color}
-The background color of the border can be controlled by \Lkeyword{knotbgcolor}
-with only a numerical value of $[0..1]$ for a grayscale color. It makes
+The background color of the border can be controlled by \Lkeyword{knotbgcolor}.
+It can use any possible color value and it makes
only sense for a colored background to get the same color for the crossing.
\begin{LTXexample}[pos=t]
@@ -108,7 +112,7 @@ only sense for a colored background to get the same color for the crossing.
\psframe[fillcolor=black!20,fillstyle=solid](-2,-2)(6,2)
\psKnot[linewidth=5pt,linecolor=red!50](0,0){7-4}
\psKnot[linewidth=5pt,linecolor=red!50,
- knotbgcolor=0.8](4,0){7-4}
+ knotbgcolor=black!20](4,0){7-4}
\end{pspicture}
\end{LTXexample}
@@ -116,17 +120,37 @@ Pay attention that black!20 is the same as 0,8 of gray.
\subsection{Border width}
The width of the border is controlled by the keyword \Lkeyword{knotborder} and
-it is preset to 2 as a factor to the current linewidth.
-It must at least be the currentlinewidth (1.0).
+it is preset to 5\Ldim{pslinewidth}. The border width is added
+to the current linewidth.
\begin{LTXexample}[pos=t]
\begin{pspicture}(-2,-2)(6,2)
\psKnot[linewidth=3pt,linecolor=cyan!60](0,0){6-3}
\psKnot[linewidth=3pt,linecolor=red!50,
- knotborder=5](4,0){6-3}
+ knotborder=5\pslinewidth](4,0){6-3}
\end{pspicture}
\end{LTXexample}
+\section{\nxLcs{psBorromean}}
+
+The macro \Lcs{psBorromean} draws the so called Borromean rings.
+It has one optional and three mandatory arguments, the origin
+of the image, the inner and outer radius. The following list shows all available knot types.
+
+\begin{BDef}
+\Lcs{psBorromean}\OptArgs\Largr{\CAny}\Largb{circle radius}\Largb{inner radius}
+\end{BDef}
+
+
+\begin{LTXexample}
+\begin{pspicture}[showgrid=true](-2,-3)(10,4)
+ \psBorromean(0,0){1cm}{1cm}
+ \psBorromean[linewidth=8pt,knotborder=2\pslinewidth,
+ bmcolor={blue,yellow,magenta}](6,0){2cm}{1.5cm}
+\end{pspicture}
+\end{LTXexample}
+
+
\clearpage
\section{List of all optional arguments for \nxLPack{pst-knot}}
diff --git a/Master/texmf-dist/dvips/pst-knot/pst-psm.pro b/Master/texmf-dist/dvips/pst-knot/pst-psm.pro
index de68cc2a60d..184c6ff016e 100644
--- a/Master/texmf-dist/dvips/pst-knot/pst-psm.pro
+++ b/Master/texmf-dist/dvips/pst-knot/pst-psm.pro
@@ -1,5 +1,5 @@
%% psMath.pro (c) Aug 28, 1996 Matthias T. Kromann
-%% version 0.01 2009/11/07 changes to knot subroutines
+%% version 0.02 2009/11/08 changes to knot subroutines
%% (hv)
/tx@KnotDict 11 dict def
tx@KnotDict begin
@@ -1151,7 +1151,7 @@ end
xmin xmax ymin ymax
} 7 ldef
%
-/knot-bgcolour 1 def
+/knot-bgcolour { 1 setgray } def
/knot-bgline {currentlinewidth 5 mul setlinewidth} def
/knot-line {1 setlinewidth} def
/chequer-line 0 def
@@ -1265,7 +1265,7 @@ end
/lowerlayer xdef
/layer xdef
layer splinestroke
- gsave knot-bgcolour setgray knot-bgline upperlayer msplinestroke grestore
+ gsave knot-bgcolour knot-bgline upperlayer msplinestroke grestore
upperlayer msplinestroke
} 3 ldef
/knot{
diff --git a/Master/texmf-dist/source/generic/pst-knot/Makefile b/Master/texmf-dist/source/generic/pst-knot/Makefile
deleted file mode 100644
index fec35e5e0cf..00000000000
--- a/Master/texmf-dist/source/generic/pst-knot/Makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-
-# `Makefile' for `pst-coil.pdf', hv, 2006/08/11
-
-.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps
-
-PACKAGE = pst-knot
-
-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 .blg .bbl .glg .glo .gls .ilg .idx .ind .tmp .toc .out )
- $(RM) $(addprefix $(MAIN), .dvi .ps)
-
-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 *.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/tex/generic/pst-knot/pst-knot.tex b/Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex
index ea222af4b4c..bf8a8d8ffd4 100644
--- a/Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex
+++ b/Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex
@@ -25,35 +25,81 @@
% interface to the `xkeyval' package
\pst@addfams{pst-knot}
-\def\fileversion{0.01}
-\def\filedate{2009/11/07}
+\def\fileversion{0.02}
+\def\filedate{2009/11/08}
\message{`PST-knot' v\fileversion, \filedate\space (hv)}
%
\SpecialCoor
\pstheader{pst-psm.pro}
%
-\define@key[psset]{pst-knot}{knotborder}[2]{\def\psk@knot@border{#1 }}
-\define@key[psset]{pst-knot}{knotbgcolor}[1]{\def\psk@knot@bgcolor{#1 }}
+\newdimen\psk@knot@border
+\define@key[psset]{pst-knot}{knotborder}[2]{\pssetlength\psk@knot@border{#1}}
+\define@key[psset]{pst-knot}{knotbgcolor}[1]{\pst@getcolor{#1}\psk@knot@bgcolor}
\define@key[psset]{pst-knot}{knotscale}[1 1]{\pst@getscale{#1}\psk@knot@scale}
-\psset[pst-knot]{knotborder=2,knotbgcolor=1,knotscale=1}
+\psset[pst-knot]{knotborder=5\pslinewidth,knotbgcolor=white,knotscale=1}
%
\def\psKnot{\def\pst@par{}\pst@object{psKnot}}
\def\psKnot@i(#1)#2{\expandafter\psKnot@ii(#1)#2}
\def\psKnot@ii(#1)#2-#3{%
\addto@par{border=.5\pslinewidth}%
\begin@ClosedObj%
+ \pst@getcolor{\pslinecolor}\psk@linecolor%
\pst@getcoor{#1}\pst@tempA%
\addto@pscode{
\pst@tempA\space moveto
tx@KnotDict begin
PSMinit
- /rgb {} def /gray {} def /cmyk {} def
- \pst@number\pslinewidth SLW
- \pst@usecolor\pslinecolor
\psk@knot@scale
- /knot-bgline { CLW \psk@knot@border mul SLW } def
- /knot-bgcolour \psk@knot@bgcolor def
+ \pst@number\pslinewidth SLW
+ \pst@usecolor\psk@linecolor
+ /knot-bgline { CLW \pst@number\psk@knot@border add SLW } def
+ /knot-bgcolour { \pst@usecolor\psk@knot@bgcolor } def
knot-#2-#3 \ifnum#2=0 \else knot \fi
+ PSMclose
+ end
+ }%
+ \end@ClosedObj}
+%
+\define@key[psset]{pst-knot}{bmcolor}{\expandafter\pst@borromean@color#1,\@nil}
+\def\pst@borromean@color#1,#2,#3,\@nil{%
+ \pst@getcolor{#1}\psk@borromean@colorA%
+ \pst@getcolor{#2}\psk@borromean@colorB%
+ \pst@getcolor{#3}\psk@borromean@colorC%
+}
+\psset[pst-knot]{bmcolor={red,green,blue}}
+%
+\def\psBorromean{\def\pst@par{}\pst@object{psBorromean}}
+\def\psBorromean@i(#1)#2#3{%
+% \addbefore@par{knotborder=3}%
+ \begin@ClosedObj%
+ \pst@getcoor{#1}\pst@tempA%
+ \pst@getcolor{\pslinecolor}\psk@linecolor%
+ \pssetlength\pst@dima{#2}%
+ \pssetlength\pst@dimb{#3}%
+ \addto@pscode{
+ tx@KnotDict begin
+ PSMinit
+ \pst@tempA\space translate
+ \psk@knot@scale
+ /rgb {} def /gray {} def /cmyk {} def
+ \pst@number\pslinewidth SLW
+ \pst@usecolor\psk@linecolor
+ /r \pst@number\pst@dima def % circle radius
+ /R \pst@number\pst@dimb def % inner circle radius
+ /c1 [R 90] p2r def
+ /c2 [R 210] p2r def
+ /c3 [R 330] p2r def
+ /knot-bgline { CLW \pst@number\psk@knot@border add SLW } def
+ /knot-bgcolour {\pst@usecolor\psk@knot@bgcolor} def
+ /stroke-shaded {
+ gsave knot-bgline knot-bgcolour stroke grestore stroke
+ } def
+ c1 r circle \pst@usecolor\psk@borromean@colorA stroke
+ c2 r circle \pst@usecolor\psk@borromean@colorB stroke-shaded
+ c3 r circle \pst@usecolor\psk@borromean@colorC stroke-shaded
+ c1 r -30 30 arc \pst@usecolor\psk@borromean@colorA stroke-shaded
+ c1 r -150 -90 arc stroke-shaded
+ PSMclose
end
}%
\end@ClosedObj}