Files
pandoc/test/command/12060.md
T
John MacFarlaneandClaude Opus 5.5 e39194e939 ODT reader: support the styles extension. (#12065)
With `+styles`, named paragraph and character styles are recorded
in `custom-style` attributes on Divs and Spans, as in the docx
reader. Automatic styles are resolved to the named style they are
based on, and the user-visible name of the style is used.
The default paragraph style, default table cell styles, and styles
that pandoc interprets itself (Emphasis, Strong Emphasis, Source Text,
links, table captions) are not recorded. Paragraphs in list items
and image captions are not wrapped. Headings get a `custom-style`
attribute if their style is not the standard one for their level.

OpenDocument writer: encode custom style names as LibreOffice does,
e.g. `Text body` becomes `Text_20_body`, so that they match
the styles in a reference doc.

See #12060.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 19:53:49 -08:00

381 B

Custom style names are encoded as LibreOffice does:

% pandoc -t opendocument
::: {custom-style="My Style"}
[Text here]{custom-style="Char (1)"} and [more]{custom-style="Quote_20_Text"}
:::
^D
<text:p text:style-name="My_20_Style"><text:span text:style-name="Char_20__28_1_29_">Text
here</text:span> and
<text:span text:style-name="Quote_20_Text">more</text:span></text:p>