I have a workflow where I use asciidoc
(via asciidoctor
) to create html, pdf and or open office (.odt) format documents. For the most part this works very well.
For the open office conversion I use pandoc
with docbook format as an intermediary as in:
asciidoctor -b docbook foo.adoc -o foo.docbook
pandoc --base-header-level=3 -V date:"" -V title:"" -f docbook foo.docbook -o foo.odt
Now I wish to format output like the following:
This is some pipe delimited output:
#columns: name|phone
Goza|555
This is some more:
#columns: name|phone
Zuul|666
For which I use the asciidoc syntax like:
==== Example
This is some pipe delimited output:
----
#columns: name|phone
Goza|555
----
This is some more:
----
#columns: name|phone
Zuul|666
----
In docbook this comes out as:
<title>Example</title>
<simpara>This is some pipe delimited output:
</simpara>
<screen>#columns: name|phone
Goza|555</screen>
But in libreoffice the odt file appears with no blank lines as below, which looks really ugly:
This is some pipe delimited output:
#columns: name|phone
Goza|555
This is some more:
#columns: name|phone
Zuul|666
I want to be able force the insertion of a blank line after each colon such that:
- It will appear in the .odt file
- It won't mess up the output of
asciidoctor -b html5
or asciidoctor-pdf
- The .adoc file is not encumbered with too much noise
There is some discussion here:
I tried various combinations of macros like:
:blank: {empty} +
with no luck.
First of all I am not clear what docbook syntax I need asciidoctor to produce.
I tried using "literallayout" instead of "simpara" and it looks the same after processing by pandoc.
The same seems to be mostly true if I insert "<div>" elements or " ".
It may be the pandoc stage that is at fault here. If so I'm not sure what to do about it.
Update
I am now pretty confident it is the docbook to odt stage via pandoc that is at fault. Using "[example]" I can get asciidoctor to produce docbook like:
<simpara>This is some pipe delimited output:
</simpara>
<informalexample>
<literallayout class="monospaced">#columns: name|phone
Goza|555</literallayout>
</informalexample>
and there is still no blank line after the colon.
question from:
https://stackoverflow.com/questions/65944733/insert-a-blank-line-in-odt-generated-from-docbook-by-pandoc