summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-28 22:49:15 +0000
committerKarl Berry <karl@freefriends.org>2021-12-28 22:49:15 +0000
commit44536de21976580d6897abaf43eb8cab5ea98dca (patch)
tree5a2323c2fda5578d38e3ffb7299c1717dee595ac /Master/texmf-dist/tex/generic
parent3a8f490ec582c95b7adc117b1f8d3debb60b7f88 (diff)
pst-geometrictools (28dec21)
git-svn-id: svn://tug.org/texlive/trunk@61430 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r--Master/texmf-dist/tex/generic/pst-geometrictools/pst-geometrictools.tex149
1 files changed, 77 insertions, 72 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-geometrictools/pst-geometrictools.tex b/Master/texmf-dist/tex/generic/pst-geometrictools/pst-geometrictools.tex
index cad64e8e3c2..608e29ef560 100644
--- a/Master/texmf-dist/tex/generic/pst-geometrictools/pst-geometrictools.tex
+++ b/Master/texmf-dist/tex/generic/pst-geometrictools/pst-geometrictools.tex
@@ -1,6 +1,7 @@
%% This is file `pst-geometrictools.tex',
%%
%% Thomas Söll
+%% fixes for lualatex by Herbert Voß
%%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License %%
@@ -15,18 +16,17 @@
\csname PSTgeometrictoolsLoaded\endcsname
\let\PSTgeometrictoolsLoaded\endinput
% Requires PSTricks, pst-xkey, pst-node packages
-\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
-\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey.tex\fi
-\ifx\PSTnodeLoaded\endinput\else\input pst-node.tex\fi
-\def\fileversion{1.1}
-\def\filedate{2017/09/16}
+\ifx\PSTricksLoaded\endinput \else\input pstricks.tex\fi
+\ifx\PSTXKeyLoaded\endinput \else\input pst-xkey.tex\fi
+\ifx\PSTEuclideLoaded\endinput\else\input pst-eucl.tex\fi
+\ifx\PSTnodeLoaded\endinput \else\input pst-node.tex\fi
+\def\fileversion{1.3}
+\def\filedate{2021/12/28}
\message{`PST' v\fileversion, \filedate}
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
-
-
\pst@addfams{pst-geometrictools}
-
+%
\define@boolkey[psset]{pst-geometrictools}[Pst@]{Ghost}[true]{}
\define@key[psset]{pst-geometrictools}{ProLineCol}[cyan]{\pst@getcolor{#1}\ProLineCol}
\define@key[psset]{pst-geometrictools}{ProFillCol}[gray!60]{\pst@getcolor{#1}\ProFillCol}
@@ -44,62 +44,60 @@
\def\psProtractor{\def\pst@par{}\pst@object{psProtractor}}
-\def\psProtractor@i#1(#2){\@ifnextchar(%
-{\psProtractor@ii{#1}(#2)}%
-{\psProtractor@ii{#1}(#2)(#2)}}%
+\def\psProtractor@i#1(#2){\@ifnextchar({\psProtractor@ii{#1}(#2)}{\psProtractor@ii{#1}(#2)(#2)}}%
+
\def\psProtractor@ii#1(#2)(#3){%------------------------------- #1 Winkel, #2 Ursprung P, zweiter Punkt Q für Winkel
-\begin@SpecialObj
-\pst@killglue
-\begingroup%
-\pnode(#2){@PGD}%
-\pnode(#3){@QGD}%
-\use@par%
-\pst@getcoor{@QGD}\pst@tempB % -------------------------- Hohle die Koordinaten und speichere sie in \pst@tempB
-\pst@getcoor{@PGD}\pst@tempA % -------------------------- Hohle die Koordinaten und speichere sie in \pst@tempA
-\addto@pscode{%
-/sysfill {systemdict /fill get exec} def
-/Country (\pst@country) def
+ \begin@SpecialObj
+ \pst@killglue
+% \begingroup
+ \pnode(#2){@PGD}%
+ \pnode(#3){@QGD}%
+ \use@par
+ \pst@getcoor{@QGD}\pst@tempB % -------------------------- Hohle die Koordinaten und speichere sie in \pst@tempB
+ \pst@getcoor{@PGD}\pst@tempA % -------------------------- Hohle die Koordinaten und speichere sie in \pst@tempA
+ \addto@pscode{%
+ /sysfill {systemdict /fill get exec} def
+ /Country (\pst@country) def
/cm {28.45274 mul} def % ---------------------------------------- Definiere cm als Längeneinheit mit der multipliziert wird
\pst@tempA \tx@UserCoor /@y1 ED /@x1 ED % ---------- Definiere die Koordinaten des Ursprungs (zur Winkelberechnung benötigt)
\pst@tempB \tx@UserCoor /@y2 ED /@x2 ED % ---------- Definiere die Koordinaten des zweiten Punktes (zur Winkelberechnung benötigt)
- @y1 @y2 sub @x1 @x2 sub Atan /@delta ED %------------ Winkelberechnung
+ @y1 @y2 sub @x1 @x2 sub Atan /@delta ED %------------ Winkelberechnung
\pst@tempA \pst@coor T % ------------------------------------ Tranformiere den Koordinatenursprung in P
@delta #1 add 180 add rotate % ------------------------------ Drehe das gesamte Geodreieck
- \pst@ProScale dup scale % -------- Skaliere das ganze Geodreieck
-%-------------------------------------------------------------------------------------------------------------
-\ifPst@Ghost\else
-gsave
-%-------------------------------------------------------------------------------------------------------------
-%-------------- Äußere Begrenzung des Geodreiecks -----------------------------------------------
-gsave
- newpath
+ \pst@ProScale dup scale % -------- Skaliere das ganze Geodreieck
+ %-------------------------------------------------------------------------------------------------------------
+ gsave
+ \ifPst@Ghost\else
+ %-------------- Äußere Begrenzung des Geodreiecks -----------------------------------------------
+ gsave
+ newpath
-8 cm 0 moveto
16 cm 0 rlineto
-8 cm 8 cm rlineto
- closepath
- gsave
- 0.7 setlinewidth
- 0.1 setgray
- stroke
+ closepath
+% gsave
+ 0.7 setlinewidth
+ 0.1 setgray
+ stroke
+% grestore
grestore
-grestore
%-------------------------------------------------------------------------------------------------------------
%-------------- Gefüllter innerer Teil des Geodreiecks -----------------------------------------------
-gsave
+ gsave
newpath
-7.5 cm 0.5 22.5 tan mul cm moveto
15 cm 0 rlineto
-7.5 cm 7.5 cm rlineto
closepath
- gsave
+% gsave
\pst@usecolor\ProFillCol
- [ /ca .1 /SetTransparency pdfmark % set transparency
+% [ /ca .1 /SetTransparency pdfmark % set transparency
0.1 .setopacityalpha sysfill
+% grestore
grestore
-grestore
%-------------------------------------------------------------------------------------------------------------
%-------------- Millimetereinteilung auf der Grundseite -------------------------------------------
- /mmBlinie { newpath
+ /mmBlinie { newpath
-7 cm 0 cm moveto
0 cm 0.17 cm rlineto
% closepath
@@ -185,12 +183,12 @@ grestore
0 0 5.1 cm 6 174 arc
0 0 4.8 cm 174 6 arcn
closepath
- gsave
+% gsave
\pst@usecolor\ProLineCol
- [ /ca .4 /SetTransparency pdfmark % set transparency
+% [ /ca .4 /SetTransparency pdfmark % set transparency
0.4 .setopacityalpha
sysfill
- grestore
+% grestore
grestore
%---------------------------------------------------------------------------------------------------------------------------------------------
%--------------- 1-Grad-Winkeleinteilung an der linken Kathete -----------------------------------------------------------------
@@ -428,7 +426,7 @@ grestore
0 -1 rlineto
closepath
setrgbcolor
- [ /ca .5 /SetTransparency pdfmark % set transparency
+% [ /ca .5 /SetTransparency pdfmark % set transparency
0.5 .setopacityalpha sysfill
} def
Country (France) eq {
@@ -452,8 +450,8 @@ Country (Germany) eq {
grestore
%--------------------------------------------------------------------------------------------------------------------------------------------------
%--------------- Ende nur grestore von gsave ganz am Anfang ------------------
-grestore
\fi
+grestore
}%
\pnode(!
/cm {28.45274 mul} def % ---------------------------------------- Definiere cm als Längeneinheit mit der multipliziert wird
@@ -474,17 +472,18 @@ grestore
@delta #1 add 180 add rotate % ------------------------------ Drehe die rechte untere Ecke des Geodreiecks
\pst@ProScale\space \pst@ProScale\space scale % -------- Skalieren!
8 0){GeodrB}%
-\endgroup%
-\end@SpecialObj\ignorespaces
+%\endgroup%
+ \end@SpecialObj
+ \ignorespaces
}%
-
\definecolor{HolzCol}{rgb}{1,0.937,0.835}%
\define@key[psset]{pst-geometrictools}{PenScale}[1]{\def\pst@PenScale{#1 }}%
\define@key[psset]{pst-geometrictools}{PenLength}[5]{\def\pst@PenLength{#1 }}%
\define@key[psset]{pst-geometrictools}{pencilColA}[red]{\pst@getcolor{#1}\pencilColA}
\define@key[psset]{pst-geometrictools}{pencilColB}[HolzCol]{\pst@getcolor{#1}\pencilColB}
\psset[pst-geometrictools]{PenLength=5,pencilColA=red,pencilColB=HolzCol,PenScale=1}
+
\def\psPencil{\def\pst@par{}\pst@object{psPencil}}
\def\psPencil@i#1(#2){%------------------------------- #1 Winkel, #2 Ursprung P
\begin@SpecialObj
@@ -659,7 +658,7 @@ gsave
closepath
gsave
\pst@usecolor\RulerFillCol
- [ /ca .25 /SetTransparency pdfmark % set transparency
+% [ /ca .25 /SetTransparency pdfmark % set transparency
0.25 .setopacityalpha sysfill
grestore
grestore
@@ -676,7 +675,7 @@ gsave
closepath
gsave
\pst@usecolor\RulerFillCol
- [ /ca .15 /SetTransparency pdfmark % set transparency
+% [ /ca .15 /SetTransparency pdfmark % set transparency
0.15 .setopacityalpha sysfill
grestore
gsave
@@ -1151,28 +1150,34 @@ grestore
%
\def\psParallels{\def\pst@par{}\pst@object{psParallels}}
\def\psParallels@i(#1)(#2)(#3){%
-\begin@SpecialObj %
-\pnode(#1){pointA}%
-\pnode(#2){pointB}%
-\pnode(#3){pointC}%
-\pcline[nodesep=-3](pointA)(pointB)
-\psdots(pointA)(pointB)(pointC)
-\uput[l](pointA){A}
-\uput[l](pointB){B}
-\uput[r](pointC){C}
+% \begin@SpecialObj
+ \pst@killglue
+ \begingroup
+ \use@par
+ \pnode(#1){pointA}%
+ \pnode(#2){pointB}%
+ \pnode(#3){pointC}%
+ \pcline[nodesep=-3](pointA)(pointB)
+ \psdots(pointA)(pointB)(pointC)
+% \uput[l](pointA){A}\uput[l](pointB){B}\uput[r](pointC){C}
%
-\psProtractor[Ghost]{0}(pointA)%
-\psAngleAB(pointA)(pointB){alpha1}
-\psAngleAB(pointA)(GeodrA){alpha2}
-\psProtractor[Ghost]{alpha1 alpha2 sub}(pointA)%
-\psRuler{0}(GeodrB)(GeodrC)
+ \psProtractor[Ghost]{0}(pointA)%
+ \psAngleAB(pointA)(pointB){alpha1}
+ \psAngleAB(pointA)(GeodrA){alpha2}
+% \psdot(GeodrA)\uput[-90](GeodrA){A'}% right edge of triangle
+ \psProtractor[Ghost]{alpha1 alpha2 sub }(pointA)%
+% \psdot(GeodrA)\uput[-90](GeodrA){A''}% right edge of triangle
+% \psdot(GeodrB)\uput[-90](GeodrB){B''}% left edge of triangle
+% \psdot(GeodrC)\uput[-90](GeodrC){C''}% bottom edge of triangle
+ \psRuler{0}(GeodrB)(GeodrC)
%
-\pstProjection[PointName={},PointSymbol=none]{pointA}{pointB}{pointC}[pointI]%
-\pstRotation[RotAngle=45,PointSymbol=none,PointName={}]{pointC}{pointI}[pointJ]%
-\pstInterLL[PointSymbol=none,PointName={}]{pointA}{pointB}{pointC}{pointJ}{pointK}%
-\pstTranslation[PointSymbol=none,PointName={},DistCoef=\pst@DistCoeff]{pointK}{pointC}{pointA}[pointA*]
-\psProtractor{alpha1 alpha2 sub}(pointA*)%
-\end@SpecialObj\ignorespaces%
+ \pstProjection[PointName={},PointSymbol=none]{pointA}{pointB}{pointC}[pointI]%
+ \pstRotation[RotAngle=45,PointSymbol=none,PointName={}]{pointC}{pointI}[pointJ]%
+ \pstInterLL[PointSymbol=none,PointName={}]{pointA}{pointB}{pointC}{pointJ}{pointK}%
+ \pstTranslation[PointSymbol=none,PointName={},DistCoef=\pst@DistCoeff]{pointK}{pointC}{pointA}[pointA*]
+ \psProtractor{alpha1 alpha2 sub}(pointA*)%
+ \endgroup
+ \ignorespaces%
}%
%\define@boolkey[psset]{pst-geometrictools}[Pst@]{Ruler}[true]{}