On Tuesday, July 24, 2012 4:43:05 PM UTC-7, Powerman wrote: > > Hi! > > Is it possible to convert asciidoc article (one file) into Word document > format (.doc, .docx, .rtf, etc.)? > > I have cobbled together a toolchain for converting asciidoc to Word docx but it has a number of unresolved issues that limit its general utility -- it gets the job done for me so I haven't put in the time to fix the problems. I first generate docbook output from asciidoc, then translate this to Word XML using xsltproc, then merge this with a docx template using the python docx library. The docbook-to-Word XML translation is based on the docbook "roundtrip" XSLT stylesheets from the docbook-xsl package, updated to handle Word 2007 XML.
Only a subset of asciidoc elements are handled correctly. It handles images, tables, lists, headings using styles from the template document. My main use case is actually using R for automated report generation with both HTML and docx output, and this path was the best I could come up with. I could not find any other way to produce a docx file that used styles properly -- and I tried a lot of things. It would be great if someone with a bit of XSLT experience and some time were interested in fooling around with what I've got. A couple of the problems are irksome but I just have not had the time to learn enough XSLT to fix them -- I tried contacting the roundtrip stylesheet maintainer but the package seems to be essentially abandoned. It is really only developer-ready at this stage. If anyone wants to take a look, I can forward a tarball with some basic instructions. -- Dave -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To view this discussion on the web visit https://groups.google.com/d/msg/asciidoc/-/rUXOT81Ns0EJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/asciidoc?hl=en.
