0

Code:

\documentclass[12pt]{article}
\usepackage{istgame}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows.meta, positioning}
\usepackage{enumitem}
\usepackage{float}
\usepackage[margin=1in]{geometry} 
\usepackage{amsmath}
\begin{document}
    \begin{figure}[H]
        \centering
        \begin{istgame}[scale = 0.85, transform shape] %Cause of error
            \setistNewNodeStyle{max}
            [regular polygon, regular polygon sides = 3]{1.75cm}
            \setistNewNodeStyle{maxTerm}
            [regular polygon, regular polygon sides = 3, dashed]{1.75cm}
            \setistNewNodeStyle{min}
            [regular polygon, regular polygon sides = 3, shape border rotate = 180]{1.75cm}
            \def\distFactor{25};
            \xtdistance{\distFactor mm}{4*\distFactor mm}
            \istroot(bd)[max]<center>{$bd$}
            \istb \istb \endist
            \xtdistance{\distFactor mm}{2*\distFactor mm}
            \istroot(cd)(bd-1)[min]<center>{$cd$}
            \istb \istb \istb \endist
            \xtdistance{\distFactor mm}{\distFactor mm}
            \istroot(ce)(cd-1)[max]<center>{$ce$}
            \istb \istb \endist
            \istroot(de)(ce-1)[min]<center>{$de$}
            \istb \endist
            \istroot(dd)(de-1)[maxTerm]<center>{$dd$} \endist
            \istroot(be)(ce-2)[min]<center>{$be$} 
            \istb \endist
            \istroot(bdRepeat)(be-1)[max]<center>{$bd$} 
            \istbt{}{-1} \istbt{}{0} \endist %Error
        \end{istgame}
    \end{figure}
    \begin{figure}[H]
        \centering
        \begin{istgame}
            \setistNewNodeStyle{max}
            [regular polygon, regular polygon sides = 3]{1.75cm}
            \setistNewNodeStyle{min}
            [regular polygon, regular polygon sides = 3, shape border rotate = 180]{1.75cm}
            \setistNewNodeStyle{chance}
            [circle]{1.2cm}
            %\xtShowTerminalNodes[box node, minimum size = 1cm]
            \def\distFactor{20};
            \xtdistance{\distFactor mm}{4*\distFactor mm}
            \setxtarrowtips[blue, thick]
            \istroot(0)[max]<center, blue>{1.5}
            \istb[blue, ->-] \istb \endist
            \xtdistance{\distFactor mm}{2*\distFactor mm}
            \istroot(1)(0-1)[chance]<center, purple>{1.5}
            \istb{0.5}[al] \istb{0.5}[ar] \endist
            \istroot(2)(0-2)[chance]<center, purple>{$-0.5$}
            \istb{0.5}[al] \istb{0.5}[ar] \endist
            \xtdistance{\distFactor mm}{\distFactor mm}
            \istroot(3)(1-1)[min]<center, red>{2}
            \istbt{}{2} \istbt{}{2} \endist
            \istroot(4)(1-2)[min]<center, red>{1}
            \istbt{}{1} \istbt{}{2} \endist
            \istroot(5)(2-1)[min]<center, red>{0}
            \istbt{}{0} \istbt{}{2} \endist
            \istroot(6)(2-2)[min]<center, red>{$-1$}
            \istbt{}{-1} \istbt{}{0} \endist
        \end{istgame}
    \end{figure}
\end{document}

Error message:

Package PGF Math Error: Unknown function `south' (in 'south'). \istbt{}{-1} \istbt{}{0} \endist

Output:

enter image description here

The syntax is correct, yet I am getting an error for the line with the %Error comment. What is going on?

Edit: If I comment out the [scale = 0.85, transform shape] part, the error doesn’t appear. Why would an error be thrown then?

  • If you replace \istbt{}{-1} \istbt{}{0} with \istBt{}{-1} \istBt{}{0} it works. I think you misused istbt. According to the doc should be used as \istbt[<options>]{<label>} while \istBt accepts 2 labels \istbt{<labelabove>}[<optionsabove>]{<labelbelow>}[<optionsbelow>] – BambOo Apr 27 at 7:26
  • I think \istbt is correctly used in the question code because the second curly braces argument is used like a payoff. – InSung Cho Jul 29 at 14:14
0

I would not use transform shape (particularly, not as an environment option) since the minimum size is specified. If you need to use transform shape you can use it in each definition of NewNodeStyle (not as an environment option) as follows:

\begin{istgame}[scale = 0.85] %%, transform shape] %Cause of error
    \setistNewNodeStyle{max}
    [regular polygon, regular polygon sides = 3, 
    transform shape]{1.75cm}
    \setistNewNodeStyle{maxTerm}
    [regular polygon, regular polygon sides = 3, dashed, 
    transform shape]{1.75cm}
    \setistNewNodeStyle{min}
    [regular polygon, regular polygon sides = 3, shape border rotate = 180, 
    transform shape]{1.75cm}
    ...
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.