TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A question regarding drawing checkers pieces and boards using TikZ has been asked here previously and I'm aware of the chessboard package. However I want to draw a Chinese checkers board:

enter image description here

I want to draw it as opposed to using an image because I want to be able to edit the locations of pieces. The question is how I would go about drawing the board. Two options I see are:

  1. Draw the board as rows of circles and then draw the outline similar to the above.

  2. Draw the board as rows of equilateral triangles as seen here.

Either way is fine, but drawing either one is a mystery to me. Any tips?

share|improve this question
I imagine that another approach people might take is draw a square array of circles, and then clip it to the desired shape. – cmhughes Oct 22 '11 at 0:32
@cmhughes: I don't think that would really work. The circles are not in the corners/vertices of a square matrix, they are aligned along triangles. – Count Zero Oct 22 '11 at 9:47
up vote 31 down vote accepted

You can use a \foreach loop that takes the number of positions in each row as the loop list. For the standard chinese checkers boards, that could look like \foreach \m [count=\count] in {1,...,4,13,12,...,9,10,11,...,13,4,3,...,1}.

If you systematically name the nodes you create in this loop, you've got a very nice framework for drawing Chinese Checkers setups and moves. I've written a couple of macros and styles for this.

The command \checkerboard[checkerboard labels] will draw a blank board with the fields labeled <row>-<column>:

You can then place pieces using

\placepieces[<colour>]{<comma separated list of positions>}

and show moves using

 \showmove{<sequential list of positions>}

For example,


Here's the full code:




        minimum size=0.5cm
        fill=black!5, draw=gray,
        minimum size=0.6cm,
        inner sep=0pt,
    checkerboard labels/.is if=checkerboardlabels,
    checkerboard labels/.default=true,
        densely dashed,
        very thick,
        bend right=45

        \foreach \m [count=\count] in {1,...,4,13,12,...,9,10,11,...,13,4,3,...,1}{
            \foreach \n in {1,...,\m}
                \node at (\n-\m/2,\count) [
                    outer sep=0.5cm,
                    label=center:{\ifcheckerboardlabels \count-\n\fi}] {};

            \draw [gray,thick,rounded corners=0.4cm,fill=yellow!30] (pos-1-1.240) -- (pos-5-5.240) -- (pos-5-1.240) --
                (pos-5-1.180) -- (pos-9-1.180) -- (pos-13-1.180) --
                (pos-13-1.120) -- (pos-13-5.120) -- (pos-17-1.120) --
                (pos-17-1.60) -- (pos-13-9.60) -- (pos-13-13.60) --
                (pos-13-13.0) -- (pos-9-9.0) -- (pos-5-13.0) --
                (pos-5-13.300) -- (pos-5-9.300) -- (pos-1-1.300) -- cycle;

    \foreach \checker in {#2} {
        \node [pieces,#1] at (pos-\checker) {};

\foreach \position [remember = \position as \previousposition,count=\count] in {#2}{
    \ifnum \count=1
        \node at (pos-\position.center) [positions,black,ultra thick,fill=none] {};
        \draw [move] (pos-\previousposition.center) to (pos-\position.center);



share|improve this answer
That is fantastic. Thanks! – Mike Wierzbicki Oct 22 '11 at 13:39
That's a great answer to an interesting question. – DJP Oct 22 '11 at 14:52
@Jake: Very nice! Can I add this example to the TikZ examples gallery? If yes, perhaps mail your author details to me. – Stefan Kottwitz Dec 22 '11 at 19:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.