Skip to content

Configurable, uniquely-classed caption delimiters - #838

Merged
opoudjis merged 2 commits into
mainfrom
feature/configurable-caption-delimiters
Aug 11, 2026
Merged

Configurable, uniquely-classed caption delimiters#838
opoudjis merged 2 commits into
mainfrom
feature/configurable-caption-delimiters

Conversation

@opoudjis

Copy link
Copy Markdown
Contributor

Refs metanorma/metanorma-pdfa#51

Make caption delimiters configurable per caption type via i18n, and give the terminal clause-number delimiter its own fmt-clause-delim class — distinct from the fmt-autonum-delim used for the internal 1.1.1 separators — so it is uniquely targetable in XSLT/CSS.

  • i18n_delim(type, default) resolves @i18n.get["<type>_delimiter"] || @i18n.get["caption_delimiter"] || default (keys optional via @i18n.get, so default output is unchanged unless a flavour/document sets them).
  • The clause delimiter and the per-asset caption delimiters (note, table, figure, subfigure, termnote, annex, example, admonition, sourcecode) route through it.
  • e.g. clause_delimiter: "" removes the terminal period after clause numbers (1.2.3.1.2.3) — the metanorma-pdfa#51 request — for both PDF and HTML.

Spec fixtures updated for the terminal-delimiter class rename.

Follow-ups (separate): document fmt-clause-delim in the isodoc-presentation grammar, the new i18n labels on metanorma.org, and the PDF-XSL handling of fmt-clause-delim.

🤖

Add an `i18n_delim(type, default)` helper that resolves a caption delimiter from
`@i18n.get["<type>_delimiter"] || @i18n.get["caption_delimiter"] || default`
(optional keys via `@i18n.get`, so default behaviour is unchanged unless a
flavour/document sets them). Route the clause delimiter and the per-asset caption
delimiters (note, table, figure, subfigure, termnote, annex, example, admonition,
sourcecode) through it.

Give the terminal clause-number delimiter its own `fmt-clause-delim` class,
distinct from the `fmt-autonum-delim` used for the internal `1.1.1` separators, so
it is uniquely targetable in XSLT/CSS.

Spec fixture updates (terminal-delim class rename across presentation-XML and HTML
fixtures) still pending.

Refs metanorma/metanorma-pdfa#51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant