Co-authored-by: Cursor <cursoragent@cursor.com>
Business Report Templates
Quarto templates for Kimia Razi Persian (RTL) business reports.
One .qmd source renders to:
- HTML — RTL reading layout with the same title block as PDF (company, logo, report title)
- PDF — via WeasyPrint from the HTML, matching
typst-templatespage chrome (sidebar, header, title block, tables)
Requirements
- Quarto 1.7+
- WeasyPrint (for PDF)
- Fonts in
assets/fonts/(IRNazanin,IRZar, …)
Install WeasyPrint once in this repo:
uv venv .venv-pdf
uv pip install --python .venv-pdf/bin/python weasyprint
Quick start
Always render from this project root so _quarto.yml applies (RTL CSS, filters, PDF post-render):
quarto render examples/travel-report.qmd
quarto render examples/product-test.qmd
quarto render examples/travel-expense.qmd
Outputs land in _output/ (HTML + PDF). PDF is produced by scripts/html-to-pdf.py in project.post-render.
Templates
Three named metadata templates (Typst-style explicit choice). Pick one via metadata-files in the .qmd frontmatter — that sets report-type and controls whether the travel meta block is injected. Document type is not inferred from purpose.
| Template | File | report-type |
Example |
|---|---|---|---|
| Travel / mission | templates/travel.yml |
travel |
examples/travel-report.qmd |
| Product / raw-material test | templates/product-test.yml |
product-test |
examples/product-test.qmd |
| Travel / mission expense | templates/travel-expense.yml |
travel-expense |
examples/travel-expense.qmd |
Start a new report
- Copy the matching example
.qmd(keep itsmetadata-filesline pointing attemplates/travel.yml,templates/product-test.yml, ortemplates/travel-expense.yml). - Fill frontmatter and body.
- Render with
quarto renderfrom this repo root.
Travel fields
Content for the PDF «اطلاعات کلی» block (only when using the travel template):
purpose— هدف مأموریتdestinations— مقصد (also used on the sidebar)report-date— تاریخ
Product-test body
Put general info, samples, formula, and results in the body as Markdown tables. destinations is optional sidebar text. No purpose field is needed.
Travel-expense body
Write a short formal letter in the body (addressee, greeting, mission meta, aligned expense list, notes, signature). destinations is sidebar text. No travel «اطلاعات کلی» block is injected.
Project layout
_quarto.yml
styles/report.css # HTML screen theme
styles/print.css # PDF / print (typst-templates match)
filters/print-chrome.lua # title block + sidebar + travel meta
scripts/html-to-pdf.py # WeasyPrint post-render
assets/fonts/
assets/logo.png
templates/travel.yml
templates/product-test.yml
templates/travel-expense.yml
examples/travel-report.qmd
examples/product-test.qmd
examples/travel-expense.qmd
Notes
- PDF layout targets
typst-templates(product_test_template.typ/travel-report-template.typ): A4, RTL, rotated left sidebar with pagen / N, running header on page 2+, content-sized tables with grey header row. - HTML on screen shows the shared title block (logo + company | subtitle + report title); running header and sidebar stay
display: noneuntil print/PDF. - Typst is not used for PDF generation.