Create a table for an athletic knockout event

You can use the hvfloat package; a little example:

\documentclass{article}
\usepackage{hvfloat}

\begin{document}

\section{Test Section}

\hvFloat[rotAngle=90,nonFloat]%
{}%
{\begin{tabular}{ll}
column 1a & column 2a \\
column 1b & column 2b \\
column 1c & column 2c \\
\end{tabular}}%
{A rotated table}%
{fig:test}

\end{document}

enter image description here

1: http://i.stack.imgur.com/ls7ba.pngYou 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:

\Pair{<team1>}{<score>}{<team2>}{<score>}

Here's the code:

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{array}
\usepackage{tikz}
\usetikzlibrary{trees}

\newcommand\Pair[4]{%
  \arrayrulecolor{cyan!60!black!40}%
  \arrayrulewidth=1pt
  \renewcommand\extrarowheight{1.5pt}%
  \begin{tabular}{|p{2cm}|>{\centering\arraybackslash}p{10pt}|}
  \hline
  \rowcolor{cyan!60!black!10}\textcolor{red!60!black}{#1} & \textcolor{red!60!black}{#2} \\
  \hline 
  \rowcolor{cyan!60!black!10}\textcolor{red!60!black}{#3} & \textcolor{red!60!black}{#4} \\
  \hline
  \end{tabular}%
}
\begin{document}

\begin{tikzpicture}[
  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};
\end{tikzpicture}

\end{document}

enter image description here


Something to get you started.

\documentclass{standalone} 

\usepackage{tikz-qtree}

\begin{document}

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

% Setup for horizontal tree
    % Grow tree to right with nodes placed clockwise(')
    \tikzset{grow'=left}
    % 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} ] ]
\end{tikzpicture}

\end{document}

result:

knockouts

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

Tags:

Diagrams