1

I am still learning the ropes with Latex so forgive me if this is a straight forward question. I would like to have table notes below my table. However, the default is to center the table notes. I have figured out that to move it to the left I need to use [flushleft] but this removes the ability to have new lines even if I use a double backslash (\\). When I use [para,flushleft] if has weird spacing to cover the entire line. How do I get the notes to begin on the left, move onto a new line when I need it to and not have weird spacing all at the same time?

\usepackage{adjustbox}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{float}
\restylefloat{table}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}
\usepackage{threeparttable}
\begin{documentclass}
        \begin{table}[ht]
    \centering
    \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
    \caption{First Stage Results}\label{First Stage results}
    \begin{adjustbox}{width=1\textwidth}
    \begin{tabular}{l*{9}{c}}
    \hline\hline \multicolumn{1}{c}{} &\multicolumn{9}{c}{\textbf{Public Sector Education in \$1,000}} \\
                        &\multicolumn{1}{c}{(1)}         &\multicolumn{1}{c}{(2)}         &\multicolumn{1}{c}{(3)}         &\multicolumn{1}{c}{(4)}         &\multicolumn{1}{c}{(5)}         &\multicolumn{1}{c}{(6)}         &\multicolumn{1}{c}{(7)}         &\multicolumn{1}{c}{(8)}         &\multicolumn{1}{c}{(9)}         \\
    \hline
    Students In Gov Schools&       0.231\sym{***}&                     &       0.544\sym{***}&                     &       0.258         &      -0.213         &      -0.702         &                     &      -0.744         \\
                        &      (9.10)         &                     &      (3.45)         &                     &      (0.86)         &     (-0.42)         &     (-0.63)         &                     &     (-0.70)         \\
    [1em]
    Government Schools  &                     &       81.45\sym{***}&      -115.3         &      -675.7\sym{*}  &                     &      -763.9         &                     &       121.6         &       153.9         \\
                        &                     &      (7.70)         &     (-1.93)         &     (-2.09)         &                     &     (-1.61)         &                     &      (0.50)         &      (0.69)         \\
    [1em]
    Percentage Growth Working Age&                     &                     &                     &                     &                     &                     &    -12234.3         &    -10629.6         &    -12852.3         \\
                        &                     &                     &                     &                     &                     &                     &     (-0.83)         &     (-0.75)         &     (-0.85)         \\
    [1em]
    Private Education Construction&                     &                     &                     &                     &                     &                     &       0.873\sym{**} &       0.883\sym{**} &       0.869\sym{**} \\
                        &                     &                     &                     &                     &                     &                     &      (3.37)         &      (3.11)         &      (3.30)         \\
    [1em]
    Political Party     &                     &                     &                   &                     &                     &                     &      4009.8         &     -1272.7         &      3351.3         \\
                        &                     &                     &                     &                     &                     &                     &      (0.14)         &     (-0.05)         &      (0.12)         \\
    [1em]
    Exports to China         &                     &                     &                     &                     &                     &                     &       3.168         &       2.542         &       2.696         \\
                        &                     &                     &                     &                     &                     &                     &      (0.61)         &      (0.54)         &      (0.55)         \\
    [1em]
    Young-age Workers   &                     &                     &                     &                     &                     &                     &       1.964         &       2.131         &       2.018         \\
                        &                     &                     &                     &                     &                     &                     &      (0.91)         &      (0.98)         &      (0.92)         \\
    [1em]
    Mid-age workers     &                     &                     &                     &                     &                     &                     &      -0.593         &      -0.787         &      -0.588         \\
                        &                     &                     &                     &                     &                     &                     &     (-0.67)         &     (-0.98)         &     (-0.67)         \\
    [1em]
    Old-age workers     &                     &                     &                     &                     &                     &                     &      -0.250         &      -0.248         &      -0.234         \\
                        &                     &                     &                     &                     &                     &                     &     (-0.53)         &     (-0.52)         &     (-0.51)         \\
    [1em]
    Building The Education Revolution&                     &                     &                     &                     &                     &                     &     65553.2\sym{*}  &     69193.6\sym{*}  &     65809.6\sym{*}  \\
                        &                     &                     &                     &                     &                     &                     &      (2.44)         &      (2.26)         &      (2.46)         \\
    \hline Fixed Effects & No & No & No & Yes & Yes & Yes & Yes & Yes & Yes \\ 
    Observations        &         136         &         136         &         136         &         136         &         136         &         136         &         128         &         128         &         128         \\ Kleibergen–Paap F & 82.75 & 59.36 & 109.27 & 4.37 & 0.74 & 1.71 & 0.40 & 0.25 & 1.50 \\
    \hline\hline
    \end{tabular}
    \end{adjustbox}
    \begin{tablenotes}[para,flushleft]
    \small
    \textbf{Notes:} Fixed effects cover both state and time. Education construction is adjusted for inflation \\ \textit{t} statistics in parentheses\\ \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)\\
    \end{tablenotes}
    \end{table}

