diff options
author | Karl Berry <karl@freefriends.org> | 2011-02-24 23:36:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-02-24 23:36:18 +0000 |
commit | 2a886fbce3b9f2ed32e02e952d4b300e6e3dd7b4 (patch) | |
tree | 1e795c05f0261278a6d0889ad79c977485ec6e5c /Master/texmf-dist/doc/latex/pstricks-examples/36-00-116.ltx | |
parent | 9b3b61b4613379d47f4dc1700f76efc1c1dbfced (diff) |
new german doc pstricks examples (23feb11)
git-svn-id: svn://tug.org/texlive/trunk@21511 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/pstricks-examples/36-00-116.ltx')
-rw-r--r-- | Master/texmf-dist/doc/latex/pstricks-examples/36-00-116.ltx | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pstricks-examples/36-00-116.ltx b/Master/texmf-dist/doc/latex/pstricks-examples/36-00-116.ltx new file mode 100644 index 00000000000..fd26a03c23c --- /dev/null +++ b/Master/texmf-dist/doc/latex/pstricks-examples/36-00-116.ltx @@ -0,0 +1,104 @@ +%% +%% Ein Beispiel der DANTE-Edition +%% +%% +%% Copyright (C) 2010 Herbert Voss +%% +%% It may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% +%% See http://www.latex-project.org/lppl.txt for details. +%% +%% +%% ==== +% Show page(s) 1 +%% +\documentclass[]{exaarticle} +\pagestyle{empty} +\setlength\textwidth{352.81416pt} +\StartShownPreambleCommands +\usepackage{pstricks} +\parindent=0pt +\makeatletter +\def\@nameedef#1{\expandafter\edef\csname#1\endcsname} +\newrgbcolor{jaunesale}{1.00 0.90 0.50} +\newpsstyle{corde}{doubleline=true, + doublecolor=jaunesale, linewidth=1pt, + doublesep=4pt} +\newpsobject{entier}{psccurve}{style=corde} +\newpsobject{partie}{psecurve}{style=corde} + +\newcount\n@eudmax + +\def\noeud{% + \count@=0 + \n@eud +} +\def\n@eud{% + \@ifnextchar+{\n@eudp}{\@ifnextchar({\n@eudm}{\n@@ud}}% +} +\def\n@eudp+(#1){% + \@namedef{noeud\the\count@}{(#1)}% + \@namedef{pos\the\count@}{+}% + \advance\count@\@ne + \n@eud +} +\def\n@eudm(#1){% + \@namedef{noeud\the\count@}{(#1)}% + \@namedef{pos\the\count@}{-}% + \advance\count@\@ne + \n@eud +} +\def\n@@ud{% + \n@eudmax=\count@ + \advance\count@-1 + \@nameedef{noeud-1}{\csname noeud\the\count@\endcsname}% + \@nameedef{pos-1}{\csname pos\the\count@\endcsname}% + \advance\count@\m@ne + \@nameedef{noeud-2}{\csname noeud\the\count@\endcsname}% + \@nameedef{pos-2}{\csname pos\the\count@\endcsname}% + \advance\count@2 + \@nameedef{noeud\the\count@}{\csname noeud0\endcsname}% + \@nameedef{pos\the\count@}{\csname pos0\endcsname}% + \advance\count@\@ne + \@nameedef{noeud\the\count@}{\csname noeud1\endcsname}% + \@nameedef{pos\the\count@}{\csname pos1\endcsname}% + \count@=0 + \def\chemin{}% + \loop + \edef\chemin{\chemin\csname noeud\the\count@\endcsname}% + \advance\count@\@ne + \ifnum\count@<\n@eudmax + \repeat + \expandafter\entier\chemin + \count@=0 + \loop + \if\@nameuse{pos\the\count@}+\relax + \advance\count@-2 + \edef\chemin{\csname noeud\the\count@\endcsname}% + \advance\count@\@ne + \edef\chemin{\chemin\csname noeud\the\count@\endcsname}% + \advance\count@\@ne + \edef\chemin{\chemin\csname noeud\the\count@\endcsname}% + \advance\count@\@ne + \edef\chemin{\chemin\csname noeud\the\count@\endcsname}% + \advance\count@\@ne + \edef\chemin{\chemin\csname noeud\the\count@\endcsname}% + \advance\count@-2 + \expandafter\partie\chemin + \fi + \advance\count@\@ne + \ifnum\count@<\n@eudmax + \repeat +} +\makeatother + +\StopShownPreambleCommands +\begin{document} +\begin{pspicture}(0,0)(7,5) + \noeud(0,2)(1,0)+(3,1)(3.1,1.4)(3.2,1.8)(3,3)(3,4)(4,5)+(5,4)(4,2) + +(3.2,1.8)(2,2)(1,1)(3,1)(4,1)(5,0)(6,0)(7,2)(6,4)(5,4)(4,3) + +(3,4)(2,4)(1,3) +\end{pspicture} +\end{document} |