I want to align two numbers in two different rows the decimal point.
I do see a link for that here:
Aligning numbers by decimal points in table columns
However, I don't understand how to incorporate that into my code. What follows is a reduced version of my code.
\documentclass[12pt,english]{article}
\usepackage{longtable}
\usepackage{fullpage}
\usepackage{times}
\usepackage[flushleft]{threeparttable}
\usepackage[font=large,labelfont=bf,tableposition=top,textfont=bf]{caption}
\usepackage{tabularx}
\usepackage{booktabs}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{document}
\clearpage \newpage
\begin{table}[!ht]
\caption{Table Title}
\def\arraystretch{1.05}
\vspace{-0.2cm}
\begin{threeparttable}
\small
\begin{tabularx}{\textwidth}{l*{10}{C}}
\hline \hline \addlinespace
& (1) \\
Variable Name & 0.1234566 \\
& (0.1234566) \\
\hline \hline \addlinespace
\end{tabularx}
\begin{tablenotes}
\vspace{0.1cm}
\footnotesize{
\item \noindent \hspace{-1.8mm} Notes:
\noindent Sources:
}
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
Best Answer
In addition to trying out the
dcolumn
package mentioned by @DavidCarlisle, you may also want to check out some of the capabilities of thesiunitx
package, specifically, itsS
column type. I've simplified your (not exactly minimal) working example to the example code below, in order to focus on the operation of this column type: