1

I need your help with tabular. I have added an MWE.

What I don't like is 1) The space between "Manchester City" and the line above is too small. 2) The spaces (white columns) between the columns are too big.

\documentclass{article}
\usepackage{tabu}
\begin{document}
    \begin{tabu}{p{5cm} p{0.01cm} c p{0.01cm} c p{0.01cm} c}
        \tabucline[1pt]{-}
        && Champions PL && Champions CL && Champions EL \\ \cline{1-1} \cline{3-3} \cline{5-5} \cline{7-7}
        \textbf{Manchester City} && x && - && - \\
        - Manchester City Football Club && && && \\
        - The Citizens && && && \\ \cline{1-1} \cline{3-3} \cline{5-5} \cline{7-7}
        \textbf{FC Liverpool} && - && x && - \\ \cline{1-1} \cline{3-3} \cline{5-5} \cline{7-7}
        \textbf{Arsenal Football Club} && - && - && - \\
        - Gunners && && && \\ \cline{1-1} \cline{3-3} \cline{5-5} \cline{7-7}
        \end{tabu}
\end{document}
4
  • 3
    Package tabu is unmaintained and known having problems. If possible omit to use it ...
    – Mensch
    Sep 3, 2019 at 9:49
  • 2
    you are using && everywhere so the "white s[aces between columns" are the empty columns that you are inserting, what is the intention of && here? Sep 3, 2019 at 10:09
  • @DavidCarlisle I'm using && to create a small gap between the lines.
    – user123937
    Sep 3, 2019 at 12:21
  • 2
    @GuestUser but that is wrong, latex already has a settable padding on each side of a column (\tabcolsep) so you are generating an empty column of width specified to p plus 2\tabcolsep which complicates the markup for no gain, you can just set \tabcolsep appropriately. Sep 3, 2019 at 12:50

2 Answers 2

1

A package which helps to produce nice tables is booktabs. It adds some space between cells and horizontal lines (called \toprule, \midrule, \bottomrule and \cmidrule). To make the gaps narrower, I just redefined \tabcolsep, it specifies distance between table columns. And actually you don't need tabu here (\toprule seem to be an adequate replacement for \tabucline). Also, I replaced x by $\times$ and - by $-$ in the cells (they look nicer this way).

\documentclass{article}
\usepackage{booktabs}
\begin{document}
\def\tabcolsep{1mm}
\begin{tabular}{lp{0.01cm}cp{0.01cm}cp{0.01cm}c}
\toprule
&& Champions PL && Champions CL && Champions EL \\ \cmidrule{1-1} \cmidrule{3-3} \cmidrule{5-5} \cmidrule{7-7}
\textbf{Manchester City} && $\times$ && $-$ && $-$ \\
- Manchester City Football Club && && && \\
- The Citizens && && && \\ \cmidrule{1-1} \cmidrule{3-3} \cmidrule{5-5} \cmidrule{7-7}
\textbf{FC Liverpool} && $-$ && $\times$ && $-$ \\ \cmidrule{1-1} \cmidrule{3-3} \cmidrule{5-5} \cmidrule{7-7}
\textbf{Arsenal Football Club} && $-$ && $-$ && $-$ \\
- Gunners && && && \\
\bottomrule
\end{tabular}
\end{document}

The result:

enter image description here

1

One more "design": column numbers are reduced to four (as you use columns), with booktabs' rules and use of em dash (--) for punctuation marks.

enter image description here

\documentclass{article}
\usepackage{booktabs}

\begin{document}
\begin{tabular}{l c c c}
    \toprule
    & Champions PL  & Champions CL  & Champions EL  \\ 
    \midrule
\textbf{Manchester City} 
    & $\times$      & --            & --            \\
- Manchester City Football Club 
    &               &               &               \\
- The Citizens 
    &               &               &               \\ 
    \midrule
\textbf{FC Liverpool} 
    & --            & $\times$      & --            \\ 
    \midrule
\textbf{Arsenal Football Club} 
    & --            & --            & --            \\
- Gunners 
    &               &               &               \\
    \bottomrule
\end{tabular}
\end{document}

or

enter image description here

\documentclass{article}
\usepackage{booktabs}

\begin{document}
\renewcommand\arraystretch{1.2}
\begin{tabular}{l c c c}
    \toprule
    & \multicolumn{3}{c}{Champions} \\
    \cmidrule{2-4}
    &   PL      & CL        & EL    \\ 
    \midrule
\textbf{Manchester City} 
    & $\times$  & --        & --    \\
- Manchester City Football Club 
    &           &           &       \\
- The Citizens 
    &           &           &       \\
    \midrule
\textbf{FC Liverpool} 
    & --        & $\times$  & --    \\ 
    \midrule
\textbf{Arsenal Football Club} 
    & --        & --        & --    \\
- Gunners 
    &           &           &       \\
    \bottomrule
\end{tabular}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .