jgm / pandoc

Universal markup converter
https://pandoc.org
Other
33.95k stars 3.35k forks source link

Jats writer: support lineblocks #7828

Open denismaier opened 2 years ago

denismaier commented 2 years ago

As discussed on the mailing list, better support for lineblocks should be added. Currently, the jats writer seems to convert lineblocks to regular paragraphs.

jgm commented 2 years ago

How do you think they should be rendered? The mailing list mentions

<preformat preformat-type="lines"> or something similar. The only disadvantage of that is that we have to do some extra work to process math formulae, as those are not allowed contents of <preformat> elements.

But that's a pretty big disadvantage! I don't see how we'd work around that.

Also, can you explain what the disadvantage of just using paragraphs with line breaks is?

denismaier commented 2 years ago

I think the main disadvantage of of just using paragraphs with line breaks is that the semantics are not lost. JATS XML has verse-group and verse-line elements. They could be used for verse like material. Maybe this be restricted to divs with a class verse or so? Of course, there are other situations where that might not be appropriate. (It's not super urgent.) I currently just post-process the current result with XSLT to get the desired result.

jgm commented 2 years ago

verse-group and verse-line aren't good general replacements for line blocks, which can be used for many purposes. Using a filter might be a good solution here.