pub fn class_defines_chapter() -> boolExpand description
The one “has chapters” test (OXIDIZED_DESIGN #179): does the class have chapters, as the real class’s
\@ifundefined{chapter} sees it? natbib’s forks head the bibliography by it (NJDnatbib.sty:1050, ws-rv-har.sty:676),
appendix.sty:38 and titlesec.sty:1526 number by it, and the kernel’s \appendix numbers within chapters only then
(begin_appendices). The answer the “has chapters” step stored after the document’s class loaded
(settle_chapter_after_class_load, latexml_engine sect01.rs, CLASS_HAS_CHAPTERS); while a class loads, the
test made now (class_has_chapters_now), as a class’s own \@ifundefined{chapter} is answered by what it has
defined so far. Not a chapter counter alone: WileyNJDv5.cls:5728 and MRM.cls:2160 \newcounter{chapter}[part] with
no \chapter (2609.08425, 2506.14995: “REFERENCES”; 2211.16474: “Appendix A”). A LaTeX 2.09 \documentstyle
document never settles (only a \documentclass retracts and settles, \chapter:settles); its class’s end stores
the answer (\chapter:stored, store_chapter_after_latex_ix_class_load, latexml_engine sect01.rs), so
\documentstyle[appendix]{report} numbers its appendix chapters “Appendix A” and \documentstyle{article} with the
document’s own \newcounter{chapter} + \def\chapter letters its appendix “A”, as pdflatex. Before any class load
(plain TeX), the test made now.