summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-11-13 14:30:47 +0000
committerKarl Berry <karl@freefriends.org>2009-11-13 14:30:47 +0000
commit6b6e76c3af4749246c999e2c6c6166a437c5d9cb (patch)
treec4b3f869163634e91c31c7961f3e2d028d462d38 /Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex
parentad927497ce54afc88641e38d368c1130a198f40a (diff)
new pstricks package pst-knot 0.2 (12nov09)
git-svn-id: svn://tug.org/texlive/trunk@16000 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex65
1 files changed, 65 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex b/Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex
new file mode 100644
index 00000000000..ea222af4b4c
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pst-knot/pst-knot.tex
@@ -0,0 +1,65 @@
+%%
+%% This is file `pst-knot.tex',
+%%
+%% IMPORTANT NOTICE:
+%%
+%% Package `pst-knot.tex'
+%%
+%% Herbert Voss <herbert -> dante.de>
+%%
+%% 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-knot' is a PSTricks package for knot macros
+%%
+%%
+\csname PSTknotLoaded\endcsname
+\let\PSTknotLoaded\endinput
+% Requires PSTricks
+\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
+\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey.tex \fi
+%
+\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
+% interface to the `xkeyval' package
+\pst@addfams{pst-knot}
+
+\def\fileversion{0.01}
+\def\filedate{2009/11/07}
+\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 }}
+\define@key[psset]{pst-knot}{knotscale}[1 1]{\pst@getscale{#1}\psk@knot@scale}
+\psset[pst-knot]{knotborder=2,knotbgcolor=1,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@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
+ knot-#2-#3 \ifnum#2=0 \else knot \fi
+ end
+ }%
+ \end@ClosedObj}
+%
+\catcode`\@=\PstAtCode\relax
+%
+%% END: pst-knot.tex
+\endinput
+%