summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/istgame/istgame-doc.tex
blob: eec92b2280b967273e9f7fe2ef6f482c8fb5b86c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
%!TEX program = arara
% arara: xelatex: {synctex: yes}
% arara: xelatex: {synctex: yes}
% arara: makeindex: {style: istgame} 
% arara: xelatex: {synctex: yes}
% arara: xelatex: {synctex: yes}

% 2017/09/04  v1.0
\def\tmpdate{2017/09/04}
\def\tmpversion{1.0}

\documentclass[a4paper]{oblivoir}

\usepackage{fapapersize}
\usefapapersize{*,*,30mm,*,28mm,28mm}
\setsecnumdepth{subsubsection}
\settocdepth{subsubsection}
\setlength\cftsubsubsectionindent{4.5em}

\renewcommand\contentsname{Table of Contents}
\renewcommand\figurename{Figure}
\renewcommand\tablename{Table}
\renewcommand\abstractname{Abstract}
\renewcommand\indexname{Index}
\renewcommand\pagerefname{\kern-4pt}

\usepackage{tabu}
\usepackage{mathtools}
%\usepackage{xparse}  %% oblivoir will load xparse
%\usepackage{tikz}    %% istgame will load tikz
\usepackage{makecell}
\usepackage{capt-of}
\usepackage{multido}
\usepackage{ulem}
\usepackage{idxlayout}

\usepackage{istgame}

\usepackage{tcolorbox}
\tcbuselibrary{listings,breakable}
    \tcbset{breakable,listing above text,center upper,sidebyside gap=10pt,lower separated=true,center lower,
    listing options={
    	style=tcblatex,
      keywordstyle=\color{blue},
      commentstyle=\color{black!20!green},
      morekeywords={istgame,istroot,istrooto,istb,endist,xtdistance,
        istcntm,istcntmarc,setistgrowdirection,istgrowdirection,
        xtInfoset,xtInfosetO,xtActionLabel,
        xtSubgame,xtSubgameBox,xtSubgameOval,istgamefontsize,setistgamefontsize,
        xtgrow,setistgrowkey,xtInfosetOwner,xtOwner,xtPayoff,xtNode,
        xtShowEndPoints,xtHideEndPoints,
        xtShowTerminalNodes,xtHideTerminalNodes,
        xtlevdist,xtsibdist,
        setistDecisionNodeStyle,setistOvalNodeStyle,
        setistSolidNodeStyle,setistHollowNodeStyle,
        setistEllipseNodeStyle,setistNullNodeStyle,setistRectangleNodeStyle,
        cntmdistance,cntmlevdist,cntmsibdist,
        xtALpush,xtALshift,
        xtdefaultsubrootshiftoval,
        \tikzstyle,\draw,\node,\coordinate,\foreach,
        NewDocumentCommand,NewDocumentEnvironment,IfBooleanTF
        }
      }
    }

%\usepackage{tikz-qtree} %%% DO NOT USE

%%% to resolve the conflict with tikz-qtree
%\RenewDocumentEnvironment{istgame}{O{}}   % accepts tikzpicture options
%    {\begin{tikzpicture}[%
%        edge from parent path={(\tikzparentnode\istparentanchor) -- 
%        (\tikzchildnode\istchildanchor)}, % tikz-qtree conflict resolved
%        font=\istgamefontsize,>=stealth,#1
%        ]
%    }
%    {\end{tikzpicture}
%    }


\linespread{1}

\newcommand*\Tikz{Ti\textit{k}Z}
\let\tikz\Tikz

\newenvironment{keywords}{%
	\par\vskip2pt
	\noindent\hangfrom{\textsc{Keywords: }}%
}

\NewDocumentEnvironment{mytcblisting}{O{}}
{ \medskip
  \begin{tcblisting}{#1} 
}
{ \end{tcblisting} 
  \medskip
}

\NewExpandableDocumentCommand\xcol{mO{c|}m}
  {\multicolumn{#1}{#2}{\ensuremath{#3}}}

%% more lazy macros
\newcommand\mbigskip[1]{\multido{}{#1}\bigskip}
\def\hpara{\hangpara{1.52em}{1}}

\newcommand\remark{\noindent \textbf{Remark: }}

%% index
\renewcommand\cmd[1]{\cmdprint{#1}}
\newcommand\xword[1]{\cmd{#1}}
\newcommand\xw[1]{\cmd{#1}}
\newcommand\pkg[1]{\textsf{#1}}
\newcommand\env[1]{\textsf{#1}}
\newcommand\ixw[1]{\cmd{#1}\index{#1}}
\newcommand\isw[1]{#1\index{#1}}
\newcommand\ipkg[1]{\textsf{#1}\index{#1@\textsf{#1}}}
\newcommand\ienv[1]{\textsf{#1}\index{#1@\textsf{#1}}}

\makeatletter
\newcommand{\icmd}[1]{\cmdprint{#1}%
  \index{\expandafter\@gobble\string#1@\string\cmdprint{\string#1}}}
\makeatother

\makeindex

\title{\texttt{istgame.sty} \\
Drawing Game Trees with \tikz}
\author{In-Sung Cho \\  \texttt{ischo <at> ktug.org}}
\date{Economics, Kongju National University\\[3pt] \tmpdate\quad version \tmpversion}

%%=======================================================================
\begin{document}

\frontmatter
\maketitle

\begin{abstract}
This is a \LaTeX{} package that provides macros based on \Tikz\ to draw a game tree. The main idea underlying the core macros here is the completion of a whole tree by using a sequence of simple `parent-child' tree structures, with no longer nested relations involved like the use of grandchildren or great-grandchildren.
With the \ipkg{istgame} package, you can draw a game tree as if you were drawing a game tree with a pen and paper. 

\begin{keywords}
game trees, nodes, branches, information sets, subgames
\end{keywords}
\end{abstract}

\tableofcontents*

\mainmatter

%\input{istgame_test}
\include{istgame-doc-v1.0}

\printindex

\end{document}