4

I am using the tocloft package so that the word Table shows up before the number in the list of tables. When I do this, the tables with long captions wrap to the next line but are not aligned. This is the code that I am using.

\documentclass [12pt] {article}
\usepackage{times, url}
\usepackage[left=1.5in,top=1in,bottom=1in,right=1in,footskip=0.5in]{geometry}
\usepackage{float}
\usepackage{booktabs,threeparttable}
\usepackage[subfigure]{tocloft}
\usepackage{subfigure}
\usepackage[justification=centering]{caption} 
\renewcommand{\cfttabfont}{Table }


\begin{document} 

\listoftables  

\begin{table}[htbp]
\begin{threeparttable}
\captionsetup{font=normalsize}
\caption{Summary Statistics for Structural Housing Characteristics.  Central Kentucky Data, 2000-2011. N=142,164.}
\centering
\footnotesize
\label{table:sumstatsfull}
\begin{tabular}{lcccc} \hline
Variable & Mean & Std. Dev. & Min & Max \\ \hline
\end{tabular}
\end{threeparttable}
\end{table}

\end{document}
`

I want the Table to precede the table number but I want the caption to be aligned like it is when the code below is used

`
\documentclass [12pt] {article}
\usepackage{times, url}
\usepackage[left=1.5in,top=1in,bottom=1in,right=1in,footskip=0.5in]{geometry}
\usepackage{float}
\usepackage{booktabs,threeparttable}
\usepackage[subfigure]{tocloft}
\usepackage{subfigure}
\usepackage[justification=centering]{caption} 
%\renewcommand{\cfttabfont}{Table }


\begin{document} 

\listoftables  

\begin{table}[htbp]
\begin{threeparttable}
\captionsetup{font=normalsize}
\caption{Summary Statistics for Structural Housing Characteristics.  Central Kentucky Data, 2000-2011. N=142,164.}
\centering
\footnotesize
\label{table:sumstatsfull}
\begin{tabular}{lcccc} \hline
Variable & Mean & Std. Dev. & Min & Max \\ \hline
\end{tabular}
\end{threeparttable}
\end{table}

\end{document}
3

\cfttabfont is meant to be used to introduce a change of font attributes for the title and the preceding number, so using it to add some string will produce undesired side effects, like the one you noticed.

Add the word "Table" and a space using \cfttabpresnum and then use \cfttabnumwidth to increase the space reserved for the number:

\documentclass[12pt]{article}
\usepackage{times, url}
\usepackage[left=1.5in,top=1in,bottom=1in,right=1in,footskip=0.5in]{geometry}
\usepackage{float}
\usepackage{booktabs,threeparttable}
\usepackage[subfigure]{tocloft}
\usepackage{subfigure}
\usepackage[justification=centering]{caption} 

\newlength\mylen
\renewcommand\cfttabpresnum{Table }
\settowidth\mylen{\cfttabpresnum\cfttabaftersnum}
\addtolength\cfttabnumwidth{\mylen}

\begin{document} 

\listoftables  

\begin{table}[htbp]
\begin{threeparttable}
\captionsetup{font=normalsize}
\caption{Summary Statistics for Structural Housing Characteristics.  Central Kentucky Data, 2000-2011. N=142,164.}
\centering
\footnotesize
\label{table:sumstatsfull}
\begin{tabular}{lcccc} \hline
Variable & Mean & Std. Dev. & Min & Max \\ \hline
\end{tabular}
\end{threeparttable}
\end{table}

\end{document}

enter image description here

If you want "Table" to be flushed to the left margin, add

\setlength\cfttabindent{0pt}

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.