Take the 2-minute tour ×
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.
\begin{table}[htbp]
  \centering
    \footnotesize
  \caption{Add caption}
    \begin{tabular}{ccccccccc}
    \toprule
    Bank  & Country &       &       & Conditional joint probability of default &       &       & Total assets & Total liabilities \\
    \midrule
          &       & 15 Sept. 2008 & 10 Mar. 2009 & 2 May 2010 & 25 Nov. 2011 & 19 Dec. 2013 &       &  \\
    Erste Group Bank AG & AUT   & 0.084 & 0.133 & 0.094 & 0.201 & 0.091 & 209.30 & 194.12 \\
    Raiffeisen Bank & AUT   & 0.094 & 0.121 & 0.080 & 0.256 & 0.097 & 146.63 & 135.69 \\
    Dexia SA & BEL   & 0.052 & 0.111 & 0.059 & 0.154 & 0.060 & 412.05 & 412.37 \\
    KBC Groep NV & BEL   & 0.145 & 0.140 & 0.123 & 0.256 & 0.134 & 282.94 & 266.17 \\
    Danske Bank A/S & DEN   & 0.071 & 0.118 & 0.071 & 0.191 & 0.075 & 3422.61 & 3296.76 \\
    BNP Paribas & FRA   & 0.230 & 0.293 & 0.209 & 0.333 & 0.208 & 1955.94 & 1870.31 \\
    Credit Agricole SA & FRA   & 0.156 & 0.286 & 0.151 & 0.330 & 0.162 & 1718.51 & 1669.22 \\
    Natixis & FRA   & 0.108 & 0.119 & 0.146 & 0.404 & 0.164 & 504.50 & 487.11 \\
    Societe Generale & FRA   & 0.168 & 0.285 & 0.167 & 0.278 & 0.166 & 1176.79 & 1125.68 \\
    Commerzbank AG & GER   & 0.182 & 0.335 & 0.180 & 0.277 & 0.153 & 657.61 & 630.23 \\
    Deutsche Bank AG & GER   & 0.182 & 0.262 & 0.146 & 0.322 & 0.204 & 2155.37 & 2100.71 \\
    IKB Bank & GER   & 0.038 & 0.052 & 0.055 & 0.202 & 0.051 & 31.25 & 30.27 \\
    Alpha Bank & GRE   & 0.034 & 0.060 & 0.031 & 0.096 & 0.035 & 57.68 & 56.25 \\
    Allied Irish Banks PLC & IRE   & 0.040 & 0.062 & 0.037 & 0.124 & 0.019 & 132.96 & 118.50 \\
    Irish Life and Permanent & IRE   & 0.038 & 0.071 & 0.039 & 0.097 & 0.090 & 71.85 & 68.34 \\
    Bank of Ireland & IRE   & 0.035 & 0.061 & 0.040 & 0.109 & 0.092 & 153.50 & 143.25 \\
    Banca Italease & ITA   & 0.030 & 0.043 & 0.081 & 0.336 & 0.105 & 10.53 & 8.89 \\
    Banca Monte dei Paschi di Siena & ITA   & 0.117 & 0.261 & 0.115 & 0.205 & 0.068 & 234.03 & 223.05 \\
    Banca Popolare di Milano & ITA   & 0.166 & 0.232 & 0.132 & 0.224 & 0.079 & 51.22 & 47.16 \\
    Banco Popolare SC & ITA   & 0.110 & 0.119 & 0.090 & 0.157 & 0.084 & 130.86 & 121.44 \\
    Intesa Sanpaolo SpA & ITA   & 0.158 & 0.242 & 0.131 & 0.230 & 0.162 & 626.90 & 579.14 \\
    Mediobanca SpA & ITA   & 0.152 & 0.242 & 0.129 & 0.259 & 0.152 & 74.80 & 67.77 \\
    UniCredit SpA & ITA   & 0.133 & 0.162 & 0.116 & 0.336 & 0.164 & 914.11 & 859.31 \\
    Banco Comercial Portugues SA & POR   & 0.097 & 0.147 & 0.078 & 0.148 & 0.075 & 91.92 & 87.54 \\
    Espirito Santo Financial Group & POR   & 0.076 & 0.126 & 0.075 & 0.198 & 0.092 & 79.53 & 73.54 \\
    Banco Bilbao Vizcaya & SPA   & 0.185 & 0.251 & 0.154 & 0.321 & 0.164 & 3198.97 & 3082.27 \\
    Banco de Sabadell SA & SPA   & 0.067 & 0.120 & 0.085 & 0.195 & 0.103 & 1180.67 & 1126.09 \\
    Banco Santander SA & SPA   & 0.178 & 0.249 & 0.169 & 0.325 & 0.163 & 1226.99 & 1179.73 \\
    Nordea Bank & SWE   & 0.108 & 0.193 & 0.097 & 0.243 & 0.110 & 6397.94 & 6164.55 \\
    Skandinaviska Enskilda Banken & SWE   & 0.077 & 0.112 & 0.073 & 0.192 & 0.078 & 2361.34 & 2252.18 \\
    Svenska Handelsbanken AB & SWE   & 0.118 & 0.196 & 0.112 & 0.285 & 0.112 & 2453.99 & 2359.46 \\
    Swedbank AB & SWE   & 0.058 & 0.090 & 0.070 & 0.195 & 0.071 & 1856.19 & 1758.06 \\
    Credit Suisse Group & SWI   & 0.210 & 0.265 & 0.209 & 0.405 & 0.186 & 1040.23 & 999.14 \\
    UBS SG & SWI   & 0.151 & 0.194 & 0.159 & 0.351 & 0.196 & 1410.64 & 1352.78 \\
    ING Groep NV & NL    & 0.083 & 0.199 & 0.114 & 0.259 & 0.174 & 1270.56 & 1223.33 \\
    SNS Bank Netherlands & NL    & 0.128 & 0.072 & 0.056 & 0.165 & 0.039 & 128.21 & 123.64 \\
    Barclays PLC & UK    & 0.119 & 0.185 & 0.167 & 0.317 & 0.142 & 1560.52 & 1495.32 \\
    HBOS PLC & UK    & 0.065 & 0.209 & 0.115 & 0.317 & 0.217 & 568.00 & 540.36 \\
    Lloyds Banking Group & UK    & 0.166 & 0.207 & 0.117 & 0.228 & 0.156 & 966.05 & 919.46 \\
    Standard Chartered & UK    & 0.201 & 0.126 & 0.219 & 0.417 & 0.116 & 385.26 & 358.62 \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%

