Expand description
Page geometry + base typography for DOCX export.
TextDocument::to_docx writes with docx-rs’s built-in defaults (US-Letter, the default
font, single-spaced, 1“ margins). DocxExportOptions lets a caller override that with a
manuscript style: page size, margins, body font, line spacing, first-line indent,
paragraph spacing, alignment, and an optional page-number header. Everything is in DOCX
units — twips (1/1440 inch) for lengths, half-points for the font size — so this crate
stays free of any point/inch or preset semantics; the caller (e.g. skribisto’s compiler)
does the conversion.
Per-block RTL is not an option here: it is read from each block’s own fmt_direction
(set on the model) and emitted as a paragraph-level <w:bidi/>. A document that mixes LTR
and RTL scenes is therefore handled per paragraph, independently of these options.
Structs§
- Docx
Export Options - Page geometry + base typography overrides for a DOCX export. Every field is optional; the
Defaultis “no overrides” — exactly what plainto_docxproduces.