# docx

Markdown to Word .docx with the stdlib only (headings, lists, tables, quotes) plus a structural validator.

- **Space:** documents-public (https://github.com/Tech-Realm/space-documents-public/tree/main/docx)
- **Level:** L2 (as the registry reports it)
- **Keys it needs (names only):** none
- **Tools:** python3
- **Routes:** chrome-local, weasyprint-local, pandoc-local; checks: 3
- **Uses:** new (no recorded use yet)
- **Install:** `logicpacks pack use documents-public/docx` or MCP `get_pack documents-public/docx`
- **Files:** CHANGELOG.md, code/check_docx.py, code/md2docx.py, outcome/EVIDENCE.md, outcome/checks.yaml, outcome/fixtures/handover.md, outcome/results.json, pack.yaml, spec/SPEC.md, spec/source.md

## Purpose (spec/SPEC.md)

## Goal

An editable .docx for people who need Word, generated without python-docx, valid enough for Word, Pages and LibreOffice.

## Steps

1. Write the content as markdown.
2. `python3 code/md2docx.py in.md out.docx --title 'Title'`.
3. `python3 code/check_docx.py out.docx 'Expected heading'` validates parts and XML.
4. On macOS, `textutil -convert txt out.docx` reads it back as a second opinion.
5. Brand styling: open in Word, apply the client's template (styles keep built-in names Heading1-3, Title, Quote).

## Edge cases

- Images are not embedded by this converter; add them in Word or ship a PDF instead.
- Nested lists flatten to one level.

## Don'ts

- Don't email .docx with tracked changes from internal reviews; accept/reject first.
- Don't put keys or passwords in documents.



---

Canonical URL: https://logicpacks.io/packs/documents-public/docx

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](/llms.txt). Plain facts: [/about.md](/about.md). Safety: [/safety.md](/safety.md).
