1

On my list of figures and list of tables pages there is no space between the figure number (or table number) and the caption. I would like to control this spacing. I would also like to control the alignment of the caption. So if the caption runs into other lines then these should be aligned with the first line. How can I control these?

  • 1
    Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Do you use any related packages? – Marco Daniel May 20 '13 at 13:38
  • I am using \documentclass[11pt,a4paper]{report} \usepackage{tocloft}

    \renewcommand{\cftfigfont}{Figure } \renewcommand{\cfttabfont}{Table }

    – Peter Palmer May 20 '13 at 13:43
  • 2
  • I am using \documentclass[11pt,a4paper]{report} \usepackage{tocloft}
    \begin{document} \renewcommand{\cftfigfont}{Figure } \renewcommand{\cfttabfont}{Table } \begin{document}
    – Peter Palmer May 20 '13 at 13:50
  • 1
    Does the linked question help? – Marco Daniel May 20 '13 at 14:01
  • @Daniel I am looking at it to see which parts I can take out. – Peter Palmer May 20 '13 at 14:03
  • @Daniel. The following \newlength{\mylenf} \setlength{\cftfignumwidth}{\dimexpr\mylenf+3.5em} \setlength{\cfttabnumwidth}{\dimexpr\mylenf+3.5em} helped to control the spacing. Can you give a suggestion to control the alignment of the caption when it runs into other lines? – Peter Palmer May 20 '13 at 14:15
  • This should be happened. Please provide a MWE. – Marco Daniel May 20 '13 at 14:29
  • @Daniel maybe this will help. The alignment for the caption was ok before I used `\usepackage{tocloft}

    \renewcommand{\cftfigfont}{Figure } \renewcommand{\cfttabfont}{Table }` to insert the words Figure and Table before the figure (table) number.

    – Peter Palmer May 20 '13 at 15:12
  • 1
    @PeterPalmer don't use \cftfigfont and \cfttabfont to add the words "Figure" and "Table" (those commands are only meant to change font attributes). Use these instead: `\renewcommand\cftfigpresnum{Figure\ } \renewcommand\cfttabpresnum{Table\ }

    \newlength\mylenf \settowidth\mylenf{\cftfigpresnum} \addtolength\cftfignumwidth{\mylenf} \addtolength\cfttabnumwidth{\mylenf}`

    – Gonzalo Medina May 20 '13 at 19:34
  • @Medina Thank you. When I use your code the alignments are correct but the words "Figure" and "Table" are not present before the figure or table number. I get the error messages \cftfigpresnum undefined and \cfttabpresnum undefined. The following code found at link solves the problem \makeatletter \patchcmd{\@caption}{\csname the#1\endcsname}{\csname fnum@#1\endcsname:}{}{} \renewcommand*\l@figure{\@dottedtocline{1}{1.5em}{7.0em}} \let\l@table\l@figure \makeatother. – Peter Palmer May 21 '13 at 03:32

0 Answers0