For example, in the following code, only the words "First Group" and "Second Group" get underlined. However, I would like for both underlines to span the entire 5 columns.
Moreover, I do not want the 2 underlines to connect to each other.
For that last point, would I have to create an extra column in the table? And if so, is there a way to set that column to be of an infinitetesimal length just so the 2 underlinings don't connect?
I very much appreciate all of your help!
Code: Select all
\documentclass[12pt]{article}
\usepackage{rotating}
\usepackage{pdflscape}
\usepackage[flushleft]{threeparttable}
\usepackage[margin=1in, lmargin = 1in]{geometry}
\usepackage[T1]{fontenc}
\usepackage[font=large,labelfont=bf,tableposition=top, textfont=bf]{caption}
\usepackage{longtable}
\usepackage{array}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{mathptmx}
\usepackage[scaled]{helvet}
\usepackage{fix-cm}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcommand{\rowstyle}[1]{%
\gdef\currentrowstyle{#1}%
#1\ignorespaces
}
\begin{document}
\begin{landscape}
\begin{table}[!ht]
\caption{Table 1's Caption}\label{table1}
\centering
\begin{threeparttable}
\small
\begin{tabularx}{1.25\textwidth}{l*9{C}C}
\toprule
& (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) \\
& A & BB & CCC & DDDD & EEEEE & FFF & GGG & HHH & III & J \\
& \multiline{5}{c}{\underline{First Group}} & \multiline{5}{c}{\underline{Second Group}}
\midrule
Variable & 0.139*** & 0.034*** & 0.032*** & 0.016*** & 0.109 & 0.053*** & -0.051 & -0.051*** & 0.011*** & -0.002*** \\
\bottomrule\addlinespace
\end{tabularx}
\begin{tablenotes}
\vspace{0.2cm}
\footnotesize{
\item \noindent \hspace{-1.8mm} Notes:
}
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{landscape}
\end{document}