1

Is there a way to change the caption delimiter of floats?

For example, I have "Figure 1: Big figure" and want to obtain "Figure 1 - Big figure" both in text and list of figure.

Using this code I get change in text, but don't in list of figure.

\documentclass{book}

\usepackage[labelsep=endash]{caption}
\usepackage{graphicx}
\usepackage{tocloft}

\renewcommand{\cftfigfont}{Figura~ }

\begin{document}

  \listoffigures

  \begin{figure}[ht]
    \centering
    \includegraphics[scale=1.0]{fig.png}
    \caption{Big figure}
    \label{fig:puc.png}
   \end{figure}

\end{document}

How can I decrease spacing between Figure and number in list of figure? From "Figure 1 Big figure" to "Figure 1 - Big figure".

1

You can use

\renewcommand\cftfignumwidth{5.5em}
\renewcommand{\cftfigpresnum}{Figura\hfill}
\renewcommand{\cftfigaftersnum}{~--~}

Example:

\documentclass{book}
\usepackage[labelsep=endash]{caption}
\usepackage{graphicx}
\usepackage{tocloft}

\renewcommand\cftfignumwidth{5.5em}
\renewcommand{\cftfigpresnum}{Figura\hfill}
\renewcommand{\cftfigaftersnum}{~--~}

\begin{document}
\listoffigures
\begin{figure}[ht]
  \centering
  \includegraphics{example-image}
  \caption{Big figure}
  \label{fig:puc.png}
\end{figure}
\setcounter{figure}{9}
\begin{figure}[ht]
  \centering
  \includegraphics{example-image}
  \caption{Another big figure}
\end{figure}
\end{document}

enter image description here

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.