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
Djot line breaks don't split slides like markdown line breaks #9680
Comments
Hm. When I tried this I got two slides... |
You're right that the section-ification built into the djot reader will defeat the use of horizontal rules to split slides. That's something we should think about. But the case with no headings (as above) should still split perfectly well. |
Huh. I did it again and it worked. Not sure what I did wrong the first time 🤦 But yeah let's make this issue about the headings then. My initial thought was that it would make sense to have the thematic break split heading sections in general. But after reading the description of thematic breaks in HTML that specifically mentions that Maybe Ex:
It is definitely a little more clunky. What are your thoughts? Alternatively, there could be a special-case in pandoc's djot reader to adjust how |
I don't think that The only ways forward I see are:
To be sure, using explicit divs would be another option, but it makes the slides clunkier to write. |
I would lean towards (2) since the auto-sectionification is a nice feature.
Currently has this AST:
In this case we'd want pandoc to see that as:
Because of cases like this, I don't think that a section with a
I think it should become:
I think the rule could be "Search every section for its first thematic break that is a direct child. If it has one, the children before the thematic break should remain inside the section, and the thematic break and all later children should be moved outside of (after) the section". I think this rule should work because (it looks like) sections only appear for headings that are children of other sections or children of the root, so sections are already not created for things like headings inside of blockquotes or divs. |
I couldn't decide if this fits better in the "bug report" or "feature request" category, it depends on the intended behavior.
Explain the problem.
When I use the following code as markdown (gfm) or as djot:
And convert it with
pandoc -f djot test.djot -o test.pptx
and
pandoc -f gfm test.md -o test.pptx
(or to any of the presentation formats)
Pandoc turns the markdown version into separate slides, but the djot version is turned into a single slide. Initially I was using headings and I expected the issue to be related to the fact that the thematic break is injected into the sections that are created from the headings, but then I changed the headings to paragraphs and the issue persists.
Is it intended to be able to use top-level thematic breaks as "slide splitters" for djot, similar to markdown, or is that use case not supported?
Pandoc version? 3.1.13, Linux
The text was updated successfully, but these errors were encountered: