答案1
也许你想要类似的东西
\documentclass[12pt,a4paper]{report}
\usepackage{graphicx}
\usepackage[english]{babel}
\addto{\captionsenglish}{%
\renewcommand\contentsname{Table-of-contents}%
}
\usepackage[nottoc]{tocbibind}% to add the LoF etc to ToC
\usepackage{tocbasic}
\DeclareTOCStyleEntry[
indent=0pt,
dynnumwidth,
entryformat=\figureentryformat
]{tocline}{figure}
\newcommand*\figureentryformat[1]{\figurename~#1}
\DeclareTOCStyleEntry[
indent=0pt,
dynnumwidth,
entryformat=\tableentryformat
]{tocline}{table}
\newcommand*\tableentryformat[1]{\tablename~#1}
% to remove the chapter gap in LoF and LoT (see https://tex.stackexchange.com/a/121881/43317)
\usepackage{etoolbox}
\makeatletter
\def\@gobblesix#1#2#3#4#5#6{}
\patchcmd{\@chapter}% <cmd>
{\chaptermark{#1}}% <search>
{\chaptermark{#1}\@gobblesix}% <replace>
{}{}% <success><failure>
\makeatother
\usepackage{mwe}% only for dummy text and example images
\begin{document}
\tableofcontents
\listoffigures
\chapter{First chapter}
\Blindtext
\begin{figure}
\includegraphics[width=\columnwidth]{example-image}%
\caption{dummy fig 2}%
\end{figure}
\chapter{Second chapter}
\Blindtext
\begin{figure}%
\includegraphics[width=\columnwidth]{example-image}%
\caption{dummy fig 2}%
\end{figure}
\Blindtext[2]
\begin{figure}%
\includegraphics[width=\columnwidth]{example-image}%
\caption{dummy fig 3}%
\end{figure}
\end{document}
运行三次得到:
或者如果你可以使用 KOMA-Script 类scrreprt
:
\documentclass[12pt,
chapterprefix,
sfdefaults=false,% needs version 3.39 or newer, replaces egregdoesnotlikesansseriftitles
listof=nochaptergap,
listof=entryprefix
]{scrreprt}
\usepackage{graphicx}
\usepackage[english]{babel}
\renewcaptionname{english}{\contentsname}{Table-of-contents}
\usepackage{mwe}% only for dummy text and example images
\begin{document}
\tableofcontents
\listoffigures
\chapter{First chapter}
\Blindtext
\begin{figure}
\includegraphics[width=\columnwidth]{example-image}%
\caption{dummy fig 2}%
\end{figure}
\chapter{Second chapter}
\Blindtext
\begin{figure}%
\includegraphics[width=\columnwidth]{example-image}%
\caption{dummy fig 2}%
\end{figure}
\Blindtext[2]
\begin{figure}%
\includegraphics[width=\columnwidth]{example-image}%
\caption{dummy fig 3}%
\end{figure}
\end{document}
运行三次即可获得