-
Notifications
You must be signed in to change notification settings - Fork 659
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
Change numbering styles in different parts #1646
Comments
Thanks to executablebooks/MyST-Parser#188 I found a workaround that allows me to build a latex/pdf article with appendix numbered A:
I'd like to do this with a |
@choldgraf we did look into this when we were putting together sphinx-multitoc-numbering. From memory the main issue is there is no real "concept" of this document structure in It might be possible to add Thanks @tavin on that workaround for LaTeX to override part numbers in the |
Sounds like a good idea. We can create the facility of having a |
🤔 -- interesting, thanks @AakashGfude perhaps we could call it something like |
@mmcky Hmmm, that can work. Let's start implementing it soon and see how we go. Should we put this issue in the Bug reduction drive? That issue is turning out to be a repository of things to focus on 😅 |
+1 for this enhancement Selectively turning headline numbering off is important for writing scientific articles ( It would be great to give an example
Please let me know if this is already possible with |
I guess the real question here is whether this should be implemented here as a package or if we should look at pushing a contribution upstream to add these |
@michaelosthege currently this is not available in sphinx-multitoc-numbering. It was designed to build a compatible |
This week I managed to render a pandoc-Markdown into DOCX and PDF that look really good. For the PDF I even got partially numbered headings working: https://boisgera.github.io/pandoc/markdown/#heading-identifiers Maybe one can adopt their approach? Are there examples (tests?) where |
I am also looking for a way to restart the numbering for different parts of the book |
@giswqs you can do it like this: In the MyST markdown files:
The In format: jb-book
root: index
options: 👈 remove this line (unless you set other options)
numbering: true 👈 remove this line
chapters:
- file: 0_Prefix/prefix.md
- file: 1_Introduction/introduction.md |
@michaelosthege Thanks for the tricks. It would be better if jupyter-book can officially support this so that we only need to modify |
Describe the problem/need and solution
Sphinx allows you to add numbers to chapters via the
:numbered:
flag in a TOCtree. In addition,sphinx-multitoc-numbering
allows you to continue numbering across parts.However, many books have an appendix that should both restart numbering and use a different numbering style. A common example of this is:
It would be useful if people could do two things:
Guide for implementation
There's a Sphinx issue that already exists about this: sphinx-doc/sphinx#6614
But perhaps we could implement something via
sphinx-multitoc-numbering
, for example supporting some extratoctree
metadata like:Along with a config like
numbered_group_styles = {"group1": "123", "group2": "ABC"}
.I wonder if @mmcky has thought about that possibility?
Tasks and updates
No response
The text was updated successfully, but these errors were encountered: