| name | report-template |
| description | Publication-quality PDF report generation using Typst templates. Produces professional scientific reports with colored section bands, styled tables, figure captions, callout boxes, and page headers/footers. |
Report Template System
Generate publication-quality PDF reports using the BioClaw Typst template engine.
Quick Start
import sys
sys.path.insert(0, "path/to/report-template")
from report_builder import ReportBuilder, T
report = ReportBuilder(
title="My Analysis Report",
subtitle="Project XYZ",
author="BioClaw",
)
report.heading(1, "Background")
report.text("Description of the project...")
report.heading(1, "Results")
report.table(
["Sample", "Value", "Status"],
[["A", "92.3", "Pass"], ["B", "87.1", "Pass"]],
caption="Summary of results",
)
report.compile("output/report.pdf")
Available Components
Call methods on the ReportBuilder instance to append content in order. The T
namespace exposes the same helpers as static functions that return raw Typst
markup — combine them with report.raw(...).
Headings & Text
report.heading(level, "Section title")
report.text("Plain paragraph")
report.raw(T.bold("Bold") + " / " + T.italic("italic"))
report.raw(T.list(["Item 1", "Item 2"]))
report.raw(T.enum(["Step 1", "Step 2"]))
Tables
report.table(headers, rows, caption=None)
Callout Boxes
report.callout(text, title="Note", kind="note")
Figures
report.set_image_dir("path/to/figures")
report.image(path, caption=None, width="100%")
Metadata Blocks
report.metadata_block([("Key", "Value"), ("Date", "2026-04-15")])
Metric Cards
report.metric_cards([
{"label": "Samples", "value": "6"},
{"label": "Quality", "value": "A+"},
])
Layout
report.pagebreak()
report.vspace("12pt")
Template Features
- Dark navy section heading bands with white text
- Teal sub-heading accents
- Professional page headers and footers with page numbers
- Alternating-row table styling
- Four callout box types (note, warning, success, danger)
- Figure numbering and italic captions
- Key-value metadata blocks
- Metric card rows
Requirements
- Python package:
typst (pip install typst)
- No system dependencies required