![避免在图表列表中显示 chapter.section 的数量](https://linux22.com/image/352040/%E9%81%BF%E5%85%8D%E5%9C%A8%E5%9B%BE%E8%A1%A8%E5%88%97%E8%A1%A8%E4%B8%AD%E6%98%BE%E7%A4%BA%20chapter.section%20%E7%9A%84%E6%95%B0%E9%87%8F.png)
使用时,是否可以不显示图形列表中图形前面的数字\listoffigures
?
例如,仅显示图 a、图 b、图 c,而不是 1.1 图 a、2.1 图 b,...
代码示例:
\documentclass[a4paper,12pt]{book}
\usepackage[demo]{graphicx}
\usepackage{blindtext}
\begin{document}
\author{TeXstudio Team}
\title{Simple Book Example}
\date{January 2013}
\frontmatter
\maketitle
\tableofcontents
\listoffigures
\mainmatter
\chapter{AAA}
\blindtext
\begin{figure}[hpb]
\centering
\includegraphics[width=3cm]{example-image-a}
\caption{figure a}
\end{figure}
\chapter{BBB}
\blindtext
\begin{figure}[hpb]
\centering
\includegraphics[width=3cm]{example-image-b}
\caption{figure b}
\end{figure}
\chapter{CCC}
\blindtext
\begin{figure}[hpb]
\centering
\includegraphics[width=3cm]{example-image-c}
\caption{figure c}
\end{figure}
\end{document}
答案1
以下是使用包(版本 3.20 或更新版本)的建议tocbasic
:
\documentclass[a4paper,12pt]{book}
\usepackage[demo]{graphicx}
\usepackage{blindtext}
\usepackage{tocbasic}[2016/05/10]% needs version 3.20 or newer
\DeclareTOCStyleEntry[
entrynumberformat=\gobble,
numwidth=0pt,
indent=0pt
]{tocline}{figure}
\newcommand\gobble[1]{}
\begin{document}
\author{TeXstudio Team}
\title{Simple Book Example}
\date{January 2013}
\frontmatter
\maketitle
\tableofcontents
\listoffigures
\mainmatter
\chapter{AAA}
\blindtext
\begin{figure}[hpb]
\centering
\includegraphics[width=3cm]{example-image-a}
\caption{figure a}
\end{figure}
\chapter{BBB}
\blindtext
\begin{figure}[hpb]
\centering
\includegraphics[width=3cm]{example-image-b}
\caption{figure b}
\end{figure}
\chapter{CCC}
\blindtext
\begin{figure}[hpb]
\centering
\includegraphics[width=3cm]{example-image-c}
\caption{figure c}
\end{figure}
\end{document}