Classroom handouts using dealer

One of the applications of the dealer program is to generate hands for bidding practice. While it does a good job at that, it has a few disadvantages in its plain form:

  • The same hand always gets the same problem.
  • The formatting can be improved.

The dealer2latex.pl tool does exactly this:

  1. It rotates the hands such that on half of them, east will start the bidding and on the other half west will.
  2. The formatting is improved, and there is room for comments.
  3. Vulnerability is added.

To use this tool, first download these files:

  1. Make sure that perl and latex are installed on your machine. Both can be downloaded for free for windows, Mac and Linux (and a lot of other systems). Also install dealer.
  2. Download the tools to a directory
  3. Create a description file. If you have never worked with that program, here is a tutorial. The assumption is that 2 players bid the hands (east and west). In the description file, east must be the one opening the bidding. The descr.weaktwo file that you just downloaded is an example.
  4. Now run the programs from your shell or xterm.
    • ./dealer -s 1 Descr.weaktwo | dealer2html.pl
    • pdflatex practice.tex
  5. Done. Here is an example of the output.

If you don’t like the instructions that I have written, simply edit the practice.tex file. The “-s 1” parameter ensures that if you run the programs twice with the same description file, you get the same output. Thus, you can simply recreate what you generated earlier.

Obviously, the next time you want to do this, step 1 and 2 can be skipped.



Henk Uijterwaal 2019