Graphics, Figures & TablesAlign horizontal Position of Table Footnote

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
piltdownpunk
Posts: 11
Joined: Tue Aug 09, 2011 8:05 pm

Align horizontal Position of Table Footnote

Post by piltdownpunk »

Hi, all.

In creating a table with a footnote, I've produced a working example that looks exactly like what I need, except for the horizontal position of the table's footnote. I'd like the footnote to be aligned with the table's bottom-rule. Any suggestions are welcome.

Code: Select all

\documentclass[12pt,letterpaper]{report}
\usepackage{booktabs}
\usepackage[top=1.0in, bottom=1.0in, left=1.0in, right=1.0in]{geometry}

\begin{document}
    \begin{table}[h!]
	\centering
	\begin{minipage}{6.5in}
		\centering
		\caption{Ratio of immature skeletons, $_{15}P_{5}$, and paleodemographic estimates for HK43.}
		\begin{tabular}{lccccc}
		\toprule
		Sample & $n_{5-19}$ & $N_{\mathrm{total}}$\footnote{Minus small children (0-4 years old)} & $_{15}P_{5}}$ & Birth rate & Growth rate\\
		\midrule
		Early & 28 & 126 & 0.2222 & 0.0493 & 0.0073\\
		Late & 67 & 247 & 0.2713 & 0.0517 & 0.0134\\
		Total & 95 & 373 & 0.2547 & 0.0491 & 0.0114\\
		\bottomrule
		\end{tabular}
		\vspace{-7pt}\renewcommand{\footnoterule}{}
  	\end{minipage}
    \end{table}
\end{document}

Thanks in advance.
-Trey

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Align horizontal Position of Table Footnote

Post by localghost »

You need to adjust the width of the {minipage} environment.

Code: Select all

\documentclass[11pt,letterpaper]{report}
\usepackage[T1]{fontenc}
\usepackage[margin=1.0in]{geometry}
\usepackage{booktabs}

\begin{document}
  \begin{table}[!ht]
    \centering
    \begin{minipage}{27.6em}
      \caption{Ratio of immature skeletons, $_{15}P_{5}$, and paleodemographic estimates for HK43.}
      \begin{tabular}{lccccc}\toprule
        Sample & $n_{5-19}$ & $N_{\mathrm{total}}$\footnote{Minus small children (0-4 years old)} & $_{15}P_{5}$ & Birth rate & Growth rate\\ \midrule
        Early & 28 & 126 & 0.2222 & 0.0493 & 0.0073 \\
        Late & 67 & 247 & 0.2713 & 0.0517 & 0.0134 \\
        Total & 95 & 373 & 0.2547 & 0.0491 & 0.0114 \\ \bottomrule
      \end{tabular}
      \vspace{-7pt}\renewcommand{\footnoterule}{}
    \end{minipage}
  \end{table}
\end{document}

Thorsten
piltdownpunk
Posts: 11
Joined: Tue Aug 09, 2011 8:05 pm

Re: Align horizontal Position of Table Footnote

Post by piltdownpunk »

Hi, Thorsten.

Thanks so much for the help. That's what I was looking for. Do you suggest trial and error to get the appropriate width setting for minipage? Thanks, again.

--Trey
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Align horizontal Position of Table Footnote

Post by localghost »

piltdownpunk wrote:[…] Do you suggest trial and error to get the appropriate width setting for minipage? […]
I'd suggest to set a fixed table width either by using the tabular* environment or by the tabularx package and choose the same width for the {minipage}. That would be less tedious. Perhaps the varwidth package can be helpful here, too.

By the way, when marking a topic as solved, please do this by accepting the answer that led you to the solution of your problem.
Post Reply