1

I have a table but still struggling. Would be great if you could help me out with the following questions:

a) Even having two times $\toprule$, I get only one thick line in the pdf. How can both be thick?

b) How can I get two thick lines at the bottom? I have in my code two times $\bottomrule$, but the lines shown in the pdf are not thick.

c) Between the column of the year "2007" and "2008", there is a wider space than between all the other columns. How can this be changed, so that every column has the same distance to each other?

Thank you very much for your help in advance!

\documentclass[12pt]{article} 
\usepackage{geometry} 
\geometry{a4paper}
\usepackage{eurosym}
\usepackage{graphicx} 
\usepackage{float} 
\usepackage{wrapfig} 
\usepackage{lipsum} 
\usepackage[applemac]{inputenc}  
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{fancyref} 
\renewcommand{\arraystretch}{1.5}
\linespread{1.2}

\begin{document}
\begin{table}
\caption{Trade evolution Costa Rica - EFTA}
\footnotesize
\setlength{\tabcolsep}{3pt}
\begin{tabular}{l*{12}r}
    \toprule\toprule
    \multicolumn{12}{l}{\textbf{Total trade, by country (in million US\$)}} \\
    \midrule
               & 2003 & 2004 & 2005 & 2006 & 2007 & 2008 & 2009 & 2010 & 2011 & 2012 & 2013 \\[-14pt]
               &      &        &           &     &         &  & & & & &\\
Iceland & 0.217 &  0.82 & 0.1 &   0.165  &  0.206  &  0.124&  0.17 &  0.082&  0.04 &  0.12  &  0.11   \\

    Liechtenstein &  0.017  &   0.002  &   0.004  &   - &  0.000 &  0.001 &   0.023  &   0.049  &  0.000 &  0.000  &  0.014   \\

    Norway &  1.495  &   6.196    &   9.195      &    4.795    &   9.392                            &   29.17  &   1.705  &   8.465  &  22.79  &   25.11   &   28.56   \\

    Switzerland &  58.46  &   74.20     &   72.06        &    90.19    &   111.6                           &   143.9  &   128.3  &   135.9  &    120.8   &    135.8    &    156.9     \\

     Total &   60.19   &    80.48 &    81.36 &    95.15     & 121.2 &      173.2 &   130.2 &   144.5 &   143.7 &   161.1 &   185.6      \\
\midrule
\multicolumn{7}{l}{\textbf{Share of total trade (in \%)}} \\
    \midrule
    Iceland &    0.4\ &    0.1\   & 0.1\ & 0.2\ & 0.2\ & 0.1\ & 0.1\ & 0.1\ & 0.0\ & 0.1\ & 0.1\ \\
    Liechtenstein &    0.0\ &  0.0\ & 0.0\ & 0.0\ & 0.0\ & 0.0\ & 0.0\ & 0.0\ & 0.0\ & 0.0\ & 0.0\ &   \\
    Norway &    2.5\ & 7.7\   & 11.3\    & 5.0\ & 7.7\ & 16.8\    & 1.3\ & 5.9\ & 15.9\    & 15.6\    & 15.4\ \\
    Switzerland &    97.1\ &   92.2\  & 88.6\    & 94.8\    & 92.1\    & 83.1\    & 98.5\    & 94.1\    & 84.1\    & 84.3\    & 84.5\  \\

    \midrule
\multicolumn{7}{l}{\textbf{Imports from EFTA, by country (in million US\$)}} \\
    \midrule
    Iceland &     0.01  &        0.01    &    0.06  &        0.06  &     0.04    &    0.03    &   0.05   &    0.02   &    0.04   &    0.04   &    0.12 \ \\
    Liechtenstein &     0.02      &   0.00   &    0.00   &    -      &    0.00   &    -      &    0.02   &    0.05   &    0.00   &    0.00  &        0.01    \\
    Norway &     1.12     &   5.73   &    8.60  &        4.59     &   9.10  &        28.49    &   1.47   &    8.24   &    15.91       &   9.49   &    13.88  \\
    Switzerland &     53.00      &    69.92      &    65.91  &       86.95   &    104.78     &    139.23     &    125.98     &    133.51     &    117.25  &      131.07       &   155.33   \\
    Total & 54.15 &      75.66   & 74.58    &  91.61    &  113.91   &  167.75   &  127.53   &  141.81   &  133.21   &  140.60 &      169.34  \\
    \midrule
\multicolumn{7}{l}{\textbf{Exports to EFTA, by country (in million US\$)}} \\
    \midrule
    Iceland &      0.21     &   0.07    &   0.04    &   0.10    &   0.17    &   0.10 &       0.12   &   0.06 &       -      &   0.08    &   0.00 \ \\
    Liechtenstein &      -  &        -  &        -  &        -  &        -   &       0.01 &      -   &       -   &       -   &       -   &       -      \\
    Norway &      0.37   &  0.47 &       0.59 &      0.20 &      0.30 &      0.69   &   0.23 &       0.23 &      6.88 &      15.63 &     14.68   \\
    Switzerland &      5.47     &   4.29    &   6.15    &   3.24    &   6.91 &       4.68   &   2.39 &       2.44 &      3.64   &   4.82    &   1.59    \\
    Total &  6.05  &     4.83    &  6.78  &      3.55    &  7.37 &       5.48  &     2.75    &  2.73     &  10.52    &  20.53  &     16.28 \\



    \bottomrule\bottomrule
  \end{tabular}

\label{tbl:tradeevo-costa-efta}
\end{table}
\end{document}
0

For questions (a) and (b):

If you want a really thick \toprule and \bottomrule, then add

\setlength\heavyrulewidth{2pt}

before your table.

For question (c):

Change the line

\multicolumn{7}{l}{\textbf{Imports from EFTA, by country (in million US\$)}} \\

to

\multicolumn{8}{l}{\textbf{Imports from EFTA, by country (in million US\$)}} \\

This happens because you are forcing the text Imports from EFTA, by country (in million US$) onto 7 columns when in fact it occupies 8 columns. To be safe, I would recommend changing ALL \multicolumn{7} to \multicolumn{12} just in case you change the text headers.

Your Answer

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

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