Skip to content

Conversation

@DynaSpan
Copy link
Contributor

@DynaSpan DynaSpan commented Aug 5, 2025

Hi!

At the company I work for, we use Word templates which contain normal headings (e.g. Heading 1, etc.) and numbered headings (e.g. NumberedHeading 1 etc.).

This doesn't play nice with the current implementation of numbered headings in html2openxml. If you define a numbered heading within Word, you shouldn't add the numbering properties to the heading as this will mess up the style of the heading (spacings etc.).

This PR adds a new NumberedHeadingStyle to the DefaultStyles. If the NumberedHeadingStyle is defined differently by the user than HeadingStyle, this PR will not add a numbering property to the heading, keeping the numbered heading styling intact.

This implementation ensures that current implementations keep working as-is, while opening up the styling for alternative use-cases (such as ours).

@DynaSpan DynaSpan changed the title Add + implement NumberedHeadingStyle to DefaultStyles Add a NumberedHeadingStyle option to DefaultStyles Aug 5, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 5, 2025

@onizet onizet merged commit aa639c2 into onizet:dev Aug 11, 2025
3 checks passed
@onizet
Copy link
Owner

onizet commented Aug 11, 2025

Brillant!

@onizet onizet mentioned this pull request Aug 11, 2025
@DynaSpan
Copy link
Contributor Author

DynaSpan commented Sep 2, 2025

Hi @onizet,

Today I was trying to upgrade our local package to the version on nuget, 3.2.6. Unfortunately we have some issues as the NumberedHeadingStyle doesn't seem to be included in the 3.2.6 release (or our internal nuget cache is busted). Could you verify this?

Thank you!

@onizet
Copy link
Owner

onizet commented Sep 4, 2025

Hello @DynaSpan , I messed up my packaging!
With Nuget, we cannot overwrite an existing package so I just published v3.2.7 with the NumberedHeadingStyle property.
Thanks for reporting

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.

2 participants