summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/egameps
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/egameps')
-rw-r--r--Master/texmf-dist/tex/latex/egameps/egameps.sty41
1 files changed, 37 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/egameps/egameps.sty b/Master/texmf-dist/tex/latex/egameps/egameps.sty
index 182eb5f8592..0e7360080b5 100644
--- a/Master/texmf-dist/tex/latex/egameps/egameps.sty
+++ b/Master/texmf-dist/tex/latex/egameps/egameps.sty
@@ -3,11 +3,11 @@
% Macros to draw extensive games, using the PSTricks package
% macros (but retaining TeX's integer arithmetic).
%
-% See egameps.tex for documentation.
+% See egameps.pdf for documentation.
% By Martin J. Osborne
% martin.osborne@utoronto.ca
% http://www.economics.utoronto.ca/osborne
-% Version 1.0, 2001/4/9
+% Version 1.1, 2004/6/19
%
% Defaults. (Changes made here will be global. To change locally, use
% optional arguments of functions.)
@@ -15,6 +15,11 @@
\def\@branchstyle{solid} % style of branches
\def\@branchwidth{0.8pt} % width of branches
%
+% Style of arcs in \ctmbarc
+\def\egarclinestyle{solid}
+\def\egarclinewidth{0.6pt}
+\def\egarclinecolor{black}
+%
\newgray{verylightgray}{.9}
\def\ctmfillcolor{verylightgray} % color of triangle for continuum of branches
\def\egnode{\pscircle*{5}} % node
@@ -65,6 +70,9 @@
\newcount\@egyynum
\newcount\@egyyynum
\newcount\@egyyyynum
+\newdimen\@egrad
+\newdimen\@egxdim
+\newdimen\@egydim
\newcount\@@egxnum
\newcount\@@egxxnum
\newcount\@@egxxxnum
@@ -409,7 +417,7 @@
\rput[bl](\@@egxnum,\@@egynum){\fbox{\@egalbox{#1}}}
\fi
\else\ifnum\@tempcnty=\@@egyynum
- \rput[l](\@@egxnum,\@@egynum){\fbox{\@egalbox{#1}}}
+ \rput[t](\@@egxnum,\@@egynum){\fbox{\@egalbox{#1}}}
\fi\fi\fi
\else\if\@egdirection l
\ifnum\@tempcnty<\@@egyynum
@@ -1312,8 +1320,11 @@
\@egabsvnum=-\@egvnum
\else\@egabsvnum=\@egvnum\fi
\if\@egdirection d
+ \ifnum\@eghnum=0
+ \else
\multiply\@eghdistance by\@egabshnum
\divide\@eghdistance by\@egabsvnum
+ \fi
\else\if\@egdirection u
\multiply\@eghdistance by\@egabshnum
\divide\@eghdistance by\@egabsvnum
@@ -1328,6 +1339,29 @@
\@ifnextchar[{\@ctmbpsto}{\@ctmbpstno}
}
+\def\ctmbarc{%
+ \@egxyiicalc
+ \psline(\@egxnum,\@egynum)(\@egxxnum,\@egyynum)%
+ \psline(\@egxnum,\@egynum)(\@egxxxnum,\@egyyynum)%
+ \@tempcntx=\@egxnum%
+ \advance\@tempcntx by-\@egxxnum%
+ \divide\@tempcntx by2
+ \@tempcnty=\@egynum%
+ \advance\@tempcnty by-\@egyynum%
+ \divide\@tempcnty by2
+ \@egxdim=\@tempcntx\psxunit%
+ \@egydim=\@tempcnty\psyunit%
+% see pst-3d.tex for \pst@pyth and pstricks.tex for its use
+ \pst@pyth\@egxdim\@egydim\@egrad%
+ \psclip%
+ {\psline[linestyle=none](\@egxnum,\@egynum)(\@egxxnum,\@egyynum)%
+ (\@egxxxnum,\@egyyynum)}
+ \pscircle[linestyle=\egarclinestyle,linewidth=\egarclinewidth,%
+ linecolor=\egarclinecolor](\@egxnum,\@egynum){\@egrad}
+ \endpsclip
+ \@ifnextchar[{\@ctmbpsto}{\@ctmbpstno}
+}
+
% first argument is option
%
% #1: list of options
@@ -1575,4 +1609,3 @@
\def\endegame{\end{pspicture}}
- \ No newline at end of file