1

The footnote within my table appears constrained to the width of the first tabular section, and I'm seeking a way to extend it to occupy the entire width of the table.

My document is formatted in two-column style, and I've employed the table* environment to expand the table across the entire page width. Within this structure, I've arranged two tabular sections side by side to form two distinct tables. Additionally, I'm utilizing the threeparttable package to incorporate table notes.

The provided code generates the output in the figure below. I want to enhance the footnote to encompass all the white space highlighted in red.

enter image description here

\documentclass[twocolumn]{article}

\usepackage{graphicx} % Required for inserting images
\usepackage{booktabs} 
\usepackage{tabularx} 
\usepackage{threeparttable}
\usepackage{makecell}
\usepackage{colortbl}
\usepackage{amsmath} 
\usepackage{lipsum} % For dummy text; you can remove this in your actual document

\usepackage{geometry} %margins of the document
 \geometry{
 a4paper,
 total={170mm,257mm},
 left=20mm,
 top=20mm,
 }

\usepackage{showframe} % to show page margins

\title{two_colums_two_columns}
\author{alexyshr }
\date{January 2024}

\begin{document}
\definecolor{light-gray}{gray}{0.95}

\section{Introduction}
\lipsum[1-2]


\addtolength{\tabcolsep}{-5pt} %reduce default column separation

\begin{table*}[hbt!] %table* will expand the table to all the space available
\caption{SOF Metrics. All providers. Florida Power Grid - PG}

