Skip to content

book-theme: ordered-list style (lower-roman/lower-alpha) dropped inside prf:* directives → renders decimal #71

Description

@mmcky

Ordered lists that carry an explicit style (lower-roman or lower-alpha) render with the correct marker in body text, but when the same list is nested inside a prf:* directive (theorem, lemma, proposition, corollary, definition, proof, exercise) the style is dropped and the browser falls back to decimal 1, 2, 3. This is the renderer-side counterpart to the body-list marker support added in #50.

Why it matters (book-dp2). DP2 sets \setlist[enumerate,1]{label=(\roman*)}, so list parts are (i), (ii), (iii) and the prose refers to them as "part (viii)", "part (i)", etc. In body text this now renders correctly. Inside theorem/lemma/proof boxes the markers show 1, 2, 3, which directly contradicts the surrounding prose. Reported by a reader in QuantEcon/book-dp-public#29 (Lemma 2.1.1, Theorem 5.2.18, and several appendix examples).

The markup is correct — only the rendering drops the style. In the built AST, the list node inside the proof/theorem admonition already carries the style:

{ "type": "list", "ordered": true, "start": 1, "style": "lower-roman" }

but the emitted HTML is a bare decimal list (no type / list-style-type):

<ol start="1"><li></li></ol>

Outside a prf:* directive, an identical style:"lower-roman" node renders with roman markers as expected.

Expected. A style:"lower-roman" / "lower-alpha" list renders with roman / alpha markers regardless of whether it is nested inside a prf:* directive.

Actual. Inside prf:* the list renders decimal.

Scope. Affects both lower-roman and lower-alpha; affects all prf:* admonition types; body lists are unaffected. Fixing this single rendering path clears three separate reader-reported items at once: enumerated parts in theorem/lemma/proposition/exercise boxes, the appendix "index labels", and the Theorem 5.2.18 parts.

Renderer in use: QuantEcon fork qe-v8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions