[Tex/LaTex] Aligning Table Notes in Three Part Table

notestablesthreeparttable

I am using the threeparttable environment to make tables. The table notes are always indented. How can I get the notes to start flush with the table?

\documentclass[a4paper,12pt]{article}

\usepackage[flushleft]{threeparttable}

\begin{document}

\begin{table}[ht] \centering
\begin{threeparttable}
\caption{Title For My Table}
\begin{tabular}{l*{3}{c}}
\hline\hline
&\multicolumn{1}{c}{Outcome 1}&\multicolumn{1}{c}{Outcome 2 }&\multicolumn{1}{c}{Outcome 3 }\\

\hline
Independent Variable 1              &      0.0316         &     0.00186         &  0.0001   \\
                    &    (0.0284)         &    (0.0256)         &    (0.0221)          \\
[1em]
Independent Variable 1                &      0.0226 ***&     -0.0154 *  &     -0.0125          \\
                    &   (0.00833)         &   (0.00887)         &    (0.0107)             \\
[1em]
Independent Variable 1                &      0.0180         &    -0.00997         &     -0.0245                \\
                    &    (0.0122)         &   (0.00972)         &    (0.0255)                \\
[1em]
Independent Variable 1               &      0.0270 *  &     -0.0180 *  &     -0.0222                \\
                    &    (0.0141)         &   (0.00915)         &    (0.0153)                 \\
\hline
Observations        &         585         &         585         &         448                 \\
\hline\hline

\end{tabular}



    \begin{tablenotes}
      \tiny
      \item I'm writing the notes down here and I want them to be alligned with the table. However, there is a small indent. 

    \end{tablenotes}
\end{threeparttable}
\end{table}


\end{document}

Best Answer

The syntax intended for items in the tablenotes environment is \item[<some marker>} .... If you're not going to use markers, i.e., if you're going to write \item ..., you should add the instruction

\setlength\labelsep{0pt}

at the start of the tablenotes environment.

A separate issue: Since the numbers in the table look like they may be easier to parse if they're aligned on their decimal markers, you may want to use a package such as dcolumn and its d column type to make the table more readable.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage[flushleft]{threeparttable}
\usepackage{dcolumn}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\begin{document}

\begin{table}[ht] \centering
\begin{threeparttable}
\caption{Title For My Table}

\begin{tabular}{ l d{2.7} d{2.6} d{2.5} }
\hline\hline
&\multicolumn{1}{c}{Outcome 1}
&\multicolumn{1}{c}{Outcome 2}
&\multicolumn{1}{c}{Outcome 3}\\
\hline
Independent Variable 1 & 0.0316 & 0.00186 & 0.0001 \\
& (0.0284) & (0.0256) & (0.0221) \\[1em]
Independent Variable 2 & 0.0226^{***} & -0.0154^{*} & -0.0125 \\
& (0.00833) & (0.00887) & (0.0107) \\[1em]
Independent Variable 3 & 0.0180 & -0.00997 & -0.0245 \\
& (0.0122) & (0.00972) & (0.0255) \\[1em]
Independent Variable 4 & 0.0270^{*} & -0.0180^{*} & -0.0222 \\
& (0.0141) & (0.00915) & (0.0153) \\
\hline
Observations 
& \multicolumn{1}{c}{585} 
& \multicolumn{1}{c}{585} 
& \multicolumn{1}{c}{448} \\
\hline\hline
\end{tabular}

\begin{tablenotes}
\setlength\labelsep{0pt}
\footnotesize
\item I'm writing the notes down here and I want them to be aligned with the table. Now, there's no longer small indent.
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document} 
Related Question