Omikhleia / resilient.sile

Advanced book classes and packages for the SILE typesetting system
MIT License
21 stars 4 forks source link

Wrong section name or section number in header #46

Closed vrilcode closed 1 year ago

vrilcode commented 1 year ago

When I try to use resilient default settings, I got a wrong section name or section number in header. Please look at my minimal example (PDF file attached):

\begin[papersize=a5,class=resilient.book]{document}
\use[module=packages.lorem]

\chapter{Lorem ipsum 1.}
\lorem
\section{Lorem ipsum 1.1.}
\lorem
\subsection{Lorem ipsum 1.1.1.}
\lorem
\subsection{Lorem ipsum 1.1.2.}
\lorem[words=900]

\end{document}

On PDF page number 5 the header consists of second subsection number (1.1.2), but first section name. I don't know, whether it should consist section data (that's what I would assume) or subsection data, but currently it's mixed.

PS: On page number 4 header consists of chapter name, but without chapter number. Is this intended?

test.pdf

Omikhleia commented 1 year ago

Regarding the section header: Thanks for the minimal example. Good catch! The intent, by default, is to have the section data here... I usually disable header numbering in my style files, however, so it could have remained unnoticed! But when refactoring the style paradigm in the v2.0 milestone, I overlooked the section level when formatting the counter... Oops. It should now be fixed.

Regarding the PS on chapter number: This was indeed the initial intent not to have the number in headers. But we could probably do better and in a more generic way now, vs. the initial implementation (which had less styling capabilities at the time).... I'll need to think about how best to address it --- it will likely introduce a small breaking change for existing books. (So keeping this issue open currently, to remember it.)

vrilcode commented 1 year ago

Thanks for clarification (and for this great piece of software)