0

I am trying to expand the width of my table notes in my longtable which is in landscape mode with the TableNotes command from the threeparttable package.

Previously, I have tried it with \begin{minipage}{26cm} {Notes about my table} \begin{minipage} (see commented out part below) but then I found the possibility with threeparttable and TableNotes. Then I turned to the TableNotes package which, as you can see below, only puts the notes in the first column of the table instead of using the space of all columns. The trouble is coming first from my inability to expand the TableNotes width to all columns of the longtable and second from the landscape mode since I do not know how to expand the TableNotes width to the height of a DIN A4 page.

\documentclass[a4paper, 12pt]{article}

\usepackage{longtable}
\usepackage{booktabs}
\usepackage[flushleft]{threeparttable}
\usepackage{multirow}
\usepackage{geometry} %Improves table widths
\usepackage{makecell}
\usepackage{lscape} %Rotates page by 90 degree
\usepackage{pdflscape}

%Makes table coloring possible
\usepackage[table, svgnames]{xcolor}
% table package somehow fixed the line break issue


\begin{document}


Normal vertical orientation of pages.

%Rotates pages by 90 degree
\begin{landscape}

%Centers the table
\begin{center}

\begin{ThreePartTable} %Has to be put outside longtable to make the TableNotes possible

\begin{longtable}{|p{6em}|p{6cm}|p{3cm}|p{10cm}|} %DIN A4 21x29.7 cm

%% Headers and footers:

        \caption{Sustainability Literature Overview}\\
        
        \toprule
        Topic & Paper & Category & Results \\
        \midrule
        \endfirsthead

        \multicolumn{4}{l}{Table \thetable, continued}\\
        \addlinespace
        \toprule
        Topic & Paper & Category & Results \\
        \midrule
        \endhead
        
        \midrule
        \multicolumn{4}{r}{\footnotesize\em Continued on following page}
        \endfoot
        
        \bottomrule
        \endlastfoot

%% Body of longtable

%Cost of Capital Literature
    {Cost of capital} & {Ghoul2011} & CSR & {Firms with better CSR scores exhibit cheaper equity financing} \\
    & {Goss2011} & CSR & {Firms with CSR concerns pay between 7 and 18 basis points more than firms that are more responsible} \\
    & {Humphrey2012} & CSP & {UK firms do not incur any changes in cost of capital due to their CSP ratings} \\
    & {Chava2014} & ENV & {A firm that has ENV concerns in all dimensions considered pays an almost 20\% higher loan interest  rate  (approximately  25bps)  compared to  a  firm that  has  an  equal  number  of environmental concerns and strengths.} \\
    & {Cheng2014} & CSR & {Firms with better CSR performance face significantly lower capital constraints} \\
    & {Dhaliwal2014} & CSR & {There is a negative association between CSR disclosure and the cost of equity capital} \\
    & {Gregory2014} & CSR & {High CSR firms have lower cost of capital but this can primarily be explained by industry effects} \\
    & {Cahan2015} & CSR & {There is a positive relationship between CSR and favorable news coverage reducing the cost of capital} \\
    & {Gregory2020} & SRI & {Sustainability performance does mitigate risk and lowers the cost of equity for the firm} \\
    \hline
    
