TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

I have used LaTeX for fairly large documents in the past but not for diagrams.

I would like to create a table describing a knockout athletic event, for instance like the one found here in HTML.

How would I go about creating such a thing in LaTeX? Perhaps there is already a package for this and I couldn't find it. But if not, which packages would you advise me to study and combine?

share|improve this question
Welcome to TeX.sx! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are "too localized". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help. – Martin Schröder Nov 22 '12 at 23:44
try the tikz-qtree package. – mythealias Nov 22 '12 at 23:52
Tikz is the way to go. Have a look at page 115 of the pgfmanual: ctan.org/tex-archive/graphics/pgf/base/doc/generic/pgf/… – Vivi Nov 22 '12 at 23:54
up vote 6 down vote accepted

You can produce the table using TikZ and its trees library; inside the tree the \Pair command (a two-column tabular) is used to fill the information; this command has four mandatory arguments:


Here's the code:


  \rowcolor{cyan!60!black!10}\textcolor{red!60!black}{#1} & \textcolor{red!60!black}{#2} \\
  \rowcolor{cyan!60!black!10}\textcolor{red!60!black}{#3} & \textcolor{red!60!black}{#4} \\

  level distance=5cm,every node/.style={minimum width=3cm,inner sep=0pt},
  edge from parent/.style={cyan!70!black,ultra thick,draw},
  level 1/.style={sibling distance=4cm},
  level 2/.style={sibling distance=2cm},
  legend/.style={draw=orange,fill=orange!30,inner sep=3pt}
\node (1) {\Pair{Netherlands}{0}{Spain}{1}}
[edge from parent fork left,grow=left]
child {node (2) {\Pair{Netherlands}{4}{Uruguay}{2}}
child {node (3) {\Pair{Germany}{2}{Colombia}{1}}}
child {node {\Pair{Russia}{0}{Spain}{2}}}
child {node {\Pair{Germany}{0}{Spain}{1}}
child {node {\Pair{Germany}{2}{Colombia}{1}}}
child {node {\Pair{Russia}{0}{Spain}{2}}}
\node[legend] at ([yshift=50pt]3) (QF) {Quarter Finals};
\node[legend] at (2|-QF) {Semi-Finals};
\node[legend] at (1|-QF) (QF) {Final};


enter image description here

share|improve this answer

Something to get you started.




[ every text node part/.style={draw, align = left, inner sep = 0pt} ]

% Setup for horizontal tree
    % Grow tree to right with nodes placed clockwise(')
    % Use edges with 90° bends instead of default straight
    \tikzset{edge from parent/.style = { draw,
             edge from parent path = { (\tikzparentnode.west) 
                                        -- +(-8pt, 0)
                                        |- (\tikzchildnode.east) }}}
    % Increase horizontal spacing (adjust if length of name is long)
    \tikzset{level distance = 6em}
    % Adjust the alignment of the nodes
    \tikzset{every tree node/.style = {draw, anchor = base west}}

\Tree[ .{Team 1}
        [     .{Team 1} {Team 2}
              [.{Team 1} {Team 3} {Team 4} ] ]
        [.{Team 5} {Team 5} {Team 6} ] ]




you can further edit the tree so that each node is a table. to better match the table you linked to.

share|improve this answer

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.