gmedina, thank you for your previous help on this topic. Here is where things break down for me. If I change the font of the LOT entries, the indentation is incorrect. Note lines 3-6 in the following code; they are the only change from one of your examples. Tossing this into pdflatex produces a LOT entry with incorrect line wrapping. Any ideas?
\documentclass{report}
\usepackage{tocloft}
\renewcommand\cfttabfont{
\fontfamily{phv}
\fontsize{12pt}{10pt}
\selectfont}
\newlength\mylength
\settowidth\mylength{Table}
\addtolength\cfttabnumwidth{\mylength}
\renewcommand\cfttabpresnum{Table }
\begin{document}
\listoftables
\begin{table}[!ht]
\centering
\rule{4cm}{3cm}% to simulate a table
\caption{Some long, very long test text which should span at least one line in the list of tables}
\label{tab:test}
\end{table}
\end{document}
rotarydial wrote:gmedina, thank you for your previous help on this topic...
You are welcome!
rotarydial wrote:...Here is where things break down for me. If I change the font of the LOT entries, the indentation is incorrect. Note lines 3-6 in the following code; they are the only change from one of your examples. Tossing this into pdflatex produces a LOT entry with incorrect line wrapping. Any ideas?
Simply remove any blank spaces within \fontfamily, \fontsize, and \selectfont; it is also advisable to apply the font modification to calculate the \mylength length:
\documentclass{report}
\usepackage{tocloft}
\renewcommand\cfttabfont{%
\fontfamily{phv}\fontsize{12pt}{10pt}\selectfont}
\newlength\mylength
\settowidth\mylength{\cfttabfont Table}
\addtolength\cfttabnumwidth{\mylength}
\renewcommand\cfttabpresnum{Table\ }
\begin{document}
\listoftables
\begin{table}[!ht]
\centering
\rule{4cm}{3cm}% to simulate a table
\caption{Some long, very long test text which should span at least one line in the list of tables}
\label{tab:test}
\end{table}
\end{document}
Edit: I corrected the last part of my message, regarding \mylength.