%Sustainability ratings diversion

    {ESG ratings diversion}  & {Dorfleitner2015} & ESG & {ESG scores of different providers do not coincide largely and are therefore incomparable on the whole} \\
    {} & {Chatterji2016} & SRI & {Average tetrachoric correlation between the six raters is 0.31} \\
    & {Halbritter2015} & ESG & {The magnitude and direction of ESG's impact are substantially dependent on the rating provider} \\
    & {Drempetic2019} & ESG & {There is a significant positive correlation between the size of a firm } \\
    {} & {} & {} & {and its ESG rating} \\
   & {Dimson2020} & ESG & {Companies with a high score from one rater often receive a middling or low score from another rater and also the pillar weightings across agencies varies } \\ %No access
   & {Avramov2021} & ESG & {There are substantial variations across different rating providers, while the average rating correlation is 0.48} \\
   & {Billio2021} & ESG & {There is a lack of common metrics among rating agencies in the definition of ESG.} \\
    & {Gibson2021} & ESG & {The average pairwise correlation for ESG ratings among seven rating agencies ranges between 0.124 and 0.752 with an average correlation of 0.447} \\
    & {Berg2022DivergencePublished} & ESG & {Correlations at the ESG level are on average 0.54 and range from 0.38 to 0.71 whereas credit ratings show correlations of 0.99} \\
    & {Berg2022noise} & ESG & {ESG ratings are noisy and, therefore, standard regression estimates suffer from attenuation bias}  \\
      & {Christensen2022} & ESG & {Greater  ESG  disclosure, conversely  leads  to  greater  ESG  disagreement  across  ESG  rating  agencies}  \\
      & {Lioui2022} & ESG & {Disagreement across data vendors has substantial implications on the performance of ESG factors} \\
      & {Serafeim2022rating} & ESG & {In the presence of significant disagreement, the ratings’ usefulness declines} \\
    \hline

    \newline
%Table description
%\begin{minipage}{26cm}
    %\footnotesize{This table gives an overview of the literature concerning the impact of sustainability on asset prices. The literature is divided into different topics and categories. The topics encompass Cost of capital, ESG ratings diversion, Positive/Negative/No return impact, Risk impact, Crisis performance, ESG momentum, ESG as a new risk factor, Risk factor criticism and Sustainability news impact. The categories are based on the definition of sustainability used and comprise ESG, CSR and SRI.}
    %\end{minipage}

\begin{TableNotes}
    \footnotesize
    {This table gives an overview of the literature concerning the impact of sustainability on asset prices. The literature is divided into different topics and categories. The topics encompass Cost of capital, ESG ratings diversion, Positive/Negative/No return impact, Risk impact, Crisis performance, ESG momentum, ESG as a new risk factor, Risk factor criticism and Sustainability news impact. The categories are based on the definition of sustainability used and comprise ESG, CSR and SRI.}
\end{TableNotes}

\end{longtable} 

\end{ThreePartTable}

\end{center}

\end{landscape}

\newpage

Normal vertical orientation of pages

\end{document}

enter image description here

[![enter image description here][2]][2]

What I honestly also do not get why the error messages:

  • LaTeX Error: Environment ThreePartTable undefined.
  • LaTeX Error: Environment TableNotes undefined.
  • LaTeX Error: \begin{longtable} on input line 30 ended by \end{TableNotes}.
  • LaTeX Error: \begin{center} on input line 26 ended by \end{ThreePartTable}. show up since I am normally loading the packages at the top.

What I am also curious about, why is the table not working if I use \begin{threeparttable} instead of \begin{ThreePartTable}?

Update

With the suggestion by @cabohah of using the package threeparttablex and inserTableNotes I made it to this point:

[![enter image description here][3]][3]

but the alignment is not correct. I have tried [flushleft] as well as \raggedright but with no success.

5
  • You should use package threeparttablex instead of threepartable. See the manual of threeparttablex for more information (esp. why to use this package, how to define and print the table notes etc.).
    – cabohah
    May 17 at 7:19
  • Related: tex.stackexchange.com/q/278269/277964
    – cabohah
    May 17 at 7:25
  • Hey @cabohah thank you for your suggestion! I have tried to use it but so far I could not make the \insertTableNotes does not work for me as you can see in the updated question.
    – 9Morgan8
    May 17 at 11:15
  • I now made it work but the notes are misaligned, can I input something like {\RaggedRight} to align it properly?
    – 9Morgan8
    May 17 at 11:21
  • 2
    There is an image missing and there is no code provided that uses threeparttablex. Remember you need several LaTeX passes for the sizes to settle.
    – daleif
    May 17 at 12:17

1 Answer 1

0
  • For your table is simpler to write by using longtblr of the tabularray package.
  • After removing all superfluous crly braces MWE is:
\documentclass[a4paper, 12pt]{article}
\usepackage{geometry} %Improves table widths
\usepackage{lipsum}% For dummy text. Don't use in a real document

\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\SetTblrStyle{remark}{font=\footnotesize}
\usepackage{pdflscape}

\begin{document}

\begin{landscape}
\lipsum[66]  % to see table width

\begin{longtblr}[
caption = {Sustainability Literature Overview},
  label = {tab:long?},
remark{Note} = {This table gives an overview of the literature concerning the impact of sustainability on asset prices. The literature is divided into different topics and categories. The topics encompass Cost of capital, ESG ratings diversion, Positive/Negative/No return impact, Risk impact, Crisis performance, ESG momentum, ESG as a new risk factor, Risk factor criticism and Sustainability news impact. The categories are based on the definition of sustainability used and comprise ESG, CSR and SRI.}
                ]{vlines,
                  colspec = {Q[l, wd=5em] Q[l] Q[l] X[j]}, %DIN A4 21x29.7 cm
                  rowhead = 1
                  }
% column headers
    \toprule
Topic   & Paper         & Category  & Results \\
    \midrule
% table body
Cost of capital
        & Ghoul2011     & CSR       & Firms with better CSR scores exhibit cheaper equity financing \\
        & Goss2011      & CSR       & Firms with CSR concerns pay between 7 and 18 basis points more than firms that are more responsible   \\
        & Humphrey2012  & CSP       & UK firms do not incur any changes in cost of capital due to their CSP ratings \\
        & Chava2014     & ENV       & A firm that has ENV concerns in all dimensions considered pays an almost 20\% higher loan interest  rate  (approximately  25bps)  compared to  a  firm that  has  an  equal  number  of environmental concerns and strengths.    \\
        & Cheng2014     & CSR       & Firms with better CSR performance face significantly lower capital constraints     \\
        & Dhaliwal2014  & CSR       & There is a negative association between CSR disclosure and the cost of equity capital  \\
        & Gregory2014   & CSR       & High CSR firms have lower cost of capital but this can primarily be explained by industry effects   \\
        & Cahan2015     & CSR       & There is a positive relationship between CSR and favorable news coverage reducing the cost of capital    \\
        & Gregory2020   & SRI       & Sustainability performance does mitigate risk and lowers the cost of equity for the firm    \\
    \midrule
ESG ratings diversion
        & Dorfleitner2015   & ESG   & ESG scores of different providers do not coincide largely and are therefore incomparable on the whole   \\
        & Chatterji2016     & SRI   & Average tetrachoric correlation between the six raters is 0.31    \\
        & Halbritter2015    & ESG   & The magnitude and direction of ESG's impact are substantially dependent on the rating provider \\
        & Drempetic2019 & ESG       & There is a significant positive correlation between the size of a firm and its ESG rating  \\
        & Dimson2020     & ESG       & Companies with a high score from one rater often receive a middling or low score from another rater and also the pillar weightings across agencies varies   \\ %No access
        & Avramov2021    & ESG       & There are substantial variations across different rating providers, while the average rating correlation is 0.48   \\
        & Billio2021     & ESG       & There is a lack of common metrics among rating agencies in the definition of ESG. \\
        & Gibson2021     & ESG       & The average pairwise correlation for ESG ratings among seven rating agencies ranges between 0.124 and 0.752 with an average correlation of 0.447  \\
        & Berg2022DivergencePublished
                        & ESG       & Correlations at the ESG level are on average 0.54 and range from 0.38 to 0.71 whereas credit ratings show correlations of 0.99       \\
        & Berg2022noise & ESG       & ESG ratings are noisy and, therefore, standard regression estimates suffer from attenuation bias   \\
        & Christensen2022   & ESG   & Greater  ESG  disclosure, conversely  leads  to  greater  ESG  disagreement  across  ESG  rating  agencies   \\
        & Lioui2022         & ESG   & Disagreement across data vendors has substantial implications on the performance of ESG factors  \\
        & Serafeim2022rating    
                        & ESG       & In the presence of significant disagreement, the ratings’ usefulness declines    \\
    \bottomrule
\end{longtblr}
    \end{landscape}

Normal vertical orientation of pages,

\lipsum[1]
\end{document}

first page:

enter image description here

third page:

enter image description here

1
  • Hey @Zarko thank you for your suggestions! I will try it today and tell you if it has worked for me! What is the difference between your long longtblr and my longtable package?
    – 9Morgan8
    May 26 at 8:56

You must log in to answer this question.

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