\end{documentclass}
8
  • tables notes are not centred by default. Can you show some test document that reproduces your problem?
    – user189125
    May 19, 2019 at 14:21
  • I edited my question to include the code I used. I wasn't sure how to get it on separate lines so forgive it all being on the same line.
    – Asaf Cohen
    May 19, 2019 at 14:27
  • Could you please add a small compilable minimal working example (MWE) that allows others to reproduce the issue you describe?
    – leandriis
    May 19, 2019 at 14:30
  • How do I copy my code in without it ending up like it does now?
    – Asaf Cohen
    May 19, 2019 at 14:34
  • @AsafCohen: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it).
    – leandriis
    May 19, 2019 at 14:38

2 Answers 2

1

possible table looks:

enter image description here (red lines indicate text borders)

I wouldn't use adjustbox for reducing table width. With it the control on fonts ia lost. I would rather redesign table:

  • Define width of the first table column. If cells contents in this column are wider than column width, it will break into two line. By this the table width is significant reduced.
  • Cells' contents in the first column I would put into multirow environment -Reduce \tabcolsep to 0pt and than insert space between columns determined by macro @{\extracolsep{\fill}}.
  • Select smaller font size. It seems that \small is appropriate size (your document's page layout is unknown).
  • For horizontal rules use rules from the `booktabs package
  • Sspace between row's groups I wouldd use \addlinespace provided by the booktabs package

    \documentclass{article}  
    \usepackage{geometry}                  % new
    \usepackage{booktabs, multirow}        % new
    \usepackage[referable]{threeparttablex}% new
    
    \begin{document}
            \begin{table}[ht]
    \begin{threeparttable}
        \caption{First Stage Results}\label{First Stage results}
        \small
        \centering
        \setlength\tabcolsep{0pt}
        \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                           p{10em}
                      *{9}{c}
                                    }
        \toprule
        & \multicolumn{9}{c}{\textbf{Public Sector Education in \$1,000}} \\
        \cmidrule{2-10}
        &{(1)}              & {(2)}             & {(3)}             & {(4)}
        & {(5)}             & {(6)}             & {(7)}             & {(8)}
        & {(9)}             \\
        \midrule
    \multirow{2}{=}{Students \\ Gov Schools}
        & 0.231\tnote{***}  &                   & 0.544\tnote{***}  &
        & 0.258             & -0.213            & -0.702            &
        &-0.744             \\
        & (9.10)            &                   & (3.45)            &
        & (0.86)            & (0.42)            & (0.63)            &
        & (0.70)            \\
        \addlinespace
    \multirow{2}{=}{Government Schools}
        &                   & 81.45\tnote{***}  & -115.3            & -675.7\tnote{*}
        &                   & -763.9            &                   &  121.6
        & 153.9             \\
        &                   & (7.70)            & (1.93)            & (2.09)
        &                   & (1.61)       &                        & (0.50)
        & (0.69)            \\
        \addlinespace
    \multirow{2}{=}{Percentage Growth Working Age}
        &                   &                   &                   &
        &                   &                   & -12234.3          & -10629.6
        & {-12852.3}        \\
    
        &                   &                   &                   &
        &                   &                   & (0.83)            & (0.75)
        & (0.85)            \\
        \addlinespace
    \multirow{2}{=}{Private Education Construction}
        &                   &                   &                   &
        &                   &                   & 0.873\tnote{**}   & 0.883\tnote{**}
        & 0.869\tnote{**}   \\
        &                   &                   &                   &
        &                   &                   & (3.37)            & (3.11)
        & (3.30)            \\
        \addlinespace
    \multirow{2}{=}{Political Party}
        &                   &                   &                   &
        &                   &                   & {4009.8}          &{-1272.7}
        & {3351.3}          \\
        &                   &                   &                   &
        &                   &                   & (0.14)            & (0.05)
        & (0.12)            \\
        \addlinespace
    \multirow{2}{=}{Exports to China}
        &                   &                   &                   &
        &                   &                   & 3.168             & 2.542
        & 2.696             \\
        &                   &                   &                   &
        &                   &                   & 0.61)             & (0.54)
        & (0.55)            \\
        \addlinespace
    \multirow{2}{=}{Young-age Workers}
        &                   &                   &                   &
        &                   &                   & 1.964             & 2.131
        & 2.018             \\
        &                   &                   &                   &
        &                   &                   & (0.91)            & (0.98)
        & (0.92)            \\
        \addlinespace
    \multirow{2}{=}{Mid-age workers}
        &                   &                   &                   &
        &                   &                   & -0.593            & -0.787
        & -0.588            \\
        &                   &                   &                   &
        &                   &                   & (0.67)            & (0.98)
        & (0.67)       \\
        \addlinespace
    \multirow{2}{=}{Old-age workers}
        &                   &                   &                   &
        &                   &                   & -0.250            & -0.248
        & -0.234            \\
        &                   &                   &                   &
        &                   &                   & (0.53)            & (0.52)
        & (0.51)       \\
        \addlinespace
    \multirow{2}{=}{Building The Education Revolution}
        &                   &                   &                   &
        &                   &                   & 65553.2\tnote{*}  & 69193.6\tnote{*}
        & {65809.6}\tnote{*}    \\
        &                   &                   &                   &
        &                   &                   & (2.44)            & (2.26)
        & (2.46)            \\
        \midrule
    Fixed Effects
        & No    & No    & No        & Yes   & Yes   & Yes   & Yes   & Yes   & Yes \\
    Observations
        & 136   & 136   & 136       & 136   & 136   & 136   & 128   & 128   & 128 \\
    Kleibergen–Paap F
        & 82.75 & 59.36 & 109.27    & 4.37  & 0.74  & 1.71  & 0.40  & 0.25  & 1.50 \\
        \midrule[\heavyrulewidth]
        \end{tabular*}
        \begin{tablenotes}[para,flushleft]
        \footnotesize
        \raggedright
    \note{ Fixed effects cover both state and time. Education construction is adjusted for inflation.}
    
    \item{$t$} statistics are in parentheses
    
    \item{*}    \(p<0.05\),
    \item{**}   \(p<0.01\),
    \item{***}  \(p<0.001\)
        \end{tablenotes}
    \end{threeparttable}
        \end{table}
    \end{document}
    
1

You are actually not using any table notes, so I would simply place your text below the tabular:

\documentclass{article}

\usepackage{adjustbox}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{float}
\restylefloat{table}
%\usepackage{floatrow}
%\floatsetup[table]{capposition=top}
\usepackage{threeparttable}
\begin{document}
        \begin{table}[ht]
    \centering
    \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
    \caption{First Stage Results}\label{First Stage results}
    \begin{adjustbox}{width=1\textwidth}
    \begin{tabular}{l*{9}{c}}
    \hline\hline \multicolumn{1}{c}{} &\multicolumn{9}{c}{\textbf{Public Sector Education in \$1,000}} \\
                        &\multicolumn{1}{c}{(1)}         &\multicolumn{1}{c}{(2)}         &\multicolumn{1}{c}{(3)}         &\multicolumn{1}{c}{(4)}         &\multicolumn{1}{c}{(5)}         &\multicolumn{1}{c}{(6)}         &\multicolumn{1}{c}{(7)}         &\multicolumn{1}{c}{(8)}         &\multicolumn{1}{c}{(9)}         \\
    \hline
    Students In Gov Schools&       0.231\sym{***}&                     &       0.544\sym{***}&                     &       0.258         &      -0.213         &      -0.702         &                     &      -0.744         \\
                        &      (9.10)         &                     &      (3.45)         &                     &      (0.86)         &     (-0.42)         &     (-0.63)         &                     &     (-0.70)         \\
    [1em]
    Government Schools  &                     &       81.45\sym{***}&      -115.3         &      -675.7\sym{*}  &                     &      -763.9         &                     &       121.6         &       153.9         \\
                        &                     &      (7.70)         &     (-1.93)         &     (-2.09)         &                     &     (-1.61)         &                     &      (0.50)         &      (0.69)         \\
    [1em]
    Percentage Growth Working Age&                     &                     &                     &                     &                     &                     &    -12234.3         &    -10629.6         &    -12852.3         \\
                        &                     &                     &                     &                     &                     &                     &     (-0.83)         &     (-0.75)         &     (-0.85)         \\
    [1em]
    Private Education Construction&                     &                     &                     &                     &                     &                     &       0.873\sym{**} &       0.883\sym{**} &       0.869\sym{**} \\
                        &                     &                     &                     &                     &                     &                     &      (3.37)         &      (3.11)         &      (3.30)         \\
    [1em]
    Political Party     &                     &                     &                   &                     &                     &                     &      4009.8         &     -1272.7         &      3351.3         \\
                        &                     &                     &                     &                     &                     &                     &      (0.14)         &     (-0.05)         &      (0.12)         \\
    [1em]
    Exports to China         &                     &                     &                     &                     &                     &                     &       3.168         &       2.542         &       2.696         \\
                        &                     &                     &                     &                     &                     &                     &      (0.61)         &      (0.54)         &      (0.55)         \\
    [1em]
    Young-age Workers   &                     &                     &                     &                     &                     &                     &       1.964         &       2.131         &       2.018         \\
                        &                     &                     &                     &                     &                     &                     &      (0.91)         &      (0.98)         &      (0.92)         \\
    [1em]
    Mid-age workers     &                     &                     &                     &                     &                     &                     &      -0.593         &      -0.787         &      -0.588         \\
                        &                     &                     &                     &                     &                     &                     &     (-0.67)         &     (-0.98)         &     (-0.67)         \\
    [1em]
    Old-age workers     &                     &                     &                     &                     &                     &                     &      -0.250         &      -0.248         &      -0.234         \\
                        &                     &                     &                     &                     &                     &                     &     (-0.53)         &     (-0.52)         &     (-0.51)         \\
    [1em]
    Building The Education Revolution&                     &                     &                     &                     &                     &                     &     65553.2\sym{*}  &     69193.6\sym{*}  &     65809.6\sym{*}  \\
                        &                     &                     &                     &                     &                     &                     &      (2.44)         &      (2.26)         &      (2.46)         \\
    \hline Fixed Effects & No & No & No & Yes & Yes & Yes & Yes & Yes & Yes \\ 
    Observations        &         136         &         136         &         136         &         136         &         136         &         136         &         128         &         128         &         128         \\ Kleibergen–Paap F & 82.75 & 59.36 & 109.27 & 4.37 & 0.74 & 1.71 & 0.40 & 0.25 & 1.50 \\
    \hline\hline
    \end{tabular}
    \end{adjustbox}
%    \begin{tablenotes}[para]
        \flushleft
    \small
    \textbf{Notes:} Fixed effects cover both state and time. Education construction is adjusted for inflation \\ \textit{t} statistics in parentheses\\ \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)\\
%    \end{tablenotes}
    \end{table}

\end{document}

(I had to remove a few lines about floatrow because it caused error message and invent a documentclass, because there was no one in the question)

enter image description here

You must log in to answer this question.

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