Skip to content

v3.22 - Numbered lists follow your template's styles

Choose a tag to compare

@dvejsada dvejsada released this 15 Jul 06:25
· 40 commits to master since this release
cc2061c

Highlights

This release makes numbered lists finally respect your template's own styles — their
numbering format and their indents. If you style numbered paragraphs in a legal template
(e.g. Roman numerals for claims, or a specific left indent for numbered clauses), the
generated document now looks the way the style says it should.

🔢 Custom numbered styles keep their numbering format

A numbered list styled through style_mapping or a <!-- style: … --> directive previously
lost the style's own numbering — restarted lists silently fell back to the built-in
List Number definition (plain decimal, default indents). The renderer now resolves
numbering from the style actually applied, so a directive-styled list restarts at 1.
with the style's own numeral format and indents:

<!-- style: Legal Number -->
1. First claim
2. Second claim

📐 Left and hanging indents from styles are now honored

Word lets a list's numbering definition silently override the paragraph style's indents on
numbered items. The renderer now re-asserts the style's indents on every ordered-list item,
so the indentation you configure on a style (in your template or the default one) is what
you get in the document. Indents you did not style (typically the number's hanging indent)
still come from the numbering definition, as before.

📋 Nested numbered lists render correctly in more templates

  • In templates where each list level has its own single-level numbering definition, nested
    numbered items previously pointed at an undefined numbering level and rendered without
    numbers. Each nesting level now uses its own style's numbering.
  • A <!-- style: … --> directive on a list styles the top-level items only — nested
    items keep their List Number 2/3 / List Bullet 2/3 styles instead of being flattened
    to the directive style.

🩹 Small robustness fix

Trailing spaces after a <!-- style: … --> (or any comment) line no longer cause the
comment to be rendered as literal text in the document.

Upgrade

Pull the new image and restart — no changes to templates or configuration required.
Documents whose templates style the indents of numbered lists will now render with those
styled indents (previously the numbering definition's indents won).

What's Changed

  • Resolve list numbering and indents from the applied style in #84

Full Changelog: v3.21...v3.22