Text Formattingtext at the bottom of a table

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
enafat
Posts: 2
Joined: Mon Jul 20, 2009 12:30 pm

text at the bottom of a table

Post by enafat »

dear all, am a new user of Latex and of this forum as well...
I am trying to put some explanatory text at the bottom of a table with regression results; the text spans several lines, and by default if appears uglily centered. Using \flushleft does not improve the way it looks. Is there a way to force full justification? do you have other suggestions?
many thanks in advance
Serena

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

text at the bottom of a table

Post by localghost »

It is always helpful to see some code that shows how you generate your table. Provide a minimal working example (MWE) to present your recent efforts and explain what you are aiming at.


Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
enafat
Posts: 2
Joined: Mon Jul 20, 2009 12:30 pm

text at the bottom of a table

Post by enafat »

I realize my request did sound pretty obscure! Here's (part of) a table I have trouble with. I would like to have the explanatory text placed at the bottom ('Notes: etc etc ') fully justified. Any ideas? Thanks a lot!

Code: Select all

\begin{table}[ht]
\caption{Regression Results} % title of Table
\centering 
\begin{center}
\begin{tabular}{l c c c} 
\hline\hline 
       & (1) & (2) & (3) \\ [0.5ex] 
\hline 
GDP          & 0.667*** & 0.696*** & 0.654*** \\ 
             & (0.139) & (0.102) & (0.131) \\
Observations & 1034 & 1050 & 1050 \\ [1ex] 
\hline 
\end{tabular}
 \end{center}
\footnotesize{Notes: Coefficient estimates from GLS regressions. 
Dependent variable is bilateral trade flows. Robust standard errors clustered on the importer are in parentheses.Column (1) reports the basic specifciation; 
columns (2) and (3) include time and exporter fixed effects, respectively. ***, ** and * denote significance at the 1, 5 and 10% levels, respectively.}
\label{table:reg} 
\end{table}
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

text at the bottom of a table

Post by localghost »

A MWE looks different. Please follow the link in my first reply to learn more about building a MWE for future requests.

You could use the threeparttable package to get your notes fully justified with the width of the table.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{booktabs,threeparttable}

\parindent0em

\begin{document}
  \begin{table}[!ht]
    \centering
    \begin{threeparttable}[b]
      \caption{Regression Results}\label{table:reg}
      \begin{tabular}{lccc}\toprule
        & (1) & (2) & (3) \\ \midrule
        GDP & 0.667\tnote{***} & 0.696\tnote{***} & 0.654\tnote{***} \\
        & (0.139) & (0.102) & (0.131) \\
        Observations & 1034 & 1050 & 1050 \\ \bottomrule \addlinespace
      \end{tabular}
      \scriptsize
      Notes:\hfill\parbox[t]{6.4cm}{Coefficient estimates from GLS regressions. Dependent variable is bilateral trade flows. Robust standard errors clustered on the importer are in parentheses.Column (1) reports the basic specifcation; columns (2) and (3) include time and exporter fixed effects, respectively. ***, ** and * denote significance at the 1, 5 and 10\% levels, respectively.}
%      \begin{tablenotes}[flushleft,para]
%        \item[*] 1\%
%        \item[**] 5\%
%        \item[***] 10\%
%      \end{tablenotes}
    \end{threeparttable}
  \end{table}
\end{document}
The package offers some options for a kind of list for notes. It has no real manual so you have to look at the STY file itself to get more information.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply