Documents
| Format | Extensions | Format spec |
|---|---|---|
| DOCX | .docx | Office Open XML — ECMA-376 |
| ODT | .odt | OpenDocument |
| RTF | .rtf | Rich Text Format |
Modes
DOCX / ODT (both ZIP-packaged) get three views, cycled with Tab:
- Read (default) — styled body text. Headings render bold + themed; bold / italic /
underline / strikethrough runs render via SGR; explicit run colors apply. Bulleted lists use a
•marker indented per nesting level. Embedded images surface inline as[Image: <basename>]placeholders. Tables flatten to|-joined rows. Width-aware word wrap re-runs on resize. - TOC — the raw ZIP file tree. Inspect inner XML parts and embedded media;
Enterdescends recursively.--extract word/media/imageN.pngworks as for any ZIP archive. - Info — title, author, subject, keywords, created / modified timestamps, paragraph / word / image counts.
RTF opens to Read and Info by default. When the file embeds images as \pict groups,
a TOC view appears alongside, listing each embed; e / --extract pulls one out.
Caveats
- DOCX lists currently render as flat bullets — numbering cascade resolution from
numbering.xmlis not implemented; everything withnumPrshows as•. - ODT's
styles.xmlinheritance chain isn't consulted in v1. Real-world ODTs from LibreOffice / OpenOffice dump all directly-used styling intocontent.xml's automatic-styles, which is what peek resolves.