所以我想将lof中的索引从1改为图1:
\documentclass{scrreprt}
\usepackage{float}
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[height=0.3\textheight]{example-image}
\caption[Example Caption]{Example Caption}
\label{fig:Example}
\end{figure}
\listoffigures
\end{document}
答案1
添加选项listof=entryprefix
并重新定义\listoflofentryname
:
\documentclass[
listof=entryprefix
]{scrreprt}
%\usepackage{float}% do you need this package?
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\renewcommand*\listoflofentryname{Fig.}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[height=0.3\textheight]{example-image}
\caption[Example Caption]{Example Caption}
\label{fig:Example}
\end{figure}
\listoffigures
\end{document}
结果:
或者使用 KOMA-Script 类和包babel
:
\documentclass[
listof=entryprefix,
english
]{scrreprt}
\usepackage{babel}
%\usepackage{float}% do you need this package?
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\newcaptionname{english}{\listoflofentryname}{Fig.}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[height=0.3\textheight]{example-image}
\caption[Example Caption]{Example Caption}
\label{fig:Example}
\end{figure}
\listoffigures
\end{document}