![将“表格/图片列表”作为附录中的独立章节](https://linux22.com/image/404480/%E5%B0%86%E2%80%9C%E8%A1%A8%E6%A0%BC%2F%E5%9B%BE%E7%89%87%E5%88%97%E8%A1%A8%E2%80%9D%E4%BD%9C%E4%B8%BA%E9%99%84%E5%BD%95%E4%B8%AD%E7%9A%84%E7%8B%AC%E7%AB%8B%E7%AB%A0%E8%8A%82.png)
我想将“表格列表”和“图表列表”作为附录部分中的两个独立章节,如下所示:
Appendix A: List of Figures
Fig. 1 --------
Fig. 2 --------
Appendix B: List of Tables
Tab. 1 --------
Tab. 2 --------
我尝试了以下代码,但它没有按预期工作
\appendix
\begingroup
\chapter{List of tables}
\listoftables
\cleardoublepage
\endgroup
%
\appendix
\begingroup
\chapter{List of Figures}
\listoffigures
\cleardoublepage
\endgroup
答案1
这是我想出的最小示例。希望对您有所帮助。您正在寻找的是\addcontentsline{toc}{section}{List of XX}
\documentclass[a4paper,12pt]{article}
\usepackage{graphicx} % for including graphics.
\usepackage{caption} % For caption of Tables
\begin{document}
% Table of Contents
\tableofcontents
\
\section{First Chapter}
It's me, Mario!
\begin{figure}
\centering
\includegraphics[width=\textwidth]{1.png}
\caption{Some Figure}
\label{fig:figure1}
\end{figure}
\captionof{table}{Some Table}
\begin{center}
\begin{tabular}{c|c}
1 & 2 \\
3 & 4
\end{tabular}
\end{center}
\appendix
%% List of Figures
\addcontentsline{toc}{section}{List of Figures}
\listoffigures
\addcontentsline{toc}{section}{List of Tables}
\listoftables
\end{document}
生成结果:
您\clearpage
还可以在章节、目录、图表等之间插入空白页。