0

I have tried the solution from Header wrong when using endnotes package. I have adapted it to enotez and use it with KOMA scrbook documentclass.

unfortunately, there seem not to be an effect on the page headers. with the original solution with endnotes the right headers were changed to "Notes" but the right headers were still the last chapter.

I would like that after \printendnotes the effect is the same as with \bibliography which puts the same page header "bibliiography" left and right.

What is the best solution?

here the MWE

\documentclass{scrbook}
\KOMAoptions{paper=      
    128.5mm:198.4mm, %(5,06" x 7,91")  %ziel
    DIV=9,  %ziel kleines buch 
    fontsize=12pt,
    headings=normal,
}


%%%% Sprache
\usepackage[german]{babel}  %scheint 

\usepackage{lipsum}
%\usepackage{endnotes}
\usepackage{enotez}
\let\footnote=\endnote
\makeatletter
\def\enoteheading{\section*{\notesname
        \markright{\MakeUppercase{\notesname}}}%
    \@afterindenttrue
}
\makeatother
% Following command to produce dummy text and notes
\newcommand{\lipnote}{\lipsum*\footnote{\lipsum}\par}

\begin{document}
    \chapter{A chapter}
    \section{A section}
    \lipnote
    \lipnote
    \clearpage
%   \theendnotes
        \printendnotes

\end{document}
user855443
  • 1,120
  • \markright{right} only sets the right mark. If you want to set both right and left mark use \markboth{left}{right} – cgnieder Apr 23 '20 at 07:23
  • unfortunately, the settings in the \def\enoteheading... seems not to have any effect. I assume that the keywords for enotez are different and the ones I use are specific for endnotes . I checked the documentation for enotez but could not find any hint. – user855443 Apr 23 '20 at 13:22
  • Do you only want the marks correctly set or do you also want an entry in the toc? – cgnieder Apr 23 '20 at 18:51
  • at the moment I prefer no entry in the ToC, but could live with it (may even prefer it in the future). – user855443 Apr 24 '20 at 16:48

1 Answers1

1

enotez does not know \enoteheading but that is not surprising: it is not mentioned in the manual at all. It does have two optione, though, both described in the manual:

  • list-name = {<list name>} The name of the notes list that used for the heading of the list.
  • list-heading = {<sectioning command including argument>} You can use this option to manually set the list heading command, e. g., list-heading = {\chapter{#1}} for a numbered heading.

You can use this to set ´\markboth` for both left and right header:

\setenotez{list-heading=\chapter*{#1}\markboth{#1}{#1}}

In your example:

\documentclass{scrbook}
\KOMAoptions{
  paper=128.5mm:198.4mm, %(5,06" x 7,91")  %ziel
  DIV=9,  %ziel kleines buch 
  fontsize=12pt,
  headings=normal,
}

\usepackage[german]{babel}

\usepackage{lipsum}
\usepackage{enotez}
\setenotez{list-heading=\chapter*{#1}\markboth{#1}{#1}}

% Following command to produce dummy text and notes
\newcommand{\lipnote}{\lipsum*\endnote{\lipsum}\par}

\begin{document}

\chapter{A chapter}
\section{A section}
\lipnote
\lipnote

\clearpage
\printendnotes

\end{document}

enter image description here

cgnieder
  • 66,645