我想指出我认为存在的问题。当我尝试创建图列表时,我更喜欢看到“图 1.1 - 测试标题”,而不是“1.1 测试标题”。我使用了\DeclareCaptionListFormat选项,但它给了我一些奇怪的事情:文本重叠。您有办法解决这个问题吗?以下是 MWE:
\documentclass[11pt, a4paper, dvipsnames]{book}
\usepackage[francais]{babel}
\usepackage{caption}
\usepackage[T1]{fontenc} % Accentuation automatique
\usepackage[utf8]{inputenc}
% Pages vierges inutiles
\let\cleardoublepage\clearpage
% Légendes : paramètres
\DeclareCaptionListFormat{figureformat}{Figure~#1~--~#2}
\captionsetup[figure]{listformat=figureformat, font={bf}, skip=5pt}
\begin{document}
\listoffigures
\chapter{Test Chapter}
\captionof{figure}{Test caption}
Let's do it again :
\captionof{figure}{This is another test caption}
And again, just for fun :
\captionof{figure}{Guess what kind of caption this is ?}
\end{document}
答案1
正如我的评论中所述:
\documentclass[11pt, a4paper, dvipsnames]{book}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc} % Accentuation automatique
% Pages vierges inutiles
\let\cleardoublepage\clearpage
% Légendes : paramètres
\usepackage{caption}
\DeclareCaptionListFormat{figureformat}{Figure#1~--~#2} % <---
\captionsetup[figure]{listformat=figureformat, font={bf}, skip=5pt}
\renewcommand{\numberline}[1]{#1\quad} % <===
\begin{document}
\listoffigures
\chapter{Test Chapter}
\captionof{figure}{Test caption}
Let's do it again :
\captionof{figure}{This is another test caption}
And again, just for fun :
\captionof{figure}{Guess what kind of caption this is ?}
\end{document}
编辑: 显然OP面临两个问题:
- 如何在 LoF 中为图形标签腾出空间
- 如何重新定义
labelsep
(我在第一个版本的答案中忽略了什么)。
这两个问题的解决方案都很简单。
\usepackage{caption}
\DeclareCaptionListFormat{figureformat}{Figure#1~--~#2} % <---
\captionsetup[figure]{listformat=figureformat, font={bf}, skip=5pt}
\renewcommand{\numberline}[1]{#1\quad} % <===
上述 MWE 的序言应为:
\usepackage{caption}
\DeclareCaptionListFormat{figureformat}{Figure #1#2 --}
\captionsetup[figure]{skip=5pt, font=bf, labelsep=endash,% <---
listformat=figureformat}
\renewcommand{\numberline}[1]{#1\ } % <---
综合考虑上述情况,MWE 将产生以下结果: