The endnotes package interferes with headers text, but only if the document has an odd number of pages. Here is a minimal working example:
\documentclass{amsart}
\usepackage{endnotes}
\begin{document}
\title{My Title}
\author{My Name}
\maketitle
\thispagestyle{empty}
First page
\endnotetext{first note}
\newpage
Second page
\endnotetext{second note}
\newpage
Third page
\endnotetext{third note}
\theendnotes
\end{document}
On the last page where the end notes are printed, the header becomes "Notes" instead of "My Title". If however I remove the third page (or add a 4th one) then the header shows the author name (as it should be).
I believe that this is related to Endnotes and headers
I tried the two fixes there: \addtoendnotes{\protect\markboth{Note}{Note}} makes no difference and \def\notesname={\relax} crashes latex (unless I put it near the top of the file, in which case it makes no difference).
Many thanks for your help!
amsartI'd recommend also removing\mbox{}\par\vskip-\baselineskip, which is useless as the class does indent the first paragraph after a title. Actually the package should do\@afterindenttrueinstead of that concoction. – egreg Dec 21 '20 at 22:44endnotes.styregisters in it's changelog that the suggestion to use\mbox{}\par\vskip-\baselineskipwas by FMi. So I got curious, how would\@afterindenttruebe used here, just set it? Would it be as general or more general than the\mbox{}\par\vskip-\baselineskip? – gusbrs Apr 05 '22 at 13:23\@afterindenttrueover the\mboxincantation (yuopu would just replace the whole last line (except the closing brace) with\@afterindenttrue. There are some edge cases where it might make a difference (e.g.., with a subsection immediately following a section), but that shouldn't apply here as near as I can tell from inspecting the source of endnotes.sty. Not sure why Frank chose that particular approach. – Don Hosek Apr 05 '22 at 16:40\@afterindenttrueis a better approach. I'm actually working with another end notes package, but the situation is analogous, but slightly different. In the actual case, the whole end notes are grouped, so I can set locally exactly whatindentfirstdoes, before any sectioning commands (which should catch an eventual\chaptertoo). It looks gook so far, let's hope I don't find any of the edge cases you mention. :-) – gusbrs Apr 05 '22 at 17:26