multiple calls of printendnotes with split option

Create issue
Issue #12 on hold
Former user created an issue

with multiple calls of \printendnotes combined with the split option the endnotes list is not cleared after \printendnotes. On the second call the already printed notes are repeated (see mwe). I know it's not supported (package doc pg 7) but it would be nice to either add it or provide something like \clearenotezlist.

\documentclass{scrbook}
\usepackage[list-name={Anmerkungen},list-heading={}]{enotez} %
%
\DeclareInstance{enotez-list}{custom}{paragraph}
{ heading   = \addsec*{#1}\addcontentsline{toc}{section}{\protect\numberline{}#1},
  notes-sep = -0.5\parskip,
  format    = \normalfont\footnotesize\leftskip1.8em,
  number    = \textsuperscript{#1}
}
\setenotez{
  reset = false,
  split = section,
    split-heading = {#1},
  split-title = {\noindent{\bfseries sec <ref>}}
}
%
\begin{document}
\chapter{chap 1}
\section{sec 1.1}
This\endnote{or that (1)} is\endnote{might be (1)} a good\endnote{or bad (1)} idea\endnote{right? (1)}

\section{sec 1.2}
This\endnote{or that (2)} is\endnote{might be (2)} a good\endnote{or bad (2)} idea\endnote{right? (2)}

\crash
\show\printendnotes
\tracingmacros=1
\printendnotes[custom]
\tracingmacros=0

\chapter{chap 2}
\section{sec 2.1}
This\endnote{or that (3)} is\endnote{might be (3)} a good\endnote{or bad (3)} idea\endnote{right? (3)}

\section{sec 2.2}
This\endnote{or that (4)} is\endnote{might be (4)} a good\endnote{or bad (4)} idea\endnote{right? (4)}

\printendnotes[custom]
\end{document}

Comments (2)

  1. Log in to comment