10.4 Responsive, collapsible and print behavior
Large diagnostic tables compete with narrative and figures for attention. nlmx reports can place content in collapsible sections with Show/Hide, Maximize, Expand all and Collapse all controls. This is a navigation aid, not a change to the scientific output.
Progressive enhancement
The content is initially present in the document. When the inline script runs, collapsible sections can default to a compact state and respond to the controls. If JavaScript is disabled or stripped by an archive viewer, the content remains visible. This is an important preservation property: interactivity improves navigation, but access to evidence does not depend on it.
A maximized section helps inspect a wide or long table without losing it among surrounding content. It does not transform the table into a different dataset. Export or analyze the machine file when sorting, filtering or numeric computation is required.
Print rules
The print stylesheet forces collapsible content visible and hides interactive buttons. Review a print preview rather than assuming the screen state determines the paper output. Page-break behavior depends partly on the browser and printer/PDF driver; very large tables can still split across pages or repeat headings differently.
For an archival PDF, record the browser and conversion process when pagination is regulated or must be reproducible. The HTML file remains the more faithful interactive source, while the PDF captures one specific rendering.
Responsive review matrix
| Mode | Expected behavior | QC focus |
|---|---|---|
| Wide screen | Cards and tables use available width | Alignment, legends, long labels |
| Narrow screen | Layout reflows; tables may scroll | No clipped controls or hidden evidence |
| JavaScript disabled | Collapsible content remains visible | Evidence is still readable |
| Print preview | Sections expanded; controls hidden | Page breaks and figure scaling |
| PDF conversion | Static rendering | Fonts, links, metadata and pagination |
Accessibility implications
Collapsed content must not hide the existence of a warning. Critical run status should be visible at the summary level and repeated near the affected section. Keyboard navigation, focus visibility and meaningful button labels matter for interactive review. A reviewer should be able to use browser search to find a parameter, warning or subject identifier even when sections are collapsed.
Common mistakes
- Printing while assuming collapsed screen sections will remain absent.
- Treating maximized HTML as a data-analysis grid.
- Placing the only failure message inside a default-collapsed section.
- Archiving only a PDF and discarding the original self-contained HTML.
Checklist
- Test Expand all, Collapse all, Show/Hide and Maximize.
- Disable JavaScript once and verify that evidence remains visible.
- Inspect print preview for every release report.
- Retain HTML alongside any derived PDF.
Further reading
See HTML anatomy, publication QC and archiving.