Configuration
CSSBuilder exposes layout knobs as exported fields. They are seeded
to sensible defaults in New(); override them after construction.
Footnote layout
| Field | Type | Default | Effect |
|---|---|---|---|
FootnoteSeparatorHeight |
bag.ScaledPoint |
0.4pt | thickness of the rule above the footnote stack |
FootnoteSeparatorSkip |
bag.ScaledPoint |
6pt | gap between body content and the rule |
FootnoteInterSkip |
bag.ScaledPoint |
2pt | gap between consecutive footnote bodies |
FootnoteCallSizeRatio |
float64 |
0.7 | superscript call font size relative to surrounding body size |
FootnoteCallRiseRatio |
float64 |
0.4 | superscript call PDF rise (Ts) relative to surrounding body size |
Float layout
| Field | Type | Default | Effect |
|---|---|---|---|
FloatTopInterSkip |
bag.ScaledPoint |
6pt | gap between consecutive top-floats and below the stack |
FloatBottomInterSkip |
bag.ScaledPoint |
6pt | gap between consecutive bottom-floats and above the stack |
Counters
CSSBuilder.Counters is a map[string]int reading and writing CSS
counters. The footnote counter is incremented automatically per
extracted footnote; the page counter is set during shipout.
Other counters (e.g. pages for total page count) are set by the
caller before OutputPages*.
Page dimensions
The current page geometry comes from @page rules in the CSS. Read
the active PageDimensions via CSSBuilder.PageSize() (returns
width, height, margins, and content area). The struct is also stored
on the current frontend.Page.Userdata[PageDimensionsKey] so
callbacks can access it.
Callbacks
See Callbacks.
PDF/UA
See PDF/UA tagging.