DOCX Conversion

Overview

The ascii2doc command converts AsciiDoc files to DOCX (Microsoft Word) format. You can control the styling of the output using theme files.

Basic Conversion

ascii2doc myfile.adoc

This produces myfile.docx using default styling.

Using Themes

Themes let you control fonts, colors, spacing, headers, footers, and more. libasciidoc uses the same YAML theme format as Asciidoctor PDF themes, so you can reuse existing themes.

ascii2doc --theme my-theme.yml myfile.adoc

What Themes Control

Themes can control:

  • Font families and sizes for body text, headings, and code blocks

  • Colors for text, headings, and links

  • Page margins and spacing

  • Headers and footers with page numbers

  • Table of contents depth and formatting

  • Title page styling

Theme Reference

For the full list of theme properties, see the DOCX Theme Reference.

Tips

  • DOCX files can be opened in Microsoft Word, LibreOffice Writer, or Google Docs

  • For further customization beyond what themes offer, you can open the generated DOCX and modify styles directly in your word processor

  • Tables are rendered full-width by default for a clean, professional look