Update README to reflect new templates and usage examples.

This commit is contained in:
2026-06-30 13:30:01 +03:30
parent bd7c8e6459
commit 46a1d1255c
3 changed files with 189 additions and 25 deletions

105
README.md
View File

@@ -1,42 +1,92 @@
# Typst Templates
A collection of Typst templates for creating professional documents.
A collection of Typst templates for creating professional Persian (RTL) reports for Kimia Razi.
## Templates
### Paper Template (`paper_template.typ`)
A professional document template with:
- Custom header and footer
- Persian and English font support
- Configurable page margins
- Title, author, and date formatting
- Support for sections and structured content
This repository contains three templates:
### Paper Template (`paper_template.typ`)
A general working-paper / report template (based on the SSRN paper layout). It exposes a `paper` function with:
- Persian (RTL) layout with custom fonts (`IRNazanin`, `IRZar`, `IRLotus`)
- A rotated sidebar background showing company, title, destinations, and page number
- A logo header that appears from the second page onward
- Configurable `title`, `subtitle`, `company`, `authors`, `destinations`, `purpose`, and `date`
- Numbered headings, equations, and footnotes
### Product Test Template (`product_test_template.typ`)
A template for raw-material / product test reports. It builds on the `paper` function and adds helper functions for tabular results:
- `general_info_table(...)` – general report information (dates, sample type, count, supplier)
- `received_samples_table(rows)` – structured table of received samples
- `sample_section(...)` / `sample_entry(...)` – per-sample heading and info blocks
- `test_result_table(cols)` / `pigment_result_block(name, rows)` – non-breakable result tables grouped per sample
### Travel Report Template (`travel-report-template.typ`)
A template for mission / travel reports. It exposes a `report` function and a `report-table` helper with:
- Persian (RTL) layout with fonts loaded from `template_files/`
- A title block with company, subtitle, and logo
- A general-info section (destination, purpose, team, date)
- A rotated sidebar background with destinations, authors, and page number
## Examples
- `main.product-test-example.typ` – a completed product test report (Esmaltes pigments) using `product_test_template.typ`
- `main.travel-report-example.typ` – a completed mission report using `travel-report-template.typ`
### Main Template (`main.typ`)
Extended template for comprehensive reports including:
- Multi-language support (Persian/English)
- Professional styling
- Tables and figures support
- Bibliography and citations
- Custom layout options
## Usage
### Basic Usage
### Product test report
```typst
#import "paper_template.typ": *
#import "product_test_template.typ": *
#show: project.with(
title: "Your Document Title",
author: "Your Name",
date: datetime.today().display()
#show: paper.with(
title: "گزارش تست مواد اولیه",
subtitle: "دپارتمان جوهر",
authors: ((name: "نام نویسنده"),),
date: "۱۴۰۵/۰۱/۲۴",
)
= Section Title
Your content here...
= اطلاعات کلی
#general_info_table("۱۴۰۵/۰۱/۱۷", "۱۴۰۵/۰۱/۲۴", "پیگمنت", "۹", "Esmaltes")
```
### Travel report
```typst
#import "travel-report-template.typ": report, report-table
#show: report.with(
title: "گزارش مأموریت",
destinations: ((name: "کاشی آسیا"),),
purpose: "تست آزمایشی جوهرها",
date: "۰۵/۰۲/۲۷",
)
= گزارش مأموریت
متن گزارش ...
```
### Installation
Clone this repository to use the templates:
@@ -45,9 +95,14 @@ Clone this repository to use the templates:
git clone ssh://git@git.faryad.top:2222/rhino/typst-templates.git
```
### Requirements
- [Typst](https://typst.app/) - Install from https://github.com/typst/typst
- [Typst](https://typst.app/) - Install from [https://github.com/typst/typst](https://github.com/typst/typst)
- Persian fonts (`IRNazanin`, `IRZar`, `IRLotus`). The travel report template loads fonts from `template_files/`; compile with `--font-path template_files`.
## Contributing
@@ -55,4 +110,4 @@ Feel free to submit issues and enhancement requests.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.