-
Notifications
You must be signed in to change notification settings - Fork 203
Multiple document support #269
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
Comments
Interesting. I've been thinking on/off about multi-page specs. Your approach sounds pretty reasonable. |
+1 for this requirement. Much needed feature. |
Okay, designing out loud. Multipage inputs is already handled, that's just a Multipage output is the thing needing solving here. In general, I need you to tell me which h2s should cause a page-break, and what filename each page should have. (Splitting on lesser headings needs to be supported eventually - HTML does it, for example - but can be an enhancement, as it complicates the problem space.)
Are there more multipage specs I could look at? Hm. So anyway, splitting should be fairly trivial, link fixup should be fairly trivial. Figuring out the header/footer situation is mildly difficult. |
Includes are traditionally not parf of base Markdown syntax (although many processors implement them in their own flavors), and at this point CommonMark doesn't have support either. But |
If you have single-page input, maybe something like |
What I would love to see is each n-th level header (where "n" is set in metadata) in its own page, with a ToC on each page providing external links to the higher-level headers and internal links to lower-level headers. i.e. <h1 id="stuff"> Stuff </h1>
<h1 id="nonsense"> Nonsense </h1>
<h2 id="gibberish"> Gibberish </h2>
<h3 id="Balderdash"> Balderdash </h3>
<h2 id="gallimaufry"> Gallimaufry </h2> When n=1 this should produce two pages, <li> 1 <a href="#">Stuff</a></li>
<li> 2 <a href="nonsense.html">Nonsense</a></li> while the ToC for <li> 1 <a href="stuff.html">Stuff</a></li>
<li> 2 <a href="#">Nonsense</a>
<ul>
<li>2.1 <a href="#gibberish">Gibberish</a>
<ul><li>2.1.1 <a href="#balderdash">Balderdash</a></li>
</li>
<li>2.2 <a href="#gibberish">Gallimaufry</a></li>
</ul>
</li> |
In practice, given that h1 is used for the title of the whole document, I suspect that if the feature is used at all, n would always be 2. If that's the case, we just need an on/off switch, not a numerical parameter. Or do you have use cases for n > 2? |
Yes, I’d like to be able to split on h3 (and possibly h4). |
FWIW (which might not be much considering HTML is not using Bikeshed), HTML has non-uniform splits. Some second-level sections are small enough to get merged together, and some are big enough that they need to split on intermediate h3s within them. |
The fact that the splits happen all at one level or not won't matter for the underlying tech; it'll just be a convenience feature so people don't have to annotate every split. Splitting at arbitrary headings should be just fine. Not splitting at particular headings, so that a page consists of multiple headings of the same level, will be a little more difficult, but should be doable. (It just makes the ToC generation for the page more complicated.) Splitting at non-heading points would be rather more complicated, I think. As before, the only real blocker here is me figuring out the boilerplate structure for a multipage spec. The actual mechanics of it should be relatively straightforward. |
I am not sure if the SVG WG is even willing to switch to Bikeshed with the whole spec. I could imagine that there is resistance from Doug and Cameron. However, something that would help is support for multiple documents.
I could imagine that there is an index.bs with a
<h1>
section and a<pre class='metadata'>
block. The different documents are then added in order into the metadata block:and so on.
Bikeshed could then merge the specs into a single document to process it. Then we already have the single document version. This could then be split before each
<h2>
section and each section is added to an HTML template with navigation control. Theindex.html
would have the normal header and the TOC.The text was updated successfully, but these errors were encountered: