The Latex document below (from my earlier question Chapter name appearing in the endnotes) produces endnotes which are numbered by arabic numbers in the superscript, and there is indentation for each note.
I would like: (1) to have notes numbered by regular-sized Arabic numbers (not superscripts) followed by a period (like this: "1."), and (2) notes to appear with no indentation at the beginning of the note (but all paragraphs within a given note, starting with the second one, should be indented).
\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}
