1

I use the enotez package (current version, 0.9a) for endnotes. When I print the endnotes (using \printendnotes), the running head of the endnotes chapter contains the name of the previous chapter instead of "Notes".

Here is a minimal working example:

\documentclass[a4paper,12pt]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{enotez}
\usepackage{lipsum}

\begin{document}

\pagestyle{headings}

\chapter{Introduction}

First paragraph.\endnote{\lipsum{3}}

\lipsum{5}

Last paragraph.\endnote{\lipsum{3}}

\printendnotes

\end{document}

The behaviour is the same when I use KOMA-Script's scrlayer-scrpage package and configure the running head with \pagestyle{scrheadings} and \automark{chapter}.

I am not sure if I am doing something wrong or if it is a bug. Is there a solution or workaround for fixing this behaviour?

1

Emit the proper marks:

\documentclass[a4paper,12pt]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{enotez}
\usepackage{lipsum}

\makeatletter
\setenotez{list-heading=\chapter*{#1\@mkboth{#1}{#1}}}                   
\makeatother

\begin{document}

\pagestyle{headings}

\chapter{Introduction}

First paragraph.\endnote{\lipsum{3}}

\lipsum{5}

New paragraph.\endnote{\lipsum{3}}

Last paragraph.\endnote{\lipsum{3}}

\printendnotes

\end{document}

As you're using scrreport, an easier way is available:

\setenotez{list-heading=\addchap{#1}}

In KOMA-Script lingo, this means “add an unnumbered chapter along with the corresponding entry in the table of contents”, not “add somebody to the party”.

enter image description here

  • I don't know why it fixes the issue, but it does. Thank you! – Marc Jul 7 at 23:13
  • 2
    With class scrreprt you can use \setenotez{list-heading=\addchap{#1}} to get the desired result. – esdd Jul 7 at 23:18
  • @esdd As you see I'm not expert in these classes. The method I suggested works also for the standard classes. I know, KOMA-script classes are full of bell and whistles, but the manuals are unreadable and the name of commands not really good: why \addchap and not the clearer \addchapter? A chap in English is very different from a chapter. – egreg Jul 7 at 23:29
  • @egreg Using KOMA-script I can avoid learning TeX, as you can easily see if you compare your solution with Elke's. Your solution needs internals of LaTeX (or even TeX?), Elke only needs a well documented command from KOMA-script. There is a price: Me, being a sole user of LaTeX, have to read the manual carefully. \\ I fully understand that you'll never need to study the manual, given your TeX-skills. But your understandable unwilligness to study the manual does not justify to depreciate it. The »scrguide« / »scrguien« is really written carefully. – Keks Dose Jul 9 at 11:59
  • @KeksDose I beg to disagree about scrguien. I consulted it many times, so I could make an opinion about it. – egreg Jul 9 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.