-
Notifications
You must be signed in to change notification settings - Fork 73
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
Paragraph break in LaTeX output #116
Comments
Replacing the slide node with a paragraph node is probably not a good idea because although it works with the LaTeX/PDF output, it generates an empty paragraph in the HTML output. Replacing it with a comment node seems to work in all outputs. So the last line becomes: |
Thanks for reporting this, @uyar. I suspect the interesting thing would be to figure out what the restructured text "tree" looks like when you have two consecutive paragraphs, as well as paragraphs with a Thanks again! |
OK, the results of my tests are below. My source document goes like this:
Using the original code in hieroglyph (the one that replaces
Note that there is no empty line from para2 to para3 which effectively makes all three lines into one paragraph. For HTML, there is an empty
And similarly for XML:
Since I couldn't find a way to add an empty line, I tried replacing with a
But for HTML and XML it creates empty paragraphs:
And here is what happens if I replace with
This looks good for LaTeX and HTML. I don't know if the extra comment node in the XML output would be a problem. |
I'm writing a document that contains both the contents of a book and the slides to go with them. So I've turned off autoslides and use the slide directive. All is well in the HTML output but in the LaTeX output, if I have a structure like: paragraph1 - slide - paragraph2, when the slide gets removed in the builder the two paragraphs get merged into one. In the process_slide_nodes function in directives.py, I've changed the last line from
node.replace_self(nodes.inline())
to
node.replace_self(nodes.paragraph())
and the issue seems to be fixed. This makes more sense to me but I'm not sure whether it would break other use cases.
The text was updated successfully, but these errors were encountered: