0
    \documentclass[12pt,twoside]{article}
    \usepackage{booktabs}
    \usepackage{longtable}

\begin{footnotesize}
{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\begin{longtable}{l*{3}{c}}
\caption{OLS-regression on interaction effects and premium\label{tab:PRint}}\\
\multicolumn{4}{p{\textwidth}}{\footnotesize The table presents the results of the cross-sectional OLS regression of deal premium (in \%) on advisor expertise while interacted with several variables signaling potential complexity. The model is based on deals executed in Europe during the period 1995 to 2020 with known advisors on the acquirer side. Each model has a reported sample size in the last row, models 1-3 are separate interaction regressions for \textit{Diversifying, Cross-border} and \textit{Stock-deal} respectively. T-statistics are presented in parenthesis and significance levels are presented according to the following: \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)}\\
\toprule\endfirsthead\midrule\endhead\midrule\endfoot\endlastfoot
                    &\multicolumn{1}{c}{Diversifying}         &\multicolumn{1}{c}{Cross-border}         &\multicolumn{1}{c}{Stock-deal}         \\
\midrule
Expertise Acq. Ind. (\%)&        0.01         &        0.07         &       -0.02         \\
                    &      (0.02)         &      (0.18)         &     (-0.06)         \\
Expertise Tar. Ind. (\%)&        0.14         &        0.48         &        0.23         \\
                    &      (0.61)         &      (1.56)         &      (0.56)         \\
Pure Boutique       &        5.23         &       -0.35         &       -1.69         \\
                    &      (0.37)         &     (-0.03)         &     (-0.17)         \\
Mixed-team          &       -0.72         &        0.36         &        6.57         \\
                    &     (-0.08)         &      (0.05)         &      (0.80)         \\
Diversifying        &       8.88              &        9.23         &       10.19\sym{*}  \\
                    &        (1.69)              &      (1.93)         &      (2.12)         \\
Cross-border        &        7.10         &          9.31            &        6.95         \\
                    &      (1.55)         &         (1.67)            &      (1.51)         \\
Stock-deal          &      -17.14\sym{**} &      -17.48\sym{**} &          -15.57\sym{*}           \\
                    &     (-3.16)         &     (-3.23)         &             (-2.43)         \\
Inter. term Boutique & 6.79  & 1.71 &  8.62  \\
                     & (-0.39) & (0.10) &   (0.48) \\
Inter. term Mixed-team & 1.87 & 0.31  & -10.78 \\
                       &(0.17) &  (0.03) & (-0.96)\\
Inter. term Expertise Acq. Ind & 7.53& -0.23  & 0.22\\
                                &(1.39) & (-0.30)  &  (0.17) \\  
Inter. term Expertise Tar. Ind & &  -0.72   &-0.07 \\
                                & & (-1.59)  & (-0.15)   \\  
Constant            &       39.96\sym{***}&       39.34\sym{***}&       37.67\sym{**} \\
                    &      (3.47)         &      (3.48)         &      (3.20)         \\
\midrule
Observations        &         349         &         349         &         349         \\
Adjusted \(R^{2}\)  &       0.031         &       0.029         &       0.026         \\
\bottomrule
\end{longtable}
}
\end{footnotesize}

screenshot of failed table

Hi all, I saw the post: equal column spacing in longtable But I fail to grasp how to apply this to my table, it seems that it might be due to my header... My main problem is that the three columns refuse to outline over the page (see picture). Normally I would pragmatically choose to use the regular table enviorment, but sadly the table has to span multiple pages due to document length.

Hope you can help me in figuring out how to solve this!

7
  • Your tabke naturally is narrower than the textwidth. do you really want to stretch it to be as wide as the textwidth?
    – leandriis
    May 12, 2020 at 12:06
  • Hi Leandriis, I did so to wrap the header text. Perhaps that is my mistake? I took that solution from a different post (how to wrap within longtable). -edit, pressed enter to soon- I would like the header text to be approximatly equally long and distributed over the page for consistency, and than have the columns outlined across the page, if that makes sense. As such I used \textwidth
    – Oliver
    May 12, 2020 at 12:08
  • \multicolumn{4}{p{\textwidth}} makes the entry wider than the page (there is tabcolsep space either side) but even if it was textwidth this is far too wide, Place that paragraph before the longtable. May 12, 2020 at 13:22
  • stretching the columns out to page width just makes the table harder to read as it is harder for your eye to scan along the row. I don't understand your comment about normally using tabular all the column spacing of longtable is from tabular. May 12, 2020 at 13:23
  • Hi David, thank you for the reply. The paragraph text is the header of the table, would it be possible to have the header text in text witdh and the table itself smaller? Holding the order (title, header, table) the same? I am clearly quite new to Tatex and am struggeling with the coding.
    – Oliver
    May 12, 2020 at 13:34

1 Answer 1

1

You may load array and set three fixed width columns. I would prefer at least to use right aligned columns for the figures. I have also removed the side bearing to the right and left. See example 1 below.

In example 2, I have set the long intro as a paragraph in the text, with reference to the table number. I have used the package dcolumn to typeset the three number columns aligned at the decimal separator. For the two first columns, I used the -1 option to set the columns right aligned. The last column, I had to eye ball to align at the right border. You have to compile two or three time before the table is correct. The font size, I increased to small and the space between the columns to 8 pt. Table header is typeset smaller that rest of the table.

Example 1 - fixed width columns

enter image description here

\documentclass[12pt,twoside]{article}
\usepackage{booktabs, array}
\usepackage{longtable}

\begin{document}

\begin{footnotesize}
{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\begin{longtable}{@{}l*{3}{wr{2.5cm}}@{}}
\caption{OLS-regression on interaction effects and premium\label{tab:PRint}}\\
\multicolumn{4}{@{}p{\textwidth}@{}}{\footnotesize The table presents the results of the cross-sectional OLS regression of deal premium (in \%) on advisor expertise while interacted with several variables signaling potential complexity. The model is based on deals executed in Europe during the period 1995 to 2020 with known advisors on the acquirer side. Each model has a reported sample size in the last row, models 1-3 are separate interaction regressions for \textit{Diversifying, Cross-border} and \textit{Stock-deal} respectively. T-statistics are presented in parenthesis and significance levels are presented according to the following: \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)}\\
\toprule
\endfirsthead
\midrule
\endhead
\midrule
\endfoot
\endlastfoot
&\multicolumn{1}{r}{Diversifying}
&\multicolumn{1}{r}{Cross-border}
&\multicolumn{1}{r@{}}{Stock-deal}         \\
\midrule
Expertise Acq. Ind. (\%) &   0.01     &    0.07   &   -0.02     \\
                         &  (0.02)    &   (0.18)  &  (-0.06)    \\
Expertise Tar. Ind. (\%) &   0.14     &    0.48   &    0.23     \\
                         &  (0.61)    &   (1.56)  &  (0.56)     \\
Pure Boutique            &   5.23     &   -0.35   &  -1.69      \\
                         &  (0.37)    &   (-0.03) &  (-0.17)    \\
Mixed-team               &  -0.72     &     0.36  &    6.57     \\
                         & (-0.08)    &   (0.05)  &  (0.80)     \\
Diversifying             &   8.88     &    9.23   & 10.19\sym{*}\\
                         & (1.69)     &   (1.93)  &  (2.12)     \\
Cross-border             &  7.10      &    9.31   &   6.95      \\
                         & (1.55)     &   (1.67)  &  (1.51)     \\
Stock-deal             &-17.14\sym{**}& -17.48\sym{**} &-15.57\sym{*}\\
                         & (-3.16)    &   (-3.23) &  (-2.43)    \\
Inter. term Boutique     &   6.79     &     1.71  &    8.62     \\
                         & (-0.39)    &    (0.10) &   (0.48)    \\
Inter. term Mixed-team   &   1.87     &     0.31  &  -10.78     \\
                         &  (0.17)    &    (0.03) & (-0.96)     \\
Inter. term Expertise Acq. Ind & 7.53 &    -0.23  &   0.22      \\
                         &  (1.39)    &   (-0.30) &  (0.17)     \\  
Inter. term Expertise Tar. Ind &      &    -0.72  &   -0.07     \\
                         &            &   (-1.59) &  (-0.15)    \\  
