TransWikia.com

istgame package: Problem with display

TeX - LaTeX Asked on December 27, 2021

It’s my first time using LaTeX and I’m kind of having some problems displaying game trees. I’m using TeXnic Center and MiKTeX and the thing is, I didn’t create the following code, i found it in the istgame documentation so it is correct. It even works when I paste it on Overleaf but yet when I use it in TeXnic Center this is what it gives me…

I’m pretty sure the problem is quite simple but I sure cannot figure it out by myself so I would really appreciate if someone could give me a hand with that.

So as you can see I obtain a rather annoying graph and I don't understand why.

documentclass{article}
usepackage{istgame}
begin{document}

begin{istgame}[scale=1.5] 
setistmathTF*001 
setistgrowdirection{south east} 
xtdistance{10mm}{20mm} 
istroot(0)[initial node]{1} 
    istb{Take}[r]{(2,0)}[b] istb{Pass}[a] endist 
istroot(1)(0-2){2} 
    istb{Take}[r]{(1,3)}[b] istb{Pass}[a] endist 
istroot(2)(1-2){1}
    istb{Take}[r]{(4,2)}[b] istb{Pass}[a] endist
xtInfoset(2-2)([xshift=5mm]2-2)
istroot(3)([xshift=5mm]2-2){2}
    istb{Take}[r]{(97,99)}[b] istb{Pass}[above] endist 
istroot(4)(3-2){1} 
    istb{Take}[r]{(100,98)}[b] istb{Pass}[above] endist 
istroot(5)(4-2){2} 
    istb{Take}[r]{(99,101)}[b] istb{Pass}[a]{(100,100)}[r] endist 
end{istgame}

end{document}

One Answer

A related post: Problem with babel and tikz using draw

Error producing code:

documentclass{article}
usepackage[spanish]{babel}
usepackage{tikz}

begin{document}
begin{tikzpicture}
draw [->] (0,0) -- (1,0);
end{tikzpicture}
end{document}

Solution: usetikzlibrary{babel}

documentclass{article}
usepackage[spanish]{babel}
usepackage{tikz}
usetikzlibrary{babel} %% ADDED

begin{document}
begin{tikzpicture}
draw [->] (0,0) -- (1,0);
end{tikzpicture}
end{document}

Answer to the question:

  • The following code produces an error when compiled through latex and pdflatex.
    • No problem with xelatex and lualatex (in my case).
    • No problem in istgame code itself.
  • Once you got an error, remove auxiliary files before compiling again.
  • It is highly recommended to use usetikzlibrary{babel} when babel package is uploaded.
    • See TikZ manual on p.130 and Section 44.

output:

enter image description here

code:

%!TEX program = xelatex
documentclass{article}
usepackage[francais]{babel}
%usepackage{tikz}
%usetikzlibrary{babel}

usepackage{istgame}

begin{document}

begin{istgame}[scale=1.5] 
setistmathTF*001 
setistgrowdirection{south east} 
xtdistance{10mm}{20mm} 
istroot(0)[initial node]{1} 
    istb{Take}[r]{(2,0)}[b] istb{Pass}[a] endist 
istroot(1)(0-2){2} 
    istb{Take}[r]{(1,3)}[b] istb{Pass}[a] endist 
istroot(2)(1-2){1}
    istb{Take}[r]{(4,2)}[b] istb{Pass}[a] endist
xtInfoset(2-2)([xshift=5mm]2-2)
istroot(3)([xshift=5mm]2-2){2}
    istb{Take}[r]{(97,99)}[b] istb{Pass}[above] endist 
istroot(4)(3-2){1} 
    istb{Take}[r]{(100,98)}[b] istb{Pass}[above] endist 
istroot(5)(4-2){2} 
    istb{Take}[r]{(99,101)}[b] istb{Pass}[a]{(100,100)}[r] endist 
end{istgame}

end{document}

Answered by InSung Cho on December 27, 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