Creating a DOCX file from an AsciiDoc file

Create a DOCX file for Microsoft Word and LibreOffice from an AsciiDoc file directly in the IDE.

This feature is available since plugin version 0.37.26.

The user can choose Create DOCX from current file from the editor’s action toolbar to convert the current file to the DOCX format. If creation of the DOCX file succeeds, the exported file is opened in the system’s default application, for example, Microsoft Word or LibreOffice.

Downloading Pandoc

The conversion is done using Pandoc. On first use the plugin downloads a version of Pandoc that is compatible with the plugin.

Specifying a format template

If the plugin finds a file named reference.adoc in the current project, it will use that as a template for formatting styles of the generated document. Users can download this template and modify it for their needs. See the Pandoc manual section about the reference file for more details.

Automation on the command line

The conversion the plugin performs has two steps:

  1. Convert the AsciiDoc file to DocBook using the Asciidoctor DocBook backend.

  2. Convert the DocBook output to DOCX using Pandoc.

How this can be automated shows the DocToolchain collection in the convertToDocx Gradle snippet.