| General > General Technical Chat |
| Generating documents .docx from lightweight markup language |
| << < (3/4) > >> |
| Picuino:
HTML is difficult for normal people to learn. Thank you anyway. I have found a ReStructuredText to ODT converter in the Docutils package. Seems to be a good solution allowing complex tables. https://docutils.sourceforge.io/docs/user/odt.html |
| Picuino:
I have managed to create complex tables (with lists inside) easily with Docutils. The problem now is that I can't change the template of the output .odt file. I'm thinking of using Docutils to generate an html file and then using pandoc to transform the html to .docx or .odt. |
| Picuino:
I've found that the newly installed version of Pandoc can interpret ReStructuredText list-tables (https://docutils.sourceforge.io/docs/ref/rst/directives.html#list-table) so I don't need to use Docutils, I can do all the work with Pandoc. Now the problem is to change the format of the numbered lists so that they take up less space in the Table. I don't know how to change reference.docx so that the numbering occupies fewer millimeters of the document. |
| PlainName:
Perhaps not what you're looking for but Scrivener will take Markdown as import and compile to whatever format and template you fancy. It's a writers took which focuses on the writing part and treats fancy formatting and output as a compiler process. Notionally aimed at authors of fiction and/or screenplays, but I've used it to put together project documentation. Some chap detailing how he uses it with Markdown, which appears to be similar to what you want: http://www.raydanielmystery.com/rays-scrivenermarkdown-flow |
| Picuino:
I finally got something similar to what I was looking for. Using Pandoc you can set (in Windows) the following options. pandoc --data-dir=%~dp0 --reference-doc=template.docx --toc -s document.rst -o document.docx template.docx = template document with headers, footers, corporate images, etc. Used like base document. reference.docx = template document used to copy the text styles. document.rst = ReStructuredText with the text content. document.docx = ouput document. |
| Navigation |
| Message Index |
| Next page |
| Previous page |