Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more book divisions #119

Merged
merged 7 commits into from
Jan 17, 2025
Merged

Support more book divisions #119

merged 7 commits into from
Jan 17, 2025

Conversation

Omikhleia
Copy link
Owner

@Omikhleia Omikhleia commented Jan 12, 2025

Closes #19

Divisions

Slightly different from the discussion in the issue, after more thoughts and tests:

  • frontmatter
    • No part and chapter numbering (hard-coded, this is the semantics of this division)
    • Roman folios (default styling, configurable)
  • mainmatter
    • Part and chapter numbering (default styling, configurable)
    • Appendix numbering (default styling, configurable) - see below
    • Arabic folios (default styling, configurable)
  • backmatter
    • No part and chapter numbering (hard-coded, this is the semantics of this division)
    • Appendix numbering (default styling, configurable) - see below
    • Arabic folios (default styling, configurable)

Moreover:

  • Divisions always start on an odd page, that's the only consistent way with page number reset.
  • Page number reset occurs if the display format changes between two division (e.g., with the default styles, after the front matter)
  • All divisions accept parts (and it's up to the user to be consistent with his own expectations here)
  • Layout changes are not considered (on a second though, they require a different approach, orthogonal to these divisions)
  • As noted, front/back always have unnumbered parts/chapters, by their very definition. It seems fairly ok to me, and it avoids introducing a whole additional set of inherited styles with potential inconsistencies)
  • I can seen an interest in authorizing parts everywhere for now

Appendix sub-division

Likewise, after some tests, I think this is acceptable:

  • May occur only once either in the mainmatter or backmatter in a given part. (Changed here: if we can have chapters in all parts, then we can also have appendices in all parts for a more general case.)
    • So once in a book without parts
    • Once in a part in books with multiple parts
  • Is always numbered by default even in the backmatter (default styling, configurable)
  • Resets the chapter counter
  • Switches in a mode where the \chapter command uses a different set of styles (= use the same command / heading level, but with adequate derived style)
    • "Appendix" prefix (vs. "Chapter") (default styling, configurable)
    • Alpha numbering (vs. arabic) (default styling, configurable)

@Omikhleia Omikhleia added the enhancement New feature or request label Jan 12, 2025
@Omikhleia Omikhleia self-assigned this Jan 12, 2025
@Omikhleia Omikhleia marked this pull request as draft January 12, 2025 15:27
@Omikhleia Omikhleia changed the title feat(classes): Support frontmatter/mainmatter/backmatter divisions Support more book divisions Jan 12, 2025
@Omikhleia Omikhleia force-pushed the feat-book-divisions branch from a3de545 to 36b8667 Compare January 12, 2025 15:44
@Omikhleia Omikhleia added this to the 2.7.0 milestone Jan 12, 2025
@Omikhleia Omikhleia force-pushed the feat-book-divisions branch 5 times, most recently from 9014d76 to 3d72535 Compare January 15, 2025 00:23
@Omikhleia Omikhleia marked this pull request as ready for review January 15, 2025 22:50
@Omikhleia Omikhleia force-pushed the feat-book-divisions branch from cf97798 to 68ace04 Compare January 15, 2025 23:56
@Omikhleia Omikhleia merged commit 8f1ed52 into main Jan 17, 2025
2 checks passed
@Omikhleia Omikhleia deleted the feat-book-divisions branch January 17, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

frontmatter, backmatter, appendices etc.
1 participant