pygambit.gambit.Game.to_latex#

Game.to_latex(filepath_or_buffer: str | Path | IOBase | None = None) str | None#

Export the game to LaTeX format.

Generates a rendering of the strategic form of the game in LaTeX, suitable for use with Martin Osborne’s sgame style. The first player is the row chooser; the second player the column chooser. For games with more than two players, a collection of tables is generated, one for each possible strategy combination of players 3 and higher.

Parameters:

filepath_or_buffer (str or Path or BufferedWriter or None, default None) – String, path object, or file-like object implementing a write() function. If None, the result is returned as a string.

Return type:

String representation of the game or None if the game is exported to a file

See also

to_efg, to_nfg, to_html