-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Best markup for poetry regions (Markdown→Sile) #408
Comments
Does the verbatim package give you any clues? I think in terms of markup your best possible situation would be to have a |
For the record, though it doesn't really answer the question, Pandoc-style "line blocks" (used here for poetry) are discussed in #416 - focusing on the "native/internal" markdown support for them. This being said, I don't think the output should be using
... should yield something like:
And classes or packages would provide their necessary poetry environment. This is the approach I took in markdown.sile, where the markdown support package provides a default fallback layout, but it can be overridden to use another poetry package. E.g. with my own poetry support in resilient.sile, it could be rendered with appropriate stanza skips, verse numbering, &c. Of course, it would be best, for such 3rd-party "poetry packages" to share some common SIL-level API (commands and options), so one could use one or the other... That ideal is perhaps hard to attain (when I look at the myriad of LaTeX packages for poetry, none have the same commands and options for even the simplest things...) Anyhow, deferring the actual rendering to a well-formed package is probably better than trying to hard-code low-level things with manual breaks, fills, etc. Admittedly, my above-mentioned resilient.poetry environment wouldn't work well too with centered poetry (... just tested, ouch, it gets ugly...). That's however an issue with it (or I should use another better package!)... rather than with the underlying parsing and structuring methods. I'd be glad if that provides some sort of answer to the 4-year old question that was raised here, so it might get closed eventually. But feel free to comment and discuss -- or even best, give a try to markdown.sile and resilient.poetry (patches welcome) 😆 |
c.f. #1866 |
I'm touching up some odds and ends in the Pandoc SILE writer and am not sure the best solution for a format. Markdown supports blockquotes of course, but Pandoc's flavor also has a nestable style that forces hard line wrapping. Here's an except from the wild:
That's a couple paragraphs with a blockquote in between. Inside the blockquote are four paragraphs, two normal and two specifically poetry formatted so the line breaks have to come across.
At the moment the way Pandoc's internal representation of this works is the blockquote section is a block level item but the line break thing is inline. Right now this comes out in SILE looking like this:
This would render alright if inside a ragged environment, but what happens when it is justified is not pretty:
I can think of a couple options. One would be to output
\hfill\break
in this scenario. That's nice for most documents, but what if the document was typeset ragged left? Or center? That would mess everything up.Of course everything is messed up anyway in those cases because it's possible to indent poetry lines like this:
This I'm outputting using
\kern[width=1spc]
for each space of indent. Which works, but again a centered document would get all wonky pretty fast.Another option would be to wrap each line in some kind of function that could then be styled. Or I can try to hack on it to make this a block level format that wraps all the affected lines.
What would be the best scenario for this markup to end up looking like in a SILE document?
The text was updated successfully, but these errors were encountered: