Skip to content

Support header and footer distances on [SECTION] - #86

Merged
SimonCropp merged 1 commit into
mainfrom
section-break-header-footer
Aug 27, 2026
Merged

Support header and footer distances on [SECTION]#86
SimonCropp merged 1 commit into
mainfrom
section-break-header-footer

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

[SECTION] could set the four page edges but not the two distances Word measures from the page edge to the header and the footer, so a template could only bring a margin in as far as the header already reached: below that Word overrides the margin and pushes the text back down to clear the header, and the section gains nothing. header= and footer= are what make shortening the run of a page possible.

They are their own attributes rather than a fifth and sixth margin because they measure something else, and because a template moving only the text should not have to restate them. ResolveMargins becomes ResolvePageMargin and reads each attribute independently, so a value that does not parse costs that one setting rather than the section break or the settings beside it, and Derive now copies only what the marker named - anything it left out keeps the style source's, the gutter included. The two distances parse unsigned, where a page edge does not: a negative margin is a document Word will open, a header outside the page is not.

Five tests over the distances alone, beside margins, and unparseable or negative; readme documents the three attributes as a table. Bumped to 7.4.0.

`[SECTION]` could set the four page edges but not the two distances Word
measures from the page edge to the header and the footer, so a template
could only bring a margin in as far as the header already reached: below
that Word overrides the margin and pushes the text back down to clear the
header, and the section gains nothing. `header=` and `footer=` are what
make shortening the run of a page possible.

They are their own attributes rather than a fifth and sixth margin
because they measure something else, and because a template moving only
the text should not have to restate them. `ResolveMargins` becomes
`ResolvePageMargin` and reads each attribute independently, so a value
that does not parse costs that one setting rather than the section break
or the settings beside it, and `Derive` now copies only what the marker
named - anything it left out keeps the style source's, the gutter
included. The two distances parse unsigned, where a page edge does not: a
negative margin is a document Word will open, a header outside the page
is not.

Five tests over the distances alone, beside margins, and unparseable or
negative; readme documents the three attributes as a table. Bumped to
7.4.0.
@SimonCropp SimonCropp added this to the 7.4.0 milestone Aug 27, 2026
@SimonCropp
SimonCropp merged commit 5bf263a into main Aug 27, 2026
3 of 5 checks passed
@SimonCropp
SimonCropp deleted the section-break-header-footer branch August 27, 2026 06:41
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