--number-sections for docx: option to use native Word numbering instead of text prefixes
#11428
PascalThuet
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
When using
--number-sectionswith docx output, Pandoc inserts section numbers as text prefixes (e.g., "1.1 Heading"). This works, but prevents Word's native features (automatic renumbering, TOC field codes, outline view) from functioning correctly.Request: Add an option to generate native Word multilevel numbering via
numbering.xmlinstead of text prefixes.Current behavior
Produces headings like:
The number "1" is static text.
Desired behavior (with new option)
Would produce:
With corresponding
abstractNuminnumbering.xml:Use case
When generating technical documentation for stakeholders who edit in Word:
Currently, any structural edit requires manual renumbering of all subsequent sections.
Proposed solution
Reuse the existing
native_numberingextension (already implemented for figures/tables in #7499).When
docx+native_numberingis enabled and--number-sectionsis used:abstractNumtonumbering.xml(levels 0-8 for Heading 1-9)numPrto heading paragraphs instead of inserting text prefixesreference.docxif presentThis is opt-in (extension disabled by default), so no breaking change.
Minimal implementation scope
The smallest useful PR would:
%1.,%1.%2.,%1.%2.%3.reference.docxnumbering (future enhancement)This keeps the change small and reviewable.
Related issues
--number-sectionsin docx (closed 2020, implemented as text)native_numberingextension for figures/tables (implemented)Environment
Beta Was this translation helpful? Give feedback.
All reactions