如何设置每章的脚注?

如何设置每章的脚注?

以下是 MWE:

\documentclass[12pt,oneside,openany,openbib]{book} 
\usepackage[total={5in, 8in}]{geometry} 
\usepackage[ruled]{bigfoot}
\usepackage[hang]{footmisc}  
\DeclareNewFootnote{A}[arabic]
\DeclareNewFootnote[para]{B}[alph]
\DeclareNewFootnote[para]{C}[roman]
\setlength{\footnotemargin}{5mm}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

    \mainmatter
    \chapter{chapter 1}
     Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing chapter 1\footnoteA{Chapter 1 footnote a Chapter 1 footnote B\footnoteB{Chapter 1 footnote b Chapter 1 footnote C\footnoteC{Chapter 1 footnote c Chapter 1 footnote c Chapter 1 footnote c Chapter 1 footnote c } Chapter 1 footnote b Chapter 1 footnote b Chapter 1 footnote b } Chapter 1 footnote a Chapter 1 footnote a }
    Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing 

    \chapter{chapter 2}
    Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing\footnoteA{chapter 2 footnote a, chapter 2 footnote B,\footnoteB{chapter 2 footnote b, chapter 2 footnote b,\footnoteC{chapter 2 footnote c, chapter 2 footnote c, chapter 2 footnote c, chapter 2 footnote c, } chapter 2 footnote b, chapter 2 footnote b, chapter 2 footnote b, chapter 2 footnote b, } chapter 2 footnote a, chapter 2 footnote a, chapter 2 footnote a, } Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing Testing 


\end{document}

脚注设置为按页显示,但我需要它们按章显示,即章节的所有脚注都出现在每一章的末尾。我需要脚注以 {章节号, 页码, 脚注标记} 的形式出现

答案1

这不完全符合您的要求,但非常接近。您可以\newpage在适当的位置添加一些内容,以检查脚注中的页码。由于您希望在每章末尾添加脚注,因此我仅使用数字作为脚注标记,并且每章都会重置此编号。

\documentclass[12pt,oneside,openany,openbib]{book} 
\usepackage[total={5in, 8in}]{geometry} 

\usepackage{endnotes,chngcntr}
\let\footnote=\endnote

\makeatletter         %<-- these lines add the page numbering
\long\def\@endnotetext#1{%
    \if@enotesopen \else \@openenotes \fi
    \immediate\write\@enotes{\@doanenote{\@theenmark \ [pg \thepage]}}
    \begingroup
    \def\next{#1}
    \newlinechar='40
    \immediate\write\@enotes{\meaning\next}%
    \endgroup
    \immediate\write\@enotes{\@endanenote}}
\makeatother

\renewcommand{\notesname}{Footnotes of Chapter \thechapter} %<-- this is for the title of the footnotes at the end of the chapter
\counterwithin*{endnote}{chapter} %<-- this restarts the numbering of the footnotes for each chapter, requires the package "chngcntr"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

    \mainmatter
    \chapter{chapter 1}
     Testing Testing Testing Testing Testing Testing Testing\footnote{a footnote} Testing Testing Testing Testing Testing Testing\footnote{another footnote} Testing Testing Testing Testing Testing\footnote{A third footnote}
    Testing Testing Testing Testing Testing Testing Testing Testing Testing\footnote{one footnote more} Testing Testing 

\begingroup
\parindent 0pt
\parskip 2ex
\def\enotesize{\normalsize}
\theendnotes %<---- this prints all the footnotes together
\endgroup

    \chapter{chapter 2}
     Testing Testing Testing Testing Testing Testing Testing\footnote{a footnote} Testing Testing Testing Testing Testing Testing\footnote{another footnote} Testing Testing Testing Testing Testing\footnote{A third footnote}
Testing Testing Testing Testing Testing Testing Testing Testing Testing\footnote{one footnote more} Testing Testing 

\begingroup
\parindent 0pt
\parskip 2ex
\def\enotesize{\normalsize}
\theendnotes
\endgroup

\end{document}

在此处输入图片描述

相关内容