%!TEX program = arara
% arara: pdflatex: {shell: yes, synctex: yes}
% arara: xelatex: {shell: yes, synctex: yes}
% arara: makeindex: {style: istgame} 
% arara: xelatex: {shell: yes, synctex: yes}
% arara: xelatex: {shell: yes, synctex: yes}

\def\tmpdate{2022/03/22}
\def\tmpdate{\today}
\def\tmpversion{2.1}	

\def\printtikztreetest{}
\def\printtest{}
\def\printteststar{}
\def\printdoc{}
%\renewcommand\printtikztreetest{\input{istgame_test_tree}}
%\renewcommand\printtest{\clearpage\input{istgame_test}}
%\renewcommand\printteststar{\clearpage\input{istgame_test-star}}
\renewcommand\printdoc{\include{istgame-doc-v\tmpversion}}

%% ======================================================
\documentclass[a4paper,amsmath]{oblivoir}
%% ======================================================
%\documentclass[a4paper,article]{memoir}
%\renewcommand\thesection{\arabic{section}}

%\usepackage{istgame-v\tmpversion}
\usepackage{istgame}

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

%% us date
\usepackage{datetime}
\usdate \let\mytoday\today
\AtBeginDocument{\let\today\mytoday}

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


%\usepackage[hidelinks]{hyperref} % (memoir)
\hypersetup{pdfborder={0 0 0}} % to suppress the hyperlink red box

%\usepackage{amsmath,mathtools}
%\usepackage{xparse}  %% oblivoir loads xparse
%\usepackage{tikz}    %% istgame loads tikz
\usepackage{makecell}
\usepackage{capt-of}
\usepackage{multido}
\usepackage[normalem]{ulem} % [normalem] to correct the pdf bookmark broken characters
\usepackage{idxlayout}
%\usepackage{url}

%\setistdefaultnodedrawcolor{red} % test
%\setistdefaultnodefillcolor{black!16} % (try for MacOS mohave dark mode, TeXShop background color)

\usepackage{tcolorbox}
\tcbuselibrary{minted,xparse,listings,breakable}
\tcbset{%
  listing engine=minted,breakable,
%  minted language=latex,
  after={\par\vspace{.5\baselineskip}\noindent}
}
\tcbset{%
  colback=yellow!5!white,
  colframe=blue!30,
  listing outside text,
  righthand width=.3\linewidth,
  center upper,
  center lower,
  sidebyside gap=5pt,
  minted style=igor, %tango, **igor, xcode, ***manni, *autumn, colorful,
  listing options={%
    style=tcblatex,
%    keywordstyle={\color{blue}},
    commentstyle=\color{black!20!green},
%    morekeywords={
%      istgamefontsize,setistgamefontsize,setistgamearrowendshorten,
%      istgame,istroot,istrooto,istb,endist,xtdistance,istbm,
%      istbt,istB,istBt,istbA,cntmAInfoset,cntmAInfosetO,
%      istrootcntm,istrootcntmA,istrootocntm,istrootocntmA,
%      setistgrowdirection,istgrowdirection,
%      setistmathTF,istownerlmathtrue,istownermathfalse,istactioinlabelmathtrue,
%      istactionlabelmathfalse,istpayoffmathtrue,istpayoffmathfalse,
%      cntmdistance,cntmlevdist,cntmsibdist,
%      cntmApreset,cntmistb,cntmAistb,cntmAexpostShowEndPoints,
%      xtInfoset,xtInfosetO,xtActionLabel,
%      xtSubgame,xtSubgameBox,xtSubgameOval,
%      xtgrow,setxtgrowkey,xtInfosetOwner,xtOwner,xtPayoff,xtNode,
%      xtALPush,xtALShift,
%      xtShowEndPoints,xtHideEndPoints,
%      xtShowTerminalNodes,xtHideTerminalNodes,
%      xtTimeLineH,xtTimeLineV,xtCommentTo,xtCommentFrom,xtShowArrows,xtHideArrows,
%      xtlevdist,xtsibdist,
%      xtShowArrows,xtHideArrows,xtShowMidArrows,xtHideMidArrows,
%      setxtshowarrows,setxtmidarrows,setxtshowmidarrows,
%      setxtinfosetlayer,setxtsubgamelayer,
%      setistNewNodeStyle,
%      setistDecisionNodeStyle,setistOvalNodeStyle,
%      setistSolidNodeStyle,setistHollowNodeStyle,
%      setistEllipseNodeStyle,setistNullNodeStyle,setistRectangleNodeStyle,
%      xtALpush,xtALshift,
%      xtdefaultsubrootshiftoval,
%      tikzstyle,draw,coordinate,foreach,setlength,
%      NewDocumentCommand,NewDocumentEnvironment,IfBooleanTF,tikzset,   
%      xtCInfoset,xtCInfosetO,xtCInfosetOTurnX,
%      cntmpreset,cntmApreset,cntmAlayerpreset
%      setxtinfosetstyle,setxtarrowtips,setxtinfosetstyle
%    },
  }, % end of listing options
}

