-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add a new table of contents format #1102
Comments
This comment was marked as outdated.
This comment was marked as outdated.
@choldgraf I would be curious on your take on @agoose77's proposal that we went through on Monday and I think is pretty close. I always have a lot of difficulty in working with the current TOC, and there is a lack of flexibility and confusion on where to use the keywords of The goals that @agoose77 @fwkoch @stevejpurves and I discussed was a new toc format that: (1) is easy to understand, move around (e.g. unindent the yaml, no changing of key-names from chapter -> part); (2) the root isn't special, it is just a page; (3) can support I think the new format that @agoose77 mocked up is hitting those. Are there things we are missing as ways to set that up? |
Based on your list of goals above, and the fact that you think we are hitting them, I think that this is safe to merge and play around with to see if our understanding of this changes as we use it. We could make this as an alpha feature and then try it out. As is, I don't see anything that should be a blocker (other than perhaps more comprehensive docs to cover all the things you mentioned!). It looks great! One thought I had as an example: I wonder if we will regret not having semantic tagging (part or chapter) in some export conditions, like latex. I don't know it will be the case though, and I think we will only learn once people try it and open issues that suggest this level of control would help rather than hinder. In the absence of that data, however, I think simpler is definitely better! |
I really like the idea of the new TOC, especially having it in myst.yaml, and the free levels. For template support it would be nice with the option to name levels. So the names (e.g. part, chapter) could be unrelated to the nesting level, but assigned - so you could specify that level 2 would be toc-nesting: [part, chapter] It could also allow users to create theor own naming convention which might be good for their own use cases. Am on mobile, so apologies if this makes little sense. |
Thanks for jumping in @roaldarbol -- I am having a bit of difficulty fully understanding your suggestion. I would like us to have another think on this from the PDF export and ensuring that we are supporting the right level of nesting (i.e. to support latex chapter/part/section stuff). I know that @fwkoch has been able to do this internally in our book exports so far, and there are no labels for part/chapter at this stage, I forget how that is done though! |
Yeah sorry wasn't very clear - and on second thought it might not be an issue. All I want is to retain the ability to say "this document is a part" or "this document is a chapter" somehow, to let the nesting be explicit in some way if /when needed. But I guess the +++ fences would specify that, right? |
Just a general point here: I think our goal should be to ship an MVP, and make sure we aren't accidentally closing any important doors in the process, with the goal of getting it into people's hands and iterating from there. So my question re: |
Proposal
Add a new table-of-contents format to live inside
myst.yml
. This will supersede the_toc.yml
which is strongly constrained by the design of Sphinx (sphinx-external-toc).Additional notes
This format should be readable, easy to guess, and support styling markup (e.g. dropdown vs header)
The text was updated successfully, but these errors were encountered: