Drawing games with TikZ

TikZ is a great TeX package to draw whatever you feel like drawing. I just used it to draw game trees for a paper. A good starting point for doing this was a tutorial by Haiyun K. Chen from Simon Fraser University. Below is the code I came up with for my games. The first game is an extensive form game among two players that have to choose twice simultaneously between two alternatives. The second game is also an extensive form game, but among three players. In the first stage, player C has to choose a value for z. Next, the two players E,F have to choose among two alternatives simultaneously.

games_1

games_2

Read the rest of this entry »


Update: Version Control for Latex files

Github can be used to version control your tex files, which is handy if you are working on a large writing project, e.g. a dissertation. Here is a quick tutorial on how to include a footnote in your compiled tex files that tells you the git commit ID and the commit date. See also my first post here.

Install the gitinfo package for Latex. Next, initialize a new git repository, e.g. via the terminal and cd into the hooks folder.


git init
cd ./.git/hooks

Now, replace the files with these hooks (zip). I built them according to gitinfo package (documentation. Next, include this header into your Latex file:


\usepackage{gitinfo}
\title{Selection, Aggregation and Missing data}
\author{sumtxt\footnote{Last commit: \gitCommitterIsoDate\ Git-Hash: \gitAbbrevHash. Please do not distribute without the permission of the author.}}

and compile the tex files. The footnote (should) now read: “Last commit: 2013-01-03 22:09:06 +0100 Git-Hash: 4b23635. Please do not distribute without the permission of the author.”

Update (6/19/13): Some other useful advices here.


Version Control for Latex files

Git is not only a great tool to version control your code but also Latex files. Stackoverflow user yoda provides some excellent tipps for combining Latex and git. If you are looking for a way to tag your pdf files with the git hash or the most recent commit date, you might want to take a look at this Latex package. I use it to tag my pdfs with the corresponding git hash. That makes it hopefully easier in the future to match printouts to specific git commits.