I produce the above code using the Excel2Latex addin in Excel. I want to fit this table (portrait) on a single A4 page. However, the above code produces: enter image description here

How can I edit the table to make it fit? Also there are a few things which I'm not sure how to change. For example, the 'Conditional joint probability of default' should span over the 5 dates rather than being forced into the same column as the middle date '2 May 2010'. Furthermore, I have a feeling that the bank names could be too long for the first column, if so, perhaps we can make the banks with longer names use up 2 rows rather than one row?


EDIT:

The below is what I have for my document.

\documentclass[twoside, a4paper, 12pt]{article}

\usepackage{microtype}
\usepackage{booktabs}
\usepackage{array}
\usepackage{multirow}
\usepackage{siunitx}
\usepackage{caption}

\DeclareRobustCommand*{\tabstack}[1]{%
  \begin{tabular}[t]{@{}c@{}}#1\end{tabular}%
}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}

\linespread{1.5}

\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}

\raggedbottom

If I do not remove the 12pt I get the following output for the table:

enter image description here

But if I remove the 12pt the table shows up nicely:

enter image description here

share|improve this question
1  
How wide is your document's text block? Alternatively, how wide are the left and right margins? –  Mico Jul 19 at 10:59
    
@TrueTears Just for curiosity, what the table is about? –  pushpen.paul Jul 19 at 15:23
    
@pushpen.paul It is a paper I am currently writing. In short, it is about the systemic risk of the European sovereign debt crisis and how to quantify the level of systemic risk in the Euro Area :) –  TrueTears Jul 19 at 15:41

4 Answers 4

up vote 14 down vote accepted

Example, which uses the following tricks:

  • Smaller font size as in the question: \footnotesize. (Should not be smaller than that.)
  • Long column headers put in two lines (via macro \tabstack).
  • Also the dates are written in two lines to save space. \cmidrule adds a visual separator between the year and the following numbers in the column.
  • Space between columns reduced to 30%: \setlength{\tabcolsep}{.3\tabcolsep}.
  • Width of the bank column limited to 30 mm by using p column type. Adding package microtype prevents one of the bank names to be broken across two lines (Allied Irish Bank PLC).
  • Package siunitx provides column type S for aligning numbers at the decimal point (thanks cmhughes for the suggestion).
  • The column header Country sticks to the left and right to save some space.
  • Package caption added for correct space between table caption and table (thanks Bernard).
  • Uniform spacing of the date columns without abbreviation dot (suggestion of Barbara Beeton).

Complete source:

\documentclass{article}
\usepackage{microtype}
\usepackage{booktabs}
\usepackage{array}
\usepackage{siunitx}
\usepackage{caption}

\DeclareRobustCommand*{% robust version needed because of column type S
  \tabstack}[1]{\begin{tabular}{@{}c@{}}#1\end{tabular}%
}