\DeclareTCBListing{docstx}{ !O{} }
  {colback=blue!5!white,listing only,#1}
\DeclareTCBListing{docsty}{ !O{} }
  {colback=red!5!white,listing only,#1}
\DeclareTCBListing{docplain}{ !O{} }
  {colback=white,colframe=gray!15,listing only,#1}
\DeclareTCBListing{doccode}{ !G{1} !O{} }
  {righthand width=\expandafter#1\linewidth,#2}


%\usepackage{tikz-qtree} %%% DO NOT USE
% or, add the following in the option
%     [ edge from parent path={(\tikzparentnode) -- (\tikzchildnode)} ]


\linespread{1}

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

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

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

%% more lazy macros
\newcommand\xbigskip[1]{\multido{}{#1}\bigskip}
\newcommand\xmedskip[1]{\multido{}{#1}\bigskip}
\newcommand\xsmallskip[1]{\multido{}{#1}\bigskip}
\def\hpara{\hangpara{1.52em}{1}}
\def\listdivider{\leavevmode\smallskip\hrule width 1.5em\smallskip}

\NewDocumentCommand\remark{ O{1} }
  {\xmedskip{#1}\noindent \textbf{Remark: }}
\NewDocumentCommand\warning{ O{1} }
  {\xmedskip{#1}\noindent \textbf{Warning: }}
%
\newcommand\sourcelink[1]{\ttfamily\color{blue}\uline{#1}}
%
%%% index
%\renewcommand\cmd[1]{\cmdprint{#1}}
\ExplSyntaxOn
\renewcommand \cmd [1]
{
  \texorpdfstring 
    { \cmdprint {#1} }
    { \textbackslash \cs_to_str:N #1 }
}
\let\CMD\cmd
\ExplSyntaxOff

\newcommand\xw[1]{\cmd{#1}}
\newcommand\xttw[1]{\texttt{#1}}
\newcommand\pkg[1]{\textsf{#1}}
\newcommand\env[1]{\textsf{#1}}
\newcommand\isw[1]{#1\index{#1}}                        % simple word in text/index
\newcommand\ixsw[1]{\cmd{#1}\index{#1}}                 % texttt in text, simple word in index
\newcommand\ixw[1]{\textsf{#1}\index{#1@\textsf{#1}}}   % textsf in text/index
\newcommand\ixttw[1]{\texttt{#1}\index{#1@\texttt{#1}}} % texttt in text/index
\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} \\
Draw Game Trees with \Tikz}
\author{In-Sung Cho \\  \texttt{ischo <at> ktug.org}}
\date{Economics, Kongju National University\\[3pt] \tmpdate\quad version \tmpversion}

\def\tmpclearpage{\clearpage}

\AtBeginDocument{\MakeShortVerb{\|}}

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

\frontmatter
\maketitle

\renewcommand{\abstracttextfont}{\normalfont\small\noindent\ignorespaces}
\begin{abstract}
This is a \LaTeX{} package that provides \Tikz-based macros to draw game trees. 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 game trees as easily as drawing game trees with pen and paper.
\begin{keywords}
game trees, nodes, branches, information sets, continuum of branches, subgames
\end{keywords}
\end{abstract}

\tableofcontents*

\mainmatter


\printtikztreetest
\printtest
\printteststar
\printdoc


%\clearpage
\setsecnumdepth{chapter}
\section{Version history}
\label{version-history}

\begin{itemize}
%\item v\tmpversion (\tmpdate) to be uploaded to CTAN
%  \begin{itemize}
%  \item 
%  \end{itemize}
\item v2.1 (2022/03/22) uploaded to CTAN
  \begin{itemize}
  \item document done!
  \end{itemize}
\item v2.092 (2022/03/21)
  \begin{itemize}
  \item working on the documentation
  \item added |arrows.meta| and |bending| to the list of preloaded |tikz| libraries
    \begin{itemize}
    \item applied |arrows.meta| arrow tips to the related examples
    \end{itemize}
  \end{itemize}
\item v2.091 (2022/03/16)
  \begin{itemize}
  \item modified |istgame| environment to add its starred version
    \begin{itemize}
    \item |\begin{istgame}*| is essentially the same as |\begin{tikzpicture}|
    \item but loses some feature of the \pkg{istgame} package
    \end{itemize}
  \item fixed all macros related information sets to remove arrow tips
  \item touched |\AtBeginDocument{\setxtarrowtips}|
  \item rewrote |\setistmathTF(*)| and related macros to avoid a possible conflict
  \end{itemize}
\item v2.09 (2021/04/05)
  \begin{itemize}
  \item removed |\pgfextra| from |\istrootcntm| and |\istrootcntmA| (debugging)
  \item resolved the null font problem in |\cntmistb| and |\cntmAistb| using |\l_nullfont_tl| (debugging)
  \item added |\setist<...>nodesize| for |solid|, |hollow|, |ellipse|, and |rectangle| (for global setting in the preamble)
  \end{itemize}
\item v2.0 (2019/01/27) uploaded to CTAN
  \begin{itemize}
  \item changed the title of the package to ``Draw Game Trees with \Tikz"
  \item package document done
  \end{itemize}
\item v2.0rc (2019/01/27)
  \begin{itemize}
  \item introduced |\setxtinfosetstyle|
    \begin{itemize}
    \item introduced |infoset style|, a new style for information sets
    \item modified all definitions of information sets, accordingly
    \end{itemize}
  \item redefined macros related to layer, to easily restore default values
  \item modified the cross arrow tip options
  \item modified defaults of |\setxtarrowtips| not to depend on branch styles initially
  \item code refinement
  \end{itemize}
\item v2.0beta1 (2019/01/26)
  \begin{itemize}
%  \item beta test
  \item introduced |\xtshowXpoints| and |\xtshowXcircles| (for developer only, not documented)
  \end{itemize}
%%%\item v1.99x (2019/01/24)
%%%  \begin{itemize}
%%%  \item changed |expl3| macros
%%%    \begin{itemize}
%%%    \item \verb+\str_case_x:nnTF+ to \verb+\str_case_e:nnTF+ and then to \verb+\str_case:nnTF+
%%%    \item \verb+\str_if_eq_x:nnTF+ to \verb+\str_if_eq:eeTF+ and then to \verb+\str_if_eq:nnTF+
%%%    \end{itemize}
%%%  \item modified macros on arrows and middle arrows
%%%  \item redefined |\xtTimeLineH| and |\xtTimeLineV| to deal with swap of branches
%%%  \item modified |\xtCommentTo| and |\xtCommentFrom| for the last option delimiters
%%%  \end{itemize}
%%%\item v1.99w (2019/01/21)
%%%  \begin{itemize}
%%%  \item fixed bug in |\xtInfosetO| regarding |\xtinfosetheihtvar| for |rounded corner|
%%%  \item corrected |\cntmistb| and |\cntmAistb|
%%%    \begin{itemize}
%%%    \item separated options for |\cntmAistb| from those for |\cntmistb|
%%%    \item those two are independent to each other (except the way to deal with endpoints)
%%%    \end{itemize}
%%%  \item redefined |\endist| to restore initial values after each execution of the \verb+cntm(A)istb+ 
%%%    \begin{itemize}
%%%    \item but not for the effect of printing endpoints
%%%    \item (internally introduced) |\cntmistbVariablesRestore|
%%%    \item (internally introduced) |\cntmAistbVariablesRestore|
%%%    \end{itemize}
%%%  \item introduced |\xtHideEndPoints*| for extra work for continuum endpoints
%%%  \item introduced |\cntmAlayerpreset|, with |behind| as default
%%%  \item redefined |\xtShowArrows| to add an option for a node style
%%%  \item changed the order of options for |\setxtshowarrows|
%%%  \item changed the order of options for |\setxtarrowtips|
%%%  \item renamed |\setxtmidarrows| to |\setxtarrowtips|
%%%  \end{itemize}
%%%\item v1.99v (2018/01/17)
%%%  \begin{itemize}
%%%  \item redefined the \env{istgame} environment and |\istgameScaleCallTestAndAdjust| 
%%%        to take care of simultaneous use of |xscale| and |yscale|.
%%%  \item modified macros to make singleton information sets scaled accordingly when needed
%%%    \begin{itemize}
%%%    \item |\xtInfosetO|, |\xtCInfosetO|, |\cntmAInfosetO|, |\istgameScaleCallTestAndAdjust|
%%%    \item (internally) added |\xtinfosetheightvar| and |\cntminfosetheightvar|
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.99u (2019/01/15)
%%%  \begin{itemize}
%%%  \item redefined macros to deal with local change of sibling distances
%%%    \begin{itemize}
%%%    \item redefined |\istrootcntm|, |\istrootcntmA|, |\istrootocntm|, |\istrootocntmA|, 
%%%    \item redefined |\istbA|, |\istbAt|
%%%    \item redefined |\cntmpreset|, |\cntmApreset|  -- NEED TO GO BACK (no need call test)
%%%    \end{itemize}
%%%  \item redefined |\xtCInfoset| to add abbreviations for the position of owners
%%%  \item redefined |\xtCInfoset| to print a singleton information set
%%%  \item modified |\xtCInfoset| to change the way of input for its position (|add to \textbackslash cntmApos|)
%%%  \end{itemize}\
%%%\item v1.99t (2019/01/13)
%%%  \begin{itemize}
%%%  \item redefined macros to deal with local change of level and sibling distances for |\istbA|
%%%    \begin{itemize}
%%%    \item code complication, inevitable to take care of too many cases
%%%    \item redefined |\istroot| and |\istrooto|
%%%    \item redefined |\istrootcntm| and its variants
%%%    \item redefined |\istbA| and |\istbAt|
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.99s (2019/01/10)
%%%  \begin{itemize}
%%%  \item modified |\xtCInfosetO| for better results when swapped with \xw{plotfactor} less than 1
%%%  \item modified |\istrootcntm| and its variants for better results of shrunken continua
%%%  \item redefined |\xtTimeLineH| (for a horizontal time-line)
%%%  \item introduced |\xtTimeLineH(')| for a vertical time-line
%%%  \item introduced |\xtCInfosetOTurnX| for turning X circles to use it just in case
%%%  \end{itemize}
%%%\item v1.99r (2019/01/07)
%%%  \begin{itemize}
%%%  \item redefined |\istrootcntm| and |\istrootocntm| for smaller triangle continua of branches 
%%%  \item introduced |\cntmpreset| and |\cntmpreset*|
%%%  \item put `call test' for cases of how to change level distance with |\istbA|
%%%  \item modified |\xtCInfosetO| and |\cntmAInfosetO| for coloring
%%%  \end{itemize}
%%%\item v1.99q (2019/01/05)
%%%  \begin{itemize}
%%%  \item modified |\xtInfosetO| to print a singleton information set by a circle.
%%%  \item finished fine-tuning |\cntmAInfosetO| (for tuning base circles)
%%%  \end{itemize}
%%%\item v1.99p (2019/01/02)
%%%  \begin{itemize}
%%%  \item redefined |\xtInfoset| and |\xtInfosetO| in accordance with new |\xtCInfosetO|
%%%  \item redefined completely |\cntmAInfoset| and |\cntmAInfsetO| in the way of |\xtCInfosetO|
%%%  \item redefined |\cntmAInfoset|, |\cntmAInfosetO|, |\istrootcntmA|, and |\istrootocntmA|
%%%    \begin{itemize}
%%%    \item to compensate the dependency of arcs on the ratio of |\cntmlevdist| to |\cntmsibdist|
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.99o (2018/12/31)
%%%  \begin{itemize}
%%%  \item redefined completely |\xtCInfosetO| and |\xtCInfoset| for enhancement
%%%    \begin{itemize}
%%%      \item (internally) added |\setxtCIAngleAccordingtoGrowswapCallForCI|
%%%      \item to make it possible for the control points to turn accordingly along the base circles 
%%%            for sides of curved information sets
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.99n (2018/12/27)
%%%  \begin{itemize}
%%%  \item redefined |\setistmathTF*| to make it work with basic text font styles
%%%    \begin{itemize}
%%%    \item |\istownertextfont|, |\istactionlabeltextfont|, |\istpayofftextfont|
%%%    \item all working only in text mode
%%%    \end{itemize}
%%%  \item introduced |\xtcureslopedlabelsNS| and |\xtcureslopedlabelsEW| to resolve a \Tikz\ conflict to sloped labels
%%%    \begin{itemize}
%%%    \item (internally) added |\xtlevdistadj| and |\xtsibdistadj|
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.99m (2018/12/21)
%%%  \begin{itemize}
%%%  \item added starred versions that work with |\setistmathTF|
%%%  \begin{itemize}
%%%  \item |\xtInfoset*|, |\xtInfosetO*|, |\xtCInfoset|, |\xtCInfosetO|
%%%  \item |\xtOwner*|, |\xtActionLabel*|, |\xtPayoff*|, |\xtInfosetOwner*|
%%%  \end{itemize}
%%%  \end{itemize}
%%%\item v1.99l (2018/12/18)
%%%  \begin{itemize}
%%%  \item changed the order and the type of argument delimiters for input consistency
%%%    \begin{itemize}
%%%    \item |\xtCInfosetO|, |\cmtmAinfosetO|, and their related macros
%%%    \item effective from \xw{v.1.99l}
%%%      \begin{itemize}
%%%      \item not consistent with the earlier versions of update
%%%      \item but intact with the \xw{version 1}
%%%      \end{itemize}
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.99k (2018/12/15)
%%%  \begin{itemize}
%%%  \item introduced |\xtCInfosetO| for bubble type curved information sets
%%%    \begin{itemize}
%%%    \item (internally) added |\xtPrototypeForCInfosetO| -- only for |\xtCInfosetO|
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.99j (2018/12/11)
%%%  \begin{itemize}
%%%  \item introduced |\xtCInfoset| for curved information sets
%%%    \begin{itemize}
%%%    \item (internally) added |\istgameScaleCallTestAndAdjust| (must be used in a group)
%%%    \item (internally) added |\setxtCIAngleAccordingtoGrowswapCall|
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.99i (2018/12/08)
%%%  \begin{itemize}
%%%  \item (macro name change,  effective from \xw{v1.99i}) all `\xw{cntmarc}' changed to `\xw{cntmA}'
%%%  \item introduced |\cntmAInfosetO|
%%%  \item introduced |\cntmAexpostShowEndPoints|
%%%  \item introduced |\istbA(*)| and |\istbAt(*)|
%%%  \end{itemize}
%%%\item v1.99h (2018/11/07)
%%%  \begin{itemize}
%%%  \item changed the default position of a continuum arc from \xw{.5} to \xw{1}
%%%  \item introduced |\cntmarcInfoset|
%%%  \end{itemize}
%%%\item v1.99g (2018/09/30)
%%%  \begin{itemize}
%%%  \item put |\xtShowArrows| and |\xtShowMidArrows| into |\istB|
%%%  \item found issues with |\xtShowArrows| and |\xtShowMidArrows| related to \xw{postaction}
%%%  \item added the arrow end shorten option to |\xtCommentTo| and |\xtCommentFrom|.
%%%  \item (internal) minor changes
%%%    \begin{itemize}
%%%    \item redefined |\setistSolidNodeStyle| to keep consistency with other node styles
%%%    \item redefined |\setistNullNodeStyle| to keep consistency with other node styles
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.99f (2018/09/19)
%%%  \begin{itemize}
%%%  \item (internally) redefined |\cntmistb| and |\cntmarcistb| to resolve endpoints problems
%%%  \begin{itemize}
%%%    \item (internally) added |\cntmOUTERistb| and |\cntmarcOUTERistb|
%%%    \item (internally) removed |\cntmendpointsShow| and |\cntmendpointsPrint|
%%%    \item (internally) redefined |\istrootcntm| and its variants accordingly
%%%  \end{itemize}
%%%  \end{itemize}
%%%\item v1.99e (2018/09/15)
%%%  \begin{itemize}
%%%  \item introduced |\xtShowArrows| and |\xtHideArrows(*)|
%%%  \item introduced |\setxtshowarrows|
%%%  \item introduced |\xtShowMidArrows| and |\xtHideMidArrows|
%%%  \end{itemize}
%%%\item v1.99d (2018/09/13)
%%%  \begin{itemize}
%%%  \item introduced |\setxtarrowtips| with a tikzstyle \xw{->-}
%%%  \item introduced new arrow styles: \xw{->>-}, \xw{->>>-}, \xw{-o-}, and \xw{-x-}
%%%  \end{itemize}
%%%\item v1.99c (2018/09/09)
%%%  \begin{itemize}
%%%  \item introduced |\cntmistb| and |\cntmarcistb|
%%%  \item redefined |\cntmdistance| to check if |\cntmactsibdist| is called or not
%%%  \item (internally) added |\cntmendpointsShow|
%%%    \begin{itemize}
%%%    \item redefined |\xtShowEndPoints| and |\xtHideEndPoints| accordingly
%%%    \item introduced |\xtShowEndPoints*| (for outermost branches of a continuum)
%%%    \end{itemize}
%%%  \item (internally) added |\cntmendpointsPrint|
%%%    \begin{itemize}
%%%    \item redefined |\istrootcntm| and its variants accordingly
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.99b (2018/09/07)
%%%  \begin{itemize}
%%%  \item redesigned |\istrootcntm| and its variants
%%%    \begin{itemize}
%%%    \item removed |\ISTCntm(')| and |\ISTCntmArc(')|
%%%    \end{itemize}
%%%  \item introduced |\cntmdraw|, |\cntmdrawset| and related macros
%%%  \item redfined |\cntmdistance| to check if |\cntmactsibdist| is called or not
%%%  \end{itemize}
%%%\item v1.99a (2018/09/05)
%%%  \begin{itemize}
%%%  \item introduced |\setistgameshorten| (for \env{istgame} environment option)
%%%  \end{itemize}
%%%\item v1.98 (2018/09/03)
%%%  \begin{itemize}
%%%  \item redefined |\istrootcntm(arc)| to make it work with |\setistmathTF(*)|
%%%  \item redefined |\istrootocntm(arc)| to make it work with |\setistmathTF(*)|
%%%  \end{itemize}
%%%\item v1.97 (2018/09/02)
%%%  \begin{itemize}
%%%  \item redefined |\istroot(o)| to resolve tex expansion problems
%%%  \item redefined |\istrootcntm(arc)| to resolve tex expansion problems
%%%  \item redefined |\istrootocntm(arc)| to resolve tex expansion problems
%%%  \item redefined the \env{istgame} environment to add \xw{[shorten >=0pt]} if \xw{[->]} exists
%%%  \end{itemize}
%%%\item 1.96 (2018/08/30)
%%%  \begin{itemize}
%%%  \item minor changes
%%%    \begin{itemize}
%%%    \item altered the default sibling distance of |\xtdistance| from \xw{15mm} to \xw{\levdist}
%%%    \item altered initial options for \xw{null}, \xw{solid}, and \xw{hollow} nodes (added \xw{thin}, \xw{solid})
%%%    \item added \xw{text depth=.25ex} for some definitions
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.95 (2018/08/27)
%%%  \begin{itemize}
%%%  \item resolved dimension issues for |\cntmdistance|
%%%  \item added |\xtOwner*|, |\xtActionLabel*|, |\xtPayoff*| (working with |\setistmathTF(*)|)
%%%  \end{itemize}
%%%\item v1.94 (2018/08/22)
%%%  \begin{itemize}
%%%  \item resolved tex expansion issues in the macros for a continuum of branches
%%%  \end{itemize}
%%%\item v1.93 (2018/08/19)
%%%  \begin{itemize}
%%%  \item introduced |\setistmath| to set input mode for owners, action labels, and payoffs
%%%  \item introduced |\setistmath*| to print action labels in italics, in case of text mode
%%%  \item (internally) added |\istownerstyle|, |\istactionlabelstyle|, and |\istpayoffstyle|
%%%  \end{itemize}
%%%\item v1.92 (2018/08/17)
%%%  \begin{itemize}
%%%  \item redesigned the \env{istgame} environment
%%%    \begin{itemize}
%%%    \item to extract the number input from \xw{scale}, \xw{xscale}, or \xw{yscale}
%%%    \item added |\xtscale|, |\xtxscale|, and |\xtyscale| to save scale option values
%%%    \end{itemize}
%%%  \item tested to apply scale values to improve the result of |\xtInfosetO|
%%%  \end{itemize}
%%%\item v1.91 (2018/08/16)
%%%  \begin{itemize}
%%%  \item many changes to resolve expansion problems
%%%    \begin{itemize}
%%%    \item redefined |\cntmset|, |\cntmarcset|, and related macors
%%%    \item redifined |\cntmlevdist| and |\cntmsibdist| as lengths
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.9 (2018/08/11)
%%%  \begin{itemize}
%%%  \item introduced |\cntmarcplotfactorset|
%%%  \end{itemize}
%%%\item v1.8 (2018/08/09)
%%%  \begin{itemize}
%%%  \item made possible to use the directional abbreviations with |\xtInfoset|
%%%  \item introduced |\istrootocntm| and |\istrootocntmarc| (oval versions)
%%%  \end{itemize}
%%%\item v1.7 (2018/08/04)
%%%  \begin{itemize}
%%%  \item introduced |\istbm|
%%%  \item introduced |\setistNewNodeStyle|
%%%  \end{itemize}
%%%\item v1.6 (2018/08/01)
%%%  \begin{itemize}
%%%  \item resigned |\cntmdistance| (now ready for users)
%%%    \begin{itemize}
%%%    \item added |\cntmactsibdist| to distinguish it from |\cntmsibdist|
%%%    \end{itemize}
%%%  \item added |\cntmdistance*| to incorporate with |\xtdistance|
%%%  \item introduced |\istrootcntmA(')|
%%%    \begin{itemize}
%%%    \item added (internally) |\ISTCntmArc(')|
%%%    \item added |\cntmarcset|
%%%    \end{itemize}
%%%  \item introduced |\istrootcntm(')|
%%%    \begin{itemize}
%%%    \item added (internally) |\ISTCntm(')|
%%%    \end{itemize}
%%%  \item (internally) renamed |\istCntmRoot(Arc)| to |\obsoleteISTCntm(Arc)|
%%%  \end{itemize}  
%%%\item v1.5 (2018/07/26)
%%%  \begin{itemize}
%%%  \item introduced |\setxtinfosetlayer|
%%%  \item introduced |\setxtsubgamelayer|
%%%  \end{itemize}
%%%\item v1.4 (2018/07/12)
%%%  \begin{itemize}
%%%  \item completely rewrote |\xtInfosetO| to deal with sloped information sets
%%%    \begin{itemize}
%%%    \item removed |\xtInfosetO'| and |\xtInfoset'| (critical change for users!)
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v1.3 (2018/07/06)
%%%  \begin{itemize}
%%%  \item (internally) renamed some macros (such as |\xt@...|)
%%%  \item (internally) renamed |\xtaction| to |\istaction|
%%%  \item (internally) renamed |\xtpayoff| to |\istpayoff|
%%%  \item (internally) renamed |\istRoot(O)| to |\ISTRoot(O)|
%%%  \end{itemize}
%%%\item v1.2 (2017/12/11)
%%%  \begin{itemize}
%%%  \item replaced |\istb.| by |\istbt| (critical change for users!)
%%%    \begin{itemize}
%%%    \item |\istb| redefined accordingly
%%%    \item this is the cost of introducing |\istB(*)|
%%%    \end{itemize}
%%%  \item introduced |\istB(*)| to deal with dual action labels
%%%  \item added |\istbt(*)| and |\istBt(*)|
%%%  \item added \xw{text depth=.25ex} as an option to |\istroot| and |\istrooto|
%%%  \end{itemize}
%%%\item v1.1 (2017/10/02)
%%%  \begin{itemize}
%%%  \item introduced |\xtCommentTo| and |\xtCommentFrom|
%%%  \item introduced |\xtTimeLineH(')|
%%%  \item redefined |\xtActionLabel| to deal with sloped labels
%%%  \item replaced |\tikzstyle| by |\tikzset|
%%%  \end{itemize}
\item v1.0 (2017/09/04)
  \begin{itemize}
  \item introduced |\cntmlevdist| and |\cntmsibdist|
  \item introduced |\cntmdistance|
  \item redefined related marcos
  \item package document done
  \end{itemize}
%%%\item v1.0 (2017/09/04) ready to submit to CTAN
%%%  \begin{itemize}
%%%  \item introduced |\cntmlevdist| and |\cntmsibdist|
%%%  \item introduced |\cntmdistance| (for internal use)
%%%  \item redefined related marcos.
%%%  \item package document done
%%%  \end{itemize}
%%%\item v0.99g (2017/08/21)
%%%  \begin{itemize}
%%%  \item redefined the \env{istgame} environment to add \xw{>=stealth} as default
%%%  \item added \xw{text depth=.25ex} as an option to |\istb| to get better alignment of action labels
%%%  \end{itemize}
%%%\item v0.99f (2017/08/02)
%%%  \begin{itemize}
%%%  \item redefined |\xtInfosetO(')|
%%%    \begin{itemize}
%%%    \item added \verb+\begin{scope}[on background layer]...\end{scope}+
%%%    \end{itemize}
%%%  \end{itemize}
%%%\item v0.99e (2017/08/01)
%%%  \begin{itemize}
%%%  \item introduced the prime(\xw{'}) versions to deal with \xw{grow'} (this is the swap version in \TikZ)
%%%  \item redefined |\istroot(')|
%%%  \item defined |\istrooto(')| to replace |\istroot*|
%%%    \begin{itemize}
%%%    \item |\istroot*| completely replaced by |\istrooto|
%%%    \end{itemize}
%%%  \item redefinde |\istcntm|
%%%  \item defined |\istcntmarc|
%%%    \begin{itemize}
%%%    \item |\istcntm*| completely replaced by |\istcntmarc|
%%%    \end{itemize}
%%%  \item redefined |\xtInfoset(')| and |\xtInfosetOwner(')|
%%%  \item introduced |\xtInfosetO(')|
%%%    \begin{itemize}
%%%    \item |\xtInfoset*| completely replaced by |\xtInfosetO|
%%%    \end{itemize}
%%%  \item introduced |\xt@growswap| introduced
%%%  \item redefined |\xtNode| accordingly
%%%  \end{itemize}
%%%\item v0.99d (2017/07/27)
%%%  \begin{itemize}
%%%  \item defined |\xtSubgameBox(*)| and |\xtSubgameOval(*)| to express a subgame
%%%  \end{itemize}
%%%\item v0.99c (2017/07/20)
%%%  \begin{itemize}
%%%  \item defined |\xtgrow| to deal with going `clockwise' of branch arrangement
%%%  \item defined |\setxtgrowkey| to change between \xw{grow} and \xw{grow'}
%%%  \item introduced |\setistgrowdirection'| by redefining |\setistgrowdirection|
%%%  \item updated `related macros' accordingly
%%%  \end{itemize}
%%%\item v0.99b (2017/07/16)
%%%  \begin{itemize}
%%%  \item renamed \xw{zero node} as \xw{plain node}
%%%  \item added |\setistPlainNodeStyle|
%%%  \item defined |\xtNode*| (for a terminal node text with a plain node)
%%%  \item redefined |\xt<...>NodeStyle| (now all arguments are optional)
%%%  \item renamed |\isthorizontallabelshift| as |\istactionlabelxshift|, with default \xw{1pt}
%%%  \item renamed |\istverticallabelshift| as |\istactionlabelyshift|, with default \xw{2pt}
%%%  \end{itemize}
%%%\item v0.99a (2017/03/10)
%%%  \begin{itemize}
%%%  \item started rewriting package manual
%%%  \item introduced |\istb.|\ (for terminal nodes)
%%%  \item redefined |\xtShowTerminalNodes|
%%%  \item introduced |\xtShowEndPoints| and |\xtHideEndPoints|
%%%  \item redefined |\xtInfoset*|, with |\xtdefaultinfosep| added
%%%  \end{itemize}
%%%\item v0.9 (2017/02/13)
%%%  \begin{itemize}
%%%  \item some internal macro names changed (|\xtnode|, |\xttnode|,|\xtshowtnode|)
%%%%  \item conflict with \pkg{tikz-qtree} resolved. (\env{istgame} differs from \env{tikzpicture} with \pkg{tikz-qtree})
%%%%  \item |\setistbranchanchors| added
%%%  \item added \xw{zero node}
%%%  \end{itemize}
%%%\item v0.8 (2017/01/17)
%%%  \begin{itemize}
%%%  \item macro names changed
%%%    \begin{itemize}
%%%      \item |\xtdistance|: prefix `\xw{x}' changed to `\xw{xt}' meaning `extensive tree'
%%%      \item |\xtInfoset(*)|, |\xtInfosetOwner|, |\xtActionLabel|, |xtOwner|, |\xtPayoff|, |\xtNode|
%%%      \item |\xtShowTerminalNodes|, |\xtHideTerminalNodes|
%%%      \item |\xtlevdist|, |\xtsibdist|
%%%    \end{itemize}
%%%  \item |\xtNode| redefined
%%%  \item some internal macro names changed (including |\xtpayff|, |\xtmove|)
%%%  \item node styles redefined
%%%  \item |\setist<Solid>NodeStyle| added for <Various> node styles
%%%  \item |\setistdefaultnodecolor|, |setistdefaultnodebgcolor| added
%%%  \end{itemize}
\end{itemize}


\section{Acknowledgement}

The basic idea of the \pkg{istgame} package came from Osborne's \pkg{egameps} package and Chen (2013). 
The update of the package \pkg{istgame} to \xw{version 2.0} is partly motivated by the questions and discussions on the \xw{game tree} topic at \url{https://tex.stackexchange.com/}.
Special thanks go to Kangsoo Kim of KTUG for his great help in using \pkg{expl3} to simplify the appearance and the usage of the macros, and to resolve the issues on \TeX's expansion.


\section{References}
\hpara{}Chen, H.~K.~(2013), ``Drawing Game Trees with \TikZ,'' \url{http://www.sfu.ca/~haiyunc/notes/Game_Trees_with_TikZ.pdf}.

\hpara{}Cho, I-S.~(2017), ``\pkg{istgame}: Drawing Game Trees with \TikZ,'' in Korean TeX Society, \emph{\TeX, Beyond the World of Typesetting}, Seoul: Kyungmoonsa, 203--237.

\hpara{}Osborne, M.~J.~(2004a), ``Manual for \pkg{egameps.sty},'' Version 1.1, \url{http://texdoc.net/texmf-dist/doc/latex/egameps/egameps.pdf}

\hpara{}\uline{\hphantom{Osborne, M.~J}}~(2004b), \emph{An Introduction to Game Theory}, New York: Oxford.

\hpara{}Tantau, T.~(2021), ``\TikZ\ and PGF: Manual for version 3.1.9a,'' \url{http://sourceforge.net/projects/pgf}.

%\section*{Discussions (in Korean) on KTUG board}
%
%\begin{itemize}
%\item Drawing Game Trees 1: \url{http://www.ktug.org/xe/index.php?document_srl=207287}
%
%\item Drawing Game Trees 1-1: \url{http://www.ktug.org/xe/index.php?document_srl=207513}
%
%\item Drawing Game Trees 1-2:
%\url{http://www.ktug.org/xe/index.php?document_srl=208286}
%
%\item Drawing Game Trees 2: \url{http://www.ktug.org/xe/index.php?document_srl=212043}
%
%\item Drawing Game Trees 2-1:
%\url{http://www.ktug.org/xe/index.php?document_srl=212225}
%
%\item Drawing Game Trees 2-2:
%\url{http://www.ktug.org/xe/index.php?document_srl=212319}
%\end{itemize}

\clearpage
\printindex

\end{document}
