10.6 The web, print and publication figure pipeline
nlmx does not need separate scientific calculations for the report and publication copy of the same chart. A shared chart specification can feed two presentation paths: a responsive web theme for inline HTML and a fixed physical theme for standalone SVG/PNG output.
Figure 10.4. Data, scales and geometry are shared; dimensions, font sizing and theme tokens adapt to the destination.
Web figures
Theme::web() uses responsive dimensions, a 12-unit base font and CSS variables that integrate with the HTML report. Titles, legends, captions and hover targets are enabled by default. Responsive means the SVG can scale with its container; it does not mean labels can be made arbitrarily small without collision.
Some commands write these web-oriented SVGs in an svg/ directory in addition to embedding them in HTML. They are useful for inspection, but should not automatically be treated as final publication masters because their sizing assumptions are screen-oriented.
Publication figures
Theme::print() receives explicit width and height in points, base font size and publication colors. The shared plot settings default to 7 by 5 inches, 300 dpi, an 11-point base font and PNG output unless changed. Units may be inches, centimetres, millimetres or pixels; inches and physical units are safer when a journal specifies column width.
The standalone files normally live below plots/; SVG copies, when requested, live below plots/svg/. Commands can expose plot-format controls that select PNG, SVG or both. Always verify the command-specific interface rather than assuming every command emits the same combination.
Equivalent science, non-identical markup
The web and print renderings may differ in physical dimensions, font size, theme values, hover targets and title/legend inclusion. Those are expected presentation differences. The plotted statistics, grouping, scales and labels should remain consistent. A QC comparison should therefore inspect source values and semantic elements, not demand byte-identical SVG markup.
Sizing calculation
For physical units, width in points is
For raster output, the corresponding pixel width is
Thus the default 7×5-inch, 300-dpi canvas is 2100×1500 pixels. Increasing dpi increases raster density, not the intended physical size.
Common mistakes
- Publishing a responsive web SVG without checking its physical dimensions.
- Recomputing statistics separately for HTML and publication paths.
- Comparing SVG files byte-for-byte when only presentation tokens differ.
- Treating dpi as a vector-quality setting.
Checklist
- Fix the target physical width before choosing dpi.
- Compare report and publication figures against the same source table.
- Request both SVG and PNG when revision and office compatibility are needed.
- Inspect titles, legends and captions at final size.
Further reading
See SVG output, PNG output and figure families.