图表列表与尾注

图表列表与尾注

我正在使用尾注和图表列表。但不知为何,图表列表没有列出任何图表。这似乎与我的尾注有冲突。有什么想法吗?

\documentclass[11pt,a5paper,twoside]{book}
\usepackage[left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{graphicx}

\usepackage[Lenny]{fncychap}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[RO]{\nouppercase{\leftmark}}
\fancyhead[LE]{\nouppercase{\rightmark}}
\fancyhead[RE,LO]{\thepage}
\fancyfoot[C]{}

\usepackage{endnotes,chngcntr}
\usepackage{alphalph}
\renewcommand*{\theendnote}{\alphalph{\value{endnote}}}

\counterwithin*{endnote}{chapter}
\renewcommand\notesname{Footnotes}

\makeatletter
\renewcommand\enoteheading{%
  \setcounter{secnumdepth}{-2}
  \chapter*{\notesname}
  \markboth{Footnotes}{Footnotes}
  \mbox{}\par\vskip-\baselineskip
  \let\@afterindentfalse\@afterindenttrue
  \addtocontents{toc}{\protect\setcounter{tocdepth}{-2}}
}
\makeatother

\usepackage{xparse}

\let\latexchapter\chapter

\RenewDocumentCommand{\chapter}{som}{%
  \IfBooleanTF{#1}
    {\latexchapter*{#3}}
    {\IfNoValueTF{#2}
       {\latexchapter{#3}}
       {\latexchapter[#2]{#3}}%
     \addtoendnotes{%
       \noexpand\enotedivision{\noexpand\subsection}
         {\chaptername\ \thechapter. \unexpanded{#3}}}%
    }%
}
\makeatletter
\def\enotedivision#1#2{\@ifnextchar\enotedivision{}{#1{#2}}}
\makeatletter

\begin{document}

\begin{titlepage}
    Book Title
\end{titlepage}

\tableofcontents

\chapter{Chapter 1}
Text\endnote{Endnote 1}. Second Sentence\endnote{Endnote 2}.

\chapter{Chapter 2}
Chapter text\endnote{Endnote 1 of this Chapter}

\chapter{Chapter 3}
\begin{figure}
\includegraphics[scale=1]{immage.png}
\caption[Figure]{Caption of the Figure}\label{Figure}
\end{figure}

\chapter{Chapter 4}

\newpage
\begingroup
\def\enotesize{\normalsize}
\addtoendnotes{\unexpanded{\enotedivision{}{}}}
\theendnotes
\endgroup

{\footnotesize
\listoffigures
}

\end{document}

答案1

\addtocontents{toc}{\protect\setcounter{tocdepth}{-2}}负责分割图表,所以我建议删除该行。为了避免在目录中出现尾注之间的划分,似乎可以用 来\subsection*代替\subsection

\documentclass[11pt,a5paper,twoside]{book}
\usepackage[left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[draft]{graphicx}

\usepackage[Lenny]{fncychap}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[RO]{\nouppercase{\leftmark}}
\fancyhead[LE]{\nouppercase{\rightmark}}
\fancyhead[RE,LO]{\thepage}
\fancyfoot[C]{}

\usepackage{endnotes,chngcntr}
\usepackage{alphalph}
\renewcommand*{\theendnote}{\alphalph{\value{endnote}}}

\counterwithin*{endnote}{chapter}
\renewcommand\notesname{Footnotes}

\makeatletter
\renewcommand\enoteheading{%
  \setcounter{secnumdepth}{-2}%
  \chapter*{\notesname}%
  \markboth{Footnotes}{Footnotes}%
  \mbox{}\par\vskip-\baselineskip
  \let\@afterindentfalse\@afterindenttrue
%   \addtocontents{toc}{\protect\setcounter{tocdepth}{-2}}%
}
\makeatother

\let\latexchapter\chapter

\RenewDocumentCommand{\chapter}{som}{%
  \IfBooleanTF{#1}
  {\latexchapter*{#3}}
  {\IfNoValueTF{#2}
    {\latexchapter{#3}}
    {\latexchapter[#2]{#3}}%
    \addtoendnotes{%
      \noexpand\enotedivision{\noexpand\subsection*}%
      {\chaptername\ \thechapter. \unexpanded{#3}}}%
  }%
}
\makeatletter
\def\enotedivision#1#2{\@ifnextchar\enotedivision{}{#1{#2}}}
\makeatletter

\begin{document}

\begin{titlepage}
  Book Title
\end{titlepage}

\tableofcontents

\chapter{Chapter 1}
Text\endnote{Endnote 1}. Second Sentence\endnote{Endnote 2}.

\chapter{Chapter 2}
Chapter text\endnote{Endnote 1 of this Chapter}

\chapter{Chapter 3}
\begin{figure}
  \includegraphics[scale=1]{immage.png}
  \caption[Figure]{Caption of the Figure}\label{Figure}
\end{figure}

\chapter{Chapter 4}

\newpage
\begingroup
\def\enotesize{\normalsize}
\addtoendnotes{\unexpanded{\enotedivision{}{}}}
\theendnotes
\endgroup

{\footnotesize
  \listoffigures
}

\end{document}

相关内容