1

enter image description here

Hey fellas, look at the picture given above. I want (continued) to be completely left aligned, however, leftalign not working in tabularx (ltablex) env. for me, and hence I am using \hfill. Though hfill works to some extent, but doesn't yield a complete left alignment. Any solutions for modifying hill or any other solution to fix this? Thanks.

\documentclass{article}
\usepackage{ltablex}
\usepackage{threeparttable}
\usepackage{booktabs}

\title{Document}
\begin{document}
\maketitle

\begin{tabularx}{\textwidth}{Xc}
\toprule\toprule
Some random text & 1,75,650\\\midrule
\multicolumn{2}{l}{\textbf{Panel A1: AAA}} \\\midrule
Number of observations ... & 1,75,650\\
Delete: ... & (78,420)\\
Delete: ... & (7,104)\\
Final sample & 90,126\\
Delete: & (2,143)\\
Delete: & (8,345)\\
Final sample & 79,638\\\midrule
\multicolumn{2}{l}{\textbf{Panel A2: AAA}} \\\midrule
Number of observations & 79,638\\
Delete: & (39,540)\\
Delete: & (7,979) \\
Final sample & 32,119 \\\midrule
\multicolumn{2}{l}{\textbf{Panel B1: BBB }} \\\midrule
Number of observations  & 1,75,650\\
Delete: & (78,420)\\
Delete: & (47,136)\\
Delete: & (7,178)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Final sample & 42,884\\\midrule
\multicolumn{2}{l}{\textbf{Panel B2: BBB}} \\\midrule
Number of observations  & 1,75,650\\
Delete: & (78,420)\\
Delete: & (47,136)\\
Delete: & (7,178)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Number of observations  & 1,75,650\\
Delete: & (78,420)\\
Delete: & (47,136)\\
Delete: & (7,178)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Delete: & (32)\\
Final sample & 42,884\\\midrule\bottomrule
\end{tabularx}

\end{document}
  • The line which bothers me is this : \bottomrule\hfill\small\textit{(Continued)}\endfoot \bottomrule\insertTableNotes\endlastfoot – Sumit Mar 24 '14 at 9:27
3

Since you speak of tabularx: in tabular environments, there's space before and after a column. You can remove it by inserting @{} in the corresponding place of the column definitions, such as:

\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{4cm}{@{}Xr@{}}
\hline
Number & 42\\
\hline
\end{tabularx}
\end{document}

table output

Similar, if you use \multicolumn:

\multicolumn{2}{@{}l}{...}

Your MWE becomes:

table output

And in your case of the "Continued" line, use \multicolumn instead of \hfill:

\bottomrule\multicolumn{2}{@{}r@{}}{\small\textit{(Continued)}}\endfoot

Continued line

  • very cool. Thanks. I understood the mistake I was making. Thanks a lot. – Sumit Mar 24 '14 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.