單獨列出附錄條目

單獨列出附錄條目

我在附錄中有兩章 - 表格和圖形(“附錄 A 圖”和附錄 B 表”),我希望文檔的目錄顯示每個章節中的條目。例如,“A.1 這是一些圖”我不知道如何做到這一點,目前目錄中僅列出了附錄A 和B。

\documentclass[12pt,twoside,a4paper]{book}
\usepackage[titletoc,page]{appendix}
\usepackage{caption}


\begin{document}
\tableofcontents



\begin{appendices}


\captionsetup[table]{list=no}
\renewcommand{\thesection}{\thechapter.\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
\chapter{Tables \label{app:figures}}
\begin{table}
\caption{Test table one}
\end{table}

\begin{table}
\caption{Test table one}
\end{table}
\end{appendices}
\end{document}

答案1

在此輸入影像描述

您可以透過告訴 LaTeX 對清單使用相同的副檔名來組合表格清單和目錄。

\documentclass[12pt,twoside,a4paper]{book}
\usepackage[titletoc,page]{appendix}
\usepackage{caption}

\makeatletter
\def\ext@figure{toc}
\def\ext@table{toc}
\makeatother

\begin{document}
\tableofcontents



\begin{appendices}


%\captionsetup[table]{list=no}
\renewcommand{\thesection}{\thechapter.\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
\chapter{Tables \label{app:figures}}
\begin{table}
\caption{Test table one}
\end{table}

\begin{table}
\caption{Test table two}
\end{table}
\end{appendices}
\end{document}

相關內容