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

🔢 Enable continuous numbering across pages #1391

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

fwkoch
Copy link
Collaborator

@fwkoch fwkoch commented Jul 14, 2024

This adds an extra key to numbering fields - continue. If true, the numbering of that type will continue counting from the previous page.

This also adds title/page-level enumeration (which, combined with continue means you can have numbered chapters).

Finally, this cleans up how frontmatter numbering heading_# relates to page heading depths. Now, the user-defined frontmatter levels match the user-defined heading depths, even if transforms have changed the depths in the mdast (for normalization, title lifting, etc).

@agoose77
Copy link
Contributor

What is this blocked on? Can I help in any way?

@rowanc1
Copy link
Collaborator

rowanc1 commented Aug 23, 2024

I think it was blocked on requirements as we got a bit confused on how to actually do it!

@rowanc1 rowanc1 added the blocked Waiting for another task to be compled label Aug 28, 2024
@fwkoch
Copy link
Collaborator Author

fwkoch commented Sep 4, 2024

I don't think there is anything critical blocking this - I just stepped away from it and have not come back. The biggest thing I could use some input on is the frontmatter fields:

In numbering on a page, you can now specify start: <number> (if you want to start counting at a specific number) or continue: true (if you want to continue counting from the previous page). However, as these are separate fields, you can specify both, e.g.:

numbering:
  figure:
    start: 3
    continue: true

In that case, it is ambiguous which takes priority. So, I think we should reconsider this frontmatter so this ambiguity is not possible. Maybe that means start: number | 'continue' or something? So you can either specify a starting number or say "continue from previous page." Or, we could just leave start and continue but introduce a validation error if both are defined... Or maybe something else?

Beyond that, this PR just needs some more testing and bug fixing - the continuous numbering still doesn't quite work as expected everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Waiting for another task to be compled
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants