Wrong level for change history in case of class with chapters
dbitouze opened this issue · 2 comments
The following MWE points out that, in case of class with chapters, the "Change history" is a section instead of a chapter.
\documentclass{report}
\usepackage{hypdoc}
\RecordChanges
\begin{document}
\tableofcontents
\chapter{Foo}
\changes{v1}{2016/09/30}{Initial version}
\PrintChanges
\end{document}
I think this is "by design" or at least hypdoc is just following doc here.
doc sets up the heading in \glossary@prologue
at the section level and just documents that that needs to be changed if necessary. You might hoe that it would use \chapter or \section depending on some automatic test, but it doesn't (even if \chapter was defined you may like this at section level under some \chapter{Appendix} or some such, so it isn't clear what the automatic test should be.
I think this works as you intend:
\documentclass{report}
\makeatletter
\def\glossary@prologue{\chapter*{{Change History}}%
\markboth{{Change History}}{{Change History}}}%
\makeatother
\usepackage{hypdoc}
\RecordChanges
\begin{document}
\tableofcontents
\chapter{Foo}
\changes{v1}{2016/09/30}{Initial version}
\PrintChanges
\end{document}
IMHO, at least for standard class, the best would be to make it be a chapter in case of \chapter
does exist, a section otherwise. But maybe this wouldn't work for more complex classes, such as memoir
. Thanks.