尾注以常规阿拉伯数字(而非上标)编号,且无缩进

尾注以常规阿拉伯数字(而非上标)编号,且无缩进

下面的 Latex 文档(来自我之前的问题出现在尾注中的章节名称)生成以阿拉伯数字编号的尾注上标,并且有缩进对于每个音符。

我想要:(1)用常规大小的阿拉伯数字(不是上标)对注释进行编号,后跟句点(像这样:“1。”),(2)注释在开头没有缩进(但给定注释中的所有段落,从第二个段落开始,都应缩进)。

\documentclass[12pt]{book}

\usepackage{endnotes,chngcntr}

\counterwithin*{endnote}{chapter}  % Reset endnote numbering every new chapter

\let\latexchapter\chapter
\makeatletter
\renewcommand\enoteheading{%
\setcounter{secnumdepth}{-2}
\latexchapter*{\notesname\markboth{NOTES}{}}
\mbox{}\par\vskip-\baselineskip
\let\@afterindentfalse\@afterindenttrue
}
\makeatother

\usepackage{xparse}


\RenewDocumentCommand{\chapter}{som}{%
\IfBooleanTF{#1}
{\latexchapter*{#3}%
\setcounter{endnote}{0}%
\addtoendnotes{%
 \noexpand\enotedivision{\noexpand\subsection}
   {\unexpanded{#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}

\setcounter{tocdepth}{1}

\tableofcontents

\chapter*{Preface\markboth{MY BOOK}{PREFACE}}

\addcontentsline{toc}{chapter}{Preface}

This is the Prologue.\endnote{There is one endnote here, which should
appear under the heading "Prologue". The paragraph should start
with ``1.'' and should not be indented.

This is the second paragraph of the same note. It should be indented.}

\chapter{Amazing Story}
As I am describing this story, I make a note which should appear at
the end.\endnote{This the first endnote. It should start with ``1.''

This is the second paragraph of the same note. It should be indented.

This is the third paragraph of the same note. It should also be
indented.} And then I make the second note.\endnote{This is the second
note. It should start with ``2.''}

\chapter{Another Amazing Story}
In this chapter, there are no endnotes. So it should not appear in the
"Notes" at the end.

\chapter{Yet Another Amazing Story}
In this chapter, I have some notes again, which I want to go to the
end.\endnote{This note should appear at the end, under the heading
"Chapter 3. Yet Another Amazing Story", with the counter reset to 1,
since this is the first endnote of this chapter.}

\chapter*{Epilogue\markboth{EPILOGUE}{}}

\addcontentsline{toc}{chapter}{Epilogue}

This is the Epilogue.\endnote{One last endnote. It should have number
1 and should appear under the heading ``Epilogue''.}

\addtoendnotes{\unexpanded{\enotedivision{}{}}}

\cleardoublepage

\addcontentsline{toc}{chapter}{Notes}

\theendnotes

\end{document}

答案1

只需改变以下定义\enoteformat

\documentclass[12pt]{book}

\usepackage{endnotes,chngcntr}

\counterwithin*{endnote}{chapter}  % Reset endnote numbering every new chapter

\makeatletter
\renewcommand\enoteformat{%
  \parindent=1.8em
  \noindent\@theenmark.\ }
\makeatother

<the rest is the same>

在此处输入图片描述

相关内容