You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support configurable report structure and synchronized table of contents in CPSR and PCGR #314
Please allow users to customize the structure of CPSR and PCGR reports by selecting which analytical sections to include, changing their order, and organizing them into groups.
The table of contents should be generated automatically from the final structure, with the correct section order, hierarchy, and links.
Requirements
Enable, disable, and reorder sections and subsections.
Support custom section titles and grouping.
Allow summary cards, plots, and tables to be positioned independently where appropriate.
Keep headings, section anchors, and table-of-contents links synchronized when components are moved.
Apply the configured structure to both HTML and PDF outputs.
Preserve the current layout as the default.
Suggested implementation
Add an optional layout configuration file, supplied through a parameter such as:
--report-layout report-layout.yaml
Each report component could have a stable identifier. The configuration would specify its inclusion, position, title, and nesting. For example:
sections:
id: documentation
The report body and table of contents should be generated from the same section tree. Each component should move together with its heading and anchor, preventing navigation links from pointing to unrelated content.
Acceptance criteria
The configuration controls section inclusion, order, titles, and grouping.
The table of contents matches the rendered report and links to the correct sections.
HTML and PDF follow the same configured structure.
Layout changes preserve analytical results and table contents.
Invalid configurations produce clear errors.
Running without a configuration preserves the default layout.
Please also support configuring the column order in variant tables through the report layout configuration. For example in CPSR:
Activity