magentastripe / willorapdf

Document preparation system for self-publishers based on Asciidoctor
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

docx-to-Asciidoc pipeline #11

Open dressupgeekout opened 3 months ago

dressupgeekout commented 3 months ago

We need a way to convert "standard" manuscripts (in Microsoft Word doc format) to Asciidoc, such that Asciidoctor can then typeset them into pretty PDFs.

dressupgeekout commented 3 months ago

I did a quick pandoc --from odt --to asciidoc and the end result does not have curly quotes, which is No Bueno for Willora purposes

Therefore I think I might need to add support for the "smart" extension in the asciidoc converter (pandoc --to asciidoc+smart)

dressupgeekout commented 3 months ago

Lol OK so pandoc's ODT reader does NOT put DoubleQuote nodes into the AST. But the Markdown reader does. However, the AsciiDoc writer will ONLY use the correct syntax for double-quotes --

"`Like this,`" she said.

-- when given a DoubleQuote node in the AST.

Therefore, ODT -> AsciiDoc does NOT provide the correct results, but ODT -> Markdown -> AsciiDoc does.

# This is a serviceable workaround lol
pandoc -f odt -t markdown UNTITLED.odt | pandoc -f markdown -t asciidoc