[pstricks] [pst-eucl] add a parameter 'MarkAngleType' to mark angle with double or triple arcs as we can do in `eukleides', can you approve this change?

廖雄飞 liaofei1128 at 163.com
Mon Aug 19 13:13:57 CEST 2019


Hi,
    I add a parameter 'MarkAngleType' to mark angle with double or triple arcs as we can do in `eukleides', can you approve this change?


following is my patch:
diff --git a/pst-eucl/pst-eucl-v1.64.tex b/pst-eucl/pst-eucl-v1.64.tex
index 1baee98..ebf7170 100755
--- a/pst-eucl/pst-eucl-v1.64.tex
+++ b/pst-eucl/pst-eucl-v1.64.tex
@@ -90,6 +90,7 @@
 \define at key[psset]{pst-eucl}{RightAngleType}[default]{\edef\psk at RightAngleType{#1}}%
 % radius of an angle mark
 \define at key[psset]{pst-eucl}{MarkAngleRadius}[0.4]{\edef\psk at MarkAngleRadius{#1}}%
+\define at key[psset]{pst-eucl}{MarkAngleType}[default]{\edef\psk at MarkAngleType{#1}}%
 % angular offset position of the label for marking an angle
 \define at key[psset]{pst-eucl}{LabelAngleOffset}[0]{\edef\psk at LabelAngleOffset{#1}}%
 % position radius of the label for marking an angle
@@ -155,7 +156,7 @@
   PosAngleB=undef, PosAngleC=undef, Mark=undef, mark=undef,SegmentSymbol=MarkHashh,
   SegmentSymbolA=MarkHashh, SegmentSymbolB=MarkHash, SegmentSymbolC=MarkHashhh,
   RightAngleSize=.4, RightAngleType=default, LabelAngleOffset=0, LabelSep=1,
-  LabelRefPt=c, MarkAngle=undef, MarkAngleRadius=.4, HomCoef=.5, RotAngle=60,
+  LabelRefPt=c, MarkAngle=undef, MarkAngleType=default, MarkAngleRadius=.4, HomCoef=.5, RotAngle=60,
   CurveType=none, TransformLabel=none, Central at Sym=false, DrawCirABC=true,
   CodeFig=false, CodeFigColor=cyan, CodeFigStyle=dashed, CodeFigA=undef,
   CodeFigB=undef, CodeFigAarc=true, CodeFigBarc=true, Radius=none, RadiusA=undef,
@@ -169,6 +170,8 @@
 \def\@default{default}%
 \def\@german{german}%
 \def\@suisseromand{suisseromand}%
+\def\@double{double}%
+\def\@triple{triple}%
 \def\@polygon{polygon}
 \def\@polyline{polyline}
 \def\@curve{curve}
@@ -458,7 +461,18 @@
         \psline(0,0)
       }
     \fi
-    \psarc[fillstyle=none](0,0){\psk at MarkAngleRadius}{(#2)}{(#4)}%
+    \ifx\psk at MarkAngleType\@default
+        \psarc[fillstyle=none](0,0){\psk at MarkAngleRadius}{(#2)}{(#4)}%
+    \else
+        \ifx\psk at MarkAngleType\@double
+            \psarc[fillstyle=none](0,0){\psk at MarkAngleRadius}{(#2)}{(#4)}%
+            \psarc[fillstyle=none](0,0){! \psk at MarkAngleRadius\space 0.85 mul}{(#2)}{(#4)}%
+        \else
+            \ifx\psk at MarkAngleType\@triple
+                \psarc[fillstyle=none](0,0){\psk at MarkAngleRadius}{(#2)}{(#4)}%
+                \psarc[fillstyle=none](0,0){! \psk at MarkAngleRadius\space 0.85 mul}{(#2)}{(#4)}%
+                \psarc[fillstyle=none](0,0){! \psk at MarkAngleRadius\space 0.70 mul}{(#2)}{(#4)}%
+    \fi\fi\fi
     \rput[\psk at LabelRefPt]{*0}(! tx at EcldDict begin
         /N@#4 GetNode exch Atan /N@#2 GetNode exch Atan end
         2 copy lt { exch 360 sub exch } if


---------------------------
here is an example:
\documentclass[b5paper]{book}


\usepackage{picture}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{pstricks}
\usepackage{auto-pst-pdf}
\usepackage{pst-eucl}
\usepackage{pst-plot}


\psset{unit=1cm}
\psset{linewidth=0.6pt}
\psset{dotscale=0.5}
\psset{CodeFig=false}
\psset{PointSymbol=*}


\begin{document}
\begin{figure}[htp]
\centering
\begin{pspicture}[showgrid=false](-1.0,-1.0)(4,4)
\pstGeonode[PosAngle=-90](0.0,0.0){A}
\pstGeonode[PosAngle=-90](3.0,0.0){B}
\pstGeonode[PosAngle=90](1.8,2.5){C}
\pstGeonode[PosAngle=-90](1.5,0.0){D}
\pstMarkAngle[LabelSep=.6,MarkAngleRadius=.4,MarkAngleType=double]{A}{C}{B}{$\gamma$}
\pstMarkAngle[LabelSep=.6,MarkAngleRadius=.4,MarkAngleType=default]{C}{B}{A}{$\beta$}
\pstMarkAngle[LabelSep=.6,MarkAngleRadius=.4,MarkAngleType=double,fillcolor=red!30,fillstyle=solid]{B}{A}{C}{$\alpha$}
\pstMarkAngle[LabelSep=.6,MarkAngleRadius=.4,MarkAngleType=triple,fillcolor=red!30,fillstyle=solid]{B}{D}{C}{$\theta$}
\pstMarkAngle[LabelSep=.6,MarkAngleRadius=.4,MarkAngleType=triple]{C}{D}{A}{$\zeta$}
\pstLineAB{A}{B}
\pstLineAB{B}{C}
\pstLineAB{C}{A}
\pstLineAB{C}{D}
\end{pspicture}
\end{figure}
\end{document}


and here is the output:
| |
廖雄飞
|
|
liaofei1128 at 163.com
|
签名由网易邮箱大师定制
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/pstricks/attachments/20190819/1dc0c5f4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: double_triple_mark.JPG
Type: image/jpeg
Size: 13204 bytes
Desc: not available
URL: <https://tug.org/pipermail/pstricks/attachments/20190819/1dc0c5f4/attachment-0001.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-to-pst-eucl-v1.64-Add-MarkAngleType-double-and-triple-support-like-eukleids.patch
Type: application/octet-stream
Size: 2526 bytes
Desc: not available
URL: <https://tug.org/pipermail/pstricks/attachments/20190819/1dc0c5f4/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.tex
Type: application/x-tex
Size: 1151 bytes
Desc: not available
URL: <https://tug.org/pipermail/pstricks/attachments/20190819/1dc0c5f4/attachment-0001.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.pdf
Type: application/pdf
Size: 12124 bytes
Desc: not available
URL: <https://tug.org/pipermail/pstricks/attachments/20190819/1dc0c5f4/attachment-0001.pdf>


More information about the PSTricks mailing list