TransWikia.com

istgame error on correct code

TeX - LaTeX Asked on April 8, 2021

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}
            defdistFactor{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]
            defdistFactor{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?

One Answer

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}
    ...

Answered by InSung Cho on April 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP