From 2b4e42b51b5b1ffa51fe48a70eb10517e3b70d99 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 12 Aug 2011 23:13:08 +0000 Subject: pst-eucl (11aug11) git-svn-id: svn://tug.org/texlive/trunk@23521 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/generic/pst-eucl/pst-eucl.tex | 147 ++++++++++++--------- 1 file changed, 87 insertions(+), 60 deletions(-) (limited to 'Master/texmf-dist/tex/generic/pst-eucl') diff --git a/Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex b/Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex index df1b8481418..fafcfa61f22 100644 --- a/Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex +++ b/Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex @@ -1,35 +1,32 @@ -%% $Id: pst-eucl.tex 467 2011-03-01 21:04:36Z herbert $ -%% -%% This is file `pst-eucl.tex', -%% -%% IMPORTANT NOTICE: -%% -%% Package `pst-eucl.tex' -%% -%% Dominique RODRIGUEZ -%% with contributions of Herbert Voss + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% pst-eucl.tex --- Generation of geometric figures in euclidean geometry %% Copyright 2000-2011 Dominique RODRIGUEZ %% %% 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-eucl' is a PSTricks package to draw geometric figures in euclidean geometry, +%% of the LaTeX Project Public License Distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. %% +%% Author : Dominique RODRIGUEZ (EN) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Require PSTricks and pst-node packages +\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 +\def\fileversion{1.38} +\def\filedate{2011/08/07}% +%% 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. +\message{`PST-Euclide v\fileversion, \filedate\space (Dominique RODRIGUEZ)}% +\message{ This version uses the pst-xkey package for managing parameters}% +\message{ Please read the doc, some macros have a new syntax}% +\message{ use option old for upward compatibility}% \csname PSTEuclideLoaded\endcsname \let\PSTEuclideLoaded\endinput -\ifx\PSTricksLoaded\endinput\else \input pstricks.tex\fi -\ifx\PSTnodeLoaded\endinput\else \input pst-node.tex\fi -\ifx\PSTMultidoLoaded\endinput\else \input multido.tex\fi -\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi -% -\def\fileversion{1.37} -\def\filedate{2011/05/05}% -\message{`PST-Euclide v\fileversion, \filedate\space (DR)}% %% prologue for postcript \pstheader{pst-eucl.pro}% % interface to the `xkeyval' package +\input pst-xkey.tex \pst@addfams{pst-eucl} \edef\PstAtCode{\the\catcode`\@}% \catcode`\@=11\relax @@ -355,9 +352,16 @@ end}% %% #2 #3 #4 -> 3 nodes for defining the angle %% #5 -> label \def\pstMarkAngle{\@ifnextchar[\Pst@MarkAngle{\Pst@MarkAngle[]}}% +%\def\pstMarkAngle{\@ifnextchar[\Pst@MarkAngle@i{\Pst@MarkAngle@i[]}}% +%\def\Pst@MarkAngle@i[#1]{\@ifnextchar+{\Pst@MarkAngle@ii[#1]}{\Pst@MarkAngle@iii[#1]}}% +%\def\Pst@MarkAngle@ii[#1]+#2#3#4#5{% +% %% here we should check the angle size for right angles +% +%} +%\def\Pst@MarkAngle@iii[#1]#2#3#4#5{% \def\Pst@MarkAngle[#1]#2#3#4#5{% - \begingroup\ifx\relax#1\relax\else\psset{#1}\fi% % Affectation of local parameters + \bgroup\psset{#1}% % Affectation of local parameters %\rput(#3){\psarc(0,0){\psk@MarkAngleRadius}{(#2)}{(#4)}}% %\rput[\psk@LabelRefPt]% % {*0}([nodesep=\psk@LabelSep, angle= \psk@LabelAngle]#3){#5}% @@ -367,21 +371,17 @@ end}% (!tx@EcldDict begin /N@#4 GetNode exch Atan /N@#2 GetNode exch Atan end 2 copy lt { exch 360 sub exch } if add 2 div \psk@LabelAngleOffset\space add \psk@LabelSep\space exch PtoC){#5} + %%begin modif alaindelplanque 11/2003 + \ifx\psk@MarkAngle\@undef\psset{MarkAngle=90}\fi \ifx\psk@Mark\@undef\else - \rput{! tx@EcldDict begin - /N@#4 GetNode /N@#3 GetNode ABVect exch atan %dup == - /N@#2 GetNode /N@#3 GetNode ABVect exch atan %dup == - end - 2 copy lt \pslbrace exch 360 sub \psrbrace if - add 2 div cvi 90 mod 45 sub - }(!\psk@MarkAngleRadius\space tx@EcldDict begin - /N@#4 GetNode /N@#3 GetNode ABVect exch atan %dup == - /N@#2 GetNode /N@#3 GetNode ABVect exch atan %dup == - end - 2 copy lt { exch 360 sub } if - add 2 div PtoC ){\csname\psk@Mark\endcsname} + \rput{!tx@EcldDict begin + /N@#3 GetNode /N@#4 GetNode ABVect Atan + /N@#3 GetNode /N@#2 GetNode ABVect Atan + end 2 copy lt \pslbrace exch 360 sub exch \psrbrace if add 2 div 90 add} + (0,0){\rput{-90}(\psk@MarkAngleRadius,0){\csname\psk@Mark\endcsname}} \fi} - \endgroup% + %%end modif alaindelplanque 11/2003 + \egroup% }% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% #2 #4 #6 -> coordinates for nodes @@ -910,11 +910,14 @@ end}% \def\pstInterLL{\@ifnextchar[\Pst@InterLL{\Pst@InterLL[]}}% \def\Pst@InterLL[#1]#2#3#4#5#6{% \bgroup\psset{#1}% % Affectation of local parameters - \rput(! + \pnode(! tx@EcldDict begin /N@#2 GetNode /N@#3 GetNode /N@#4 GetNode /N@#5 GetNode InterLines end - \pst@number\psyunit div exch \pst@number\psxunit div exch){\pnode{#6}}% + \pst@number\psyunit div exch \pst@number\psxunit div exch + 2 copy + /#6.Y exch def /#6.X exch def % save the coors for futher use + ){#6}% \Pst@geonodelabel{#6}% \egroup% }% @@ -930,7 +933,7 @@ end}% \def\Pst@InterLC[#1]#2#3#4#5#6#7{% \bgroup\psset{#1}% % Affectation of local parameters \rput(#4){% - \rput(! + \pnode(! tx@EcldDict begin /N@#2 GetNode /N@#3 GetNode 4 copy EqDr \ifx\psk@Radius\@none @@ -942,7 +945,9 @@ end}% \fi InterLineCircle /Glby exch def /Glbx exch def \pst@number\psyunit div exch \pst@number\psxunit div exch - end){\pnode{#6}}% + 2 copy end + /#6.Y exch def /#6.X exch def % save the coors for futher use + ){#6}% \rput(! tx@EcldDict begin Glbx \pst@number\psxunit div Glby \pst@number\psyunit div @@ -967,7 +972,7 @@ end}% \def\pstInterCC{\@ifnextchar[\Pst@InterCC{\Pst@InterCC[]}}% \def\Pst@InterCC[#1]#2#3#4#5#6#7{% \bgroup\psset{#1}% % Affectation of local parameters - \rput(#2){% + \pnode(#2){% \rput(! tx@EcldDict begin \ifx\psk@RadiusA\@undef @@ -1000,13 +1005,15 @@ end}% exch Atan dup /xoC exch def Rotate /Glby exch def /Glbx exch def xoC Rotate end - \pst@number\psyunit div exch \pst@number\psxunit div exch) - {\pnode{#6}}% - \rput(! + \pst@number\psyunit div exch \pst@number\psxunit div exch + 2 copy + /#6.Y exch def /#6.X exch def % save the coors for futher use + ){#6}% + \pnode(! tx@EcldDict begin Glbx \pst@number\psxunit div Glby \pst@number\psyunit div end)% - {\pnode{#7}}% + {#7}% }% \bgroup\ifx\psk@PosAngleA\@undef\else\psset{PosAngle=\psk@PosAngleA}\fi \ifx\psk@PointSymbolA\@undef\else\psset{PointSymbol=\psk@PointSymbolA}\fi @@ -1036,10 +1043,16 @@ end}% \def\pstInterFF{\@ifnextchar[\Pst@InterFF{\Pst@InterFF[]}}% \def\Pst@InterFF[#1]#2#3#4#5{% \bgroup\psset{#1}% % Affectation of local parameters - \rput(! - tx@EcldDict begin - #4 { #3 } { #2 } NewtonSolving pop - end){\pnode{#5}}% +% \rput(! +% tx@EcldDict begin +% #4 { #3 } { #2 } NewtonSolving pop +% end){\pnode{#5}}% + \pnode(! + tx@EcldDict begin + #4 { #3 } { #2 } NewtonSolving pop + 2 copy end + /#5.Y exch def /#5.X exch def % save the coors for futher use + ){#5}% \Pst@geonodelabel{#5}% \egroup% } @@ -1051,12 +1064,19 @@ end}% \def\pstInterFL{\@ifnextchar[\Pst@InterFL{\Pst@InterFL[]}}% \def\Pst@InterFL[#1]#2#3#4#5#6{% \bgroup\psset{#1}% % Affectation of local parameters - \rput(! - tx@EcldDict begin +% \rput(! +% tx@EcldDict begin +% #5 { /N@#3 GetNode /N@#4 GetNode EqDr 1 index div +% \pst@number\psxunit div 3 1 roll div x mul add } { #2 } +% NewtonSolving pop +% end){\pnode{#6}}% + \pnode(! + tx@EcldDict begin #5 { /N@#3 GetNode /N@#4 GetNode EqDr 1 index div - \pst@number\psxunit div 3 1 roll div x mul add } { #2 } - NewtonSolving pop - end){\pnode{#6}}% + \pst@number\psxunit div 3 1 roll div x mul add } { #2 } + NewtonSolving pop 2 copy end + /#5.Y exch def /#5.X exch def % save the coors for futher use + ){#6}% \Pst@geonodelabel{#6}% \egroup% } @@ -1068,12 +1088,19 @@ end}% \def\pstInterFC{\@ifnextchar[\Pst@InterFC{\Pst@InterFC[]}}% \def\Pst@InterFC[#1]#2#3#4#5#6{% \bgroup\psset{#1}% % Affectation of local parameters - \rput(! - tx@EcldDict begin +% \rput(! +% tx@EcldDict begin +% #5 { /N@#3 GetNode 2 copy /N@#4 GetNode ABDist \pst@number\psxunit div +% 3 1 roll \pst@number\psyunit div exch \pst@number\psxunit div exch x #2 ABDist sub } { 0 } NewtonSolving pop +% pop dup /x exch def #2 +% end){\pnode{#6}}% + \pnode(! + tx@EcldDict begin #5 { /N@#3 GetNode 2 copy /N@#4 GetNode ABDist \pst@number\psxunit div - 3 1 roll \pst@number\psyunit div exch \pst@number\psxunit div exch x #2 ABDist sub } { 0 } NewtonSolving pop - pop dup /x exch def #2 - end){\pnode{#6}}% + 3 1 roll \pst@number\psyunit div exch \pst@number\psxunit div exch x #2 ABDist sub } { 0 } NewtonSolving pop + pop dup /x exch def #2 2 copy end + /#5.Y exch def /#5.X exch def % save the coors for futher use + ){#6}% \Pst@geonodelabel{#6}% \egroup% } -- cgit v1.2.3