diff --git a/README.md b/README.md index d8c1535..1f916fc 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file diff --git a/main.product-test-example.typ b/main.product-test-example.typ new file mode 100644 index 0000000..b5f76ab --- /dev/null +++ b/main.product-test-example.typ @@ -0,0 +1,109 @@ +#import "product_test_template.typ": * +#set text(lang: "fa") +#show: paper.with( + authors: ( + ( + name: "دیاکو سلطانپور", + affiliation: "کیمیا رازی - واحد جوهر", + email: "diaco@kimiarazi.com", + note: "ink dept", + ), + ), + date: "۲۲ تا ۴/۶/۲۶", + destinations: ( + (name: " نتايج تست پيگمنت‌های شرکت اسمالتس"), + ), + purpose: "بازدید و بررسی وضعیت", +) + +// Your main content goes here +\ += اطلاعات کلی +#general_info_table( + "۱۴۰۵/۰۱/۱۷", + "۱۴۰۵/۰۱/۲۴", + "پیگمنت", + "۹", + "Esmaltes", +) +\ +== نمونه دریافتی +\ +#received_samples_table(( + ("پیگمنت زرد", "CLCE-539/1", "PI-Y36", "2"), + ("پیگمنت قهوه‌ای", "CLCE-539/2", "PI-DBR3", "3"), + ("پیگمنت بژ", "CLCE-539/3", "PI-BG31", "4"), + ("پیگمنت بژ", "CLCE-539/4", "PI-BG32", "5"), + ("پیگمنت آبی", "CLCE-539/5", "PI-BL53", "6"), + ("پیگمنت آبی", "CLCE-539/6", "PI-BL54", "7"), + ("پیگمنت مشکی", "CLCE-539/7", "PI-BK38", "8"), + ("پیگمنت مشکی", "CLCE-539/8", "PI-BK39", "9"), + ("پیگمنت صورتی", "CLCE-539/9", "PI-P26", "10"), +)) +== تست‌های انجام شده +با استفاده از این پیگمنت‌ها نمونه جوهر ساخته شد و در کنار نمونه آزمایشگاهی ساخته شده با پیگمنت استاندارد کیمیا رازی به صورت قطره‌ای روی سه لعاب مختلف و در دماهای مختلف پخت (۱۰۳۰، ۱۱۵۰ و ۱۱۸۰ درجه سانتی‌گراد) و روی لعاب‌های براق و مات تست شد. + +فرمول نمونه جوهر بر اساس درصد وزنی به صورت زیر است: +#align(left)[#text(lang: "en")[ +- Pigment: 30 +- Sol-1: 60 +- Super Disp.: 10]] + +تست‌ها شامل: +- بررسی کیفیت سطح +- شدت رنگ +- تم رنگ +// تست پایداری جوهر در مقابل رسوب‌گذاری و ته‌نشینی نیز انجام شده است. +#colbreak() +== نتایج تست‌ها +وضعیت نمونه‌های پیگمنت تست شده در مقایسه با نمونه استاندارد کیمیا رازی: +#columns(2, gutter: 8pt)[ +#pigment_result_block("پیگمنت زرد", ( + ([*معیار*], [*CLCE-539/1*]), + ([کیفیت سطح], [خوب]), + ([تم رنگ], [خوب]), + ([شدت رنگ], [کمتر (L\*: +1.0)]), + ([نتیجه نهایی], [نامناسب]), +)) +\ +#pigment_result_block("پیگمنت قهوه‌ای", ( + ([*معیار*], [*CLCE-539/2*]), + ([کیفیت سطح], [خوب]), + ([تم رنگ], [خوب]), + ([شدت رنگ], [خوب]), + ([نتیجه نهایی], [مناسب]), +)) +\ +#pigment_result_block("پیگمنت بژ", ( + ([*معیار*], [*CLCE-539/3*], [*CLCE-539/4*]), + ([کیفیت سطح], [خوب], []), + ([تم رنگ], [خوب], []), + ([شدت رنگ], [کمتر (L\*: +1.3)], []), + ([نتیجه نهایی], [نامناسب], []), +)) +\ +#pigment_result_block("پیگمنت آبی", ( + ([*معیار*], [*CLCE-539/5*], [*CLCE-539/6*]), + ([کیفیت سطح], [خوب], [خوب]), + ([تم رنگ], [خوب], [خوب]), + ([شدت رنگ], [کمتر (L\*: +2.5)], [خوب]), + ([نتیجه نهایی], [نامناسب], [خوب]), +)) +\ +#pigment_result_block("پیگمنت مشکی", ( + ([*معیار*], [*CLCE-539/7*], [*CLCE-539/8*]), + ([کیفیت سطح], [خوب], []), + ([تم رنگ], [خوب], []), + ([شدت رنگ], [خوب], []), + ([نتیجه نهایی], [مناسب], []), +)) +\ +=== پیگمنت صورتی (CLCE-539/9 / PI-P26) +به دلیل موجود کافی در انبار تست این پیگمنت به زمان دیگری موکول شد. +] +== جمع بندی نتايج +- پیگمنت قهوه‌ای شرکت کلوبیا مشابه پیگمنت استاندارد کیمیا رازی بوده و در نتیجه نهایی نیز مناسب ارزیابی شد. این نمونه ممکن است برای تست صنعتی در نظر گرفته شود. +- پیگمنت آبی به دلیل شدت رنگ پایین، زرد به دلیل تم چرک و بژ به دلیل شدت رنگ پایین و تم زرد مورد تأیید نیستند. +- به نظر می‌رسد که این پیگمنت‌ها با پیگمنت‌های ارسالی با کد مشابه از شرکت یسنا ملل آرمای یکسان هستند. +== پیشنهادات +پیگمنت قهوه‌ای با کد ۷۰۳ برای انجام تست صنعتی پیشنهاد می‌شود. \ No newline at end of file diff --git a/travel-report-example.typ b/main.travel-report-example.typ similarity index 100% rename from travel-report-example.typ rename to main.travel-report-example.typ