diff --git a/packages/preview/zen-utbm-report/0.1.0/LICENSE b/packages/preview/zen-utbm-report/0.1.0/LICENSE new file mode 100644 index 0000000000..10da2e728f --- /dev/null +++ b/packages/preview/zen-utbm-report/0.1.0/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 langonne + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/preview/zen-utbm-report/0.1.0/README.md b/packages/preview/zen-utbm-report/0.1.0/README.md new file mode 100644 index 0000000000..552c69b891 --- /dev/null +++ b/packages/preview/zen-utbm-report/0.1.0/README.md @@ -0,0 +1,119 @@ +# zen-utbm-report + +Minimal, customizable Typst template for UTBM report submissions. + +**Institution & logo attribution** +The template uses the **Université de Technologie de Belfort-Montbéliard (UTBM)** logo. +See [https://www.utbm.fr](https://www.utbm.fr) for the institution’s official website. +Use of this logo is subject to UTBM’s own policies, users should verify the authorization for their context. + +## Overview + +`zen-utbm-report` provides a simple report wrapper with sensible defaults for UTBM coursework. It sets up the page, title area, optional outline. + +## Features + +- Pre-made cover page: automatically formatted, only requires title, subject, and authors + +- Semester detection: Spring or Autumn semester inferred automatically from the date + +- Built-in table of contents (“Sommaire”) + +## Install + +```typst +#import "@preview/zen-utbm-report:0.1.0": report +``` + +## Quick Start + +Minimal usage: + +```typst +#import "@preview/zen-utbm-report:0.1.0": report + +#show: doc => report( + doc-title: [My First UTBM Report], + doc-author: ("Alice Martin", "Bob Dupont"), + course-name: "IF2", + doc +) + += Introduction + +Your content starts here. +``` + +## Parameters + +`report(`**doc-title**, **doc-author**, **doc-date**, **page-paper**, **page-numbering**, **text-size**, **text-lang**, **text-font**, **par-justify**, **heading-numbering**, **show-outline**, **outline-title**, **course-name**, **doc**`)` + +| Parameter | Type / Example | Default | Notes | +| ------------------- | ------------------------------------ | ----------------------- | ---------------------------------------- | +| `doc-title` | content block: `[Title]` | `[Title]` | Shown on the title page. | +| `doc-author` | `string`|`array` : `("Alice","Bob")` | `("Author1","Author2")` | Authors on the title page. | +| `doc-date` | `auto` or `datetime type` | `auto` | Print date on cover; `auto` uses today. | +| `page-paper` | string: `"a4"` | `"a4"` | Paper size. | +| `page-numbering` | string: `"1"` | `"1"` | Page number format (e.g., `"1"`). | +| `text-size` | length: `12pt` | `12pt` | Base text size. | +| `text-lang` | language code: `"fr"` | `"fr"` | Sets text language (hyphenation, etc.). | +| `text-font` | font family: `"New Computer Modern"` | `"New Computer Modern"` | Base font family. | +| `par-justify` | bool | `true` | Paragraph justification toggle. | +| `heading-numbering` | string: `"11"` | `"11"` | Heading numbering style (Typst pattern). | +| `show-outline` | bool | `true` | Insert an outline (“Sommaire”) page. | +| `outline-title` | string: `"Sommaire"` | `"Sommaire"` | Title used for the outline page. | +| `course-name` | string | `"Course name"` | Appears on title area. | +| `doc` | document content | *(required)* | Your report body. | + +## Full Example + +Paste this into a fresh `.typ` file: + +```typst +#import "@preview/zen-utbm-report:0.1.0": report + +#show: doc => report( + doc-title: [Rapport TP n°1], + doc-author: ("Alice Martin", "Bob Dupont"), + doc-date: datetime(year: 2025, month: 9, day: 14), + page-paper: "a4", + page-numbering: "1", + text-size: 12pt, + text-lang: "fr", + text-font: "New Computer Modern", + par-justify: true, + heading-numbering: "11", + show-outline: true, + outline-title: "Sommaire", + course-name: "IF2", + doc +) + += Introduction + +This template helps you meet UTBM conventions with minimal setup. + +== Motivation +State the problem you are solving and the expected outcomes. + += Methods + +Explain your approach, assumptions, and tools. + +== Algorithm +Present your algorithm and its complexity. + += Results + +Summarize the key findings, tables, or figures. + += Conclusion + +Wrap up with lessons learned and potential improvements. +``` + +## License + +MIT © langonne + + diff --git a/packages/preview/zen-utbm-report/0.1.0/assets/utbm_logo.jpg b/packages/preview/zen-utbm-report/0.1.0/assets/utbm_logo.jpg new file mode 100644 index 0000000000..f2fe0aaff0 Binary files /dev/null and b/packages/preview/zen-utbm-report/0.1.0/assets/utbm_logo.jpg differ diff --git a/packages/preview/zen-utbm-report/0.1.0/lib.typ b/packages/preview/zen-utbm-report/0.1.0/lib.typ new file mode 100644 index 0000000000..2ad0525fba --- /dev/null +++ b/packages/preview/zen-utbm-report/0.1.0/lib.typ @@ -0,0 +1,89 @@ +#let report( + doc-title: [Title], + doc-author: ("Author1", "Author2"), + doc-date: auto, + page-paper: "a4", + page-numbering: "1", + text-size: 12pt, + text-lang: "fr", + text-font: "New Computer Modern", + par-justify: true, + heading-numbering: "11", + show-outline: true, + outline-title: "Sommaire", + course-name: "Course name", + doc, +) = { + set document( + title: doc-title, + author: doc-author, + date: doc-date, + ) + set page( + paper: page-paper, + ) + set text( + font: text-font, + lang: text-lang, + size: text-size, + ) + set par( + justify: par-justify, + ) + set heading( + numbering: heading-numbering, + ) + let date = datetime.today() + if type(doc-date) == datetime { + date = doc-date + } + let year = date.display("[year repr:last_two]") + let month = date.display("[month]") + let semester = if month < "09" { + text("P") + } else { + text("A") + } + v(15%) + align(center)[ + #image("assets/utbm_logo.jpg", width: 40%) + ] + align(center)[ + #text(size: 20pt, weight: "bold")[#doc-title] + #linebreak() + #text(size: 20pt)[#course-name] + #linebreak() + #text( + size: 20pt, + )[ + #if type(doc-author) == str { + doc-author + } else { + box( + width: 50%, + par( + justify: false, + )[ + #doc-author.join(" - ") + ], + ) + } + ] + ] + v(40%) + align(center)[ + #text(size: 16pt)[#semester#year] + ] + if show-outline { + pagebreak() + outline( + indent: auto, + title: "Sommaire", + ) + } + pagebreak() + set page( + numbering: page-numbering, + ) + doc +} diff --git a/packages/preview/zen-utbm-report/0.1.0/template/example.typ b/packages/preview/zen-utbm-report/0.1.0/template/example.typ new file mode 100644 index 0000000000..966b6b89e3 --- /dev/null +++ b/packages/preview/zen-utbm-report/0.1.0/template/example.typ @@ -0,0 +1,30 @@ +#import "@preview/zen-utbm-report:0.1.0": report + +#show: doc => report( + doc-title: [My First UTBM Report], + doc-author: ("Alice Martin", "Bob Dupont"), + course-name: "IF2", + doc, +) + += Introduction + +This template helps you meet UTBM conventions with minimal setup. + +== Motivation +State the problem you are solving and the expected outcomes. + += Methods + +Explain your approach, assumptions, and tools. + +== Algorithm +Present your algorithm and its complexity. + += Results + +Summarize the key findings, tables, or figures. + += Conclusion + +Wrap up with lessons learned and potential improvements. diff --git a/packages/preview/zen-utbm-report/0.1.0/thumbnail.png b/packages/preview/zen-utbm-report/0.1.0/thumbnail.png new file mode 100644 index 0000000000..16934a7506 Binary files /dev/null and b/packages/preview/zen-utbm-report/0.1.0/thumbnail.png differ diff --git a/packages/preview/zen-utbm-report/0.1.0/typst.toml b/packages/preview/zen-utbm-report/0.1.0/typst.toml new file mode 100644 index 0000000000..a6915e042c --- /dev/null +++ b/packages/preview/zen-utbm-report/0.1.0/typst.toml @@ -0,0 +1,15 @@ +[package] +name = "zen-utbm-report" +version = "0.1.0" +entrypoint = "lib.typ" +authors = ["langonne "] +license = "MIT" +description = "Minimalist & customizable for submitting UTBM's reports." +repository = "https://github.com/langonne/zen-utbm-report" +keywords = ["UTBM","report"] +categories = ["report"] + +[template] +path = "template" +entrypoint = "example.typ" +thumbnail = "thumbnail.png"