2

Calling all LaTeX & football fans! The FIFA World Cup is fast approaching and I've been trying to make a wall chart for the tournament in LaTeX.

This is what I've managed to create so far:

enter image description here

enter image description here

enter image description here

My idea was to have four groups spread across the top of the page, and four groups across the bottom of the page. Across the centre of the page would be the knock-out stages. How can I achieve this page layout? (I also need a way to include the final match, 3rd place match and other missing half of the knock-out stages)

Additionally, are there ways to make this chart automatically calculate the group table statistics and positions? So basically the scores are the only data you have to input. That would be really cool but perhaps very complicated!

MWE

\documentclass{article}
\usepackage[landscape,a4paper,margin=1cm]{geometry}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{ulem}
\usepackage[table]{xcolor}
\usepackage{array}
\usepackage{tikz}
\usetikzlibrary{trees}

\newcommand\Pair[4]{%
  \arrayrulecolor{black}%
  \renewcommand\extrarowheight{1.5pt}%
  \begin{tabular}{p{2cm}|>{\centering\arraybackslash}p{10pt}}  
  \textcolor{black}{#1} & \textcolor{black}{#2} \\
  \hline 
  \textcolor{black}{#3} & \textcolor{black}{#4} \\ 
  \end{tabular}%
}

\renewcommand{\arraystretch}{1.5}
\pagestyle{empty}

\begin{document}

\resizebox{5cm}{!}{%
\begin{tabular}{llllllllll}
\multicolumn{10}{l}{Group A}                           \\ \hline
No. & Team         & Pl & W & D & L & F & A & GD & Pts \\ \hline
1   & Russia       &  0  & 0  & 0  & 0  & 0  & 0  & 0   & 0    \\ 
2   & Saudi Arabia &  0  & 0  & 0  & 0  & 0  & 0  & 0   & 0    \\
3   & Egypt        &  0  & 0  & 0  & 0  & 0  & 0  & 0   & 0    \\ 
4   & Uruguay      &  0  & 0  & 0  & 0  & 0  & 0  & 0   & 0    \\ \hline
\end{tabular}
}

\vspace{0.2cm}

\resizebox{3.5cm}{!}{%
\begin{tabular}{rlcll}
Russia       & 0 & - & 0 & Saudi Arabia \\ 
Egypt        & 0 & - & 0 & Uruguay      \\ 
Russia       & 0 & - & 0  & Egypt        \\ 
Uruguay      & 0  & - & 0  & Saudi Arabia \\ 
Saudi Arabia & 0  & - & 0  & Egypt        \\ 
Uruguay      & 0  & - & 0  & Russia       
\end{tabular}
}

\vspace{1cm}

\resizebox{15cm}{!}{%
\begin{tikzpicture}[
  level distance=5cm,every node/.style={minimum width=2cm,inner sep=0pt},
  edge from parent/.style={<-},
  level 1/.style={sibling distance=4cm},
  level 2/.style={sibling distance=2cm},
]
\node (1) {\Pair{Winner QF 1}{0}{Winner QF 2}{0}}
[edge from parent fork left,grow=left]
child {node (2) {\Pair{Winner 1}{0}{Winner 2}{0}}
child {node (3) {\Pair{1st Group A}{0}{2nd Group B}{0}}}
child {node {\Pair{1st Group C}{0}{2nd Group D}{0}}}
}
child {node {\Pair{Winner 3}{0}{Winner 4}{0}}
child {node {\Pair{1st Group E}{0}{2nd Group F}{0}}}
child {node {\Pair{1st Group G}{0}{2nd Group H}{0}}}
};
\node at ([yshift=50pt]3) (QF) {\uline{Round of 16}};
\node at (2|-QF) {\uline{Quarter-finals}};
\node at (1|-QF) (QF) {\uline{Semi-finals}};
\node at ([xshift=5cm,yshift=-1.5cm]QF) (F) {\uline{Final}}; 
\node at ([yshift=-4cm]F) {\uline{Third place play-off}}; 
\end{tikzpicture}
}

\end{document}

Some of the code was adapted from Create a table for an athletic knockout event

  • 4
    I would say the same as usual, do the math somewhere else bring in the results to TeX for typesetting. – percusse Jun 7 '18 at 23:49
  • 3
    @percusse now where's the fun in that? :-) – David Carlisle Jun 8 '18 at 8:28
  • 1
    @DavidCarlisle Watching the games instead of waiting TeX to finish the compilation? :) – percusse Jun 8 '18 at 8:41
  • 2
    @percusse there's time, the world cup is not till next year anyway. – David Carlisle Jun 8 '18 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.