1

I'm trying to create endnotes separated by chapter, and I'm having trouble. This comment makes me think that what I'm trying to do may not be possible using this package; if that's the case then I'll need to find some other solution. But if it is possible, how can I make it happen?

(What I'm looking for is headings that just have the chapter titles: Epistola Præfatoria, Liber Primus, Liber Alter. If that's not possible, then even just chapter numbers would be good, but I can't get those to happen either; when I add <rev> all I get is "Chapter 0" over and over again.)

Here's an MWE, though it's clearly wrong.

\documentclass[openany]{octavo}
\usepackage{etoolbox}   
\usepackage{lipsum}
\usepackage{enotez}
\setenotez{list-name={Fontes et Adnotationes},split=chapter,split-title={<name>}}

\begin{document}

\chapter{Epistola Præfatoria}

Here is a line from the preface\endnote[\relax]{Here is an endnote for that line.}.

\chapter{Liber Primus}

Here is a line from chapter one\endnote[\relax]{Here is an endnote for that line.}.

\chapter{Liber Alter}

Here is a line from chapter two\endnote[\relax]{Here is an endnote for that line.}.

\printendnotes

\end{document}

1 Answer 1

1

Here's a hack based on octavo's feature of not numbering chapters.

\documentclass[openany]{octavo}
\usepackage{enotez}

\setenotez{
  list-name={Fontes et Adnotationes},
  split=chapter,
  split-title=<ref>,
}

\makeatletter
\pretocmd{\@chapter}{\stepcounter{chapter}\def\thechapter{#2}}{}{}
\makeatother

\begin{document}

\chapter{Epistola Præfatoria}

Here is a line from the preface\endnote[\relax]{Here is an endnote for that line.}.

\chapter{Liber Primus}

Here is a line from chapter one\endnote[\relax]{Here is an endnote for that line.}.

\chapter{Liber Alter}

Here is a line from chapter two\endnote[\relax]{Here is an endnote for that line.}.

\printendnotes

\end{document}

Explanation: <ref> uses the expansion of \thechapter. Therefore we can abuse \thechapter to set it to the chapter's title.

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .