diff options
author | Karl Berry <karl@freefriends.org> | 2019-01-27 22:47:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-01-27 22:47:47 +0000 |
commit | 613cf530a8259bbf9d70db56711dfea9f0461496 (patch) | |
tree | ffd8f1f8d9a4408b59db64ba230bdfcb1ea9e99c /Master/texmf-dist/tex | |
parent | 8e627b933f0617923284400b0b9ca2731973a690 (diff) |
pst-eucl (27jan19)
git-svn-id: svn://tug.org/texlive/trunk@49836 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex | 140 |
1 files changed, 78 insertions, 62 deletions
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 7c4b724f697..dd33826b9e1 100644 --- a/Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex +++ b/Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex @@ -19,17 +19,10 @@ \csname PSTEuclideLoaded\endcsname \let\PSTEuclideLoaded\endinput % -\def\fileversion{1.61} -\def\filedate{2018/12/11} -%% -%% 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. +\def\fileversion{1.63} +\def\filedate{2019/01/27} %% \message{`PST-Euclide v\fileversion, \filedate\space (dr,hv)}% -\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}% %% prologue for postcript \pstheader{pst-eucl.pro}% \edef\PstAtCode{\the\catcode`\@}% @@ -38,16 +31,21 @@ % Definition of the parameters % ---------------------------- % symbol used for the point -\define@key[psset]{pst-eucl}{PointSymbol}[*]{\def\psk@PointSymbol{#1}}% -\define@key[psset]{pst-eucl}{PointSymbolA}[*]{\edef\psk@PointSymbolA{#1}}% -\define@key[psset]{pst-eucl}{PointSymbolB}[*]{\edef\psk@PointSymbolB{#1}}% -\define@key[psset]{pst-eucl}{PointSymbolC}[*]{\edef\psk@PointSymbolC{#1}}% +\define@key[psset]{pst-eucl}{PointSymbol}[*]{% + \def\psk@PointSymbol{#1}% + \def\psk@PointSymbolA{#1}% + \def\psk@PointSymbolB{#1}% + \def\psk@PointSymbolC{#1}% +}% +\define@key[psset]{pst-eucl}{PointSymbolA}[*]{\def\psk@PointSymbolA{#1}}% +\define@key[psset]{pst-eucl}{PointSymbolB}[*]{\def\psk@PointSymbolB{#1}}% +\define@key[psset]{pst-eucl}{PointSymbolC}[*]{\def\psk@PointSymbolC{#1}}% % name used for the point \define@key[psset]{pst-eucl}{PointName}[default]{\def\psk@PointName{#1}}% -\define@key[psset]{pst-eucl}{PointNameA}[undef]{\edef\psk@PointNameA{#1}}% -\define@key[psset]{pst-eucl}{PointNameB}[undef]{\edef\psk@PointNameB{#1}}% -\define@key[psset]{pst-eucl}{PointNameC}[undef]{\edef\psk@PointNameC{#1}}% +\define@key[psset]{pst-eucl}{PointNameA}[undef]{\def\psk@PointNameA{#1}}% +\define@key[psset]{pst-eucl}{PointNameB}[undef]{\def\psk@PointNameB{#1}}% +\define@key[psset]{pst-eucl}{PointNameC}[undef]{\def\psk@PointNameC{#1}}% % use math mode in point name \newif\ifPst@PtNameMath% \define@key[psset]{pst-eucl}{PtNameMath}[false]{\@nameuse{Pst@PtNameMath#1}}% @@ -149,7 +147,7 @@ % -------------- \def\resetEUCLvalues{% \psset[pst-eucl]{% - PointSymbol=*, PointSymbolA=*, PointSymbolB=*, PointSymbolC=*, + PointSymbol=*, %PointSymbolA=*, PointSymbolB=*, PointSymbolC=*, PointName=default, PointNameA=undef, PointNameB=undef, PointNameC=undef, PtNameMath=true, PointNameMathSize=\textstyle, PointNameSize=\normalsize, PointNameSep=default, PosAngle=undef, @@ -182,10 +180,10 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % create a curve after a points list \def\pst@MngTransformCurve{%DR 25032005 - \ifx\psk@CurveType\@none\else% - \ifx\psk@CurveType\@polygon\expandafter\pspolygon\@@GenCourbe\else% - \ifx\psk@CurveType\@polyline\expandafter\psline\@@GenCourbe\else% - \ifx\psk@CurveType\@curve\expandafter\pscurve\@@GenCourbe% + \ifx\psk@CurveType\@none\else + \ifx\psk@CurveType\@polygon\expandafter\pspolygon\@@GenCourbe\else + \ifx\psk@CurveType\@polyline\expandafter\psline\@@GenCourbe\else + \ifx\psk@CurveType\@curve\expandafter\pscurve\@@GenCourbe \fi\fi\fi\fi}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % macros for managing a list of parameters @@ -200,12 +198,13 @@ %% end DR 2005/04/10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\@InitListMng{% - \def\LastValidPN{default}\def\LastValidPNS{default}\def\LastValidPA{undef}\def\LastValidPS{default}} -%%begin modif alaindelplanque 11/2003 (VALID) + \def\LastValidPN{default}\def\LastValidPNS{default}\def\LastValidPA{undef}\def\LastValidPS{undef}} %% car(liste) -- param1,param2,... -> param1 \def\PstParamListFirst#1,#2/{#1} %% cdr(liste) -- param1,param2,... -> param2,... + \def\PstParamListLasts#1,#2/{#2} + \def\Pst@ManageParamList#1{%DR 02092004 #1->point node name \edef\OldPointName{\psk@PointName}% \edef\psk@PointName{\expandafter\PstParamListFirst\OldPointName,undef/}% @@ -232,16 +231,17 @@ \def\pstGeonode{\@ifnextchar[\Pst@Geonode{\Pst@Geonode[]}} \def\Pst@Geonode[#1]{\@ifnextchar({\Pst@Geonode@i[#1]}{\Pst@Geonode@i[#1](0,0)}} \def\Pst@Geonode@i[#1]{% - \begingroup% + \begingroup \@InitListMng% DR 22032005 - \edef\@@GenCourbe{}%%for accumulating points% DR 22032005 - \psset{#1}\Pst@Geonode@ii} + \xdef\@@GenCourbe{}%%for accumulating points% DR 22032005 + \psset{#1}% + \Pst@Geonode@ii} \def\Pst@Geonode@ii(#1)#2{% \pnode(#1){#2} \xdef\@@GenCourbe{\@@GenCourbe(#2)}%%for accumulating points% DR 22032005 \Pst@ManageParamList{#2}% \@ifnextchar(\Pst@Geonode@ii{\pst@MngTransformCurve\endgroup}}% DR 22032005 -%%end modif alaindelplanque 11/2003 (VALID) + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% create a point with an associated node, in a new %% landmark @@ -392,22 +392,37 @@ \def\pstRightAngle{\pst@object{pstRightAngle}} \def\pstRightAngle@i#1#2#3{% \begingroup - \addbefore@par{dotscale=1}%linestyle=solid,linecolor=black,linewidth=\pslinewidth} + \addbefore@par{dimen=inner,dotscale=1}%linestyle=solid,linecolor=black,linewidth=\pslinewidth} \use@par% % Affectation of local parameters %% not good at all, but \rput{0}(#3){\rput{(#2)}{stuff}} doesn't work... \rput(#2){% - \ifx\psk@RightAngleType\@default% - \psline(!tx@EcldDict begin /N@#1 GetNode exch Atan - \psk@RightAngleSize\space exch PtoC end)% + \ifx\psk@RightAngleType\@default + \ifx\psk@fillstylename\@none\else + \pspolygon[linestyle=none,dimen=inner](0,0)(!tx@EcldDict begin /N@#1 GetNode exch Atan \psk@RightAngleSize\space exch PtoC end)% + (!tx@EcldDict begin /N@#1 GetNode exch Atan \psk@RightAngleSize\space exch PtoC end)% (!tx@EcldDict begin /N@#1 GetNode exch Atan /AngleNo1 ED tx@EcldDict begin /N@#3 GetNode exch Atan /AngleNo3 ED AngleNo1 AngleNo3 sub abs 180 gt { /Diff -45 def }{ /Diff 45 def } ifelse AngleNo1 AngleNo3 gt { AngleNo1 Diff sub }{ AngleNo3 Diff sub } ifelse \psk@RightAngleSize\space 2 sqrt mul exch PtoC end)% - (!tx@EcldDict begin /N@#3 GetNode exch Atan - \psk@RightAngleSize\space exch PtoC end)% + (!tx@EcldDict begin /N@#3 GetNode exch Atan \psk@RightAngleSize\space exch PtoC end)% + \fi + \psline[fillstyle=none](!tx@EcldDict begin /N@#1 GetNode exch Atan \psk@RightAngleSize\space exch PtoC end)% + (!tx@EcldDict begin /N@#1 GetNode exch Atan \psk@RightAngleSize\space exch PtoC end)% + (!tx@EcldDict begin /N@#1 GetNode exch Atan /AngleNo1 ED + tx@EcldDict begin /N@#3 GetNode exch Atan /AngleNo3 ED + AngleNo1 AngleNo3 sub abs 180 gt { /Diff -45 def }{ /Diff 45 def } ifelse + AngleNo1 AngleNo3 gt { AngleNo1 Diff sub }{ AngleNo3 Diff sub } ifelse + \psk@RightAngleSize\space 2 sqrt mul exch PtoC end)% + (!tx@EcldDict begin /N@#3 GetNode exch Atan \psk@RightAngleSize\space exch PtoC end)% \else \ifx\psk@RightAngleType\@german +% \ifx\psk@fillstylename\@none\else +% \pscustom[linestyle=none,dimen=inner]{\psline(0,0) +% \pstMarkAngle[MarkAngleRadius=\psk@RightAngleSize,LabelSep=\psk@RightAngleSize\space .5 mul]{#1}{#2}{#3}{}% +% \psline(0,0) +% } +% \fi \pstMarkAngle[MarkAngleRadius=\psk@RightAngleSize,LabelSep=\psk@RightAngleSize\space .5 mul]{#1}{#2}{#3}% {\psscalebox{\psk@RightAngleSize}{\pscircle*{!.08 \psk@xdotscale\space mul}}}% \else @@ -416,7 +431,6 @@ (!tx@EcldDict begin /N@#3 GetNode exch Atan /N@#1 GetNode exch Atan 2 copy lt { exch 360 sub exch } if add 2 div .45 \psk@RightAngleSize\space mul exch PtoC end)% {\psscalebox{\psk@RightAngleSize}{\pscircle*{.08}}}% -% \pspolygon(0,0)% \psline(0,0)% (!tx@EcldDict begin /N@#3 GetNode exch Atan \psk@RightAngleSize\space exch PtoC end )% (!tx@EcldDict begin /N@#1 GetNode exch Atan \psk@RightAngleSize\space exch PtoC end )% @@ -437,7 +451,14 @@ \psset{%MarkAngle=0, #1}% \rput(#3){% - \psarc(0,0){\psk@MarkAngleRadius}{(#2)}{(#4)}% + \ifx\psk@fillstylename\@none\else + \pscustom[linestyle=none,linewidth=0.01pt,arrows=-]{% + \psline(0,0) + \psarc(0,0){\psk@MarkAngleRadius}{(#2)}{(#4)} + \psline(0,0) + } + \fi + \psarc[fillstyle=none](0,0){\psk@MarkAngleRadius}{(#2)}{(#4)}% \rput[\psk@LabelRefPt]{*0}(! tx@EcldDict begin /N@#4 GetNode exch Atan /N@#2 GetNode exch Atan end 2 copy lt { exch 360 sub exch } if @@ -459,26 +480,20 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% #2 #4 #6 -> coordinates for nodes %% #3 #5 #7 -> nodes name -\def\pstTriangle{\@ifnextchar[\Pst@Triangle{\Pst@Triangle[]}}% -\def\Pst@Triangle[#1]{%NEW DR 14112001 (for default (0,0) coordinates) - \def\pst@par{#1}% - \@ifnextchar(\Pst@Trianglei{\Pst@Trianglei(0,0)}}% -\def\Pst@Trianglei(#1)#2(#3)#4(#5)#6{% - %\pst@killglue% <------------------------------------------------- hv - DR 050315 - \bgroup - \pst@killglue% <------------------------------------------- DR 050315 +\def\pstTriangle{\pst@object{pstTriangle}}% +\def\pstTriangle@i{\@ifnextchar(\pstTriangle@ii{\pstTriangle@ii(0,0)}}% +\def\pstTriangle@ii(#1)#2(#3)#4(#5)#6{% + \pst@killglue %%begin modif alaindelplanque 11/2003 - \pst@@getcoor{#1}\xdef\@@coordi{\pst@coor}%% A<------------------ hv - \pst@@getcoor{#3}\xdef\@@coordiii{\pst@coor}%% B<------------------ hv - \pst@@getcoor{#5}\xdef\@@coordv{\pst@coor}%% C<- ---------------- hv + \pst@getcoor{#1}\@@coordi + \pst@getcoor{#3}\@@coordiii + \pst@getcoor{#5}\@@coordv \pstVerb{ \@@coordi\space\@@coordiii\space exch 4 1 roll \@@coordv\space exch 6 1 roll % x x x y y y add add 3 div /YS exch def add add 3 div /XS exch def - } - %%end modif alaindelplanque 11/2003 - %\bgroup\use@par% % Affectation of local parameters<---- DR 050315 - \use@par% % Affectation of local parameters<---- DR 050315 - %%begin modif alaindelplanque 11/2003 + }% + \bgroup + \use@keep@par \bgroup \ifx\psk@PosAngleA\@undef \psset{PosAngleA={! @@ -491,13 +506,13 @@ \else \psset{PosAngle=\psk@PosAngleA} \fi - %%end modif alaindelplanque 11/2003 \ifx\psk@PosAngleA\@undef\else\psset{PosAngle=\psk@PosAngleA}\fi \let\psk@PointSymbol=\psk@PointSymbolA \ifx\psk@PointNameA\@undef\else\psset{PointName=\psk@PointNameA}\fi - \Pst@Geonode@i[](#1){#2}\egroup%%NEW DR 15112001 - %%begin modif alaindelplanque 11/2003 + \Pst@Geonode@i[](#1){#2} + \egroup \bgroup + \use@keep@par \ifx\psk@PosAngleB\@undef \psset{PosAngleB={! /AngleBC \@@coordiii\space\@@coordv\space tx@EcldDict begin ABVect end exch Atan def @@ -508,12 +523,11 @@ \else \psset{PosAngle=\psk@PosAngleB} \fi - %%end modif alaindelplanque 11/2003 \ifx\psk@PosAngleB\@undef\else\psset{PosAngle=\psk@PosAngleB}\fi - \let\PointSymbol=\psk@PointSymbolB + \let\psk@PointSymbol=\psk@PointSymbolB \ifx\psk@PointNameB\@undef\else\psset{PointName=\psk@PointNameB}\fi - \Pst@Geonode@i[](#3){#4}\egroup%%NEW DR 15112001 - %%begin modif alaindelplanque 11/2003 + \Pst@Geonode@i[](#3){#4}% + \egroup \ifx\psk@PosAngleC\@undef \psset{PosAngleC={! /AngleCB \@@coordv\space\@@coordiii\space tx@EcldDict begin ABVect end exch Atan def @@ -521,15 +535,17 @@ AngleCB AngleCA add 2 div dup 1 exch \tx@PtoC exch \@@coordv\space 4 1 roll add 3 1 roll add XS YS Pyth2 \@@coordv\space XS YS Pyth2 le { 180 add } if }}%% <------ hv - \else\psset{PosAngle=\psk@PosAngleC}\fi%% <----------------------- hv - %%end modif alaindelplanque 11/2003 + \else + \psset{PosAngle=\psk@PosAngleC} + \fi \ifx\psk@PosAngleC\@undef\else\psset{PosAngle=\psk@PosAngleC}\fi - \let\PointSymbol=\psk@PointSymbolC + \let\psk@PointSymbol=\psk@PointSymbolC \ifx\psk@PointNameC\@undef\else\psset{PointName=\psk@PointNameC}\fi \Pst@Geonode@i[](#5){#6}%%NEW DR 15112001 \pst@TraceTriangle{#2}{#4}{#6}% - \egroup% + \egroup }% +% \def\pst@TraceTriangle#1#2#3{\pspolygon(#1)(#2)(#3)}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Line, circle, Arc |