\begin{document}
\begin{table}[htbp]
  \centering
  \footnotesize
  \setlength{\tabcolsep}{.3\tabcolsep}
  \newcommand*{\tabdate}[1]{%
    \begingroup
      \settowidth{\dimen0 }{10 Mar}%
      \hbox to \dimen0{\hss #1\hss}%
    \endgroup
  }
  \caption{Add caption}
    \begin{tabular}{
      >{\centering}p{30mm}
      c
      *{5}{S[table-format=1.3]}
      *{2}{S[table-format=4.2]}
    }
    \toprule
    Bank  & \hspace{-\tabcolsep}Country\hspace{-\tabcolsep}\null &
      \multicolumn{5}{c}{%
        Conditional joint probability of default%
      }
      & \tabstack{Total\\assets}
      & \tabstack{Total\\liabilities} \\
    \midrule
      &
      & \tabstack{\tabdate{15 Sept}\\2008}
      & \tabstack{\tabdate{10 Mar}\\2009}
      & \tabstack{\tabdate{2 May}\\2010}
      & \tabstack{\tabdate{25 Nov}\\2011}
      & \tabstack{\tabdate{19 Dec}\\2013}
      &       &  \\
    \cmidrule(r{\tabcolsep}){3-7}
    Erste Group Bank AG & AUT   & 0.084 & 0.133 & 0.094 & 0.201 & 0.091 & 209.30 & 194.12 \\
    Raiffeisen Bank & AUT   & 0.094 & 0.121 & 0.080 & 0.256 & 0.097 & 146.63 & 135.69 \\
    Dexia SA & BEL   & 0.052 & 0.111 & 0.059 & 0.154 & 0.060 & 412.05 & 412.37 \\
    KBC Groep NV & BEL   & 0.145 & 0.140 & 0.123 & 0.256 & 0.134 & 282.94 & 266.17 \\
    Danske Bank A/S & DEN   & 0.071 & 0.118 & 0.071 & 0.191 & 0.075 & 3422.61 & 3296.76 \\
    BNP Paribas & FRA   & 0.230 & 0.293 & 0.209 & 0.333 & 0.208 & 1955.94 & 1870.31 \\
    Credit Agricole SA & FRA   & 0.156 & 0.286 & 0.151 & 0.330 & 0.162 & 1718.51 & 1669.22 \\
    Natixis & FRA   & 0.108 & 0.119 & 0.146 & 0.404 & 0.164 & 504.50 & 487.11 \\
    Societe Generale & FRA   & 0.168 & 0.285 & 0.167 & 0.278 & 0.166 & 1176.79 & 1125.68 \\
    Commerzbank AG & GER   & 0.182 & 0.335 & 0.180 & 0.277 & 0.153 & 657.61 & 630.23 \\
    Deutsche Bank AG & GER   & 0.182 & 0.262 & 0.146 & 0.322 & 0.204 & 2155.37 & 2100.71 \\
    IKB Bank & GER   & 0.038 & 0.052 & 0.055 & 0.202 & 0.051 & 31.25 & 30.27 \\
    Alpha Bank & GRE   & 0.034 & 0.060 & 0.031 & 0.096 & 0.035 & 57.68 & 56.25 \\
    Allied Irish Banks PLC & IRE   & 0.040 & 0.062 & 0.037 & 0.124 & 0.019 & 132.96 & 118.50 \\
    Irish Life and Permanent & IRE   & 0.038 & 0.071 & 0.039 & 0.097 & 0.090 & 71.85 & 68.34 \\
    Bank of Ireland & IRE   & 0.035 & 0.061 & 0.040 & 0.109 & 0.092 & 153.50 & 143.25 \\
    Banca Italease & ITA   & 0.030 & 0.043 & 0.081 & 0.336 & 0.105 & 10.53 & 8.89 \\
    Banca Monte dei Paschi di Siena & ITA   & 0.117 & 0.261 & 0.115 & 0.205 & 0.068 & 234.03 & 223.05 \\
    Banca Popolare di Milano & ITA   & 0.166 & 0.232 & 0.132 & 0.224 & 0.079 & 51.22 & 47.16 \\
    Banco Popolare SC & ITA   & 0.110 & 0.119 & 0.090 & 0.157 & 0.084 & 130.86 & 121.44 \\
    Intesa Sanpaolo SpA & ITA   & 0.158 & 0.242 & 0.131 & 0.230 & 0.162 & 626.90 & 579.14 \\
    Mediobanca SpA & ITA   & 0.152 & 0.242 & 0.129 & 0.259 & 0.152 & 74.80 & 67.77 \\
    UniCredit SpA & ITA   & 0.133 & 0.162 & 0.116 & 0.336 & 0.164 & 914.11 & 859.31 \\
    Banco Comercial Portugues SA & POR   & 0.097 & 0.147 & 0.078 & 0.148 & 0.075 & 91.92 & 87.54 \\
    Espirito Santo Financial Group & POR   & 0.076 & 0.126 & 0.075 & 0.198 & 0.092 & 79.53 & 73.54 \\
    Banco Bilbao Vizcaya & SPA   & 0.185 & 0.251 & 0.154 & 0.321 & 0.164 & 3198.97 & 3082.27 \\
    Banco de Sabadell SA & SPA   & 0.067 & 0.120 & 0.085 & 0.195 & 0.103 & 1180.67 & 1126.09 \\
    Banco Santander SA & SPA   & 0.178 & 0.249 & 0.169 & 0.325 & 0.163 & 1226.99 & 1179.73 \\
    Nordea Bank & SWE   & 0.108 & 0.193 & 0.097 & 0.243 & 0.110 & 6397.94 & 6164.55 \\
    Skandinaviska Enskilda Banken & SWE   & 0.077 & 0.112 & 0.073 & 0.192 & 0.078 & 2361.34 & 2252.18 \\
    Svenska Handelsbanken AB & SWE   & 0.118 & 0.196 & 0.112 & 0.285 & 0.112 & 2453.99 & 2359.46 \\
    Swedbank AB & SWE   & 0.058 & 0.090 & 0.070 & 0.195 & 0.071 & 1856.19 & 1758.06 \\
    Credit Suisse Group & SWI   & 0.210 & 0.265 & 0.209 & 0.405 & 0.186 & 1040.23 & 999.14 \\
    UBS SG & SWI   & 0.151 & 0.194 & 0.159 & 0.351 & 0.196 & 1410.64 & 1352.78 \\
    ING Groep NV & NL    & 0.083 & 0.199 & 0.114 & 0.259 & 0.174 & 1270.56 & 1223.33 \\
    SNS Bank Netherlands & NL    & 0.128 & 0.072 & 0.056 & 0.165 & 0.039 & 128.21 & 123.64 \\
    Barclays PLC & UK    & 0.119 & 0.185 & 0.167 & 0.317 & 0.142 & 1560.52 & 1495.32 \\
    HBOS PLC & UK    & 0.065 & 0.209 & 0.115 & 0.317 & 0.217 & 568.00 & 540.36 \\
    Lloyds Banking Group & UK    & 0.166 & 0.207 & 0.117 & 0.228 & 0.156 & 966.05 & 919.46 \\
    Standard Chartered & UK    & 0.201 & 0.126 & 0.219 & 0.417 & 0.116 & 385.26 & 358.62 \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%
\end{document}

Result

Another variant, inspired by Mico's answer:

  • Use of package multirow for "Total assets" and "Total liabilities".
  • Using three letter abbreviation "Sep." instead of "Sept.".
  • "Total assets" moved a tiny bit to the right, also a little space is added before the last two columns.

Source:

\documentclass{article}
\usepackage{microtype}
\usepackage{booktabs}
\usepackage{array}
\usepackage{multirow}
\usepackage{siunitx}
\usepackage{caption}

\DeclareRobustCommand*{\tabstack}[1]{%
  \begin{tabular}[t]{@{}c@{}}#1\end{tabular}%
}

\begin{document}
\begin{table}[htbp]
  \centering
  \footnotesize
  \setlength{\tabcolsep}{.3\tabcolsep}
  \newcommand*{\tabdate}[1]{%
    \begingroup
      \settowidth{\dimen0 }{10 Mar}%
      \hbox to \dimen0{\hss #1\hss}%
    \endgroup
  }
  \caption{Add caption}
    \begin{tabular}{
      >{\centering}p{30mm}
      c
      *{5}{S[table-format=1.3]}
      !{\kern.9\tabcolsep}
      *{2}{S[table-format=4.2]}
    }
    \toprule
      Bank & \hspace{-\tabcolsep}Country &
      \multicolumn{5}{c}{%
        Conditional joint probability of default%
      }
      & \multirow{2}{*}{\,\tabstack{Total\\assets}}
      & \multirow{2}{*}{\tabstack{Total\\liabilities}} \\
    \cmidrule(r{\tabcolsep}){3-7}
      &
      & \tabstack{\tabdate{15 Sep}\\2008}
      & \tabstack{\tabdate{10 Mar}\\2009}
      & \tabstack{\tabdate{2 May}\\2010}
      & \tabstack{\tabdate{25 Nov}\\2011}
      & \tabstack{\tabdate{19 Dec}\\2013}
      & & \\
    \midrule
    Erste Group Bank AG & AUT   & 0.084 & 0.133 & 0.094 & 0.201 & 0.091 & 209.30 & 194.12 \\
    Raiffeisen Bank & AUT   & 0.094 & 0.121 & 0.080 & 0.256 & 0.097 & 146.63 & 135.69 \\
    Dexia SA & BEL   & 0.052 & 0.111 & 0.059 & 0.154 & 0.060 & 412.05 & 412.37 \\
    KBC Groep NV & BEL   & 0.145 & 0.140 & 0.123 & 0.256 & 0.134 & 282.94 & 266.17 \\
    Danske Bank A/S & DEN   & 0.071 & 0.118 & 0.071 & 0.191 & 0.075 & 3422.61 & 3296.76 \\
    BNP Paribas & FRA   & 0.230 & 0.293 & 0.209 & 0.333 & 0.208 & 1955.94 & 1870.31 \\
    Credit Agricole SA & FRA   & 0.156 & 0.286 & 0.151 & 0.330 & 0.162 & 1718.51 & 1669.22 \\
    Natixis & FRA   & 0.108 & 0.119 & 0.146 & 0.404 & 0.164 & 504.50 & 487.11 \\
    Societe Generale & FRA   & 0.168 & 0.285 & 0.167 & 0.278 & 0.166 & 1176.79 & 1125.68 \\
    Commerzbank AG & GER   & 0.182 & 0.335 & 0.180 & 0.277 & 0.153 & 657.61 & 630.23 \\
    Deutsche Bank AG & GER   & 0.182 & 0.262 & 0.146 & 0.322 & 0.204 & 2155.37 & 2100.71 \\
    IKB Bank & GER   & 0.038 & 0.052 & 0.055 & 0.202 & 0.051 & 31.25 & 30.27 \\
    Alpha Bank & GRE   & 0.034 & 0.060 & 0.031 & 0.096 & 0.035 & 57.68 & 56.25 \\
    Allied Irish Banks PLC & IRE   & 0.040 & 0.062 & 0.037 & 0.124 & 0.019 & 132.96 & 118.50 \\
    Irish Life and Permanent & IRE   & 0.038 & 0.071 & 0.039 & 0.097 & 0.090 & 71.85 & 68.34 \\
    Bank of Ireland & IRE   & 0.035 & 0.061 & 0.040 & 0.109 & 0.092 & 153.50 & 143.25 \\
    Banca Italease & ITA   & 0.030 & 0.043 & 0.081 & 0.336 & 0.105 & 10.53 & 8.89 \\
    Banca Monte dei Paschi di Siena & ITA   & 0.117 & 0.261 & 0.115 & 0.205 & 0.068 & 234.03 & 223.05 \\
    Banca Popolare di Milano & ITA   & 0.166 & 0.232 & 0.132 & 0.224 & 0.079 & 51.22 & 47.16 \\
    Banco Popolare SC & ITA   & 0.110 & 0.119 & 0.090 & 0.157 & 0.084 & 130.86 & 121.44 \\
    Intesa Sanpaolo SpA & ITA   & 0.158 & 0.242 & 0.131 & 0.230 & 0.162 & 626.90 & 579.14 \\
    Mediobanca SpA & ITA   & 0.152 & 0.242 & 0.129 & 0.259 & 0.152 & 74.80 & 67.77 \\
    UniCredit SpA & ITA   & 0.133 & 0.162 & 0.116 & 0.336 & 0.164 & 914.11 & 859.31 \\
    Banco Comercial Portugues SA & POR   & 0.097 & 0.147 & 0.078 & 0.148 & 0.075 & 91.92 & 87.54 \\
    Espirito Santo Financial Group & POR   & 0.076 & 0.126 & 0.075 & 0.198 & 0.092 & 79.53 & 73.54 \\
    Banco Bilbao Vizcaya & SPA   & 0.185 & 0.251 & 0.154 & 0.321 & 0.164 & 3198.97 & 3082.27 \\
    Banco de Sabadell SA & SPA   & 0.067 & 0.120 & 0.085 & 0.195 & 0.103 & 1180.67 & 1126.09 \\
    Banco Santander SA & SPA   & 0.178 & 0.249 & 0.169 & 0.325 & 0.163 & 1226.99 & 1179.73 \\
    Nordea Bank & SWE   & 0.108 & 0.193 & 0.097 & 0.243 & 0.110 & 6397.94 & 6164.55 \\
    Skandinaviska Enskilda Banken & SWE   & 0.077 & 0.112 & 0.073 & 0.192 & 0.078 & 2361.34 & 2252.18 \\
    Svenska Handelsbanken AB & SWE   & 0.118 & 0.196 & 0.112 & 0.285 & 0.112 & 2453.99 & 2359.46 \\
    Swedbank AB & SWE   & 0.058 & 0.090 & 0.070 & 0.195 & 0.071 & 1856.19 & 1758.06 \\
    Credit Suisse Group & SWI   & 0.210 & 0.265 & 0.209 & 0.405 & 0.186 & 1040.23 & 999.14 \\
    UBS SG & SWI   & 0.151 & 0.194 & 0.159 & 0.351 & 0.196 & 1410.64 & 1352.78 \\
    ING Groep NV & NL    & 0.083 & 0.199 & 0.114 & 0.259 & 0.174 & 1270.56 & 1223.33 \\
    SNS Bank Netherlands & NL    & 0.128 & 0.072 & 0.056 & 0.165 & 0.039 & 128.21 & 123.64 \\
    Barclays PLC & UK    & 0.119 & 0.185 & 0.167 & 0.317 & 0.142 & 1560.52 & 1495.32 \\
    HBOS PLC & UK    & 0.065 & 0.209 & 0.115 & 0.317 & 0.217 & 568.00 & 540.36 \\
    Lloyds Banking Group & UK    & 0.166 & 0.207 & 0.117 & 0.228 & 0.156 & 966.05 & 919.46 \\
    Standard Chartered & UK    & 0.201 & 0.126 & 0.219 & 0.417 & 0.116 & 385.26 & 358.62 \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%
\end{document}

Result

First variant with class option 12pt, now the height becomes too large, the following example tries to fit the table on the page without a smaller font:

  • If it is possible to write into the margin (as \marginpar does), then the bank column can be made wider to avoid line breaks.

  • Because of class option twoside, the margin can be at the left or right side depending on the oddity of the page number. Package zref-abspage is used to write a label with the absolute page number to check it in the next LaTeX run. Therefore two LaTeX runs are necessary.

  • The height is still to large (about 20pt), thus \renewcommand*{\arraystretch}{.95} makes the row heights smaller.

Source:

\documentclass[12pt,twoside]{article}
\usepackage{microtype}
\usepackage{booktabs}
\usepackage{array}
\usepackage{siunitx}
\usepackage{caption}
\usepackage{zref-abspage}
\newif\ifpageodd
\makeatletter
\newcommand*{\labelforpageodd}[1]{%
  \zref@labelbyprops{#1}{abspage}%
  \zref@refused{#1}%
  \ifodd\zref@extractdefault{#1}{abspage}{\value{page}}%
    \pageoddtrue
  \else
    \pageoddfalse
  \fi
}
\makeatother

\DeclareRobustCommand*{% robust version needed because of column type S
  \tabstack}[1]{\begin{tabular}{@{}c@{}}#1\end{tabular}%
}

\begin{document}
\begin{table}[htbp]
  \centering
  \footnotesize
  \setlength{\tabcolsep}{.3\tabcolsep}
  \renewcommand*{\arraystretch}{0.95}
  \newcommand*{\tabdate}[1]{%
    \begingroup
      \settowidth{\dimen0 }{10 Mar}%
      \hbox to \dimen0{\hss #1\hss}%
    \endgroup
  }
  \labelforpageodd{bank}
  \caption{Add caption}
  \ifpageodd
  \else
    \hspace*{-\marginparsep}\hspace{-\marginparwidth}%
  \fi
    \begin{tabular}{
      c
      c
      *{5}{S[table-format=1.3]}
      *{2}{S[table-format=4.2]}
    }
    \toprule
    Bank  & \hspace{-\tabcolsep}Country\hspace{-\tabcolsep}\null &
      \multicolumn{5}{c}{%
        Conditional joint probability of default%
      }
      & \tabstack{Total\\assets}
      & \tabstack{Total\\liabilities} \\
    \midrule
      &
      & \tabstack{\tabdate{15 Sept}\\2008}
      & \tabstack{\tabdate{10 Mar}\\2009}
      & \tabstack{\tabdate{2 May}\\2010}
      & \tabstack{\tabdate{25 Nov}\\2011}
      & \tabstack{\tabdate{19 Dec}\\2013}
      &       &  \\
    \cmidrule(r{\tabcolsep}){3-7}
    Erste Group Bank AG & AUT   & 0.084 & 0.133 & 0.094 & 0.201 & 0.091 & 209.30 & 194.12 \\
    Raiffeisen Bank & AUT   & 0.094 & 0.121 & 0.080 & 0.256 & 0.097 & 146.63 & 135.69 \\
    Dexia SA & BEL   & 0.052 & 0.111 & 0.059 & 0.154 & 0.060 & 412.05 & 412.37 \\
    KBC Groep NV & BEL   & 0.145 & 0.140 & 0.123 & 0.256 & 0.134 & 282.94 & 266.17 \\
    Danske Bank A/S & DEN   & 0.071 & 0.118 & 0.071 & 0.191 & 0.075 & 3422.61 & 3296.76 \\
    BNP Paribas & FRA   & 0.230 & 0.293 & 0.209 & 0.333 & 0.208 & 1955.94 & 1870.31 \\
    Credit Agricole SA & FRA   & 0.156 & 0.286 & 0.151 & 0.330 & 0.162 & 1718.51 & 1669.22 \\
    Natixis & FRA   & 0.108 & 0.119 & 0.146 & 0.404 & 0.164 & 504.50 & 487.11 \\
    Societe Generale & FRA   & 0.168 & 0.285 & 0.167 & 0.278 & 0.166 & 1176.79 & 1125.68 \\
    Commerzbank AG & GER   & 0.182 & 0.335 & 0.180 & 0.277 & 0.153 & 657.61 & 630.23 \\
    Deutsche Bank AG & GER   & 0.182 & 0.262 & 0.146 & 0.322 & 0.204 & 2155.37 & 2100.71 \\
    IKB Bank & GER   & 0.038 & 0.052 & 0.055 & 0.202 & 0.051 & 31.25 & 30.27 \\
    Alpha Bank & GRE   & 0.034 & 0.060 & 0.031 & 0.096 & 0.035 & 57.68 & 56.25 \\
    Allied Irish Banks PLC & IRE   & 0.040 & 0.062 & 0.037 & 0.124 & 0.019 & 132.96 & 118.50 \\
    Irish Life and Permanent & IRE   & 0.038 & 0.071 & 0.039 & 0.097 & 0.090 & 71.85 & 68.34 \\
    Bank of Ireland & IRE   & 0.035 & 0.061 & 0.040 & 0.109 & 0.092 & 153.50 & 143.25 \\
    Banca Italease & ITA   & 0.030 & 0.043 & 0.081 & 0.336 & 0.105 & 10.53 & 8.89 \\
    Banca Monte dei Paschi di Siena & ITA   & 0.117 & 0.261 & 0.115 & 0.205 & 0.068 & 234.03 & 223.05 \\
    Banca Popolare di Milano & ITA   & 0.166 & 0.232 & 0.132 & 0.224 & 0.079 & 51.22 & 47.16 \\
    Banco Popolare SC & ITA   & 0.110 & 0.119 & 0.090 & 0.157 & 0.084 & 130.86 & 121.44 \\
    Intesa Sanpaolo SpA & ITA   & 0.158 & 0.242 & 0.131 & 0.230 & 0.162 & 626.90 & 579.14 \\
    Mediobanca SpA & ITA   & 0.152 & 0.242 & 0.129 & 0.259 & 0.152 & 74.80 & 67.77 \\
    UniCredit SpA & ITA   & 0.133 & 0.162 & 0.116 & 0.336 & 0.164 & 914.11 & 859.31 \\
    Banco Comercial Portugues SA & POR   & 0.097 & 0.147 & 0.078 & 0.148 & 0.075 & 91.92 & 87.54 \\
    Espirito Santo Financial Group & POR   & 0.076 & 0.126 & 0.075 & 0.198 & 0.092 & 79.53 & 73.54 \\
    Banco Bilbao Vizcaya & SPA   & 0.185 & 0.251 & 0.154 & 0.321 & 0.164 & 3198.97 & 3082.27 \\
    Banco de Sabadell SA & SPA   & 0.067 & 0.120 & 0.085 & 0.195 & 0.103 & 1180.67 & 1126.09 \\
    Banco Santander SA & SPA   & 0.178 & 0.249 & 0.169 & 0.325 & 0.163 & 1226.99 & 1179.73 \\
    Nordea Bank & SWE   & 0.108 & 0.193 & 0.097 & 0.243 & 0.110 & 6397.94 & 6164.55 \\
    Skandinaviska Enskilda Banken & SWE   & 0.077 & 0.112 & 0.073 & 0.192 & 0.078 & 2361.34 & 2252.18 \\
    Svenska Handelsbanken AB & SWE   & 0.118 & 0.196 & 0.112 & 0.285 & 0.112 & 2453.99 & 2359.46 \\
    Swedbank AB & SWE   & 0.058 & 0.090 & 0.070 & 0.195 & 0.071 & 1856.19 & 1758.06 \\
    Credit Suisse Group & SWI   & 0.210 & 0.265 & 0.209 & 0.405 & 0.186 & 1040.23 & 999.14 \\
    UBS SG & SWI   & 0.151 & 0.194 & 0.159 & 0.351 & 0.196 & 1410.64 & 1352.78 \\
    ING Groep NV & NL    & 0.083 & 0.199 & 0.114 & 0.259 & 0.174 & 1270.56 & 1223.33 \\
    SNS Bank Netherlands & NL    & 0.128 & 0.072 & 0.056 & 0.165 & 0.039 & 128.21 & 123.64 \\
    Barclays PLC & UK    & 0.119 & 0.185 & 0.167 & 0.317 & 0.142 & 1560.52 & 1495.32 \\
    HBOS PLC & UK    & 0.065 & 0.209 & 0.115 & 0.317 & 0.217 & 568.00 & 540.36 \\
    Lloyds Banking Group & UK    & 0.166 & 0.207 & 0.117 & 0.228 & 0.156 & 966.05 & 919.46 \\
    Standard Chartered & UK    & 0.201 & 0.126 & 0.219 & 0.417 & 0.116 & 385.26 & 358.62 \\
    \bottomrule
    \end{tabular}%
  \ifpageodd
    \nobreak
    \hspace{-\marginparsep}\hspace{-\marginparwidth}\null
  \fi
  \label{tab:addlabel}%
\end{table}%
\end{document}

Result 12pt

share|improve this answer
1  
beautiful (as always) :) the only thing that might improve things is to use a decimal alignment column on the last two columns, something like S from siunitx –  cmhughes Jul 19 at 11:22
    
@cmhughes: The danger is, that the width is becoming larger because of the additional alignment constraints. But in this case it can be done with the right values for option table-format, see the updated answer. –  Heiko Oberdiek Jul 19 at 11:30
1  
I would load the caption package to have correct vertical skips for the caption when, like here, it is above the table. And perhaps right- or left-align the first column. –  Bernard Jul 19 at 12:42
    
the gaps between the five dated columns are slightly different in width, which i find a bit distracting. the date headings might be packed into boxes of equal width to overcome the width discrepancies. also, i see no reason that the period after the month is needed, –  barbara beeton Jul 19 at 13:12
    
@barbarabeeton: Thanks, answer updated. –  Heiko Oberdiek Jul 19 at 13:34

You've told us the size of the sheet of paper (A4), but we lack information regarding the width of the text block or, equivalently, the widths of the margins. In the example below, I assume 1" margins.

Some suggestions:

  • Use \multicolumn{5}{c}{...} to typeset the material that spans five columns.
  • Split the headers of the final two columns to make them less wide
  • The five dates each take up a lot of space -- I suggest one way of writing them more compactly, but there are obviously other choices too. Furthermore, the dates really belong in the header part of the table, i.e., before \midrule. You can use \cmidrule to separate the dates from their respective header.
  • I suggest left-aligning the first two columns. I would also like to suggest aligning the numerical data on their respective decimal points; this may be done by using the S column type of the siunitx package.
  • Finally, what to do about the long names in the first column? I suggest wrapping them to the next line if they're too long. Here, "too long" is determined by the width of the text block (which constrains the overall width of the table). To assure that you're using the full width of the text block (but no more), I suggest you employ the tabularx environment (provided by the package with the same name) instead of tabular and specify a variant of the X column type for the first column.
  • With all these choices in place, you can even get by with a \small font directive instead of a \footnotesize directive. I think your readers will appreciate that.

enter image description here

\documentclass[a4paper]{article}
\usepackage[margin=1in]{geometry}  % specify margins here
\usepackage{booktabs,tabularx,ragged2e,siunitx}
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X}

\begin{document}
\begin{table}[ht!]
\setlength\tabcolsep{4pt} % default value: 6pt
\small
\caption{Add caption}\label{tab:big}
\smallskip
\begin{tabularx}{\textwidth}{@{} L l
     *{5}{S[table-format=1.3]}
     *{2}{S[table-format=4.2]} @{}}
\toprule
Bank  & Country & \multicolumn{5}{c}{Conditional joint probability of default} & {Total} & {Total} \\
\cmidrule(lr){3-7}
&  & {15/09/08} & {10/03/09} & {2/05/10} & {25/11/11} & {19/12/13} & {Assets} &  {Liab.}\\
\midrule
    Erste Group Bank AG & AUT   & 0.084 & 0.133 & 0.094 & 0.201 & 0.091 & 209.30 & 194.12 \\
    Raiffeisen Bank & AUT   & 0.094 & 0.121 & 0.080 & 0.256 & 0.097 & 146.63 & 135.69 \\
    Dexia SA & BEL   & 0.052 & 0.111 & 0.059 & 0.154 & 0.060 & 412.05 & 412.37 \\
    KBC Groep NV & BEL   & 0.145 & 0.140 & 0.123 & 0.256 & 0.134 & 282.94 & 266.17 \\
    Danske Bank A/S & DEN   & 0.071 & 0.118 & 0.071 & 0.191 & 0.075 & 3422.61 & 3296.76 \\
    BNP Paribas & FRA   & 0.230 & 0.293 & 0.209 & 0.333 & 0.208 & 1955.94 & 1870.31 \\
    Credit Agricole SA & FRA   & 0.156 & 0.286 & 0.151 & 0.330 & 0.162 & 1718.51 & 1669.22 \\
    Natixis & FRA   & 0.108 & 0.119 & 0.146 & 0.404 & 0.164 & 504.50 & 487.11 \\
    Societe Generale & FRA   & 0.168 & 0.285 & 0.167 & 0.278 & 0.166 & 1176.79 & 1125.68 \\
    Commerzbank AG & GER   & 0.182 & 0.335 & 0.180 & 0.277 & 0.153 & 657.61 & 630.23 \\
    Deutsche Bank AG & GER   & 0.182 & 0.262 & 0.146 & 0.322 & 0.204 & 2155.37 & 2100.71 \\
    IKB Bank & GER   & 0.038 & 0.052 & 0.055 & 0.202 & 0.051 & 31.25 & 30.27 \\
    Alpha Bank & GRE   & 0.034 & 0.060 & 0.031 & 0.096 & 0.035 & 57.68 & 56.25 \\
    Allied Irish Banks PLC & IRE   & 0.040 & 0.062 & 0.037 & 0.124 & 0.019 & 132.96 & 118.50 \\
    Irish Life and Permanent & IRE   & 0.038 & 0.071 & 0.039 & 0.097 & 0.090 & 71.85 & 68.34 \\
    Bank of Ireland & IRE   & 0.035 & 0.061 & 0.040 & 0.109 & 0.092 & 153.50 & 143.25 \\
    Banca Italease & ITA   & 0.030 & 0.043 & 0.081 & 0.336 & 0.105 & 10.53 & 8.89 \\
    Banca Monte dei Paschi di Siena & ITA   & 0.117 & 0.261 & 0.115 & 0.205 & 0.068 & 234.03 & 223.05 \\
    Banca Popolare di Milano & ITA   & 0.166 & 0.232 & 0.132 & 0.224 & 0.079 & 51.22 & 47.16 \\
    Banco Popolare SC & ITA   & 0.110 & 0.119 & 0.090 & 0.157 & 0.084 & 130.86 & 121.44 \\
    Intesa Sanpaolo SpA & ITA   & 0.158 & 0.242 & 0.131 & 0.230 & 0.162 & 626.90 & 579.14 \\
    Mediobanca SpA & ITA   & 0.152 & 0.242 & 0.129 & 0.259 & 0.152 & 74.80 & 67.77 \\
    UniCredit SpA & ITA   & 0.133 & 0.162 & 0.116 & 0.336 & 0.164 & 914.11 & 859.31 \\
    Banco Comercial Portugues SA & POR   & 0.097 & 0.147 & 0.078 & 0.148 & 0.075 & 91.92 & 87.54 \\
    Espirito Santo Financial Group & POR   & 0.076 & 0.126 & 0.075 & 0.198 & 0.092 & 79.53 & 73.54 \\
    Banco Bilbao Vizcaya & SPA   & 0.185 & 0.251 & 0.154 & 0.321 & 0.164 & 3198.97 & 3082.27 \\
    Banco de Sabadell SA & SPA   & 0.067 & 0.120 & 0.085 & 0.195 & 0.103 & 1180.67 & 1126.09 \\
    Banco Santander SA & SPA   & 0.178 & 0.249 & 0.169 & 0.325 & 0.163 & 1226.99 & 1179.73 \\
    Nordea Bank & SWE   & 0.108 & 0.193 & 0.097 & 0.243 & 0.110 & 6397.94 & 6164.55 \\
    Skandinaviska Enskilda Banken & SWE   & 0.077 & 0.112 & 0.073 & 0.192 & 0.078 & 2361.34 & 2252.18 \\
    Svenska Handelsbanken AB & SWE   & 0.118 & 0.196 & 0.112 & 0.285 & 0.112 & 2453.99 & 2359.46 \\
    Swedbank AB & SWE   & 0.058 & 0.090 & 0.070 & 0.195 & 0.071 & 1856.19 & 1758.06 \\
    Credit Suisse Group & SWI   & 0.210 & 0.265 & 0.209 & 0.405 & 0.186 & 1040.23 & 999.14 \\
    UBS SG & SWI   & 0.151 & 0.194 & 0.159 & 0.351 & 0.196 & 1410.64 & 1352.78 \\
    ING Groep NV & NL    & 0.083 & 0.199 & 0.114 & 0.259 & 0.174 & 1270.56 & 1223.33 \\
    SNS Bank Netherlands & NL    & 0.128 & 0.072 & 0.056 & 0.165 & 0.039 & 128.21 & 123.64 \\
    Barclays PLC & UK    & 0.119 & 0.185 & 0.167 & 0.317 & 0.142 & 1560.52 & 1495.32 \\
    HBOS PLC & UK    & 0.065 & 0.209 & 0.115 & 0.317 & 0.217 & 568.00 & 540.36 \\
    Lloyds Banking Group & UK    & 0.166 & 0.207 & 0.117 & 0.228 & 0.156 & 966.05 & 919.46 \\
    Standard Chartered & UK    & 0.201 & 0.126 & 0.219 & 0.417 & 0.116 & 385.26 & 358.62 \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
share|improve this answer
    
while i expect that most people looking at this table would understand that the date format is "day/month/year", u.s. readers might initially make a different assumption, and ask "what is month 15? ... oh!" (at least the dates aren't presented in "julian" form ...) –  barbara beeton Jul 19 at 13:18
    
@barbarabeeton - Indeed, the abbreviated form of the date string might create momentary flashes of ambiguity. Should the OP choose to use such a date format, I trust he/she will take the time to define explicitly the date string formats in use throughout the document. :-) –  Mico Jul 19 at 20:27
    
The third upvote on this answer pushed my point count on this site to 80K. Many thanks!!! –  Mico Jul 19 at 20:28
  1. Use p type colums to limit column width: p{2.5cm} limits the columns width to 2.5 cm (contrary to c/l/r type colums which grow with the content)
  2. Replace the table head with Bank & Country & \multicolumn{5}{|c|}{Conditional joint probability of default} & Total assets & Total liabilities \\ . The \multicolumncommand joins the number of cells specified in the first bracket for that row.
  3. Change the date format to numeric: 15.11.08is shorter than 15. Sep. 2008
  4. Change the margins of the page which holds your table. See the answer here for how: Change \textwidth and \textheight in mid-document
  5. If all this does is not sufficient try to reduce font-size or use a font-type with a smaller letter-spacing / tracking.
share|improve this answer

The easy answer would be "use a (even) smaller font size", or wider margins (see the geometry package) but I assume you don't want to do that.

By best effort:

\documentclass{article}

\usepackage{booktabs}
\usepackage{rotating}
\usepackage{multirow}

\begin{document}
\begin{table}[htbp]
  \centering
    \footnotesize
  \caption{Add caption}
    \begin{tabular}{llcccccp{0.4in}p{0.46in}}
    \toprule
    & & \multicolumn{5}{c}{Conditional joint probability of default} & & \\ \cmidrule{3-7}
    Bank & Country & \begin{turn}{90}15 Sept. 2008\end{turn} & \begin{turn}{90}10 Mar. 2009\end{turn} & \begin{turn}{90}2 May 2010\end{turn} & \begin{turn}{90}25 Nov.               2011\end{turn} & \begin{turn}{90}19 Dec. 2013\end{turn} & Total assets & Total \mbox{liabilities} \\
    \midrule
    Erste Group Bank AG & AUT   & 0.084 & 0.133 & 0.094 & 0.201 & 0.091 & 209.30 & 194.12 \\
    Raiffeisen Bank & AUT   & 0.094 & 0.121 & 0.080 & 0.256 & 0.097 & 146.63 & 135.69 \\
    \ldots \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%
\end{document}

What I did:

  1. The Conditional joint probability of default across 5 columns (see \multicolumn)
  2. Rotate dates (see the rotating package) and put them above the \midrule
  3. Add a \cmidrule to separate Conditional joint... and the dates
  4. Moved all the other headers to the second header line (the one with the dates)
  5. Changed the last two columns to p{<width} in order to make the Total headers break across two lines and thus making the columns narrower, and put liabilities inside an \mbox to keep it from being hyphenated

There's room for improvement, but maybe this is enough for you. Take at look at the Wikibook for ideas.

share|improve this answer

Your Answer

 
discard

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.