Markdown documents to OO/LO Writer and Impress
Dennis E. Hamilton
dennis.hamilton at acm.org
Sat Nov 12 12:24:01 EST 2016
> -----Original Message-----
> From: Markdown-Discuss [mailto:markdown-discuss-
> bounces at six.pairlist.net] On Behalf Of H
> Sent: Saturday, November 12, 2016 08:34
> To: Markdown Discussion Mailing List <markdown-discuss at six.pairlist.net>
> Subject: Markdown documents to OO/LO Writer and Impress
> I am a recent convert to using markdown for creating draft documents,
> outlines etc. My primary OS is CentOS where I use geany with a plugin
> although I believe gedit also allows for creating/editing markdown
> documents(?) On windows I have both geany, markdown pad íí, and notepad
> I do use tables a lot and since I like to use markdown for outlines of
> complex documents I would like to see easy folding of sections, similar
> to what you could do with the old DOS outliners. Alas, combining those
> two requirements in a modern editor seems impossible...
> Now I would also like to create drafts of documents and of slide
> presentations in markdown to later be transferred to OpenOffice or
> LibreOffice Writer for finishing the text documents or OpenOffice or
> LibreOffice Impress for finishing slide presentations. Ideally allowing
> me to go both ways for the final version.
> I do not seem able to accomplish the latter and have not found the ideal
> markdown editor yet - suggestions welcome!
There is a single-file XML format for ODF documents that would work for conversion from markdown and import to one of LibreOffice Writer or LibreOffice Impress. This works so long as (1) you have no images or other external imports and (2) you can come up with a converter. Since conversions to HTML are commonplace, it might be possible to craft a converter that makes ODF single-file XML instead. But someone needs to hack on the respective code. Fortunately, the ODF Table format matches the row-major order that is used in the Markdown and in HTML tables. Styling is different, but a converter would do some sort of fixed stylings (and font settings) that could be changed in the desktop software. You would also be editing pagination, headers/footers, etc., in the target software anyhow. There might be a way to set up templates for some of this and merge those in, but I don't know enough about that to be entirely confident about it.
Apache OpenOffice does not consume the single-file XML format, so there is a bit more work to provide a conversion in that case. Namely, AOO and LibreOffice both accept the Zip-package format of ODF documents and those can be produced with a bit more effort - the contents of the Zip is a set of XML files plus a manifest. The single-file format is convertible to the Zip-package format in a straightforward manner, so it would be a good step-up from a single-file producer. The greatest advantage is the fact that there is compression and now a way to package images and other artifacts within the multi-file contents of the ODF package.
Adding either of these conversions as input filters to either OpenOffice.org descendant is probably beyond the call of duty. It would be easier to have a converter essentially "pipe" its output into one of them, which is practical.
Also, Microsoft office will consume the ODF package formats for Text (Writer) and Presentation (Impress) formats, and anything originated in MarkDown should import just fine.
Finally, if you can find a Markdown to RTF or any of the classic or OOXML Microsoft Office formats, that should produce something simple enough that you can import into one of LibreOffice or Apache OpenOffice with decent fidelity as well.
These are all interesting challenge projects for document-processing tools. Whether there are enough piece parts out there to simply create a workflow through them is more desirable and others here might have solutions.
Thanks for your interesting question.
> Thank you.
More information about the Markdown-Discuss