General ⇒ Formatting listoffigures
Formatting listoffigures
For a list of figures (\listoffigures), how can I remove the space that get's automatically added between chapters? Also, how can I modify the entries in the \listoffigures to display something like 'Fig x.y' instead of just the figure number 'x.y'?
NEW: TikZ book now 40% off at Amazon.com for a short time.

Formatting listoffigures
Hi,
tocloft could be an option. Read the package documentation or use the "Search" functionality of this board to find the explicit answer.
tocloft could be an option. Read the package documentation or use the "Search" functionality of this board to find the explicit answer.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Formatting listoffigures
Thanks, the tocloft packages seems to be what I needed, or at least partially. I was able to add the 'figure' prefix to all of my entries as required, but I still can't get rid of the spacing between paragraphs.
To add 'figure' before number in list of figures:
Anyone know how to get rid of this space? I've tried all of the \cftbeforeXskip and \cftXafterpnum commands but I still get this (see attached pic) annoying space.
To add 'figure' before number in list of figures:
Code: Select all
\renewcommand{\cftfignumwidth}{6em}
\renewcommand{\cftfigpresnum}{Figure }
\listoffigures
- Attachments
-
- Pic of extra space
- space.png (34.32 KiB) Viewed 21978 times
Re: Formatting listoffigures
Which document class are you using?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Formatting listoffigures
Relavent portion of code:
Code: Select all
% List of figures and tables
\clearpage
\renewcommand{\listfigurename}{\begin{center} \normalsize \textbf{LIST OF FIGURES} \end{center}}
\renewcommand{\cftfignumwidth}{6em}
\renewcommand{\cftfigpresnum}{Figure }
\renewcommand{\cftbeforefigskip}{0em}
\renewcommand{\cftbeforechapskip}{0em}
\renewcommand{\cftfigafterpnum}{}
\addcontentsline{toc}{section}{LIST OF FIGURES}
\listoffigures
Formatting listoffigures
Add the following lines to the preamble of your document:
Code: Select all
\makeatletter
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\makeatother
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Formatting listoffigures
Huh, that's magic to me but it worked perfectly. Thanks!