Constant                 &39.96\sym{***}&  39.34\sym{***}& 37.67\sym{**} \\
                         & (3.47)     &   (3.48)  &  (3.20)     \\
\midrule
Observations             &  349       &   349     &  349        \\
Adjusted \(R^{2}\)       &    0.031   &     0.029 &    0.026    \\
\bottomrule
\end{longtable}
}
\end{footnotesize}

\end{document}

Example 2 - dcolumn

enter image description here

\documentclass[12pt,twoside]{article}
\usepackage{booktabs, array, dcolumn}
\usepackage{longtable}

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}

\begin{document}

Table~\ref{tab:PRint} presents the results of the cross-sectional OLS regression of deal premium (in \%) on advisor expertise while interacted with several variables signaling potential complexity. The model is based on deals executed in Europe during the period 1995 to 2020 with known advisors on the acquirer side. Each model has a reported sample size in the last row, models 1-3 are separate interaction regressions for \textit{Diversifying, Cross-border} and \textit{Stock-deal} respectively. T-statistics are presented in parenthesis and significance levels are presented according to the following: \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\).

\begin{small}
\setlength{\tabcolsep}{8pt}
\begin{longtable}{@{}l*{2}{D{.}{.}{1}}D{.}{.}{8.2}}
\caption{OLS-regression on interaction effects and premium\label{tab:PRint}}\\
\toprule
\endfirsthead
\midrule
\endhead
\midrule
\endfoot
\endlastfoot
&\multicolumn{1}{r@{}}{\footnotesize Diversifying}
&\multicolumn{1}{r@{}}{\footnotesize Cross-border}
&\multicolumn{1}{r@{}}{\footnotesize Stock-deal}         \\
\midrule
Expertise Acq. Ind. (\%) &   0.01     &    0.07   &   -0.02     \\
                         &  (0.02)    &   (0.18)  &  (-0.06)    \\
Expertise Tar. Ind. (\%) &   0.14     &    0.48   &    0.23     \\
                         &  (0.61)    &   (1.56)  &  (0.56)     \\
Pure Boutique            &   5.23     &   -0.35   &  -1.69      \\
                         &  (0.37)    &   (-0.03) &  (-0.17)    \\
Mixed-team               &  -0.72     &     0.36  &    6.57     \\
                         & (-0.08)    &   (0.05)  &  (0.80)     \\
Diversifying             &   8.88     &    9.23   & 10.19\sym{*}\\
                         & (1.69)     &   (1.93)  &  (2.12)     \\
Cross-border             &  7.10      &    9.31   &   6.95      \\
                         & (1.55)     &   (1.67)  &  (1.51)     \\
Stock-deal             &-17.14\sym{**}& -17.48\sym{**} &-15.57\sym{*}\\
                         & (-3.16)    &   (-3.23) &  (-2.43)    \\
Inter. term Boutique     &   6.79     &     1.71  &    8.62     \\
                         & (-0.39)    &    (0.10) &   (0.48)    \\
Inter. term Mixed-team   &   1.87     &     0.31  &  -10.78     \\
                         &  (0.17)    &    (0.03) & (-0.96)     \\
Inter. term Expertise Acq. Ind & 7.53 &    -0.23  &   0.22      \\
                         &  (1.39)    &   (-0.30) &  (0.17)     \\  
Inter. term Expertise Tar. Ind &      &    -0.72  &   -0.07     \\
                         &            &   (-1.59) &  (-0.15)    \\  
Constant                 &39.96\sym{***}&  39.34\sym{***}& 37.67\sym{**} \\
                         & (3.47)     &   (3.48)  &  (3.20)     \\
\midrule
Observations             &  349       &   349     &  349        \\
Adjusted \(R^{2}\)       &    0.031   &     0.029 &    0.026    \\
\bottomrule
\end{longtable}

\end{small}

\end{document}
2
  • Thank you Sveinung for the overview and clear explenation. Both work like a charm!
    – Oliver
    May 13, 2020 at 9:14
  • 1
    @Oliver My pleasure!
    – Sveinung
    May 13, 2020 at 16:02

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.