\centering
\fontsize{7}{9}\selectfont
\begin{threeparttable}
\begin{tabular}[t]{>{}clcccccc}
\toprule
  & \textbf{County} & \textbf{\makecell[c]{SOF\\MERS$^\dagger$}} & \textbf{\makecell[c]{SOF\\MERA$^\ast$}} & \textbf{$\beta_0^\ddagger$} & \textbf{$\beta_1^\S$} & \textbf{$\#^\P$} & \vphantom{1} \textbf{\makecell[c]{Risk\\Ratio}}\\
\midrule
\em{1} & OSCEOLA & 46.0 & 0.511 & -7.176 & 0.156 & 10 & 0.720\\
\em{2} & HILLSBOROUGH & 45.0 & 0.500 & -7.003 & 0.156 & 10 & 0.736\\
\em{3} & SUMTER & 44.7 & 0.497 & -8.823 & 0.197 & 10 & 0.740\\
\em{4} & PALM BEACH & 43.9 & 0.488 & -10.656 & 0.243 & 10 & 0.754\\
\em{5} & MIAMI-DADE & 43.6 & 0.484 & -9.377 & 0.215 & 10 & 0.760\\
\bottomrule
\end{tabular}
\begin{tablenotes}[para]
\item[$\ast$] \text{$\equiv$ SOF-MERS: Multi-Event median Robustness wind Speed; }
\item[$\dagger$] \text{$\equiv$ SOF-MERA: Multi-Event Robustness Area.}
\item[$\ddagger$] \text{$\equiv$ Intercept; }
\item[$\S$] \text{$\equiv$ Slope; }
\item[$\P$] \text{$\equiv$ Number of Hurricane Events.}
\end{tablenotes}
\end{threeparttable}
\centering
\begin{tabular}[t]{clcccccc}
\toprule
\em{ } & \textbf{County} & \textbf{\makecell[c]{SOF\\MERS$^\dagger$}} & \textbf{\makecell[c]{SOF\\MERA$^\ast$}} & \textbf{$\beta_0^\ddagger$} & \textbf{$\beta_1^\S$} & \textbf{$\#^\P$} & \textbf{\makecell[c]{Risk\\Ratio}}\\
\midrule
\em{35} & HAMILTON & 32.3 & 0.359 & -7.244 & 0.224 & 10 & 1.024\\
\em{36} & DIXIE & 32.2 & 0.358 & -10.633 & 0.330 & 10 & 1.027\\
\em{37} & PUTNAM & 32.2 & 0.357 & -9.266 & 0.288 & 10 & 1.030\\
\em{38} & FLAGLER & 32.0 & 0.356 & -9.695 & 0.303 & 10 & 1.033\\
\em{\cellcolor{light-gray}{\textbf{$>>$}}} & \cellcolor{light-gray}{\textbf{ALL}} & \cellcolor{light-gray}{\textbf{33.1}} & \cellcolor{light-gray}{\textbf{0.368}} & \cellcolor{light-gray}{\textbf{-7.776}} & \cellcolor{light-gray}{\textbf{0.235}} & \cellcolor{light-gray}{\textbf{683}} & \cellcolor{light-gray}{\textbf{1.000}}\\
\bottomrule
\end{tabular}
\end{table*}

\lipsum[3-15]

%return to normal column separation
\addtolength{\tabcolsep}{1pt} 


\end{document}

1
  • Welcome to TeX.SE.
    – Mico
    Commented Jan 5 at 18:01

1 Answer 1

1

I suggest you encase both of the smaller tabular environment in an "outer" two-column tabular environment and let the "outer" tabular env. span the full width of the textblock. Then, make sure that threeparttable environment encases this "outer" tabular env.

I would also load the siunitx package and use its S column type for the $\beta_0$ columns in both inner tabular environments, both to align the numbers on their decimal markers and to get proper math-minus signs.

By the way, there's no need to bold-face the cells in the header rows.

enter image description here

\documentclass[twocolumn]{article}

\usepackage{graphicx} % Required for inserting images
\usepackage{booktabs} 

\usepackage[para]{threeparttable}
\usepackage{makecell}
\usepackage{colortbl,xcolor}
\definecolor{light-gray}{gray}{0.9}

\usepackage{amsmath} 
\usepackage{lipsum} % For dummy text; you can remove this in your actual document

\usepackage{geometry} %margins of the document
\geometry{a4paper, total={170mm,257mm}, margin=20mm}

\usepackage{siunitx} % for 'S' column type


%\usepackage{showframe} % to show page margins


\begin{document}


\section{Introduction}
\lipsum[1-2]

\begin{table*}

\setlength{\tabcolsep}{3pt} % default: 6pt
\footnotesize

\caption{SOF Metrics. All providers. Florida Power Grid -- PG}

\smallskip
\begin{threeparttable}

% "outer" table
\begin{tabular}{@{}cc@{}}
 
% first "inner" table
\begin{tabular}{@{} >{\em}l l cc S[table-format=-1.3] ccc @{}}
\toprule
  & County 
  & \makecell{SOF\\MERS\tnote{\textdagger}} 
  & \makecell{SOF\\MERA\tnote{\textasteriskcentered}} 
  & {$\beta_0$\tnote{$\ddagger$}}
  & $\beta_1$\tnote{\S} 
  & \#\tnote{\P}
  & \makecell{Risk\\Ratio}\\
\midrule
1 & OSCEOLA      & 46.0 & 0.511 &  -7.176 & 0.156 & 10 & 0.720\\
2 & HILLSBOROUGH & 45.0 & 0.500 &  -7.003 & 0.156 & 10 & 0.736\\
3 & SUMTER       & 44.7 & 0.497 &  -8.823 & 0.197 & 10 & 0.740\\
4 & PALM BEACH.  & 43.9 & 0.488 & -10.656 & 0.243 & 10 & 0.754\\
5 & MIAMI-DADE   & 43.6 & 0.484 &  -9.377 & 0.215 & 10 & 0.760\\
\bottomrule
\end{tabular} % end of first "inner" table
\hspace{5pt}
% second "inner" table
\begin{tabular}{@{\hspace{2pt}} >{\em}l l cc S[table-format=-1.3] ccc @{\hspace{2pt}}} 
\toprule
  & County 
  & \makecell{SOF\\MERS\tnote{\textdagger}} 
  & \makecell{SOF\\MERA\tnote{\textasteriskcentered}} 
  & {$\beta_0$\tnote{$\ddagger$}}
  & $\beta_1$\tnote{\S}
  & \#\tnote{\P}
  & \makecell{Risk\\Ratio}\\
\midrule
35 & HAMILTON & 32.3 & 0.359 &  -7.244 & 0.224 &  10 & 1.024\\
36 & DIXIE    & 32.2 & 0.358 & -10.633 & 0.330 &  10 & 1.027\\
37 & PUTNAM   & 32.2 & 0.357 &  -9.266 & 0.288 &  10 & 1.030\\
38 & FLAGLER  & 32.0 & 0.356 &  -9.695 & 0.303 &  10 & 1.033\\
\rowcolor{light-gray}
 & ALL               & 33.1 & 0.368 &  -7.776 & 0.235 & 683 & 1.000\\
\bottomrule
\end{tabular}\null
\end{tabular} % end of "outer" tabular

\smallskip
\begin{tablenotes}
\item[\textdagger] SOF-MERS: Multi-Event median Robustness wind Speed; 
\item[\textasteriskcentered] SOF-MERA: Multi-Event Robustness Area;
\item[$\ddagger$] Intercept;
\item[\S] Slope; 
\item[\P] Number of Hurricane Events.
\end{tablenotes}

\end{threeparttable}

\end{table*}

\lipsum[3-15]

\end{document}
4
  • Thank you @Mico, very useful. You changed different useful details. You said "... let the 'outer' tabular env. span the full width of the textblock", but if I change the \footnotesize to \scriptsize then the table is not using all the page width available. How can I ensure the table uses all the page width available?
    – alexyshr
    Commented Jan 5 at 22:58
  • @alexyshr - Not rendering some of the header cells and the final row of the second tabular env. in bold and deleting $>>$ made it possible for me to switch from \scriptsize to \footnotesize, while still allowing for a useful value of \tabcolsep. Why would you want to revert to scriptsize? However, if for whatever reason you insist on reverting to \scriptsize, just increase the value of \tabcolsep suitably to make the tables once more span the full width of the textblock.
    – Mico
    Commented Jan 5 at 23:32
  • The real table in my paper (another table) does not use all the page widths available. I thought that maybe any special command would automatically expand the table without consideration of the font size. I will fix it by hand using \tabcolsep and \fontsize{8}{10}\selectfont or any specific command to change font size.
    – alexyshr
    Commented Jan 5 at 23:38
  • @alexyshr - If the main document font size is {10}{12}, i.e., the default for plain-TeX and LaTeX documents, then \footnotesize is exactly equivalent to {8}{10}. A deeper reason for why there's no easy way to set an overall target width is because the threeparttable machinery is getting in the way.
    – Mico
    Commented Jan 5 at 23:40

You must log in to answer this question.

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