Text FormattingFormat list of figures

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
macgyver
Posts: 4
Joined: Fri Nov 06, 2009 2:41 pm

Format list of figures

Post by macgyver »

Hi everyone.
I'm facing some trouble formatting the list of figures for my thesis and I would really appreciate it if someone could help me resolve it.

I would like to decrease the size available for the title of the figure while at the same time
- the title retains the same distance from the figure number (\setlength{\cftfignumwidth}{1.9em})
- the dots end just 1em before the page number.

I solved the issue partly using \cftsetpnumwidth{2em} however the dots stop way before the page number.

Thank you in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

daleif
Posts: 199
Joined: Wed Nov 19, 2008 12:46 am

Re: Format list of figures

Post by daleif »

please post a minimal example, it makes it a lot easier for us to help
macgyver
Posts: 4
Joined: Fri Nov 06, 2009 2:41 pm

Format list of figures

Post by macgyver »

Here is a minimal working example.

Code: Select all

\documentclass[11pt,a4paper,english]{report}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont={bf,sf},tableposition=top]{caption}
\usepackage{tocloft}
\setlength{\cftfignumwidth}{1.9em}  % Modify number width in LoF
\begin{document}
  \listoffigures
  \chapter{Dummy Chapter}
    \section{Dummy Section}
    \begin{figure}[!ht]
      \centering
      \rule{6.4cm}{3.6cm}
      \caption{This is a very very very very very very very very long caption}\label{fig:dummy}
    \end{figure}
\end{document}
Thank you in advance
daleif
Posts: 199
Joined: Wed Nov 19, 2008 12:46 am

Re: Format list of figures

Post by daleif »

and what exactly is the problem? as far as I can see the dots stop aprox 1em from the page number
Post Reply