# Typesetting extensive form games in LaTeX

Apr. 15, 2014

For my game theory course I needed to typeset extensive-form games in LaTeX documents. One way of doing this to use the egameps package written by Martin Osborne. Osborne is the author of two excellent game theory texts, and he has shown the same care in this package which has a very pleasing syntax and produces quite nice output. This package is based on the pstricks package which means that it will not work with pdfTeX. You need to compile to DVI, then to Postscript and then to PDF which is cumbersome, though some LaTeX environment do provide a shortcut for this pipeline.

A newer way of producing drawings in LaTeX is the PGF/TikZ packages which support pdfTeX. TikZ also has lot of built in support for drawing trees which means that unlike egameps one does not have to calculate coordinates for the nodes manually. To typeset a game tree we use node to define the game nodes, child to describe their hierarchical relationship and edge from parent to style and label the edges. The details are in Chapters 1–3 and 16 of the PGF/TikZ manual.

## A Minimal Example

Suppose you want to typeset this tree

The LaTeX code would be