diff --git a/packages/preview/hei-synd-report/0.1.0/lib/helpers.typ b/packages/preview/hei-synd-report/0.1.0/lib/helpers.typ index 8ffb677c3..a5e6eadd4 100644 --- a/packages/preview/hei-synd-report/0.1.0/lib/helpers.typ +++ b/packages/preview/hei-synd-report/0.1.0/lib/helpers.typ @@ -10,7 +10,7 @@ // Fancy pretty print with line numbers and stuff #import "@preview/codelst:2.0.2": sourcecode // Glossarium for glossary -#import "@preview/glossarium:0.5.1": * +#import "@preview/glossarium:0.5.3": * // Wordometer for word and character count #import "@preview/wordometer:0.1.4": word-count @@ -120,7 +120,7 @@ toe: i18n("toe-title"), ), before: none, - indent: true, + indent: auto, ) = { // Table of content if tableof.toc == true { @@ -189,7 +189,7 @@ length: 100%, depth: 3, title: i18n("toc-title"), - indent: false, + indent: auto, ) = { v(2em) text(large, weight: "bold", title) @@ -378,7 +378,7 @@ body ) = [ #if (after != none and before != none) { - minitoc(title: minitoc-title, after:after, before:before, indent: true) + minitoc(title: minitoc-title, after:after, before:before, indent: auto) if pb { pagebreak() } diff --git a/packages/preview/hei-synd-report/0.1.1/.gitignore b/packages/preview/hei-synd-report/0.1.1/.gitignore new file mode 100644 index 000000000..6602a0e1b --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/.gitignore @@ -0,0 +1,8 @@ +CHANGELOG.md +cliff.toml +rustfmt.toml +report.pdf +/lib/scripts/ +justfile +/img/ +guide-to-typst.pdf diff --git a/packages/preview/hei-synd-report/0.1.1/CHANGELOG.md b/packages/preview/hei-synd-report/0.1.1/CHANGELOG.md new file mode 100644 index 000000000..2af085e6d --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [0.1.1] - 2025-02-24 + +### 🚀 Features + +- *(toml)* Add minimum compiler version 0.13.0 +- *(telemetry)* Visitor count + +### 🐛 Bug Fixes + +- *(README)* Release Badge +- *(just)* Fix justfile for pdf generation +- *(typst)* Add link to new version hei-synd-report:0.1.1 +- *(package)* Latest version of glossarium and fracturist +- *(typst)* Compatibility with typst 0.13.0 +- *(telemetry)* Visitorbadge +- *(tianji)* Link to tianji +- *(tianji)* Link to tianji +- *(tianji)* Link to tianji + +### 💼 Other + +- Merge remote-tracking branch 'origin/main' + +## [0.1.0] - 2025-01-30 + +### 🚀 Features + +- *(template)* Initial commit + +### 🐛 Bug Fixes + +- *(README)* Links to various resources +- *(just)* Changelog recipies +- *(convention)* Fixed small issues indicated by the typst convention +- *(superfluous)* Remove files which are not needed + +### 📚 Documentation + +- *(README)* Add metadata.typ description +- *(chapter)* Description of the content of chapters + +### ⚙️ Miscellaneous Tasks + +- *(metadata)* Comments +- *(README)* Minor modifications +- *(just)* Add local preview test possibility +- *(release)* 0.1.0 +- *(typst.toml)* Remove exclude since it is handeled in the typst package fork + + diff --git a/packages/preview/hei-synd-report/0.1.1/LICENSE b/packages/preview/hei-synd-report/0.1.1/LICENSE new file mode 100644 index 000000000..eefb2d07b --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [2025] [Silvan Zahno] + +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/hei-synd-report/0.1.1/README.md b/packages/preview/hei-synd-report/0.1.1/README.md new file mode 100644 index 000000000..fda50bafb --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/README.md @@ -0,0 +1,151 @@ +![GitHub Repo stars](https://img.shields.io/github/stars/hei-templates/hei-synd-report) +![GitHub Release](https://img.shields.io/github/v/release/hei-templates/hei-synd-report) +![](https://tianji.tschinz.duckdns.org/telemetry/clnzoxcy10001vy2ohi4obbi0/cm7hhb3lf0038ru047n9dnhvt.gif) + +

+
+ HEI-Vs Logo +
+ HEI-Vs Engineering School - Systems Engineering +
+

+
+
+ Industrial Systems Logo +
+
+ + +This is the official template for a students report or project or lab report for the [HEI-Vs Engineering School](https://synd.hevs.io) in Sion, Switzerland. More templates can the found in our [GitHub organization](https://github.com/hei-templates) + +![](img/https://github.com/hei-templates/hei-synd-report/blob/51e8aea5b38bb51cba041bfc0ab769cc12f1a865/img/sample.png) + +## Using the template + +1. In the `Typst` Univers select the `hei-synd-report` template. Locally you can use the Typst CLI to initialise the project: + + ```bash + # from the typst universe + typst init @preview/hei-synd-report:0.1.1 + ``` + +2. Fill in the metadata in the `metadata.typ` file. + +All metadata is optional, but it is recommended to fill in as much as possible. The metadata is divided into three sections: `options`, `doc`, and `settings`. + + | Metadata | Type | Description | + | ------------------------ | --------------------------- | --------------------------------------------------------------------------------------------------- | + | `options` | _dictionary_ | These are fixed values for the document, who doesn't contribute to the content. | + | `option.type` | _string_ ("draft","final") | Type of the document. "final" will omit some text at the beginning of chapters (default: `"final"`) | + | `option.lang` | _string_ ("en", "fr", "de") | Language of the document. Many element will be changed accordingly (default:`"en"`) | + | `doc` | _dictionary_ | Document metadata | + | `doc.title` | _content_ | Title of the document. | + | `doc.abbr` | _content_ | Abbreviation of the Title. | + | `doc.subtitle` | _content_ | Subtitle of the document. | + | `doc.url` | _string_ | URL for the document or project | + | `doc.logos` | _dictionary_ | Dicrionary for the different logos | + | `doc.logos.tp_topleft` | _image_ | Image for the topleft section of the titlepage | + | `doc.logos.tp_topright` | _image_ | Image for the topright section of the titlepage | + | `doc.logos.tp_main` | _image_ | Image for the main section of the titlepage | + | `doc.logos.header` | _image_ | Image for the header of the document | + | `doc.authors` | _list_ of _dictionary_ | List of authors with their metadata | + | `doc.authors.name` | _content_ | Name of the author | + | `doc.authors.abbr` | _content_ | Abbreviation of the author | + | `doc.authors.email` | _string_ | Email of the author | + | `doc.authors.url` | _string_ | URL of the author | + | `doc.school` | _dictionary_ | School metadata | + | `doc.school.name` | _content_ | Name of the school | + | `doc.school.major` | _content_ | Major of the school | + | `doc.school.orientation` | _content_ | Orientation of the school | + | `doc.school.url` | _string_ | URL of the school | + | `doc.course` | _dictionary_ | Course metadata | + | `doc.course.name` | _content_ | Name of the course | + | `doc.course.url` | _string_ | URL of the course | + | `doc.course.prof` | _content_ | Name of the professor | + | `doc.course.class` | _content_ | Class of the course | + | `doc.course.semester` | _content_ | Semester of the course | + | `doc.keywords` | _list_ of _string_ | Keywords for the document | + | `doc.version` | _content_ | Version of the document | + | `date` | _datetime_ | Date of the document (default: `datetime.today()` | + | `tableof` | _dictionary_ | Table of ... settings for the document | + | `tableof.toc` | _boolean_ | Create table of contents (default: `true`) | + | `tableof.tof` | _boolean_ | Create table of figures (default: `false`) | + | `tableof.tot` | _boolean_ | Create table of tables (default: `false`) | + | `tableof.tol` | _boolean_ | Create table of listings (default: `false`) | + | `tableof.toe` | _boolean_ | Create table of equations (default: `false`) | + | `tableof.maxdepth` | _integer_ | Max depth of the table of contents (default: `3`) | + | `gloss` | _boolean_ | Create glossary and acronyms (default: `true`) | + | `appendix` | _boolean_ | Create appendix (default: `false`) | + | `bib` | _dictionary_ | Bibliography settings for the document | + | `bib.display` | _boolean_ | Display bibliography (default: `true`) | + | `bib.path` | _string_ | Path to the bibliography file (default: `"/tail/bibliography.bib"`) | + | `bib.style` | _string_ | Style of the bibliography (default: `"ieee"`) | + +3. Write your content in the `report.typ` file as well as the other files in the `main` folder. + +## Usage + +In order to build the `Typst` document locally you can use one of the following command: + +```bash +# Create pdf +typst compile report.typ + +# Create pdf and watch for changes +typst watch report.typ +``` + +## Features + +- [x] All metadata is optional +- [x] Title page +- [x] Table of contents +- [x] Table of figures +- [x] Table of tables +- [x] Table of listings +- [x] Table of equations +- [x] Custom Boxes +- [x] Sourcecode with codelst +- [x] Glossary and Acronyms with Glossarium +- [x] Bibliography +- [x] Draft and Final Typesetting +- [x] Content help + - [x] Introduction + - [x] Specification + - [x] Design + - [x] Implementation + - [x] Validation + - [x] Conclusion +- [ ] Wavedrom diagrams +- [ ] PlantUML diagrams + +## Help + +If you need help writting your document look at the [Typst documentation](https://typst.app/docs/) or if ou need more help with the template specifics look at the document [Guide-to-Typst](https://github.com/hei-templates/hei-synd-report/blob/51e8aea5b38bb51cba041bfc0ab769cc12f1a865/guide-to-typst.pdf). + +## Contributing + +If you would like to contribute to any of the repositories in this organization, please follow these steps: + +1. Fork the repository you want to contribute to. +2. Create a new branch for your feature or bug fix. +3. Make your changes and commit them with conventional commit messages. +4. Push your branch to your forked repository. +5. Open a pull request in the original repository and describe your changes. + +## Issues and Support + +If you encounter any issues or have questions regarding the course or any of the repositories, please feel free to open an issue in the respective repository. Our team will be happy to assist you. + +## Changelog + +All notable changes to this project are documented in the [CHANGELOG.md](./CHANGELOG.md) file. + +## Find us on + +[hevs.ch](https://synd.hevs.io)  ·  +LinkedIn [HEI-Vs](https://www.linkedin.com/showcase/school-of-engineering-valais-wallis/)  ·  +LinkedIn [HES-SO Valais-Wallis](https://www.linkedin.com/groups/104343/)  ·  +Youtube [HES-SO Valais-Wallis](https://www.youtube.com/user/HESSOVS) +Twitter [@hessovalais](https://twitter.com/hessovalais)  ·  +Facebook [@hessovalais](https://www.facebook.com/hessovalais)  ·  diff --git a/packages/preview/hei-synd-report/0.1.1/cliff.toml b/packages/preview/hei-synd-report/0.1.1/cliff.toml new file mode 100644 index 000000000..816055571 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/cliff.toml @@ -0,0 +1,85 @@ +# git-cliff ~ configuration file +# https://git-cliff.org/docs/configuration + +[changelog] +# template for the changelog header +header = """ +# Changelog\n +All notable changes to this project will be documented in this file.\n +""" +# template for the changelog body +body = """ +{% if version %}\ + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} +{% else %}\ + ## [unreleased] +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | striptags | trim | upper_first }} + {% for commit in commits %} + - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ + {% if commit.breaking %}[**breaking**] {% endif %}\ + {{ commit.message | upper_first }}\ + {% endfor %} +{% endfor %}\n +""" +# template for the changelog footer +footer = """ + +""" +# remove the leading and trailing s +trim = true +# postprocessors +postprocessors = [ + { pattern = '', replace = "https://github.com/tschinz/tschinz.github.io" }, # replace repository URL +] +# render body even when there are no releases to process +# render_always = true +# output file path +output = "CHANGELOG.md" + +[git] +# parse the commits based on https://www.conventionalcommits.org +conventional_commits = true +# filter out the commits that are not conventional +filter_unconventional = false +# process each line of a commit as an individual commit +split_commits = true +# regex for preprocessing the commit messages +commit_preprocessors = [ + # Replace issue numbers + #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))"}, + # Check spelling of the commit with https://github.com/crate-ci/typos + # If the spelling is incorrect, it will be automatically fixed. + #{ pattern = '.*', replace_command = 'typos --write-changes -' }, +] +# regex for parsing and grouping commits +commit_parsers = [ + { message = "^feat", group = "🚀 Features" }, + { message = "^fix", group = "🐛 Bug Fixes" }, + { message = "^doc", group = "📚 Documentation" }, + { message = "^docs", group = "📚 Documentation" }, + { message = "^perf", group = "⚡ Performance" }, + { message = "^refactor", group = "🚜 Refactor" }, + { message = "^style", group = "🎨 Styling" }, + { message = "^test", group = "🧪 Testing" }, + { message = "^chore\\(release\\): prepare for", skip = true }, + { message = "^chore\\(deps.*\\)", skip = true }, + { message = "^chore\\(pr\\)", skip = true }, + { message = "^chore\\(pull\\)", skip = true }, + { message = "^chore|^ci", group = "⚙️ Miscellaneous Tasks" }, + { message = "^chores\\(release\\): prepare for", skip = true }, + { message = "^chores\\(deps.*\\)", skip = true }, + { message = "^chores\\(pr\\)", skip = true }, + { message = "^chores\\(pull\\)", skip = true }, + { message = "^chores|^ci", group = "⚙️ Miscellaneous Tasks" }, + { body = ".*security", group = "🛡️ Security" }, + { message = "^revert", group = "◀️ Revert" }, + { message = ".*", group = "💼 Other" }, +] +# filter out the commits that are not matched by commit parsers +filter_commits = false +# sort the tags topologically +topo_order = false +# sort the commits inside sections by oldest/newest order +sort_commits = "oldest" diff --git a/packages/preview/hei-synd-report/0.1.1/lib/boxes.typ b/packages/preview/hei-synd-report/0.1.1/lib/boxes.typ new file mode 100644 index 000000000..48eb8316f --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/boxes.typ @@ -0,0 +1,287 @@ +// +// Description: Creating nice looking information boxes with different logos +// Author : Silvan Zahno +// +#import "constants.typ": * + +//------------------------------------- +// Option Style +// +#let option-style( + type: none, + size: small, + style: "italic", + fill: gray-40, + body) = {[ + #if type == none { + text(size:size, style:style, fill:fill)[#body] + } else { + if type == "draft" {text(size:size, style:style, fill:fill)[#body]} + } +]} + +//------------------------------------- +// Todo Box +// +#let todo(body) = [ + #let rblock = block.with(stroke: red, radius: 0.5em, fill: red.lighten(80%)) + #let top-left = place.with(top + left, dx: 1em, dy: -0.35em) + #block(inset: (top: 0.35em), { + rblock(width: 100%, inset: 1em, body) + top-left(rblock(fill: white, outset: 0.25em, text(fill: red)[*TODO*])) + }) + +] + +//------------------------------------- +// Icon Boxes +// +#let iconbox( + width: 100%, + radius: 4pt, + border: 4pt, + inset: 10pt, + outset: -10pt, + linecolor: code-border, + icon: none, + iconheight: 1cm, + body +) = { + if body != none { + align(left, + rect( + stroke: (left:linecolor+border, rest:code-border+0.1pt), + radius: (left:0pt, right:radius), + fill: code-bg, + outset: (left:outset, right:outset), + inset: (left:inset*2, top:inset, right:inset*2, bottom:inset), + width: width)[ + #if icon != none { + align(left, + table( + stroke:none, + align:left+horizon, + columns: (auto,auto), + image(icon, height:iconheight), [#body] + ) + ) + } else { + body + } + ] + ) + } +} + +#let infobox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-info, + icon: icon-info, + )[#body] +} + +#let warningbox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-warning, + icon: icon-warning, + )[#body] +} + +#let ideabox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-idea, + icon: icon-idea + )[#body] +} + +#let firebox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-fire, + icon: icon-fire, + )[#body] +} + +#let importantbox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-important, + icon: icon-important, + )[#body] +} + +#let rocketbox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-rocket, + icon: icon-rocket, + )[#body] +} + +#let todobox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-todo, + icon: icon-todo, + )[#body] +} + +// Creating nice looking information boxes with different headings +#let colorbox( + title: "title", + color: color-todo, + stroke: 0.5pt, + radius: 4pt, + width: auto, + body +) = { + let strokeColor = color + let backgroundColor = color.lighten(50%) + + return box( + fill: backgroundColor, + stroke: stroke + strokeColor, + radius: radius, + width: width + )[ + #block( + fill: strokeColor, + inset: 8pt, + radius: (top-left: radius, bottom-right: radius), + )[ + #text(fill: white, weight: "bold")[#title] + ] + #block( + width: 100%, + inset: (x: 8pt, bottom: 8pt) + )[ + #body + ] + ] +} + +#let slanted-background( + color: black, body) = { + set text(fill: white, weight: "bold") + context { + let size = measure(body) + let inset = 8pt + [#block()[ + #polygon( + fill: color, + (0pt, 0pt), + (0pt, size.height + (2*inset)), + (size.width + (2*inset), size.height + (2*inset)), + (size.width + (2*inset) + 6pt, 0cm) + ) + #place(center + top, dy: size.height, dx: -3pt)[#body] + ]] + } +} + +#let slanted-colorbox( + title: "title", + color: color-todo, + stroke: 0.5pt, + radius: 4pt, + width: auto, + body +) = { + let strokeColor = color + let backgroundColor = color.lighten(50%) + + return box( + fill: backgroundColor, + stroke: stroke + strokeColor, + radius: radius, + width: width + )[ + #slanted-background(color: strokeColor)[#title] + #block( + width: 100%, + inset: (top: -2pt, x: 10pt, bottom: 10pt) + )[ + #body + ] + ] +} diff --git a/packages/preview/hei-synd-report/0.1.1/lib/constants.typ b/packages/preview/hei-synd-report/0.1.1/lib/constants.typ new file mode 100644 index 000000000..f2c2c90a0 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/constants.typ @@ -0,0 +1,75 @@ +// +// Description: Commonly used constants in the templates +// Author : Silvan Zahno +// +// Fontsizes +#let tinyer = 6pt +#let tiny = 8pt +#let smaller = 9pt +#let small = 10pt +#let normal = 11pt +#let large = 14pt +#let larger = 16pt +#let huge = 24pt +#let huger = 36pt + +// fontsize+ +#let tinyer-p = tinyer+5pt +#let tiny-p = tiny+5pt +#let smaller-p = smaller+5pt +#let small-p = small+5pt +#let normal-p = normal+5pt +#let large-p = large+5pt +#let larger-p = larger+5pt +#let huge-p = huge+5pt +#let huger-p = huger+5pt + +// fontsizes++ +#let tinyer-pp = tinyer+10pt +#let tiny-pp = tiny+10pt +#let smaller-pp = smaller+10pt +#let small-pp = small+10pt +#let normal-pp = normal+10pt +#let large-pp = large+10pt +#let larger-pp = larger+10pt +#let huge-pp = huge+10pt +#let huger-pp = huger+10pt + +// Colors +#let box-border = rgb("#252525") +#let code-bg = rgb("#F5F5F5") +#let code-border = rgb("#F5F5F5").darken(10%) +#let gray-80 = rgb("#000000").lighten(20%) +#let gray-70 = rgb("#000000").lighten(30%) +#let gray-60 = rgb("#000000").lighten(40%) +#let gray-50 = rgb("#000000").lighten(50%) +#let gray-40 = rgb("#000000").lighten(60%) +#let gray-30 = rgb("#000000").lighten(70%) +#let gray-20 = rgb("#000000").lighten(80%) +#let gray-10 = rgb("#000000").lighten(90%) +#let hei-orange = rgb("#eb6a28").darken(20%) +#let hei-blue = rgb("#0095d8").darken(20%) +#let hei-pink = rgb("#da0066").darken(20%) +#let hei-yellow = rgb("#f5c400").darken(20%) +#let hei-green = rgb("#00925a").darken(20%) +#let spl-green = rgb("#bed600").darken(20%) +#let spl-blue = rgb("#00a9e0").darken(20%) +#let spl-pink = rgb("#da0066").darken(20%) +#let color-info = rgb("#5b75a0ff") +#let color-idea = rgb("#ffe082ff") +#let color-warning = rgb("#ffce31ff") +#let color-important = rgb("#f44336ff") +#let color-fire = rgb("#fc9502ff") +#let color-rocket = rgb("#bc5fd3ff") +#let color-todo = rgb("#F5F5F5").darken(10%) + +// Resources +#let img-folder = "img/" +#let resources-folder = "/resources/" +#let icon-fire = img-folder + "fire.svg" +#let icon-idea = img-folder + "idea.svg" +#let icon-important = img-folder + "important.svg" +#let icon-info = img-folder + "info.svg" +#let icon-rocket = img-folder + "rocket.svg" +#let icon-todo = img-folder + "todo.svg" +#let icon-warning = img-folder + "warning.svg" diff --git a/packages/preview/hei-synd-report/0.1.1/lib/helpers.typ b/packages/preview/hei-synd-report/0.1.1/lib/helpers.typ new file mode 100644 index 000000000..a5e6eadd4 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/helpers.typ @@ -0,0 +1,394 @@ +// +// Description: Import other modules so you only need to import the helpers +// Use : #import "/00-templates/helpers.typ": * +// Author : Silvan Zahno +// +#import "boxes.typ": * +#import "constants.typ": * + +// External Plugins +// Fancy pretty print with line numbers and stuff +#import "@preview/codelst:2.0.2": sourcecode +// Glossarium for glossary +#import "@preview/glossarium:0.5.3": * +// Wordometer for word and character count +#import "@preview/wordometer:0.1.4": word-count + +//------------------------------------- +// Internationalization +// +#let langs = json("i18n.json") +#let i18n( + key, + lang: "en", + extra-i18n: none) = { + if type(extra-i18n) == dictionary { + for (lng, keys) in extra-i18n { + if not lng in langs { + langs.insert(lng, (:)) + } + langs.at(lng) += keys + } + } + if not lang in langs { + lang = "en" + } + let keys = langs.at(lang) + assert( + key in keys, + message: "I18n key " + str(key) + " doesn't exist" + ) + return keys.at(key) +} + +#let get-supplement( + it +) = { + let f = it.func() + if (f == image) { + i18n("figure-name") + } else if (f == table) { + i18n("table-name") + } else if (f == raw) { + i18n("listing-name") + } else if (f == math.equation) { + i18n("equation-name") + } else { + auto + } + } +//------------------------------------- +// Reference helper function +// +#let myref(label) = locate(loc =>{ + if query(label,loc).len() != 0 { + ref(label) + } else { + text(fill: red)[?] + } +}) + +//------------------------------------- +// Specifications +// +#let full-page(path) = { + set page(margin: ( + top: 0cm, + bottom: 0cm, + x: 0cm, + )) + + if path != none { + image(path, width: 100%) + } else { + table( + columns: (100%), + rows: (100%), + stroke: none, + align: center+horizon, + [ + #rotate( + -45deg, + origin: center+horizon, + )[ + #text(fill: red, size: huger)[ + No page found + ] + ] + ] + ) + } +} + +//------------------------------------- +// Table of content +// +#let toc( + tableof: ( + toc: true, + tof: false, + tot: false, + tol: false, + toe: false, + maxdepth: 3, + ), + titles: ( + toc: i18n("toc-title"), + tof: i18n("tof-title"), + tot: i18n("tot-title"), + tol: i18n("tol-title"), + toe: i18n("toe-title"), + ), + before: none, + indent: auto, +) = { + // Table of content + if tableof.toc == true { + if before != none { + outline( + title: titles.toc, + target: selector(heading).before(before, inclusive: true), + indent: indent, + depth: tableof.maxdepth, + ) + } else { + outline( + title: titles.toc, + indent: indent, + depth: tableof.maxdepth, + ) + } + } + + // Table of figures + if tableof.tof == true { + outline( + title: titles.tof, + target: figure.where(kind: image), + indent: indent, + depth: tableof.maxdepth, + ) + } + + // Table of tables + if tableof.tot == true { + outline( + title: titles.tot, + target: figure.where(kind: table), + indent: indent, + depth: tableof.maxdepth, + ) + } + + // Table of listings + if tableof.tol == true { + outline( + title: titles.tol, + target: figure.where(kind: raw), + indent: indent, + depth: tableof.maxdepth, + ) + } + + // Table of equation + if tableof.toe == true { + outline( + title: titles.toe, + target: math.equation.where(block:true), + indent: indent, + depth: tableof.maxdepth, + ) + } +} + +#let minitoc( + after: none, + before: none, + addline: true, + stroke: 0.5pt, + length: 100%, + depth: 3, + title: i18n("toc-title"), + indent: auto, +) = { + v(2em) + text(large, weight: "bold", title) + if addline == true { + line(length:length, stroke:stroke) + } + let h = selector(heading.where(level: 2)) + .or(heading.where(level: 3)) + .or(heading.where(level: 4)) + .or(heading.where(level: 5)) + .or(heading.where(level: 6)) + .or(heading.where(level: 7)) + .or(heading.where(level: 8)) + .or(heading.where(level: 9)) + .or(heading.where(level: 10)) + outline( + title: none, + target: selector(h) + .after(after) + .before(before, inclusive: false), + depth: depth, + indent: indent, + ) + if addline == true { + line(length:length, stroke:stroke) + } +} + +//-------------------------------------- +// Heading shift +// +// #unshift-prefix[Prefix][Body] +#let unshift-prefix(prefix, content) = context { + pad(left: -measure(prefix).width, prefix + content) +} + +//------------------------------------- +// Research +// +// item, item, item and item List +// +#let enumerating-authors( + items: none, + multiline: false, +) = { + let i = 1 + if items != none { + for item in items { + if item != none { + if "name" in item { + if i > 1 { + if multiline == true { + if items.len() > 2 { + [\ ] + } else { + [, ] + } + } else { + [, ] + } + } + i = i + 1 + if "institute" in item{ + [#item.name#super(repr(item.institute))] + } else { + [#item.name] + } + } + } + } + } +} + +#let enumerating-institutes( + items: none, +) = { + let i = 1 + if items != none { + for item in items { + if item != none { + [_#super(repr(i))_ #if item.research_group != none { [_ #item.research_group - _]} _ #item.name __, #item.address _ \ ] + i = i + 1 + } + } + } +} + +//------------------------------------- +// Script +// +// item, item, item and item List +// +#let enumerating-items( + items: none, + bold: false, + italic: false, +) = { + let i = 1 + if items != none { + for item in items { + if item != none { + if bold == true and italic == true { + [#text(style: "italic")[*#item*]] + } else if bold == true { + [*#item*] + } else if italic == true { + [#text(style: "italic")[#item]] + } else { + [#item] + } + if i < items.len() { + [, ] + } + } + i = i + 1 + } + } +} +#let enumerating-links( + names: none, + links: none, +) = { + if names != none { + let i = 0 + for name in names { + if name != none { + [#link(links.at(i))[#name]] + if i+1 < names.len() { + [, ] + } + } + i = i + 1 + } + } +} +#let enumerating-emails( + names: none, + emails: none, +) = { + if names != none { + let i = 0 + for name in names { + if name != none { + [#link("mailto:"+emails.at(i))[#name]] + if i+1 < names.len() { + [, ] + } + } + i = i + 1 + } + } +} + +//------------------------------------- +// safe-link +// +#let safe-link( + name: none, + url: none, +) = { + if name != none { + if url != none { + link(url)[#name] + } else { + name + } + } else { + if url != none { + link(url)[#url] + } else { + none + } + } +} + +//------------------------------------- +// Chapter +// +#let add-chapter( + file: none, + heading-offset: 0, + after: none, + before: none, + pb: false, + minitoc-title: i18n("toc-title"), + body +) = [ + #if (after != none and before != none) { + minitoc(title: minitoc-title, after:after, before:before, indent: auto) + if pb { + pagebreak() + } + } + #set heading(offset: heading-offset) + + #if (file != none) { + include file + } else { + body + } + #set heading(offset: 0) +] diff --git a/packages/preview/hei-synd-report/0.1.1/lib/i18n.json b/packages/preview/hei-synd-report/0.1.1/lib/i18n.json new file mode 100644 index 000000000..6ac363ead --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/i18n.json @@ -0,0 +1,45 @@ +{ + "en": { + "toc-title": "Contents", + "tof-title": "Figures", + "tot-title": "Tables", + "tol-title": "Listings", + "toe-title": "Equations", + "bib-title": "Bibliography", + "gloss-title": "Glossary", + "appendix-title": "Appendix", + "figure-name": "Figure", + "table-name": "Table", + "listing-name": "Listing", + "equation-name": "Equation" + }, + "fr": { + "toc-title": "Contenu", + "tof-title": "Figures", + "tol-title": "Listings", + "tot-title": "Tableaux", + "toe-title": "Équations", + "bib-title": "Bibliographie", + "gloss-title": "Glossaire", + "appendix-title": "Annexes", + "figure-name": "Figure", + "table-name": "Table", + "listing-name": "Listing", + "equation-name": "Équation" + }, + + "de": { + "toc-title": "Inhalt", + "tof-title": "Abbildungen", + "tol-title": "Quelltexte", + "tot-title": "Tabellen", + "toe-title": "Gleichungen", + "bib-title": "Literatur", + "gloss-title": "Glossar", + "appendix-title": "Anhang", + "figure-name": "Abbildung", + "table-name": "Tabelle", + "listing-name": "Listing", + "equation-name": "Gleichung" + } +} diff --git a/packages/preview/hei-synd-report/0.1.1/lib/img/fire.svg b/packages/preview/hei-synd-report/0.1.1/lib/img/fire.svg new file mode 100644 index 000000000..4e1da2dd1 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/img/fire.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-report/0.1.1/lib/img/idea.svg b/packages/preview/hei-synd-report/0.1.1/lib/img/idea.svg new file mode 100644 index 000000000..5a147a86c --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/img/idea.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/preview/hei-synd-report/0.1.1/lib/img/important.svg b/packages/preview/hei-synd-report/0.1.1/lib/img/important.svg new file mode 100644 index 000000000..a130adbbb --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/img/important.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-report/0.1.1/lib/img/info.svg b/packages/preview/hei-synd-report/0.1.1/lib/img/info.svg new file mode 100644 index 000000000..67e33eff0 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/img/info.svg @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/packages/preview/hei-synd-report/0.1.1/lib/img/rocket.svg b/packages/preview/hei-synd-report/0.1.1/lib/img/rocket.svg new file mode 100644 index 000000000..ed4734ee3 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/img/rocket.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/preview/hei-synd-report/0.1.1/lib/img/todo.svg b/packages/preview/hei-synd-report/0.1.1/lib/img/todo.svg new file mode 100644 index 000000000..56f3bdb0c --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/img/todo.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-report/0.1.1/lib/img/warning.svg b/packages/preview/hei-synd-report/0.1.1/lib/img/warning.svg new file mode 100644 index 000000000..15f3e0ff3 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/img/warning.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-report/0.1.1/lib/pages-report.typ b/packages/preview/hei-synd-report/0.1.1/lib/pages-report.typ new file mode 100644 index 000000000..2e26a24ca --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/pages-report.typ @@ -0,0 +1,104 @@ +// +// Description: Title page for the script template +// Author : Silvan Zahno +// +#import "helpers.typ": * + +#let page-title-report( + type: none, + doc: ( + title : none, + abbr : none, + subtitle : none, + url : none, + logos: ( + tp_topleft : none, + tp_topright : none, + tp_main : none, + header : none, + ), + authors: ( + ( + name : none, + abbr : none, + email : none, + url : none, + ), + ), + school: ( + name : none, + major : none, + orientation : none, + url : none, + ), + course: ( + name : none, + url : none, + prof : none, + class : none, + semester : none, + ), + keywords : ("Typst", "Template", "Report"), + version : "v0.1.0", + ), + date: datetime.today(), +) = { + table( + columns: (50%, 50%), + stroke:none, + align:(left, right), + [ + #if doc.logos.tp_topleft != none { + [#doc.logos.tp_topleft] + } + ], + [ + #if doc.logos.tp_topright != none { + [#doc.logos.tp_topright] + } + ], + ) + v(2fr) + if doc.title != none { + align(center, text(size:huge, [*#doc.title*] )) + v(0.5em) + } + if doc.subtitle != none { + align(center, text(size:larger, [_ #doc.subtitle _] )) + v(2em) + } + + if doc.logos.tp_main != none { + align(center, [#doc.logos.tp_main]) + v(2em) + } + + v(1fr) + + set text(normal) + if doc.school.name != none or doc.school.url != none {[*#safe-link(url:doc.school.url, name:doc.school.name)* \ ]} + if doc.school.major != none {[#safe-link(url:doc.school.url, name:doc.school.major)]} + if ((doc.school.major != none and doc.school.orientation != none) or doc.school.url != none) {" - "} + if doc.school.orientation != none or doc.school.url!= none {[#safe-link(url:doc.school.url, name:doc.school.orientation)]} + if (doc.school.major != none or doc.school.orientation != none) {[\ ]} + + if doc.course.name != none or doc.course.url != none {[#safe-link(url:doc.course.url, name:doc.course.name)]} + if ((doc.course.name != none and doc.course.prof != none) or doc.course.url != none) {" - "} + if doc.course.prof != none or doc.course.url != none {[#safe-link(url:doc.course.url, name:doc.course.prof)]} + if (doc.course.prof != none or doc.course.url != none) {[\ ]} + + if doc.course.semester != none {[#doc.course.semester]} + if (doc.course.semester != none and doc.course.class != none) {" - "} + if doc.course.class != none {[#doc.course.class]} + if (doc.course.semester != none or doc.course.class != none) {[\ ]} + + line(length: 100%, stroke: 0.5pt) + + set text(large) + if doc.authors.first().name != none {[*#enumerating-emails(names:doc.authors.map(a => a.name), emails:doc.authors.map(a => a.email))*\ ]} + + if date != none {[#date.display("[day].[month].[year]") - ]} + if doc.version != none {[#doc.version]} + if (doc.version != none and type != none) {" - "} + if type != none {[#type]} +} diff --git a/packages/preview/hei-synd-report/0.1.1/lib/template-report.typ b/packages/preview/hei-synd-report/0.1.1/lib/template-report.typ new file mode 100644 index 000000000..021c8b616 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/lib/template-report.typ @@ -0,0 +1,249 @@ +// +// Description: Report Typst Template +// Author : Silvan Zahno +// +#import "helpers.typ": * +#import "pages-report.typ": * + +#let report( + option: ( + lang: "en", + type: "draft" + ), + doc: ( + title : none, + abbr : none, + subtitle : none, + url : none, + logos: ( + tp_top : none, + tp_bottom : none, + tp_main : none, + header : none, + ), + authors: ( + ( + name : none, + abbr : none, + email : none, + url : none, + ), + ), + school: ( + name : none, + major : none, + orientation : none, + url : none, + ), + course: ( + name : none, + url : none, + prof : none, + class : none, + semester : none, + ), + keywords : ("Typst", "Template", "Report"), + version : "v0.1.0", + ), + date: datetime.today(), + tableof : ( + toc: true, + tof: false, + tot: false, + tol: false, + toe: false, + maxdepth: 3, + ), + body) = { + // Sanitize inputs + doc.title = doc.at("title", default: none) + doc.abbr = doc.at("abbr", default: none) + doc.subtitle = doc.at("subtitle", default: none) + doc.url = doc.at("url", default: none) + doc.logos = if doc.at("logos", default: none) == none { + ( + tp_topleft : none, + tp_topright : none, + tp_main : none, + header : none, + ) + } else { + doc.logos + } + doc.logos.tp_topleft = doc.logos.at("tp_topleft", default: none) + doc.logos.tp_topright = doc.logos.at("tp_topright", default: none) + doc.logos.tp_main = doc.logos.at("tp_main", default: none) + doc.logos.header = doc.logos.at("header", default: none) + doc.authors = if doc.at("authors", default: none) == none { + ( + ( + name : none, + abbr : none, + email : none, + url : none, + ), + ) + } else { + doc.authors + } + for a in doc.authors { + a.name = a.at("name", default: none) + a.abbr = a.at("abbr", default: none) + a.email = a.at("email", default: none) + a.url = a.at("url", default: none) + } + doc.school = if doc.at("school", default: none) == none { + ( + name : none, + major : none, + orientation : none, + url : none, + ) + } else { + doc.school + } + doc.school.name = doc.school.at("name", default: none) + doc.school.major = doc.school.at("major", default: none) + doc.school.orientation = doc.school.at("orientation", default: none) + doc.school.url = doc.school.at("url", default: none) + + doc.course = doc.at("course", default: none) + doc.course = if doc.at("course", default: none) == none { + ( + name : none, + url : none, + prof : none, + class : none, + semester : none, + ) + } else { + doc.course + } + doc.course.name = doc.course.at("name", default: none) + doc.course.url = doc.course.at("url", default: none) + doc.course.prof = doc.course.at("prof", default: none) + doc.course.class = doc.course.at("class", default: none) + doc.course.semester = doc.course.at("semester", default: none) + doc.keywords = doc.at("keywords", default: ("Typst", "Template", "Report")) + doc.version = doc.at("version", default: none) + + // basic properties + set document(author: doc.authors.map(a => if a.name != none {a.name} else {""}), title: doc.title, keywords: doc.keywords, date: date) + set page(margin: (top:3cm, bottom:3cm, left:3cm, right:2.5cm)) + + // header and footer + set page( + header: context(if here().page() >=2 [ + #set text(small) + #table( + columns: (80%, 20%), + stroke: none, + inset: -0.5em, + align: (x, y) => (left+bottom, right+top).at(x), + [#if doc.abbr != none {[#smallcaps(doc.abbr)]} #if doc.abbr != none and doc.title != none {[/]} #if doc.title != none {smallcaps(doc.title)}], + [#v(1.2cm)#doc.logos.header] + ) + #if doc.logos.header != none {[ + #line(start: (-0.5em, 0cm), length: 85%, stroke: 0.5pt) + ]} else {[ + #line(start: (-0.5em, 0cm), length: 100%, stroke: 0.5pt) + ]} + ]), + footer: context( if here().page() >=2 [ + #set text(small) + #line(start: (85%, 0cm), length: 15%, stroke: 0.5pt) + #enumerating-emails(names:doc.authors.map(a => a.abbr), emails:doc.authors.map(a => a.email)) #if doc.authors.first().abbr != none {[/]} #date.display("[year]") #h(1fr) #context counter(page).display("1 / 1", both: true) + ]), + ) + + // font & language + set text( + font: ( + "Libertinus Serif", + "Fira Sans", + ), + fallback: true, + lang: option.lang + ) + + // heading + show heading: set block(above: 1.2em, below: 1.2em) + set heading(numbering: "1.1") + + show heading.where(level: 1): (it) => { + set text(size: huge) + set block(above: 1.2em, below: 1.2em) + if it.numbering != none { + let num = numbering(it.numbering, ..counter(heading).at(it.location())) + let prefix = num + h(0.5em) + text(code-border)[|] + h(0.5em) + unshift-prefix(prefix, it.body) + } else { + it + } + } + + show heading.where(level: 2): (it) => { + if it.numbering != none { + let num = numbering(it.numbering, ..counter(heading).at(it.location())) + unshift-prefix(num + h(0.8em), it.body) + } + } + + // link color + //show link: it => text(fill:blue, underline(it)) + //show link: it => text(fill:hei-blue, it) + show link: it => text(fill:gray-80, it) + + show raw.where(block: false): set text(weight: "semibold") + //show raw.where(block: false): it => { + // highlight( + // fill:code-bg, + // top-edge: "ascender", + // bottom-edge: "bounds", + // extent:1pt, it) + //} + show raw.where(block: true): set text(size: tiny) + show raw.where(block: true): it => { + block( + fill: code-bg, + width:100%, + inset: 10pt, + radius: 4pt, + stroke: 0.1pt + code-border, + it, + ) + } + + // Captions + set figure(numbering: "1", supplement: get-supplement) + set figure.caption(separator: " - ") // With a nice separator + set math.equation(numbering: "(1)", supplement: i18n("equation-name")) + + show: word-count + + // Title page + page-title-report( + type:option.type, + doc: doc, + date: date, + ) + + pagebreak() + // Table of content + toc( + tableof: tableof, + titles: ( + toc: i18n("toc-title"), + tot: i18n("tot-title"), + tof: i18n("tof-title"), + tol: i18n("tol-title"), + toe: i18n("toe-title"), + ), + before: + ) + + // Main body + set par(justify: true) + + body +} diff --git a/packages/preview/hei-synd-report/0.1.1/template/main/01-intro.typ b/packages/preview/hei-synd-report/0.1.1/template/main/01-intro.typ new file mode 100644 index 000000000..d761d6a53 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/main/01-intro.typ @@ -0,0 +1,140 @@ +#import "@preview/hei-synd-report:0.1.1": * +#import "/metadata.typ": * +#pagebreak() + += Introduction + +#option-style(type:option.type)[ + This chapter provides an overview of the project, including its background, motivation, and objectives. It should clearly state the problem being addressed and why it is relevant. + + Key elements: + - *Introduce the goal* – What do you want to achieve with the project? + - *Provide context* – Why is this project relevant? What problem does it solve? + - *Define the scope* – What are the boundaries and limitations of your project? + - *Outline the structure* – How is this report organized? + + Always place yourself in the point of view of the reader. For who is the report intended? What do they need to know to understand the project? Create and follow a red thread that guides the reader through the report. +] + +#infobox()[Welcome to the template’s introductory chapter! Instead of boring you with lorem ipsum, here’s a quick guide to what you can do in Typst and, more specifically, in this template. + + Need more? Check out the #link("https://github.com/hei-templates/hei-synd-report/blob/main/guide-to-typst.pdf")[Guide to Typst].] + +== Basic markup + +Typst lets you create bold, italic, or monospaced text with ease. You can also sprinkle in equations like $e^(i pi) + 1 = 0$ or even inline code like #raw(lang:"rust", "fn main() { println!(\"Hello, World!\") }"). And because life is better in color: #text(fill:hei-pink)[pink], #text(fill:hei-blue)[blue], #text(fill:hei-yellow)[yellow], #text(fill:hei-orange)[orange], #text(fill:hei-green)[green], and more! #text(fill:color-fire)[Boldly colorize!] + +You can also write numbered or unnumbered lists: +- First item +- Second item + + First Subitem + + Second Subitem +- Third item + +Need equations? Sure! They look great as blocks too: + +#figure( + [$ sin(x) = x - x^3/(3!) + x^5/(5!) - ... = sum_(n=0)^infinity (-1)^n/((2n+1)!)x^(2n+1) $] +) + +== Images + +As they say, a picture is worth a thousand words. Let’s add one: + +#figure( + image("/resources/img/project-logo.svg", width:3cm), + caption: "Project logo" +) + +== Tables + +Tables are great for organizing data. From simple to complex, Typst handles them all: + +#figure( + table( + columns: 3, + stroke:none, + align:(left+horizon), + table.header([*Name*], [*Age*], [*City*]), + [Albert Einstein], [25], [Bern], + [Marie Curie], [22], [Paris], + [Isaac Newton], [30], [London], + ), + caption: "Simple table" +) + +#figure( + table( + columns: 8, + stroke: none, + align: center, + inset: 3pt, + table.vline(x:0, start:1, end:2, stroke:0.5pt), + table.vline(x:1, start:1, end:2, stroke:0.5pt), + table.vline(x:2, start:1, end:2, stroke:0.5pt), + table.vline(x:3, start:1, end:2, stroke:0.5pt), + table.vline(x:4, start:1, end:2, stroke:0.5pt), + table.vline(x:5, start:1, end:2, stroke:0.5pt), + table.vline(x:6, start:1, end:2, stroke:0.5pt), + table.vline(x:7, start:1, end:2, stroke:0.5pt), + table.vline(x:8, start:1, end:2, stroke:0.5pt), + [\[31:27\]], [], [], [\[24:20\]], [\[19:15\]], [\[14:12\]], [\[11:7\]], [\[6:0\]], table.hline(stroke:0.5pt), + [funct5], [aq], [rl], [rs2], [rs1], [funct3], [rd], [opcode], table.hline(stroke:0.5pt), + [#align(center)[5]], [], [], [#align(center)[5]], [#align(center)[5]], [#align(center)[3]], [#align(center)[5]], [#align(center)[7]], + ), + caption: [Complex table] +) + +== Boxes + +Highlight key points with these fun boxes (and more): + +#table( + columns: 2, + stroke: none, + [ #infobox()[Infobox: For highlighting information.] ], + [ #ideabox()[Ideabox: Share a brilliant idea.] ], + [ #warningbox()[Warningbox: Proceed with caution!] ], + [ #firebox()[Firebox: This is 🔥!] ], + [ #rocketbox()[Rocketbox: Shoot for the moon!] ], + [ #todobox()[Todobox: Just do it!] ], + ) + +== Citations, Acronyms and Glossary + +Add citations with `@` like @zahnoDynamicProjectPlanning2023 (stored in `/tail/bibliography.bib`). + +Acronym terms like #gls("it") expand on first use and abbreviate after #gls("it"). Glossary items such as #gls("rust") can also be used to show their description as such: #gls-description("rust"). Acronyms and glossary entries auto-generate at the document’s end (defined in `/tail/glossary.typ`). + +#pagebreak() + +== Code + +Besides writing inline code as such #raw(lang:"rust", "fn main() { println!(\"Hello World\") }") you can also write code blocks like this: + +#figure( + sourcecode()[ + ```rust +fn main() { + let ship = Starship::new("USS Rustacean", (0.0, 0.0, 0.0)); + let destination = (42.0, 13.0, 7.0); + let warp = ship.optimal_warp(ship.distance_to(destination)); + + println!("🖖 {} traveling to {:?} at Warp {:.2}", ship.name, destination, warp); + if warp <= 9.0 { + println!("✨ Warp engaged!"); + } else { + println!("⚠️ Warp failed!"); + } +} +```], + caption:"First part of the USS-Rustacean code", +) +or directly from a file +#let code_sample = read("/resources/code/uss-rustacean.rs") +#figure( + sourcecode()[ + #raw(code_sample, lang: "rust") + ], +caption: [Second part of the USS-Rustacean code from `/resources/code/uss-rustacean.rs`] +) diff --git a/packages/preview/hei-synd-report/0.1.1/template/main/02-specification.typ b/packages/preview/hei-synd-report/0.1.1/template/main/02-specification.typ new file mode 100644 index 000000000..bfb0c4f7f --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/main/02-specification.typ @@ -0,0 +1,17 @@ +#import "@preview/hei-synd-report:0.1.1": * +#import "/metadata.typ": * +#pagebreak() + += Analysis + +#option-style(type:option.type)[ + This chapter defines the project requirements and presents the theoretical background. If applicable, it should also include a *State of the art* review to compare existing solutions and justify the chosen approach. + + Key elements: + - *Define the requirements* – What must the system/process be able to do? + - *Describe the architecture* – What are the key components of the solution? + - *Review existing solutions* – What approaches already exist? How does yours compare? + - *Explain design choices* – Why did you choose this approach? What alternatives were considered? +] + +#lorem(200) diff --git a/packages/preview/hei-synd-report/0.1.1/template/main/03-design.typ b/packages/preview/hei-synd-report/0.1.1/template/main/03-design.typ new file mode 100644 index 000000000..e56066746 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/main/03-design.typ @@ -0,0 +1,19 @@ +#import "@preview/hei-synd-report:0.1.1": * +#import "/metadata.typ": * +#pagebreak() + += Design + +#option-style(type:option.type)[ + This chapter defines the overall system architecture, core components, and interactions between different parts. The goal is to translate the specifications into a concrete, actionable blueprint for development. + + Key elements: + - *Define the architecture* – What are the main components of the system, and how do they interact? + - *Select technologies* – What programming languages, tools, or frameworks will be used? Why? + - *Design data structures* – How will data be organized and processed? + - *Create process flow* – What are the key steps or workflows in the system? + - *Plan modularity & scalability* – How can the design adapt to future needs or extensions? + - *Address constraints* – What design choices were made due to performance, security, or usability considerations? +] + +#lorem(200) diff --git a/packages/preview/hei-synd-report/0.1.1/template/main/04-implementation.typ b/packages/preview/hei-synd-report/0.1.1/template/main/04-implementation.typ new file mode 100644 index 000000000..ebbc98cfc --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/main/04-implementation.typ @@ -0,0 +1,17 @@ +#import "@preview/hei-synd-report:0.1.1": * +#import "/metadata.typ": * +#pagebreak() + += Implementation + +#option-style(type:option.type)[ + This chapter details the development and execution of the project. It describes actual implementation from a top-down or bottom-up approach depending on the project. + + Key elements: + - *Describe the implementation* – How was the project developed? + - *Explain technical decisions* – What tools, frameworks, or methods were used and why? + - *Highlight key components* – What are the most important parts of the implementation? + - *Address challenges* – What difficulties arose, and how were they solved? +] + +#lorem(200) diff --git a/packages/preview/hei-synd-report/0.1.1/template/main/05-validation.typ b/packages/preview/hei-synd-report/0.1.1/template/main/05-validation.typ new file mode 100644 index 000000000..4616f6eba --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/main/05-validation.typ @@ -0,0 +1,17 @@ +#import "@preview/hei-synd-report:0.1.1": * +#import "/metadata.typ": * +#pagebreak() + += Validation + +#option-style(type:option.type)[ + This chapter assesses the correctness and performance of the implementation. It includes testing methods, simulations, and any validation techniques used to ensure the system meets its requirements. + + Key elements: + - *Explain verification methods* – How do you ensure the system functions correctly? + - *Describe validation techniques* – How do you prove that the solution meets its objectives? + - *Present test results* – What experiments, simulations, or benchmarks were conducted? + - *Discuss findings* – What do the results show? Were there unexpected outcomes? +] + +#lorem(200) diff --git a/packages/preview/hei-synd-report/0.1.1/template/main/06-conclusion.typ b/packages/preview/hei-synd-report/0.1.1/template/main/06-conclusion.typ new file mode 100644 index 000000000..92d2a16e7 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/main/06-conclusion.typ @@ -0,0 +1,17 @@ +#import "@preview/hei-synd-report:0.1.1": * +#import "/metadata.typ": * +#pagebreak() + += Conclusion + +#option-style(type:option.type)[ + This final chapter summarizes the project outcomes, comparing them with the initial objectives. It also reflects on encountered difficulties and discusses possible improvements or future developments. + + Key elements: + - *Summarize the results* – What are the key takeaways from the project? + - *Compare with objectives* – Did the project meet its original goals? Why or why not? + - *Reflect on challenges* – What were the biggest difficulties, and what was learned? + - *Discuss future work* – What are possible improvements or next steps? +] + +#lorem(200) diff --git a/packages/preview/hei-synd-report/0.1.1/template/metadata.typ b/packages/preview/hei-synd-report/0.1.1/template/metadata.typ new file mode 100644 index 000000000..d5ab071a1 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/metadata.typ @@ -0,0 +1,97 @@ +//------------------------------------- +// Document options +// +#let option = ( + type : "final", + //type : "draft", + lang : "en", + //lang : "de", + //lang : "fr", +) +//------------------------------------- +// Optional generate titlepage image +// +#import "@preview/fractusist:0.1.1":* // only for the generated images + +#let titlepage_logo= dragon-curve( + 12, + step-size: 10, + stroke-style: stroke( + //paint: gradient.linear(..color.map.rocket, angle: 135deg), + paint: gradient.radial(..color.map.rocket), + thickness: 3pt, join: "round"), + height: 10cm, +) + +//------------------------------------- +// Metadata of the document +// +#let doc= ( + title : [*Report for Systems Engineering*], + abbr : "Prj", + subtitle : [_Typst Template Example_], + url : "https://synd.hevs.io", + logos: ( + tp_topleft : image("resources/img/synd.svg", height: 1.2cm), + tp_topright : image("resources/img/hei.svg", height: 1.5cm), + tp_main : titlepage_logo, + header : image("resources/img/project-logo.svg", width: 2.5cm), + ), + authors: ( + ( + name : "Silvan Zahno", + abbr : "ZaS", + email : "silvan.zahno@hevs.ch", + url : "https://synd.hevs.io", + ), + ( + name : "Axel Amand", + abbr : "AmA", + email : "axel.amand@hevs.ch", + url : "https://synd.hevs.io", + ), + ( + name : "Rémi Heredero", + abbr : "HeR", + email : "remi.heredero@hevs.ch", + url : "https://synd.hevs.io", + ), + ), + school: ( + name : "HES-SO Valais//Wallis", + major : "Systems Engineering", + orientation : "Infotronics", + url : "https://synd.hevs.io", + ), + course: ( + name : "Digital Design", + url : "https://course.hevs.io/did/eda-docs/", + prof : "Silvan Zahno", + class : [S1f$alpha$], + semester : "Fall Semester 2025", + ), + keywords : ("Typst", "Template", "Report", "HEI-Vs", "Systems Engineering", "Infotronics"), + version : "v0.1.0", +) + +#let date= datetime.today() + +//------------------------------------- +// Settings +// +#let tableof = ( + toc: true, + tof: false, + tot: false, + tol: false, + toe: false, + maxdepth: 3, +) + +#let gloss = true +#let appendix = false +#let bib = ( + display : true, + path : "/tail/bibliography.bib", + style : "ieee", //"apa", "chicago-author-date", "chicago-notes", "mla" +) diff --git a/packages/preview/hei-synd-report/0.1.1/template/report-en-draft.pdf b/packages/preview/hei-synd-report/0.1.1/template/report-en-draft.pdf new file mode 100644 index 000000000..88ccbb77c Binary files /dev/null and b/packages/preview/hei-synd-report/0.1.1/template/report-en-draft.pdf differ diff --git a/packages/preview/hei-synd-report/0.1.1/template/report-en-final.pdf b/packages/preview/hei-synd-report/0.1.1/template/report-en-final.pdf new file mode 100644 index 000000000..00db8565f Binary files /dev/null and b/packages/preview/hei-synd-report/0.1.1/template/report-en-final.pdf differ diff --git a/packages/preview/hei-synd-report/0.1.1/template/report.typ b/packages/preview/hei-synd-report/0.1.1/template/report.typ new file mode 100644 index 000000000..1ee21b0b7 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/report.typ @@ -0,0 +1,49 @@ +#import "@preview/hei-synd-report:0.1.1": * +#import "/metadata.typ": * +#import "/tail/bibliography.typ": * +#import "/tail/glossary.typ": * +#show:make-glossary +#register-glossary(entry-list) + +//------------------------------------- +// Template config +// +#show: report.with( + option: option, + doc: doc, + date: date, + tableof: tableof, +) + +//------------------------------------- +// Content +// +#include "/main/01-intro.typ" +#include "/main/02-specification.typ" +#include "/main/03-design.typ" +#include "/main/04-implementation.typ" +#include "/main/05-validation.typ" +#include "/main/06-conclusion.typ" + +#heading(numbering:none, outlined: false)[] + +//------------------------------------- +// Glossary +// +#make_glossary(gloss:gloss, title:i18n("gloss-title")) + +//------------------------------------- +// Bibliography +// +#make_bibliography(bib:bib, title:i18n("bib-title")) + +//------------------------------------- +// Appendix +// +#if appendix == true {[ + #pagebreak() + #counter(heading).update(0) + #set heading(numbering:"A") + = #i18n("appendix-title") + //#include "tail/a-appendix.typ" +]} diff --git a/packages/preview/hei-synd-report/0.1.1/template/resources/code/uss-rustacean.rs b/packages/preview/hei-synd-report/0.1.1/template/resources/code/uss-rustacean.rs new file mode 100644 index 000000000..3ff95f7e8 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/resources/code/uss-rustacean.rs @@ -0,0 +1,22 @@ +struct Starship { + name: String, + position: (f64, f64, f64), +} + +impl Starship { + fn new(name: &str, position: (f64, f64, f64)) -> Self { + Self { + name: name.into(), + position, + } + } + fn distance_to(&self, dest: (f64, f64, f64)) -> f64 { + ((dest.0 - self.position.0).powi(2) + + (dest.1 - self.position.1).powi(2) + + (dest.2 - self.position.2).powi(2)) + .sqrt() + } + fn optimal_warp(&self, distance: f64) -> f64 { + (distance / 10.0).sqrt().min(9.0) + } +} diff --git a/packages/preview/hei-synd-report/0.1.1/template/resources/img/hei.svg b/packages/preview/hei-synd-report/0.1.1/template/resources/img/hei.svg new file mode 100644 index 000000000..5ac783a50 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/resources/img/hei.svg @@ -0,0 +1,172 @@ + +image/svg+xml diff --git a/packages/preview/hei-synd-report/0.1.1/template/resources/img/project-logo.svg b/packages/preview/hei-synd-report/0.1.1/template/resources/img/project-logo.svg new file mode 100644 index 000000000..8c2e34d2b --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/resources/img/project-logo.svg @@ -0,0 +1,2348 @@ + + + + diff --git a/packages/preview/hei-synd-report/0.1.1/template/resources/img/synd.svg b/packages/preview/hei-synd-report/0.1.1/template/resources/img/synd.svg new file mode 100644 index 000000000..a4626abde --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/resources/img/synd.svg @@ -0,0 +1,44 @@ + + + + diff --git a/packages/preview/hei-synd-report/0.1.1/template/tail/bibliography.bib b/packages/preview/hei-synd-report/0.1.1/template/tail/bibliography.bib new file mode 100644 index 000000000..9f04cefe9 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/tail/bibliography.bib @@ -0,0 +1,17 @@ +@article{zahnoDynamicProjectPlanning2023, + title = {Dynamic Project Planning with Digital Twin}, + author = {Zahno, Silvan and Corre, Jérôme and Petrovic, Darko and Mottiez, Gilles and Fracheboud, Loïc and Amand, Axel and Devènes, Steve and Maître, Gilbert and Carrino, Francesco}, + date = {2023-05-09}, + journaltitle = {Frontiers in Manufacturing Technology}, + shortjournal = {Front. Manuf. Technol.}, + volume = {3}, + publisher = {Frontiers}, + issn = {2813-0359}, + doi = {10.3389/fmtec.2023.1009633}, + url = {https://www.frontiersin.org/journals/manufacturing-technology/articles/10.3389/fmtec.2023.1009633/full}, + urldate = {2025-01-08}, + abstract = {{$<$}p{$>$}The digital twin (DT) concept plays a crucial role in Industry 4.0 and the digitalization of manufacturing processes. A DT is a virtual representation of a physical object, system, or process, designed to accurately reflect its real-world counterpart. In manufacturing, existing process data are often incomplete and do not qualify as a DT. However, with the help of specialized communication frameworks and cheaper, easier-to-use sensors, it is possible to integrate the existing manufacturing execution system (MES) and enterprise resource planning (ERP) data with the missing data gathered from the shop floor to create a comprehensive DT. In this paper, we present a digital shop floor decision support system (DSS) for non-linear aluminum manufacturing production. The system is split into five main components: digitization of shop floor orders; merging and sorting of MES, ERP, and shop floor data; custom and genetic optimization algorithms for the aging furnace production step; layout construction mechanism for optimal placement and stacking of orders in the furnace; and a user-friendly graphical user interface (GUI). The system’s performance was evaluated through three tests. The first test measured the efficiency of digitization, the second aimed to quantify time saved in finding packets in the hall, and the last test measured the impact of the optimizer on furnace productivity. The results revealed a 23.5\% improvement in furnace capacity, but limitations were identified due to usability and human intervention.{$<$}/p{$>$}}, + langid = {english}, + keywords = {3D packaging,genetic algorithms,Greed Algorithms (GA),Real-time monitoring,Real-time optimization,shop floor optimization,user-center design}, + file = {/Users/zas/Zotero/storage/XFE2V7Y8/Zahno et al. - 2023 - Dynamic project planning with digital twin.pdf} +} diff --git a/packages/preview/hei-synd-report/0.1.1/template/tail/bibliography.typ b/packages/preview/hei-synd-report/0.1.1/template/tail/bibliography.typ new file mode 100644 index 000000000..2a79db198 --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/tail/bibliography.typ @@ -0,0 +1,18 @@ +#import "@preview/hei-synd-report:0.1.1": * + +#let make_bibliography( + bib:( + display: true, + path: "/tail/bibliography.bib", + style: "ieee", //"apa", "chicago-author-date", "chicago-notes", "mla" + ), + title: "Bibliography", +) = {[ + #if bib.display == true {[ + #pagebreak() + #bibliography(title: title, bib.path, style:bib.style) + ]} else{[ + #set text(size: 0pt) + #bibliography(title: "", bib.path, style:bib.style) + ]} +]} diff --git a/packages/preview/hei-synd-report/0.1.1/template/tail/glossary.typ b/packages/preview/hei-synd-report/0.1.1/template/tail/glossary.typ new file mode 100644 index 000000000..005e36bec --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/template/tail/glossary.typ @@ -0,0 +1,58 @@ +#import "@preview/hei-synd-report:0.1.1": * + +#let entry-list = ( + ( + key: "hei", + short: "HEI", + long: "Haute École d'Ingénierie", + group: "University" + ), + ( + key: "synd", + short: "SYND", + long: "Systems Engineering", + group: "University" + ), + ( + key: "it", + short: "IT", + long: "Infotronics", + group: "University" + ), + ( + key: "rust", + short: "Rust", + plural: "Rust programs", + long: "Rust Programming Language", + description: "Rust is a modern systems programming language focused on safety, speed, and concurrency. It prevents common programming errors such as null pointer dereferencing and data races at compile time, making it a preferred choice for performance-critical applications.", + group: "Programming Language" + ), +) + +#let make_glossary( + gloss:true, + title: i18n("gloss-title"), +) = {[ + #if gloss == true {[ + #pagebreak() + #set heading(numbering: none) + = #title + #print-glossary( + entry-list, + // show all term even if they are not referenced, default to true + show-all: false, + // disable the back ref at the end of the descriptions + disable-back-references: false, + ) + ]} else{[ + #set text(size: 0pt) + #title + #print-glossary( + entry-list, + // show all term even if they are not referenced, default to true + show-all: false, + // disable the back ref at the end of the descriptions + disable-back-references: false, + ) + ]} +]} diff --git a/packages/preview/hei-synd-report/0.1.1/thumbnail.png b/packages/preview/hei-synd-report/0.1.1/thumbnail.png new file mode 100644 index 000000000..064e297fa Binary files /dev/null and b/packages/preview/hei-synd-report/0.1.1/thumbnail.png differ diff --git a/packages/preview/hei-synd-report/0.1.1/typst.toml b/packages/preview/hei-synd-report/0.1.1/typst.toml new file mode 100644 index 000000000..8ddb5d25e --- /dev/null +++ b/packages/preview/hei-synd-report/0.1.1/typst.toml @@ -0,0 +1,33 @@ +[package] +name = "hei-synd-report" +version = "0.1.1" +compiler = "0.13.0" +authors = [ + "Silvan Zahno ", + "HEI-Vs ", +] +repository = "https://github.com/hei-templates/hei-synd-report" +homepage = "https://synd.hevs.io" +license = "MIT" +description = "A report and project template tailored to the Systems Engineering (Synd) program at the HEI-Vs School of Engineering, Sion, Switzerland." +entrypoint = "lib/template-report.typ" +categories = ["report", "paper"] +disciplines = ["engineering", "computer-science", "education"] +keywords = [ + "Report", + "Project", + "University", + "HES-SO Valais//Wallis", + "HEI", + "HEI-Vs", + "School of engineering", + "Synd", + "Systems Engineering", + "Infotronics", + "Sion", +] + +[template] +path = "template" +entrypoint = "report.typ" +thumbnail = "thumbnail.png" diff --git a/packages/preview/hei-synd-thesis/0.1.0/lib/helpers.typ b/packages/preview/hei-synd-thesis/0.1.0/lib/helpers.typ index bb926f86f..fdec3be99 100644 --- a/packages/preview/hei-synd-thesis/0.1.0/lib/helpers.typ +++ b/packages/preview/hei-synd-thesis/0.1.0/lib/helpers.typ @@ -11,7 +11,7 @@ // Fancy prettyY print with line numbers and stuff #import "@preview/codelst:2.0.2": sourcecode // Glossarium for glossary -#import "@preview/glossarium:0.5.1": * +#import "@preview/glossarium:0.5.3": * // Wordometer for word and character count #import "@preview/wordometer:0.1.4": word-count @@ -123,7 +123,7 @@ toe: i18n("toe-title", lang: "en"), ), before: none, - indent: true, + indent: auto, ) = { // Table of content if tableof.toc == true { @@ -192,7 +192,7 @@ length: 100%, depth: 3, title: i18n("toc-title", lang: "en"), - indent: false, + indent: auto, ) = { v(2em) text(large, weight: "bold", title) @@ -416,7 +416,7 @@ body ) = [ #if (after != none and before != none) { - minitoc(title: minitoc-title, after:after, before:before, indent: true) + minitoc(title: minitoc-title, after:after, before:before, indent: auto) if pb { pagebreak() } diff --git a/packages/preview/hei-synd-thesis/0.1.1/.gitignore b/packages/preview/hei-synd-thesis/0.1.1/.gitignore new file mode 100644 index 000000000..eb269b5c2 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/.gitignore @@ -0,0 +1,16 @@ +/lib/scripts/ +cliff.toml +guide-to-thesis.pdf +guide-to-typst.pdf +justfile +CHANGELOG.md +sample.png +sample.svg +rustfmt.toml +thesis.pdf +thesis-fr-final.pdf +thesis-fr-draft.pdf +thesis-de-final.pdf +thesis-de-draft.pdf +thesis-en-final.pdf +thesis-en-draft.pdf diff --git a/packages/preview/hei-synd-thesis/0.1.1/LICENSE b/packages/preview/hei-synd-thesis/0.1.1/LICENSE new file mode 100644 index 000000000..eefb2d07b --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [2025] [Silvan Zahno] + +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/hei-synd-thesis/0.1.1/README.md b/packages/preview/hei-synd-thesis/0.1.1/README.md new file mode 100644 index 000000000..e379e43c7 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/README.md @@ -0,0 +1,168 @@ +![GitHub Repo stars](https://img.shields.io/github/stars/hei-templates/hei-synd-thesis) +![GitHub Release](https://img.shields.io/github/v/release/hei-templates/hei-synd-thesis) +![](https://tianji.tschinz.duckdns.org/telemetry/clnzoxcy10001vy2ohi4obbi0/cm7hhbe65003cru047eqabmpg.gif) +

+
+ HEI-Vs Logo +
+ HEI-Vs Engineering School - Systems Engineering +
+

+
+
+ Industrial Systems Logo +
+
+ +This is the official template for a Bachlorthesis at the [HEI-Vs Engineering School](https://synd.hevs.io) in Sion, Switzerland. More templates can the found in our [GitHub organization](https://github.com/hei-templates) + +![](https://github.com/hei-templates/hei-synd-thesis/blob/main/sample.png) + +## Using the template + +1. In the `Typst` Univers select the `hei-synd-thesis` template. Locally you can use the Typst CLI to initialise the project: + + ```bash + # from the typst universe + typst init @preview/hei-synd-thesis:0.1.1 + ``` + +2. Fill in the metadata in the `metadata.typ` file. + +All metadata is optional, but it is recommended to fill in as much as possible. The metadata is divided into three sections: `options`, `doc`, and `settings`. + +| Metadata | Type | Description | +| ------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------- | +| `options` | _dictionary_ | These are fixed values for the document, who doesn't contribute to the content. | +| `option.type` | _string_ ("draft","final") | Type of the document. "final" will omit some text at the beginning of chapters (default: `"final"`) | +| `option.lang` | _string_ ("en", "fr", "de") | Language of the document. Many element will be changed accordingly (default:`"en"`) | +| `option.template` | _string_ ("thesis", "midterm") | Template of the document (default: `"thesis"`) | +| `doc` | _dictionary_ | Document metadata | +| `doc.title` | _content_ | Title of the document. | +| `doc.subtitle` | _content_ | Subtitle of the document. | +| `doc.author` | _dictionary_ | Author metadata | +| `doc.author.name` | _content_ | Name of the author. | +| `doc.author.email` | _string_ | Email of the author. | +| `doc.author.degree` | _content_ | Degree of the author. | +| `doc.author.affiliation` | _content_ | Affiliation of the author. | +| `doc.author.place` | _content_ | Place of the author. | +| `doc.author.url` | _string_ | URL of the author. | +| `doc.author.signature` | _image_ | Signature of the author. | +| `doc.keywords` | _list_ of _string_ | Keywords for the document. | +| `doc.version` | _content_ | Version of the document. | +| `summary-page` | _dictionary_ | Summary page metadata | +| `summary-page.logo` | _image_ | Logo for the summary page. | +| `summary-page.objective` | _content_ | Objective of the document. | +| `summary-page.content` | _content_ | Content of the document. | +| `professor` | _dictionary_ | Professor metadata | +| `professor.name` | _content_ | Name of the professor. | +| `professor.email` | _string_ | Email of the professor. | +| `professor.url` | _string_ | URL of the professor. | +| `expert` | _dictionary_ | Expert metadata | +| `expert.name` | _content_ | Name of the expert. | +| `expert.email` | _string_ | Email of the expert. | +| `expert.url` | _string_ | URL of the expert. | +| `school` | _dictionary_ | School metadata | +| `school.name` | _content_ | Name of the school. | +| `school.orientation` | _content_ | Major of the school. | +| `school.specialisation` | _content_ | Specialisation of the degree program. | +| `school.url` | _string_ | URL of the school. | +| `date` | _datetime_ | Date matadata of the document | +| `date.submission` | _datetime_ | Submission date of the document | +| `date.mid-term-submission`| _datetime_ | Mid-term submission date of the document | +| `date.today` | _datetime_ | Today's date of the document | +| `logos` | _dictionary_ | Logos metadata | +| `logos.main` | _image_ | Main logo of the document | +| `logos.topleft` | _image_ | Top left logo of the document | +| `logos.topright` | _image_ | Top right logo of the document | +| `logos.bottomleft` | _image_ | Bottom left logo of the document | +| `logos.bottomright` | _image_ | Bottom right logo of the document | +| `tableof` | _dictionary_ | Table of ... settings for the document | +| `tableof.toc` | _boolean_ | Create table of contents (default: `true`) | +| `tableof.tof` | _boolean_ | Create table of figures (default: `false`) | +| `tableof.tot` | _boolean_ | Create table of tables (default: `false`) | +| `tableof.tol` | _boolean_ | Create table of listings (default: `false`) | +| `tableof.toe` | _boolean_ | Create table of equations (default: `false`) | +| `tableof.maxdepth` | _integer_ | Max depth of the table of contents (default: `3`) | +| `gloss` | _boolean_ | Create glossary and acronyms (default: `true`) | +| `appendix` | _boolean_ | Create appendix (default: `false`) | +| `bib` | _dictionary_ | Bibliography settings for the document | +| `bib.display` | _boolean_ | Display bibliography (default: `true`) | +| `bib.path` | _string_ | Path to the bibliography file (default: `"/tail/bibliography.bib"`) | +| `bib.style` | _string_ | Style of the bibliography (default: `"ieee"`) | + +3. Write your content in the `thesis.typ` file as well as the other files in the `main/` folder. + +## Usage + +In order to build the `Typst` document locally you can use one of the following command: + +```bash +# Create pdf +typst compile thesis.typ + +# Create pdf and watch for changes +typst watch thesis.typ +``` + +## Features + +- [x] All metadata is optional +- [x] Multilanguage support +- [x] Customizable logos +- [x] Draft and Final Typesetting +- [x] Title page +- [x] Summary page +- [x] Table of contents +- [x] Table of figures +- [x] Table of tables +- [x] Table of listings +- [x] Table of equations +- [x] Todo Boxes with Table of Todos in draft mode +- [x] Custom Boxes +- [x] Sourcecode with codelst +- [x] Glossary and Acronyms with Glossarium +- [x] Bibliography +- [x] Content help + - [x] Acknowledgements + - [x] Abstract + - [x] Introduction + - [x] Specification + - [x] Design + - [x] Implementation + - [x] Validation + - [x] Conclusion +- [ ] Wavedrom diagrams +- [ ] PlantUML diagrams + +## Help + +If you need help writting your document look at the [Typst documentation](https://typst.app/docs/) or if ou need more help with the template specifics look at the document [Guide-to-Typst](https://github.com/hei-templates/hei-synd-thesis/blob/main/guide-to-typst.pdf). +IF you need help writing your thesis look at the document [Guide-to-Thesis](https://github.com/hei-templates/hei-synd-thesis/blob/main/guide-to-thesis.pdf) + +## Contributing + +If you would like to contribute to any of the repositories in this organization, please follow these steps: + +1. Fork the repository you want to contribute to. +2. Create a new branch for your feature or bug fix. +3. Make your changes and commit them with conventional commit messages. +4. Push your branch to your forked repository. +5. Open a pull request in the original repository and describe your changes. + +## Issues and Support + +If you encounter any issues or have questions regarding the course or any of the repositories, please feel free to open an issue in the respective repository. Our team will be happy to assist you. + +## Changelog + +All notable changes to this project are documented in the [CHANGELOG.md](https://github.com/hei-templates/hei-synd-thesis/blob/main/CHANGELOG.md) file. + +## Find us on + +[hevs.ch](https://synd.hevs.io)  ·  +LinkedIn [HEI-Vs](https://www.linkedin.com/showcase/school-of-engineering-valais-wallis/)  ·  +LinkedIn [HES-SO Valais-Wallis](https://www.linkedin.com/groups/104343/)  ·  +Youtube [HES-SO Valais-Wallis](https://www.youtube.com/user/HESSOVS) +Twitter [@hessovalais](https://twitter.com/hessovalais)  ·  +Facebook [@hessovalais](https://www.facebook.com/hessovalais)  ·  diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/boxes.typ b/packages/preview/hei-synd-thesis/0.1.1/lib/boxes.typ new file mode 100644 index 000000000..7bad837f9 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/boxes.typ @@ -0,0 +1,324 @@ +// +// Description: Creating nice looking information boxes with different logos +// Author : Silvan Zahno +// +#import "constants.typ": * + +//------------------------------------- +// Option Style +// +#let option-style( + type: none, + size: small, + style: "italic", + fill: gray-40, + body) = {[ + #if type == none { + text(size:size, style:style, fill:fill)[#body] + } else { + if type == "draft" {text(size:size, style:style, fill:fill)[#body]} + } +]} + +//------------------------------------- +// Todo Box +// +#let todo(body) = [ + #let rblock = block.with(stroke: red, radius: 0.5em, fill: red.lighten(80%)) + #let top-left = place.with(top + left, dx: 1em, dy: -0.35em) + #block(inset: (top: 0.35em), { + rblock(width: 100%, inset: 1em, body) + top-left(rblock(fill: white, outset: 0.25em, text(fill: red)[*TODO*])) + }) + +] + +//------------------------------------- +// Title Box +// +#let titlebox( + width: 100%, + radius: 10pt, + border: 1pt, + inset: 20pt, + outset: -10pt, + linecolor: box-border, + titlesize: huge, + subtitlesize: larger, + title: [], + subtitle: none, +) = { + if title != [] { + align(center, + rect( + stroke: (left:linecolor+border, top:linecolor+border, rest:linecolor+(border+1pt)), + radius: radius, + outset: (left:outset, right:outset), + inset: (left:inset*2, top:inset, right:inset*2, bottom:inset), + width: width)[ + #align(center, + [ + #if subtitle != none { + [#text(titlesize, title) \ \ #text(subtitlesize, subtitle)] + } else { + text(titlesize, title) + } + ] + ) + ] + ) + } +} + +//------------------------------------- +// Icon Boxes +// +#let iconbox( + width: 100%, + radius: 4pt, + border: 4pt, + inset: 10pt, + outset: -10pt, + linecolor: code-border, + icon: none, + iconheight: 1cm, + body +) = { + if body != none { + align(left, + rect( + stroke: (left:linecolor+border, rest:code-border+0.1pt), + radius: (left:0pt, right:radius), + fill: code-bg, + outset: (left:outset, right:outset), + inset: (left:inset*2, top:inset, right:inset*2, bottom:inset), + width: width)[ + #if icon != none { + align(left, + table( + stroke:none, + align:left+horizon, + columns: (auto,auto), + image(icon, height:iconheight), [#body] + ) + ) + } else { + body + } + ] + ) + } +} + +#let infobox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-info, + icon: icon-info, + )[#body] +} + +#let warningbox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-warning, + icon: icon-warning, + )[#body] +} + +#let ideabox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-idea, + icon: icon-idea + )[#body] +} + +#let firebox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-fire, + icon: icon-fire, + )[#body] +} + +#let importantbox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-important, + icon: icon-important, + )[#body] +} + +#let rocketbox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-rocket, + icon: icon-rocket, + )[#body] +} + +#let todobox( + width: 100%, + radius: 4pt, + border: 4pt, + inset:10pt, + outset: -10pt, + body +) = { + iconbox( + width: width, + radius: radius, + border: border, + inset: inset, + outset: outset, + linecolor: color-todo, + icon: icon-todo, + )[#body] +} + +// Creating nice looking information boxes with different headings +#let colorbox( + title: "title", + color: color-todo, + stroke: 0.5pt, + radius: 4pt, + width: auto, + body +) = { + let strokeColor = color + let backgroundColor = color.lighten(50%) + + return box( + fill: backgroundColor, + stroke: stroke + strokeColor, + radius: radius, + width: width + )[ + #block( + fill: strokeColor, + inset: 8pt, + radius: (top-left: radius, bottom-right: radius), + )[ + #text(fill: white, weight: "bold")[#title] + ] + #block( + width: 100%, + inset: (x: 8pt, bottom: 8pt) + )[ + #body + ] + ] +} + +#let slanted-background( + color: black, body) = { + set text(fill: white, weight: "bold") + context { + let size = measure(body) + let inset = 8pt + [#block()[ + #polygon( + fill: color, + (0pt, 0pt), + (0pt, size.height + (2*inset)), + (size.width + (2*inset), size.height + (2*inset)), + (size.width + (2*inset) + 6pt, 0cm) + ) + #place(center + top, dy: size.height, dx: -3pt)[#body] + ]] + } +} + +#let slanted-colorbox( + title: "title", + color: color-todo, + stroke: 0.5pt, + radius: 4pt, + width: auto, + body +) = { + let strokeColor = color + let backgroundColor = color.lighten(50%) + + return box( + fill: backgroundColor, + stroke: stroke + strokeColor, + radius: radius, + width: width + )[ + #slanted-background(color: strokeColor)[#title] + #block( + width: 100%, + inset: (top: -2pt, x: 10pt, bottom: 10pt) + )[ + #body + ] + ] +} diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/constants.typ b/packages/preview/hei-synd-thesis/0.1.1/lib/constants.typ new file mode 100644 index 000000000..081bafb76 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/constants.typ @@ -0,0 +1,88 @@ +// +// Description: Commonly used constants in the templates +// Author : Silvan Zahno +// +// Fontsizes +#let tinyer = 6pt +#let tiny = 8pt +#let smaller = 9pt +#let small = 10pt +#let normal = 11pt +#let large = 14pt +#let larger = 16pt +#let huge = 24pt +#let huger = 36pt + +// fontsize+ +#let tinyer-p = tinyer+5pt +#let tiny-p = tiny+5pt +#let smaller-p = smaller+5pt +#let small-p = small+5pt +#let normal-p = normal+5pt +#let large-p = large+5pt +#let larger-p = larger+5pt +#let huge-p = huge+5pt +#let huger-p = huger+5pt + +// fontsizes++ +#let tinyer-pp = tinyer+10pt +#let tiny-pp = tiny+10pt +#let smaller-pp = smaller+10pt +#let small-pp = small+10pt +#let normal-pp = normal+10pt +#let large-pp = large+10pt +#let larger-pp = larger+10pt +#let huge-pp = huge+10pt +#let huger-pp = huger+10pt + +// Colors +#let box-border = rgb("#252525") +#let code-bg = rgb("#F5F5F5") +#let code-border = rgb("#F5F5F5").darken(10%) +#let gray-80 = rgb("#000000").lighten(20%) +#let gray-70 = rgb("#000000").lighten(30%) +#let gray-60 = rgb("#000000").lighten(40%) +#let gray-50 = rgb("#000000").lighten(50%) +#let gray-40 = rgb("#000000").lighten(60%) +#let gray-30 = rgb("#000000").lighten(70%) +#let gray-20 = rgb("#000000").lighten(80%) +#let gray-10 = rgb("#000000").lighten(90%) +#let hei-orange = rgb("#eb6a28").darken(20%) +#let hei-blue = rgb("#0095d8").darken(20%) +#let hei-pink = rgb("#da0066").darken(20%) +#let hei-yellow = rgb("#f5c400").darken(20%) +#let hei-green = rgb("#00925a").darken(20%) +#let spl-green = rgb("#bed600").darken(20%) +#let spl-blue = rgb("#00a9e0").darken(20%) +#let spl-pink = rgb("#da0066").darken(20%) +#let color-info = rgb("#5b75a0ff") +#let color-idea = rgb("#ffe082ff") +#let color-warning = rgb("#ffce31ff") +#let color-important = rgb("#f44336ff") +#let color-fire = rgb("#fc9502ff") +#let color-rocket = rgb("#bc5fd3ff") +#let color-todo = rgb("#F5F5F5").darken(10%) + +// Resources +#let icons-folder = "img/" +#let resources-folder = "/resources/" +#let placeholder = resources-folder + "placeholder.svg" +#let icon = resources-folder + "icon.svg" +#let icon-check-badge = icons-folder + "check-badge.svg" +#let icon-check-circle = icons-folder + "check-circle.svg" +#let icon-check-square = icons-folder + "check-square.svg" +#let icon-check = icons-folder + "check.svg" +#let icon-circle = icons-folder + "circle.svg" +#let icon-file = icons-folder + "file.svg" +#let icon-fire = icons-folder + "fire.svg" +#let icon-folder = icons-folder + "folder.svg" +#let icon-idea = icons-folder + "idea.svg" +#let icon-important = icons-folder + "important.svg" +#let icon-info = icons-folder + "info.svg" +#let icon-rocket = icons-folder + "rocket.svg" +#let icon-square = icons-folder + "square.svg" +#let icon-todo = icons-folder + "todo.svg" +#let icon-warning = icons-folder + "warning.svg" +#let icon-x-circle = icons-folder + "x-circle.svg" +#let icon-x-square = icons-folder + "x-square.svg" +#let icon-x = icons-folder + "x.svg" diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/helpers.typ b/packages/preview/hei-synd-thesis/0.1.1/lib/helpers.typ new file mode 100644 index 000000000..fdec3be99 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/helpers.typ @@ -0,0 +1,432 @@ +// +// Description: Import other modules so you only need to import the helpers +// Use : #import "/00-templates/helpers.typ": * +// Author : Silvan Zahno +// +#import "boxes.typ": * +#import "constants.typ": * +#import "items.typ": * + +// External Plugins +// Fancy prettyY print with line numbers and stuff +#import "@preview/codelst:2.0.2": sourcecode +// Glossarium for glossary +#import "@preview/glossarium:0.5.3": * +// Wordometer for word and character count +#import "@preview/wordometer:0.1.4": word-count + +//------------------------------------- +// Internationalization +// +#let langs = json("i18n-thesis.json") +#let i18n( + key, + lang: "en", + extra-i18n: none) = { + if type(extra-i18n) == dictionary { + for (lng, keys) in extra-i18n { + if not lng in langs { + langs.insert(lng, (:)) + } + langs.at(lng) += keys + } + } + if not lang in langs { + lang = "en" + } + let keys = langs.at(lang) + assert( + key in keys, + message: "I18n key " + str(key) + " doesn't exist" + ) + return keys.at(key) +} + +#let get-supplement( + lang: "en", + it +) = { + let f = it.func() + if (f == image) { + i18n("figure-name", lang: lang) + } else if (f == table) { + i18n("table-name", lang: lang) + } else if (f == raw) { + i18n("listing-name", lang: lang) + } else if (f == math.equation) { + i18n("equation-name", lang: lang) + } else { + auto + } + } +//------------------------------------- +// Reference helper function +// +#let myref(label) = locate(loc =>{ + if query(label,loc).len() != 0 { + ref(label) + } else { + text(fill: red)[?] + } +}) + +//------------------------------------- +// Specifications +// +#let full-page(path) = { + set page(margin: ( + top: 0cm, + bottom: 0cm, + x: 0cm, + )) + + if path != none { + image(path, width: 100%) + } else { + table( + columns: (100%), + rows: (100%), + stroke: none, + align: center+horizon, + [ + #rotate( + -45deg, + origin: center+horizon, + )[ + #text(fill: red, size: huger)[ + No page found + ] + ] + ] + ) + } +} + +//------------------------------------- +// Table of content +// +#let toc( + tableof: ( + toc: true, + tof: false, + tot: false, + tol: false, + toe: false, + maxdepth: 3, + lang: "en", + ), + titles: ( + toc: i18n("toc-title", lang: "en"), + tof: i18n("tof-title", lang: "en"), + tot: i18n("tot-title", lang: "en"), + tol: i18n("tol-title", lang: "en"), + toe: i18n("toe-title", lang: "en"), + ), + before: none, + indent: auto, +) = { + // Table of content + if tableof.toc == true { + if before != none { + outline( + title: titles.toc, + target: selector(heading).before(before, inclusive: true), + indent: indent, + depth: tableof.maxdepth, + ) + } else { + outline( + title: titles.toc, + indent: indent, + depth: tableof.maxdepth, + ) + } + } + + // Table of figures + if tableof.tof == true { + outline( + title: titles.tof, + target: figure.where(kind: image), + indent: indent, + depth: tableof.maxdepth, + ) + } + + // Table of tables + if tableof.tot == true { + outline( + title: titles.tot, + target: figure.where(kind: table), + indent: indent, + depth: tableof.maxdepth, + ) + } + + // Table of listings + if tableof.tol == true { + outline( + title: titles.tol, + target: figure.where(kind: raw), + indent: indent, + depth: tableof.maxdepth, + ) + } + + // Table of equation + if tableof.toe == true { + outline( + title: titles.toe, + target: math.equation.where(block:true), + indent: indent, + depth: tableof.maxdepth, + ) + } +} + +#let minitoc( + after: none, + before: none, + addline: true, + stroke: 0.5pt, + length: 100%, + depth: 3, + title: i18n("toc-title", lang: "en"), + indent: auto, +) = { + v(2em) + text(large, weight: "bold", title) + if addline == true { + line(length:length, stroke:stroke) + } + let h = selector(heading.where(level: 2)) + .or(heading.where(level: 3)) + .or(heading.where(level: 4)) + .or(heading.where(level: 5)) + .or(heading.where(level: 6)) + .or(heading.where(level: 7)) + .or(heading.where(level: 8)) + .or(heading.where(level: 9)) + .or(heading.where(level: 10)) + outline( + title: none, + target: selector(h) + .after(after) + .before(before, inclusive: false), + depth: depth, + indent: indent, + ) + if addline == true { + line(length:length, stroke:stroke) + } +} + +#let outline-todos(title: [TODOS]) = context { + heading(numbering: none, outlined: false, title) + + let queried-todos = query() + let headings = () + let last-heading + for todo in queried-todos { + let new-last-heading = query(selector(heading).before(todo.location())).last() + if last-heading != new-last-heading { + headings.push((heading: new-last-heading, todos: (todo,))) + last-heading = new-last-heading + } else { + headings.last().todos.push(todo) + } + } + + for head in headings { + link(head.heading.location())[ + #if head.heading.at("numbering", default: none) != none { + numbering(head.heading.numbering, ..counter(heading).at(head.heading.location())) + } + #head.heading.body + ] + [ ] + box(width: 1fr, repeat[.]) + [ ] + [#head.heading.location().page()] + + linebreak() + pad(left: 1em, head.todos.map((todo) => { + list.item(link(todo.location(), todo.body.children.at(0).body)) + }).join()) + } +} + +//-------------------------------------- +// Heading shift +// +// #unshift-prefix[Prefix][Body] +#let unshift-prefix(prefix, content) = context { + pad(left: -measure(prefix).width, prefix + content) +} + +//------------------------------------- +// Research +// +// item, item, item and item List +// +#let enumerating-authors( + items: none, + multiline: false, +) = { + let i = 1 + if items != none { + for item in items { + if item != none { + if "name" in item { + if i > 1 { + if multiline == true { + if items.len() > 2 { + [\ ] + } else { + [, ] + } + } else { + [, ] + } + } + i = i + 1 + if "institute" in item{ + [#item.name#super(repr(item.institute))] + } else { + [#item.name] + } + } + } + } + } +} + +#let enumerating-institutes( + items: none, +) = { + let i = 1 + if items != none { + for item in items { + if item != none { + [_#super(repr(i))_ #if item.research_group != none { [_ #item.research_group - _]} _ #item.name __, #item.address _ \ ] + i = i + 1 + } + } + } +} + +//------------------------------------- +// Script +// +// item, item, item and item List +// +#let enumerating-items( + items: none, + bold: false, + italic: false, +) = { + let i = 1 + if items != none { + for item in items { + if item != none { + if bold == true and italic == true { + [#text(style: "italic")[*#item*]] + } else if bold == true { + [*#item*] + } else if italic == true { + [#text(style: "italic")[#item]] + } else { + [#item] + } + if i < items.len() { + [, ] + } + } + i = i + 1 + } + } +} +#let enumerating-links( + names: none, + links: none, +) = { + if names != none { + let i = 0 + for name in names { + if name != none { + [#link(links.at(i))[#name]] + if i+1 < names.len() { + [, ] + } + } + i = i + 1 + } + } +} +#let enumerating-emails( + names: none, + emails: none, +) = { + if names != none { + let i = 0 + for name in names { + if name != none { + [#link("mailto:"+emails.at(i))[#name]] + if i+1 < names.len() { + [, ] + } + } + i = i + 1 + } + } +} + +//------------------------------------- +// safe-link +// +#let safe-link( + name: none, + url: none, +) = { + if name != none { + if url != none { + link(url)[#name] + } else { + name + } + } else { + if url != none { + link(url)[#url] + } else { + none + } + } +} + +//------------------------------------- +// Chapter +// +#let add-chapter( + file: none, + heading-offset: 0, + after: none, + before: none, + pb: false, + minitoc-title: i18n("toc-title", lang: "en"), + body +) = [ + #if (after != none and before != none) { + minitoc(title: minitoc-title, after:after, before:before, indent: auto) + if pb { + pagebreak() + } + } + #set heading(offset: heading-offset) + + #if (file != none) { + include file + } else { + body + } + #set heading(offset: 0) +] diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/i18n-thesis.json b/packages/preview/hei-synd-thesis/0.1.1/lib/i18n-thesis.json new file mode 100644 index 000000000..eda4fcaa4 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/i18n-thesis.json @@ -0,0 +1,137 @@ +{ + "en": { + "toc-title": "Contents", + "tof-title": "Figures", + "tot-title": "Tables", + "tol-title": "Listings", + "toe-title": "Equations", + "bib-title": "Bibliography", + "gloss-title": "Glossary", + "ack-title": "Acknowledgements", + "abstract-title": "Abstract", + "introduction-title": "Introduction", + "analysis-title": "Analysis", + "design-title": "Design", + "implementation-title": "Implementation", + "validation-title": "Validation", + "conclusion-title": "Conclusion", + "appendix-title": "Appendix", + "figure-name": "Figure", + "table-name": "Table", + "listing-name": "Listing", + "equation-name": "Equation", + "degree-programme": "Degree Programme", + "major": "Major", + "thesis-title": "Bachelor's Thesis", + "midterm-title": "Midterm Report", + "diploma": "Diploma", + "professor": "Professor", + "expert": "Expert", + "student": "Student", + "partner": "Partner", + "graduate": "Graduate", + "author": "Author", + "email": "E-Mail", + "keywords": "Keywords", + "objective": "Objective", + "objective-text": "Description (one sentence with max. 240 characters, with spaces.)", + "methods-experiences-results": "Methods | Experiences | Results", + "submission-date": "Submission date", + "contact-info": "Contact Information", + "report-info": "Information about this report", + "declaration-title": "Declaration of honor", + "declaration-text": "I, undersigned, hereby declare that the work submitted is the result of a personal work. I certify that I have not resorted to plagiarism or other forms of fraud. All sources of information used and the author quotes were clearly mentioned", + "declaration-signature-prefix": "Place, date", + "declaration-signature": "Signature" + }, + "fr": { + "toc-title": "Contenu", + "tof-title": "Figures", + "tol-title": "Listings", + "tot-title": "Tableaux", + "toe-title": "Équations", + "bib-title": "Bibliographie", + "gloss-title": "Glossaire", + "appendix-title": "Annexes", + "ack-title": "Remerciements", + "abstract-title": "Résumé", + "introduction-title": "Introduction", + "analysis-title": "Analyse", + "design-title": "Conception", + "implementation-title": "Implémentation", + "validation-title": "Validation", + "conclusion-title": "Conclusion", + "figure-name": "Figure", + "table-name": "Table", + "listing-name": "Listing", + "equation-name": "Équation", + "degree-programme": "Filière", + "major": "Orientation", + "thesis-title": "Thèse de Bachelor", + "midterm-title": "Rapport intermédiaire", + "diploma": "Diplôme", + "professor": "Professeur", + "expert": "Expert", + "student": "Étudiante", + "partner": "Partnaire", + "graduate": "Diplômé", + "author": "Auteur", + "email": "E-Mail", + "keywords": "Mots-clés", + "objective": "Objectif", + "objective-text": "Description (une phrase avec max. 240 caractères, espaces compris.)", + "methods-experiences-results": "Méthodes | Expériences | Résultats", + "submission-date": "Date de soumission", + "contact-info": "Coordonnées", + "report-info": "Informations sur ce rapport", + "declaration-title": "Déclaration sur l’honneur", + "declaration-text": "Je soussigné(e), déclare par la présente que le travail soumis est le résultat d’un travail personnel. Je certifie ne pas avoir eu recours au plagiat ou à d’autres formes de fraude. Toutes les sources d’information utilisées et les citations d’auteurs ont été clairement mentionnées.", + "declaration-signature-prefix": "Lieu, date:", + "declaration-signature": "Signature:" + }, + "de": { + "toc-title": "Inhalt", + "tof-title": "Abbildungen", + "tol-title": "Quelltexte", + "tot-title": "Tabellen", + "toe-title": "Gleichungen", + "bib-title": "Literatur", + "gloss-title": "Glossar", + "appendix-title": "Anhang", + "ack-title": "Danksagung", + "abstract-title": "Zusammenfassung", + "introduction-title": "Einleitung", + "analysis-title": "Analyse", + "design-title": "Entwurf", + "implementation-title": "Implementierung", + "validation-title": "Validierung", + "conclusion-title": "Schlussfolgerung", + "figure-name": "Abbildung", + "table-name": "Tabelle", + "listing-name": "Listing", + "equation-name": "Gleichung", + "degree-programme": "Studiengang", + "major": "Spezialisierung", + "thesis-title": "Bachelorarbeit", + "midterm-title": "Zwischenbericht", + "diploma": "Diploma", + "professor": "Professor", + "expert": "Experte", + "student": "Student", + "partner": "Partner", + "graduate": "Absolvent", + "author": "Autor", + "email": "E-Mail", + "keywords": "Schlüsselwörter", + "objective": "Zielsetzung", + "objective-text": "Beschreibung (ein Satz mit max. 240 Zeichen, inkl. Leerzeichen.)", + "methods-experiences-results": "Methoden | Erfahrungen | Ergebnisse", + "submission-date": "Abgabedatum", + "contact-info": "Kontaktinformationen", + "report-info": "Informationen zu diesem Bericht", + "declaration-title": "Ehrenwörtliche Erklärung", + "declaration-text": "Ich, der/die Unterzeichnende, erkläre hiermit, dass die eingereichte Arbeit das Ergebnis einer eigenen Leistung ist. Ich versichere, dass ich weder Plagiat noch andere Formen von Betrug begangen habe. Alle verwendeten Informationsquellen und Autorenzitate wurden klar angegeben.", + "declaration-signature-prefix": "Ort, Datum:", + "declaration-signature": "Signature:" + } +} diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/check-badge.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/check-badge.svg new file mode 100644 index 000000000..92fc844b6 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/check-badge.svg @@ -0,0 +1,57 @@ + + + + + + + + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/check-circle.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/check-circle.svg new file mode 100644 index 000000000..1208e27bf --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/check-circle.svg @@ -0,0 +1,55 @@ + + + + + + + + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/check-square.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/check-square.svg new file mode 100644 index 000000000..42a64f26e --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/check-square.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/check.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/check.svg new file mode 100644 index 000000000..a8e4a4337 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/check.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/circle.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/circle.svg new file mode 100644 index 000000000..3c8df82ba --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/circle.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/file.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/file.svg new file mode 100644 index 000000000..9248c4b81 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/file.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/fire.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/fire.svg new file mode 100644 index 000000000..4e1da2dd1 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/fire.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/folder.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/folder.svg new file mode 100644 index 000000000..a14832ae6 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/folder.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/idea.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/idea.svg new file mode 100644 index 000000000..5a147a86c --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/idea.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/important.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/important.svg new file mode 100644 index 000000000..a130adbbb --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/important.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/info.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/info.svg new file mode 100644 index 000000000..67e33eff0 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/info.svg @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/rocket.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/rocket.svg new file mode 100644 index 000000000..ed4734ee3 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/rocket.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/square.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/square.svg new file mode 100644 index 000000000..c5b731630 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/square.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/todo.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/todo.svg new file mode 100644 index 000000000..56f3bdb0c --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/todo.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/warning.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/warning.svg new file mode 100644 index 000000000..15f3e0ff3 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/warning.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/x-circle.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/x-circle.svg new file mode 100644 index 000000000..8b6e2a05f --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/x-circle.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/x-square.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/x-square.svg new file mode 100644 index 000000000..27a671092 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/x-square.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/img/x.svg b/packages/preview/hei-synd-thesis/0.1.1/lib/img/x.svg new file mode 100644 index 000000000..527e19fa4 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/img/x.svg @@ -0,0 +1,53 @@ + + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/items.typ b/packages/preview/hei-synd-thesis/0.1.1/lib/items.typ new file mode 100644 index 000000000..9cb832539 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/items.typ @@ -0,0 +1,141 @@ +// +// Description: Creating nice looking item list with different icons +// Author : Silvan Zahno +// +#import "constants.typ": * + +#let item-list( + height: normal, + icon: icon-check-square, + body +) = { + if body != none { + v(-9pt) + table( + stroke: none, + columns: 2, + align: left+horizon, + column-gutter: -2pt, + image(icon, height:normal), body + ) + v(-9pt) + } +} + +#let item-circle( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-circle, + )[#body] +} +#let item-square( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-square, + )[#body] +} +#let item-checkbadge( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-check-badge, + )[#body] +} +#let item-checkcircle( + height: normal, + body, +) = { + item-list( + height: height, + icon: icon-check-circle, + )[#body] +} +#let item-checksquare( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-check-square, + )[#body] +} +#let item-check( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-check, + )[#body] +} +#let item-circle( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-circle, + )[#body] +} +#let item-square( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-square, + )[#body] +} +#let item-file( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-file, + )[#body] +} +#let item-folder( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-folder, + )[#body] +} +#let item-xcircle( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-x-circle, + )[#body] +} +#let item-xsquare( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-x-square, + )[#body] +} +#let item-x( + height: normal, + body +) = { + item-list( + height: height, + icon: icon-x, + )[#body] +} diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/pages-thesis.typ b/packages/preview/hei-synd-thesis/0.1.1/lib/pages-thesis.typ new file mode 100644 index 000000000..de8e155f4 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/pages-thesis.typ @@ -0,0 +1,351 @@ +// +// Description: Custom pages for the thesis template +// Author : Silvan Zahno +// +#import "helpers.typ": * + +#let page-title-thesis( + title: none, + subtitle: none, + template: "thesis", + date: datetime.today(), + lang: "en", + school: ( + name: none, + orientation: none, + specialisation: none, + ), + author: ( + name : none, + email : none, + degree : none, + affiliation : none, + place : none, + url : none, + signature : none, + ), + professor: none, + expert:none, + logos: ( + topleft: none, + topright: none, + bottomleft: none, + bottomright: none, + ), + extra-content-top: none, + extra-content-bottom: none, +) = { + + set page( + margin: ( + top:3.0cm, + bottom:3.0cm, + rest:3.5cm + ) + ) + //------------------------------------- + // Page content + // + let content-up = { + //line(length: 100%) + if school != none { + //v(0.5fr) + // Degree Programme + if school.orientation != none { + align(center, [#text(size:larger, + i18n("degree-programme", lang: lang) + )]) + v(1em) + } + + // Orientation + if school.orientation != none { + align(center, [#text(size:larger, + school.orientation + )]) + v(1em) + } + + // Specialisation + if school.specialisation != none { + align(center, [#text(size:large, + [#i18n("major", lang: lang) #school.specialisation] + )]) + v(2em) + } + } + + if extra-content-top != none { + extra-content-top + } + + // BACHELOR'S THESIS / Midterm Report + if template == "thesis" { + align(center, [#text(size:huge, + [*#i18n("thesis-title", lang: lang)*] + )]) + v(1em) + } else if template == "midterm"{ + align(center, [#text(size:huge, + [*#i18n("midterm-title", lang: lang)*] + )]) + v(1em) + } + + // DIPLOMA YEAR + align(center, [#text(size:huge, + [*#i18n("diploma", lang: lang) #date.display("[year]")*] + )]) + v(1em) + + // AUTHORs + align(center, [#text(size:large, [ + #if type(author) == array [ + #enumerating-authors( + items: author, + multiline: true, + ) + ] else [ + #author.name + ] + #v(2em) + ])]) + + titlebox( + title: title, + subtitle: subtitle, + ) + + if extra-content-bottom != none { + extra-content-bottom + } + } + + let content-down = [ + #v(2em) + #if professor != none and (professor.affiliation != none or professor.name != none or professor.email != none ) [ + #i18n("professor", lang: lang)\ + #professor.affiliation#if (professor.affiliation != none and professor.name != none) or (professor.affiliation != none and professor.email != none) {[, ]}#professor.name#if professor.name != none and professor.email != none {[,]} #link("mailto:professor.email")[#professor.email] + \ \ + ] + #if expert != none and (expert.affiliation != none or expert.name != none or expert.email != none ) [ + #i18n("expert", lang: lang)\ + #expert.affiliation#if (expert.affiliation != none and expert.name != none) or (expert.affiliation != none and expert.email != none) {[, ]}#expert.name#if expert.name != none and expert.email != none {[,]} #link("mailto:expert.email")[#expert.email] + \ \ + ] + #if template == "thesis" [ + #i18n("submission-date", lang: lang)\ + #date.display("[day] [month repr:long] [year]") + ] else if template == "midterm" [ + #i18n("submission-date", lang: lang)\ + #date.display("[day] [month repr:long] [year]") + ] + #v(1em) + ] + + grid( + columns: (50%, 50%), + rows: (10%, 63%, 20%, 7%), + align(left+horizon)[#logos.topleft], + align(right+horizon)[#logos.topright], + //stroke: 0.5pt, + grid.cell( + colspan: 2, + align(horizon)[#content-up] + ), + grid.cell( + colspan: 2, + align(horizon)[#content-down] + ), + align(left+horizon)[#logos.bottomleft], + align(right+horizon)[#logos.bottomright], + ) +} + +#let summary( + title: none, + student: none, + year: none, + degree: none, + field: none, + professor: none, + partner: none, + logos: ( + main: none, + topleft: none, + bottomright: none, + ), + objective: none, + address: none, + lang: "en", + body +) = { + set page( + margin: ( + top: 5.5cm, + bottom: 3cm, + x: 1.8cm, + ), + header: [ + #logos.topleft//#image(, width: 7.5cm) + ], + footer-descent: 0cm, + footer: [ + #table( + columns: (50%, 50%), + stroke: none, + align: (left + horizon, right + horizon), + [ + #if address != none { + option-style()[#address] + } else {[ + #option-style()[HES-SO Valais Wallis • rue de l'Industrie 23 • 1950 Sion \ +41 58 606 85 11 • #link("mailto"+"info@hevs.ch")[info\@hevs.ch] • #link("www.hevs.ch")[www.hevs.ch]] + ]} + ],[ + #logos.bottomright + ], + ) + ], + ) + + set text(size: 9pt) + set par(justify: true) + + table( + columns: (5.4cm, 1.2cm, 1fr), + stroke: none, + inset: 0pt, + [ + #if logos.main != none { + logos.main + } else { + box(width: 5.4cm, height: 5cm) + } + + #v(1cm) + + #align(center)[ + #heading(level: 3, numbering:none, outlined: false)[ + #text(15pt)[ + #i18n("thesis-title", lang: lang)\ | #h(0.3cm) #year #h(0.3cm) | + ] + ] + ] + + #v(0.5cm) + + //#square(size: 0.7cm, fill: blue.lighten(70%)) + + #v(0.6cm) + #set text(size: 10pt) + + #i18n("degree-programme", lang: lang)\ + _#[#degree]_ + + #v(0.6cm) + + #i18n("major", lang: lang)\ + _#[#field]_ + + #v(0.6cm) + + #if professor != none {[ + #i18n("professor", lang: lang)\ + _#[#professor.name]_\ + _#[#professor.email]_ + #v(0.6cm) + ]} + + #if partner != none {[ + #i18n("partner", lang: lang)\ + _#[#partner.name]_\ + _#[#partner.affiliation]_ + ]} + + ],[],[ + #align(left, text(15pt)[ + #heading(numbering:none, outlined: false)[#title] + ]) + #table( + columns: (0cm, 3.5cm, 1fr), + stroke: none, + align: left + horizon, + [ + //#square(size: 0.7cm, fill: blue.lighten(70%)) + ],[ + #set text( + size: 12pt, + fill: gray.darken(50%), + ) + #i18n("graduate", lang: lang) + ],[ + #set text(size: 10pt) + #student + ] + ) + + #v(1.5cm) + + #heading(level: 3, numbering:none, outlined: false)[ + #text(12pt)[#i18n("objective", lang: lang)] + ] + + #if objective == none { + [ + #i18n("objective-text") + ] + } else { + objective + } + + #v(0.6cm) + + #heading(level: 3, numbering:none, outlined: false)[ + #text(12pt)[#i18n("methods-experiences-results", lang: lang)] + ] + + #body + ] + ) +} + +#let page-reportinfo( + author: (), + date: none, + lang: "en", +) = { + heading(numbering:none, outlined: false)[#i18n("report-info", lang: lang)] + v(2em) + heading(numbering:none, outlined: false)[*#i18n("contact-info", lang: lang)*] + + table( + columns: (auto, auto), + stroke: none, + align: left + top, + table.cell(rowspan: 3)[#if author.email != none {[#i18n("author", lang: lang):]}], [#author.name], + [#author.degree #if author.degree != none {[#i18n("student", lang: lang)]}], + [#author.affiliation], + [#if author.email != none {[#i18n("email", lang: lang):]}], [#link("mailto:author.email")[#author.email]], + ) + + v(5em) + [ + *#i18n("declaration-title", lang: lang)* \ + #i18n("declaration-text", lang: lang) + ] + + table( + stroke: none, + columns: (auto,auto), + align: left + horizon, + [#i18n("declaration-signature-prefix", lang: lang)], [#author.place#if author.place != none{[,]} #date.display("[day].[month].[year]")], + [#i18n("declaration-signature", lang: lang)], + if author.signature != none {[ + #v(0.5cm) + #pad(x: 2.5em, author.signature) + #line(start: (0cm,-0.7cm),length:5cm) + ]} else {[ + #line(start: (0cm,1.5cm),length:7cm) + ]}, + ) +} diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/syntax/VHDL.sublime-syntax b/packages/preview/hei-synd-thesis/0.1.1/lib/syntax/VHDL.sublime-syntax new file mode 100644 index 000000000..70ca1c4ae --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/syntax/VHDL.sublime-syntax @@ -0,0 +1,1040 @@ +%YAML 1.2 +--- +# http://www.sublimetext.com/docs/syntax.html +name: VHDL +comment: VHDL Bundle by Brian Padalino (ocnqnyvab@tznvy.pbz) +file_extensions: + - vhd + - vhdl + - vho +scope: source.vhdl +contexts: + main: + - include: block_processing + - include: cleanup + architecture_pattern: + - match: |- + (?x) + + # The word architecture $1 + \b((?i:architecture))\s+ + + # Followed up by a valid $3 or invalid identifier $4 + (([a-zA-z][a-zA-z0-9_]*)|(.+))(?=\s)\s+ + + # The word of $5 + ((?i:of))\s+ + + # Followed by a valid $7 or invalid identifier $8 + (([a-zA-Z][a-zA-Z0-9_]*)|(.+?))(?=\s*(?i:is))\b + + captures: + 1: keyword.language.vhdl + 3: entity.name.type.architecture.begin.vhdl + 4: invalid.illegal.invalid.identifier.vhdl + 5: keyword.language.vhdl + 7: entity.name.type.entity.reference.vhdl + 8: invalid.illegal.invalid.identifier.vhdl + push: + - meta_scope: meta.block.architecture + - match: |- + (?x) + # The word end $1 + \b((?i:end)) + + # Optional word architecture $3 + (\s+((?i:architecture)))? + + # Optional same identifier $6 or illegal identifier $7 + (\s+((\3)|(.+?)))? + + # This will cause the previous to capture until just before the ; or $ + (?=\s*;) + + captures: + 1: keyword.language.vhdl + 3: keyword.language.vhdl + 6: entity.name.type.architecture.end.vhdl + 7: invalid.illegal.mismatched.identifier.vhdl + pop: true + - include: function_definition_pattern + - include: procedure_definition_pattern + - include: component_pattern + - include: if_pattern + - include: process_pattern + - include: type_pattern + - include: record_pattern + - include: for_pattern + - include: entity_instantiation_pattern + - include: component_instantiation_pattern + - include: cleanup + attribute_list: + - match: \'\( + captures: + 0: punctuation.vhdl + push: + - meta_scope: meta.block.attribute_list + - match: \) + captures: + 0: punctuation.vhdl + pop: true + - include: parenthetical_list + - include: cleanup + block_processing: + - include: package_pattern + - include: package_body_pattern + - include: entity_pattern + - include: architecture_pattern + case_pattern: + - match: |- + (?x) + # Beginning of line ... + ^\s* + + # Optional identifier ... $3 or invalid identifier $4 + ( + ( + ([a-zA-Z][a-zA-Z0-9_]*) + |(.+?) + ) + \s*:\s* + )? + + # The word case $5 + \b((?i:case))\b + + captures: + 3: entity.name.tag.case.begin.vhdl + 4: invalid.illegal.invalid.identifier.vhdl + 5: keyword.language.vhdl + push: + - meta_scope: meta.block.case.vhdl + - match: |- + (?x) + # The word end $1 + \b((?i:end))\s* + + # The word case $4 or invalid word $5 + (\s+(((?i:case))|(.*?))) + + # Optional identifier from before $8 or illegal $9 + (\s+((\2)|(.*?)))? + + # Ending with a semicolon + (?=\s*;) + + captures: + 1: keyword.language.vhdl + 4: keyword.language.vhdl + 5: invalid.illegal.case.required.vhdl + 8: entity.name.tag.case.end.vhdl + 9: invalid.illegal.mismatched.identifier.vhdl + pop: true + - include: control_patterns + - include: cleanup + cleanup: + - include: comments + - include: constants_numeric + - include: strings + - include: attribute_list + - include: syntax_highlighting + comments: + - match: '--.*$\n?' + scope: comment.line.double-dash.vhdl + component_instantiation_pattern: + - match: |- + (?x) + # From the beginning of the line ... + ^\s* + + # Match a valid identifier $1 + ([a-zA-Z][a-zA-Z0-9_]*) + + # Colon! $2 + \s*(:)\s* + + # Another valid identifier $3 + ([a-zA-Z][a-zA-Z0-9_]*)\b + + # Make sure we are just the other word, or the beginning of + # a generic or port mapping + (?=\s*($|generic|port)) + + captures: + 1: entity.name.section.component_instantiation.vhdl + 2: punctuation.vhdl + 3: entity.name.tag.component.reference.vhdl + push: + - meta_scope: meta.block.component_instantiation.vhdl + - match: ; + captures: + 0: punctuation.vhdl + pop: true + - include: parenthetical_list + - include: cleanup + component_pattern: + - match: |- + (?x) + # From the beginning of the line ... + ^\s* + + # The word component $1 + \b((?i:component))\s+ + + # A valid identifier $3 or invalid identifier $4 + (([a-zA-Z_][a-zA-Z0-9_]*)\s*|(.+?))(?=\b(?i:is|port)\b|$|--) + + # Optional word is $6 + (\b((?i:is\b)))? + + captures: + 1: keyword.language.vhdl + 3: entity.name.type.component.begin.vhdl + 4: invalid.illegal.invalid.identifier.vhdl + 6: keyword.language.vhdl + push: + - meta_scope: meta.block.component.vhdl + - match: |- + (?x) + # The word end $1 + \b((?i:end))\s+ + + # The word component $3 or illegal word $4 + (((?i:component\b))|(.+?))(?=\s*|;) + + # Optional identifier $7 or illegal mismatched $8 + (\s+((\3)|(.+?)))?(?=\s*;) + + captures: + 1: keyword.language.vhdl + 3: keyword.language.vhdl + 4: invalid.illegal.component.keyword.required.vhdl + 7: entity.name.type.component.end.vhdl + 8: invalid.illegal.mismatched.identifier.vhdl + pop: true + - include: generic_list_pattern + - include: port_list_pattern + - include: comments + constants_numeric: + - match: '\b([+\-]?[\d_]+\.[\d_]+([eE][+\-]?[\d_]+)?)\b' + scope: constant.numeric.floating_point.vhdl + - match: '\b\d+#[\h_]+#\b' + scope: constant.numeric.base_pound_number_pound.vhdl + - match: '\b[\d_]+([eE][\d_]+)?\b' + scope: constant.numeric.integer.vhdl + - match: '[xX]"[0-9a-fA-F_uUxXzZwWlLhH\-]+"' + scope: constant.numeric.quoted.double.string.hex.vhdl + - match: '[oO]"[0-7_uUxXzZwWlLhH\-]+"' + scope: constant.numeric.quoted.double.string.octal.vhdl + - match: '[bB]?"[01_uUxXzZwWlLhH\-]+"' + scope: constant.numeric.quoted.double.string.binary.vhdl + - match: '([bBoOxX]".+?")' + scope: constant.numeric.quoted.double.string.illegal.vhdl + captures: + 1: invalid.illegal.quoted.double.string.vhdl + - match: '''[01uUxXzZwWlLhH\-]''' + scope: constant.numeric.quoted.single.std_logic + control_patterns: + - include: case_pattern + - include: if_pattern + - include: for_pattern + - include: while_pattern + entity_instantiation_pattern: + - match: |- + (?x) + # From the beginning of the line + ^\s* + + # Component identifier or illegal identifier $1 + ([a-zA-Z][a-zA-Z0-9_]*) + + # Colon! $2 + \s*(:)\s* + + # Optional word use $4 + (((?i:use))\s+)? + + # Required word entity $5 + ((?i:entity))\s+ + + # Optional library unit identifier $8 for invalid identifier $9 followed by a dot $10 + ( + (([a-zA-Z][a-zA-Z0-9_]*)|(.+?)) + (\.) + )? + + # Entity name reference $12 or illegal identifier $13 + (([a-zA-Z][a-zA-Z0-9_]*)|(.+?)) + + # Check to see if we are being followed by either open paren, end of line, or port or generic words + (?=\s*(\(|$|(?i:port|generic))) + + # Optional architecture elaboration + ( + # Open paren $16 + \s*(\()\s* + + # Arch identifier $18 or invalid identifier $19 + (([a-zA-Z][a-zA-Z0-9_]*)|(.+?))(?=\s*\)) + + # Close paren $21 + \s*(\)) + )? + + captures: + 1: entity.name.section.entity_instantiation.vhdl + 2: punctuation.vhdl + 4: keyword.language.vhdl + 5: keyword.language.vhdl + 8: entity.name.tag.library.reference.vhdl + 9: invalid.illegal.invalid.identifier.vhdl + 10: punctuation.vhdl + 12: entity.name.tag.entity.reference.vhdl + 13: invalid.illegal.invalid.identifier.vhdl + 16: punctuation.vhdl + 18: entity.name.tag.architecture.reference.vhdl + 19: invalid.illegal.invalid.identifier.vhdl + 21: punctuation.vhdl + push: + - meta_scope: meta.block.entity_instantiation.vhdl + - match: ; + captures: + 0: punctuation.vhdl + pop: true + - include: parenthetical_list + - include: cleanup + entity_pattern: + - match: |- + (?x) + # From the beginning of the line ... + ^\s* + + # The word entity $1 + ((?i:entity\b))\s+ + + # The identifier $3 or an invalid identifier $4 + (([a-zA-Z][a-zA-Z\d_]*)|(.+?))(?=\s) + + captures: + 1: keyword.language.vhdl + 3: entity.name.type.entity.begin.vhdl + 4: invalid.illegal.invalid.identifier.vhdl + push: + - meta_scope: meta.block.entity.vhdl + - match: |- + (?x) + + # The word end $1 + \b((?i:end\b)) + + # Optional word entity $3 + (\s+((?i:entity)))? + + # Optional identifier match $6 or indentifier mismatch $7 + (\s+((\3)|(.+?)))? + + # Make sure there is a semicolon following + (?=\s*;) + + captures: + 1: keyword.language.vhdl + 3: keyword.language.vhdl + 6: entity.name.type.entity.end.vhdl + 7: invalid.illegal.mismatched.identifier.vhdl + pop: true + - include: comments + - include: generic_list_pattern + - include: port_list_pattern + - include: cleanup + for_pattern: + - match: |- + (?x) + # From the beginning of the line + ^\s* + ( + # Check for an identifier $2 + ([a-zA-Z][a-zA-Z0-9_]*) + + # Followed by a colon $3 + \s*(:)\s* + )? + + # Make sure the next word is not wait + (?!(?i:wait\s*)) + + # The for keyword $4 + \b((?i:for))\b + + # Make sure the next word is not all + (?!\s*(?i:all)) + + + captures: + 2: entity.name.tag.for.generate.begin.vhdl + 3: punctuation.vhdl + 4: keyword.language.vhdl + push: + - meta_scope: meta.block.for.vhdl + - match: |- + (?x) + # The word end $1 + \b((?i:end))\s+ + ( + # Followed by generate or loop $3 + ((?i:generate|loop)) + + # But it really is required $4 + |(\S+) + )\b + + # The matching identifier $7 or an invalid identifier $8 + (\s+((\2)|(.+?)))? + + # Only space and a semicolon left + (?=\s*;) + + captures: + 1: keyword.language.vhdl + 3: keyword.language.vhdl + 4: invalid.illegal.loop.or.generate.required.vhdl + 7: entity.name.tag.for.generate.end.vhdl + 8: invalid.illegal.mismatched.identifier.vhdl + pop: true + - include: control_patterns + - include: entity_instantiation_pattern + - include: component_pattern + - include: component_instantiation_pattern + - include: process_pattern + - include: cleanup + function_definition_pattern: + - match: |- + (?x) + # From the beginning of the line + ^\s* + + # The word function $1 + ((?i:function))\s+ + + ( + # A valid normal identifier $3 + ([a-zA-Z][a-zA-Z\d_]*) + # A valid string quoted identifier $4 + |("\S+") + # A valid backslash escaped identifier $5 + |(\\.+\\) + # An invalid identifier $5 + |(.+?) + ) + + # Check to make sure we have a list or we return + (?=\s* + ( + \( + |(?i:\breturn\b) + ) + ) + + captures: + 1: keyword.language.vhdl + 3: entity.name.function.function.begin.vhdl + 4: entity.name.function.function.begin.vhdl + 5: entity.name.function.function.begin.vhdl + 6: invalid.illegal.invalid.identifier.vhdl + push: + - meta_scope: meta.block.function_definition.vhdl + - match: |- + (?x) + # From the beginning of the line + ^\s* + + # The word end $1 + ((?i:end)) + + # Optional word function $3 + (\s+((?i:function)))? + + # Optional matched identifier $6 or mismatched identifier $7 + (\s+((\3|\4|\5)|(.+?)))? + + # Ending with whitespace and semicolon + (?=\s*;) + + captures: + 1: keyword.language.vhdl + 3: keyword.language.vhdl + 6: entity.name.function.function.end.vhdl + 7: invalid.illegal.mismatched.identifier.vhdl + pop: true + - include: control_patterns + - include: parenthetical_list + - include: type_pattern + - include: record_pattern + - include: cleanup + function_prototype_pattern: + - match: |- + (?x) + # From the beginning of the line + ^\s* + + # The word function $1 + ((?i:function))\s+ + + + ( + # A valid normal identifier $3 + ([a-zA-Z][a-zA-Z\d_]*) + # A valid quoted identifier $4 + |("\S+") + # A valid backslash escaped identifier $5 + |(\\.+\\) + # An invalid identifier $6 + |(.+?) + ) + + # Check to make sure we have a list or we return + (?=\s* + ( + \( + |(?i:\breturn\b) + ) + ) + + captures: + 1: keyword.language.vhdl + 3: entity.name.function.function.prototype.vhdl + 4: entity.name.function.function.prototype.vhdl + 5: entity.name.function.function.prototype.vhdl + 6: invalid.illegal.function.name.vhdl + push: + - meta_scope: meta.block.function_prototype.vhdl + - match: (?<=;) + pop: true + - match: '\b(?i:return)(?=\s+[^;]+\s*;)' + captures: + 0: keyword.language.vhdl + push: + - match: \; + captures: + 0: punctuation.terminator.function_prototype.vhdl + pop: true + - include: parenthetical_list + - include: cleanup + - include: parenthetical_list + - include: cleanup + generic_list_pattern: + - match: \b(?i:generic)\b + captures: + 0: keyword.language.vhdl + push: + - meta_scope: meta.block.generic_list.vhdl + - match: ; + captures: + 0: punctuation.vhdl + pop: true + - include: parenthetical_list + if_pattern: + - match: |- + (?x) + ( + # Optional identifier $2 + ([a-zA-Z][a-zA-Z0-9_]*) + + # Followed by a colon $3 + \s*(:)\s* + )? + + # Keyword if $4 + \b((?i:if))\b + + captures: + 2: entity.name.tag.if.generate.begin.vhdl + 3: punctuation.vhdl + 4: keyword.language.vhdl + push: + - meta_scope: meta.block.if.vhdl + - match: |- + (?x) + # The word end $1 + \b((?i:end))\s+ + + ( + ( + # Optional generate or if keyword $4 + ((?i:generate|if)) + + # Keyword if or generate required $5 + |(\S+) + )\b + ( + \s+ + ( + # Optional matching identifier $8 + (\2) + + # Mismatched identifier $9 + |(.+?) + ) + )? + )? + + # Followed by a semicolon + (?=\s*;) + + captures: + 1: keyword.language.vhdl + 4: keyword.language.vhdl + 5: invalid.illegal.if.or.generate.required.vhdl + 8: entity.name.tag.if.generate.end.vhdl + 9: invalid.illegal.mismatched.identifier.vhdl + pop: true + - include: control_patterns + - include: process_pattern + - include: entity_instantiation_pattern + - include: component_pattern + - include: component_instantiation_pattern + - include: cleanup + keywords: + - match: '''(?i:active|ascending|base|delayed|driving|event|high|image|instance|last|left|leftof|length|low|path|pos|pred|quiet|range|reverse|right|rightof|simple|stable|succ|transaction|val|value)\b' + scope: keyword.attributes.vhdl + - match: \b(?i:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)\b + scope: keyword.language.vhdl + - match: '(\+|\-|<=|=|=>|:=|>=|>|<|/|\||&|(\*{1,2}))' + scope: keyword.operator.vhdl + package_body_pattern: + - match: |- + (?x) + # The word package $1 + \b((?i:package))\s+ + + # ... but we want to be a package body $2 + ((?i:body))\s+ + + # The valid identifier $4 or the invalid one $5 + (([a-zA-Z][a-zA-Z\d_]*)|(.+?))\s+ + + # ... and we end it with an is $6 + ((?i:is))\b + + captures: + 1: keyword.language.vhdl + 2: keyword.language.vhdl + 4: entity.name.section.package_body.begin.vhdl + 5: invalid.illegal.invalid.identifier.vhdl + 6: keyword.language.vhdl + push: + - meta_scope: meta.block.package_body.vhdl + - match: |- + (?x) + # The word end $1 + \b((?i:end\b)) + + # Optional word package $3 body $4 + (\s+((?i:package))\s+((?i:body)))? + + # Optional identifier $7 or mismatched identifier $8 + (\s+((\4)|(.+?)))?(?=\s*;) + captures: + 1: keyword.language.vhdl + 3: keyword.language.vhdl + 4: keyword.language.vhdl + 7: entity.name.section.package_body.end.vhdl + 8: invalid.illegal.mismatched.identifier.vhdl + pop: true + - include: function_definition_pattern + - include: procedure_definition_pattern + - include: type_pattern + - include: subtype_pattern + - include: record_pattern + - include: cleanup + package_pattern: + - match: |- + (?x) + # The word package $1 + \b((?i:package))\s+ + + # ... but we do not want to be a package body + (?!(?i:body)) + + # The valid identifier $3 or the invalid one $4 + (([a-zA-Z][a-zA-Z\d_]*)|(.+?))\s+ + + # ... and we end it with an is $5 + ((?i:is))\b + + captures: + 1: keyword.language.vhdl + 3: entity.name.section.package.begin.vhdl + 4: invalid.illegal.invalid.identifier.vhdl + 5: keyword.language.vhdl + push: + - meta_scope: meta.block.package.vhdl + - match: |- + (?x) + # The word end $1 + \b((?i:end\b)) + + # Optional word package $3 + (\s+((?i:package)))? + + # Optional identifier $6 or mismatched identifier $7 + (\s+((\2)|(.+?)))?(?=\s*;) + captures: + 1: keyword.language.vhdl + 3: keyword.language.vhdl + 6: entity.name.section.package.end.vhdl + 7: invalid.illegal.mismatched.identifier.vhdl + pop: true + - include: function_prototype_pattern + - include: procedure_prototype_pattern + - include: type_pattern + - include: subtype_pattern + - include: record_pattern + - include: component_pattern + - include: cleanup + parenthetical_list: + - match: \( + captures: + 0: punctuation.vhdl + push: + - meta_scope: meta.block.parenthetical_list.vhdl + - match: (?<=\)) + pop: true + - match: '(?=[''"a-zA-Z0-9])' + push: + - meta_scope: meta.list.element.vhdl + - match: (;|\)|,) + captures: + 0: meta.item.stopping.character.vhdl + pop: true + - include: comments + - include: parenthetical_pair + - include: cleanup + - match: \) + scope: invalid.illegal.unexpected.parenthesis.vhdl + - include: cleanup + parenthetical_pair: + - match: \( + captures: + 0: punctuation.vhdl + push: + - meta_scope: meta.block.parenthetical_pair.vhdl + - match: \) + captures: + 0: punctuation.vhdl + pop: true + - include: parenthetical_pair + - include: cleanup + port_list_pattern: + - match: \b(?i:port)\b + captures: + 0: keyword.language.vhdl + push: + - meta_scope: meta.block.port_list.vhdl + - match: ; + captures: + 0: punctuation.vhdl + pop: true + - include: parenthetical_list + procedure_definition_pattern: + - match: |- + (?x) + # From the beginning of the line + ^\s* + + # The word function $1 + ((?i:procedure))\s+ + + ( + # A valid normal identifier $3 + ([a-zA-Z][a-zA-Z\d_]*) + # A valid quoted identifier $4 + |("\S+") + # An invalid identifier $5 + |(.+?) + ) + + # Check to make sure we have a list is + (?=\s*(\(|(?i:is))) + + captures: + 1: keyword.language.vhdl + 3: entity.name.function.procedure.begin.vhdl + 4: entity.name.function.procedure.begin.vhdl + 5: invalid.illegal.invalid.identifier.vhdl + push: + - meta_scope: meta.block.procedure_definition.vhdl + - match: |- + (?x) + # From the beginning of the line + ^\s* + + # The word end $1 + ((?i:end)) + + # Optional word function $3 + (\s+((?i:procedure)))? + + # Optional matched identifier $6 or mismatched identifier $7 + (\s+((\3|\4)|(.+?)))? + + # Ending with whitespace and semicolon + (?=\s*;) + + captures: + 1: keyword.language.vhdl + 3: keyword.language.vhdl + 6: entity.name.function.procedure.end.vhdl + 7: invalid.illegal.mismatched.identifier.vhdl + pop: true + - include: parenthetical_list + - include: control_patterns + - include: type_pattern + - include: record_pattern + - include: cleanup + procedure_prototype_pattern: + - match: |- + (?x) + \b((?i:procedure))\s+ + (([a-zA-Z][a-zA-Z0-9_]*)|(.+?)) + (?=\s*(\(|;)) + captures: + 1: keyword.language.vhdl + 3: entity.name.function.procedure.begin.vhdl + 4: invalid.illegal.invalid.identifier.vhdl + push: + - meta_scope: meta.block.procedure_prototype.vhdl + - match: ; + captures: + 0: punctual.vhdl + pop: true + - include: parenthetical_list + process_pattern: + - match: |- + (?x) + # From the beginning of the line + ^\s* + + ( + # Optional identifier $2 + ([a-zA-Z][a-zA-Z0-9_]*) + + # Colon $3 + \s*(:)\s* + )? + + # The word process #4 + ((?i:process\b)) + + captures: + 2: entity.name.section.process.begin.vhdl + 3: punctuation.vhdl + 4: keyword.language.vhdl + push: + - meta_scope: meta.block.process.vhdl + - match: |- + (?x) + # The word end $1 + ((?i:end)) + + # Optional word process $3 + (\s+((?i:process))) + + # Optional identifier $6 or invalid identifier $7 + (\s+((\2)|(.+?)))? + + (?=\s*;) + + captures: + 1: keyword.language.vhdl + 3: keyword.language.vhdl + 6: entity.name.section.process.end.vhdl + 7: invalid.illegal.invalid.identifier.vhdl + pop: true + - include: control_patterns + - include: cleanup + punctuation: + - match: (\.|,|:|;|\(|\)) + scope: punctuation.vhdl + record_pattern: + - match: \b(?i:record)\b + captures: + 0: keyword.language.vhdl + push: + - meta_scope: meta.block.record.vhdl + - match: |- + (?x) + # The word end $1 + \b((?i:end)) + + # The word record $2 + \s+((?i:record)) + + # Optional identifier $5 or invalid identifier $6 + (\s+(([a-zA-Z][a-zA-Z\d_]*)|(.*?)))? + + # Only whitespace and semicolons can be left + (?=\s*;) + + captures: + 1: keyword.language.vhdl + 2: keyword.language.vhdl + 5: entity.name.type.record.vhdl + 6: invalid.illegal.invalid.identifier.vhdl + pop: true + - include: cleanup + - include: cleanup + strings: + - match: "'.'" + scope: string.quoted.single.vhdl + - match: '"' + push: + - meta_scope: string.quoted.double.vhdl + - match: '"' + pop: true + - match: \\. + scope: constant.character.escape.vhdl + - match: \\ + push: + - meta_scope: string.other.backslash.vhdl + - match: \\ + pop: true + subtype_pattern: + - match: |- + (?x) + # The word subtype $1 + \b((?i:subtype))\s+ + + # Valid identifier $3 or invalid identifier $4 + (([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\s+ + + # The word is $5 + ((?i:is))\b + + captures: + 1: keyword.language.vhdl + 3: entity.name.type.subtype.vhdl + 4: invalid.illegal.invalid.identifier.vhdl + 5: keyword.language.vhdl + push: + - meta_scope: meta.block.subtype.vhdl + - match: ; + captures: + 0: punctuation.vhdl + pop: true + - include: cleanup + support_constants: + - match: \b(?i:math_1_over_e|math_1_over_pi|math_1_over_sqrt_2|math_2_pi|math_3_pi_over_2|math_deg_to_rad|math_e|math_log10_of_e|math_log2_of_e|math_log_of_10|math_log_of_2|math_pi|math_pi_over_2|math_pi_over_3|math_pi_over_4|math_rad_to_deg|math_sqrt_2|math_sqrt_pi)\b + scope: support.constant.ieee.math_real.vhdl + - match: \b(?i:math_cbase_1|math_cbase_j|math_czero|positive_real|principal_value)\b + scope: support.constant.ieee.math_complex.vhdl + - match: \b(?i:true|false)\b + scope: support.constant.std.standard.vhdl + support_functions: + - match: \b(?i:finish|stop|resolution_limit)\b + scope: support.function.std.env.vhdl + - match: \b(?i:readline|read|writeline|write|endfile|endline)\b + scope: support.function.std.textio.vhdl + - match: \b(?i:rising_edge|falling_edge|to_bit|to_bitvector|to_stdulogic|to_stdlogicvector|to_stdulogicvector|is_x)\b + scope: support.function.ieee.std_logic_1164.vhdl + - match: \b(?i:shift_left|shift_right|rotate_left|rotate_right|resize|to_integer|to_unsigned|to_signed)\b + scope: support.function.ieee.numeric_std.vhdl + - match: \b(?i:arccos(h?)|arcsin(h?)|arctan|arctanh|cbrt|ceil|cos|cosh|exp|floor|log10|log2|log|realmax|realmin|round|sign|sin|sinh|sqrt|tan|tanh|trunc)\b + scope: support.function.ieee.math_real.vhdl + - match: \b(?i:arg|cmplx|complex_to_polar|conj|get_principal_value|polar_to_complex)\b + scope: support.function.ieee.math_complex.vhdl + support_types: + - match: \b(?i:boolean|bit|character|severity_level|integer|real|time|delay_length|now|natural|positive|string|bit_vector|file_open_kind|file_open_status|fs|ps|ns|us|ms|sec|min|hr|severity_level|note|warning|error|failure)\b + scope: support.type.std.standard.vhdl + - match: \b(?i:line|text|side|width|input|output)\b + scope: support.type.std.textio.vhdl + - match: \b(?i:std_logic|std_ulogic|std_logic_vector|std_ulogic_vector)\b + scope: support.type.ieee.std_logic_1164.vhdl + - match: \b(?i:signed|unsigned)\b + scope: support.type.ieee.numeric_std.vhdl + - match: \b(?i:complex|complex_polar)\b + scope: support.type.ieee.math_complex.vhdl + syntax_highlighting: + - include: keywords + - include: punctuation + - include: support_constants + - include: support_types + - include: support_functions + type_pattern: + - match: |- + (?x) + # The word type $1 + \b((?i:type))\s+ + + # Valid identifier $3 or invalid identifier $4 + (([a-zA-Z][a-zA-Z0-9_]*)|(.+?)) + + ( + # A semicolon is coming up if we are incomplete + (?=\s*;) + + # Or the word is comes up $7 + |(\s+((?i:is))) + )\b + + captures: + 1: keyword.language.vhdl + 3: entity.name.type.type.vhdl + 4: invalid.illegal.invalid.identifier.vhdl + 7: keyword.language.vhdl + push: + - meta_scope: meta.block.type.vhdl + - match: ; + captures: + 0: punctuation.vhdl + pop: true + - include: record_pattern + - include: cleanup + while_pattern: + - match: |- + (?x) + # From the beginning of the line + ^\s* + ( + # Check for an identifier $2 + ([a-zA-Z][a-zA-Z0-9_]*) + + # Followed by a colon $3 + \s*(:)\s* + )? + + # The for keyword $4 + \b((?i:while))\b + + captures: + 2: '' + 3: punctuation.vhdl + 4: keyword.language.vhdl + push: + - meta_scope: meta.block.while.vhdl + - match: |- + (?x) + # The word end $1 + \b((?i:end))\s+ + ( + # Followed by keyword loop $3 + ((?i:loop)) + + # But it really is required $4 + |(\S+) + )\b + + # The matching identifier $7 or an invalid identifier $8 + (\s+((\2)|(.+?)))? + + # Only space and a semicolon left + (?=\s*;) + + captures: + 1: keyword.language.vhdl + 3: keyword.language.vhdl + 4: invalid.illegal.loop.keyword.required.vhdl + 7: entity.name.tag.while.loop.vhdl + 8: invalid.illegal.mismatched.identifier + pop: true + - include: control_patterns + - include: cleanup diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/syntax/riscv.sublime-syntax b/packages/preview/hei-synd-thesis/0.1.1/lib/syntax/riscv.sublime-syntax new file mode 100644 index 000000000..9c095232c --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/syntax/riscv.sublime-syntax @@ -0,0 +1,118 @@ +%YAML 1.2 +--- +name: riscv +file_extensions: [s, S, asm] +scope: source.rvasm +contexts: + main: + # Comments + - match: '(//|#)' + scope: punctuation.definition.comment.rvasm + push: + - meta_scope: comment.line.rvasm + - match: $ + pop: true + - match: /\* + scope: punctuation.definition.comment.rvasm + push: + - meta_scope: comment.block.rvasm + - match: \*/ + scope: punctuation.definition.comment.rvasm + pop: true + - match: ^\s*(\*)(?!/) + captures: + 1: punctuation.definition.comment.rvasm + + - include: strings + + # Symbols + - match: '^<(.*?)>:' + captures: + 1: entity.name.function.rvasm + - match: '^([^0-9\s][^\s]*?):' + captures: + 1: entity.name.function.rvasm + + # Options + - match: \.(option|section|globl)\s+([\w\.]+) + captures: + 1: keyword.operator.rvasm + 2: variable.language.rvasm + - match: \.(option|section|globl) + scope: keyword.operator.rvasm + + # Offsets + - match: <([^>+-]+)([+-]((0x)?[0-9a-fA-F]+))?> + captures: + 1: support.function.rvasm + 3: constant.numeric.rvasm + + # CSRs + - match: \b(mhartid|misa)\b + scope: support.type.rvasm + + - include: operators + + # Instructions + - match: \b(add|addi|addiw|addw|amoadd\.d|amoadd\.w|amoand\.d|amoand\.w|amomax\.d|amomax\.w|amomaxu\.d|amomaxu\.w|amomin\.d|amomin\.w|amominu\.d|amominu\.w|amoor\.d|amoor\.w|amoswap\.d|amoswap\.w|amoxor\.d|amoxor\.w|and|andi|andn|auipc|bdep|beq|bext|bfp|bge|bgeu|bgez|beqz|blt|bltu|bne|bnez|ret|call|snez|j|c\.add|c\.addi|c\.addi16sp|c\.addi4spn|c\.addiw|c\.addw|c\.and|c\.andi|c\.beqz|c\.bnez|c\.ebreak|c\.fld|c\.fldsp|c\.flw|c\.flwsp|c\.fsd|c\.fsdsp|c\.fsw|c\.fswsp|c\.j|c\.jal|c\.jalr|c\.jr|c\.ld|c\.ldsp|c\.li|c\.lui|c\.lw|c\.lwsp|c\.mv|c\.nop|c\.or|c\.sd|c\.sdsp|c\.slli|c\.srai|c\.srli|c\.sub|c\.subw|c\.sw|c\.swsp|c\.xor|clmul|clmulh|clmulr|clz|cmix|cmov|crc32\.b|crc32\.h|crc32\.w|crc32c\.b|crc32c\.h|crc32c\.w|csrrc|csrrci|csrrs|csrrsi|csrrw|csrr|csrw|csrrwi|ctz|div|divu|divuw|divw|dret|ebreak|ecall|fadd\.d|fadd\.q|fadd\.s|fclass\.d|fclass\.q|fclass\.s|fcvt\.d\.l|fcvt\.d\.lu|fcvt\.d\.q|fcvt\.d\.s|fcvt\.d\.w|fcvt\.d\.wu|fcvt\.l\.d|fcvt\.l\.q|fcvt\.l\.s|fcvt\.lu\.d|fcvt\.lu\.q|fcvt\.lu\.s|fcvt\.q\.d|fcvt\.q\.l|fcvt\.q\.lu|fcvt\.q\.s|fcvt\.q\.w|fcvt\.q\.wu|fcvt\.s\.d|fcvt\.s\.l|fcvt\.s\.lu|fcvt\.s\.q|fcvt\.s\.w|fcvt\.s\.wu|fcvt\.w\.d|fcvt\.w\.q|fcvt\.w\.s|fcvt\.wu\.d|fcvt\.wu\.q|fcvt\.wu\.s|fdiv\.d|fdiv\.q|fdiv\.s|fence|fence\.i|fence\.tso|feq\.d|feq\.q|feq\.s|fld|fle\.d|fle\.q|fle\.s|flq|flt\.d|flt\.q|flt\.s|flw|fmadd\.d|fmadd\.q|fmadd\.s|fmax\.d|fmax\.q|fmax\.s|fmin\.d|fmin\.q|fmin\.s|fmsub\.d|fmsub\.q|fmsub\.s|fmul\.d|fmul\.q|fmul\.s|fmv\.d\.x|fmv\.q\.x|fmv\.s\.x|fmv\.w\.x|fmv\.x\.d|fmv\.x\.q|fmv\.x\.s|fmv\.x\.w|fnmadd\.d|fnmadd\.q|fnmadd\.s|fnmsub\.d|fnmsub\.q|fnmsub\.s|frcsr|frflags|frrm|fscsr|fsd|fsflags|fsflagsi|fsgnj\.d|fsgnj\.q|fsgnj\.s|fsgnjn\.d|fsgnjn\.q|fsgnjn\.s|fsgnjx\.d|fsgnjx\.q|fsgnjx\.s|fsl|fsq|fsqrt\.d|fsqrt\.q|fsqrt\.s|fsr|fsri|fsrm|fsrmi|fsub\.d|fsub\.q|fsub\.s|fsw|gorc|gorci|grev|grevi|hfence\.bvma|hfence\.gvma|jal|jalr|li|la|neg|lb|lbu|ld|lh|lhu|lr\.d|lr\.w|lui|lw|lwu|max|maxu|min|minu|mret|mul|mulh|mulhsu|mulhu|mulw|mv|or|ori|orn|pack|packh|packu|pcnt|rdcycle|rdcycleh|rdinstret|rdinstreth|rdtime|rdtimeh|rem|remu|remuw|remw|rol|ror|rori|sb|sbclr|sbclri|sbext|sbexti|sbinv|sbinvi|sbreak|sbset|sbseti|sc\.d|sc\.w|scall|sd|sext\.b|sext\.h|sfence\.vma|sh|sh1add|sh2add|sh3add|shfl|shfli|sll|slli|slli\.rv32|slliw|sllw|slo|sloi|slt|slti|sltiu|sltu|sra|srai|srai\.rv32|sraiw|sraw|sret|srl|srli|srli\.rv32|srliw|srlw|sro|sroi|sub|subw|sw|unshfl|unshfli|uret|wfi|xnor|xor|xori)\b + scope: keyword.mnemonic.rvasm + + # Registers + - match: \b(ra|[sgtf]p)\b + scope: support.type.rvasm + - match: \b([xf][0-9]|[xf][012][0-9]|[xf]3[012]|ra|[sgtf]p|t[0-6]|f?s[0-9]|f?s1[01]|ft[0-7])\b + scope: storage.type.rvasm + - match: \b(f?a[0-7])\b + scope: keyword.operator.rvasm + - match: \bzero\b + scope: support.type.rvasm + + # Numbers + - match: \b-?(0x)?[0-9a-fA-F]+\b + scope: constant.numeric.rvasm + + strings: + - match: '"' + scope: punctuation.definition.string.begin.rvasm + push: + - meta_scope: string.quoted.double.rvasm + - match: '"' + scope: punctuation.definition.string.end.rvasm + pop: true + - include: string_escaped_char + - include: string_placeholder + - match: "'" + scope: punctuation.definition.string.begin.rvasm + push: + - meta_scope: string.quoted.single.rvasm + - match: "'" + scope: punctuation.definition.string.end.rvasm + pop: true + - include: string_escaped_char + + string_escaped_char: + - match: '(\\)$\n' + captures: + 1: punctuation.separator.continuation.rvasm + - match: \\(?:\\|[abefnrtv\'"?]|[0-3][0-9]{0,2}|[4-7][0-9]?|x[a-fA-F0-9]+|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}) + scope: constant.character.escape.rvasm + - match: \\. + scope: invalid.illegal.unknown-escape.rvasm + + operators: + - match: <<|>>|&&|\|\| + scope: keyword.operator.rvasm + - match: <\=|>\=|\=\=|<|>|\!\= + scope: keyword.operator.rvasm + - match: \+|\-|\*|/|%|&|\||\^|~|! + scope: keyword.operator.rvasm + - match: '\?|:' + scope: keyword.operator.rvasm + - match: \(|{|\[ + scope: punctuation.section.group.begin.rvasm + - match: \)|}|\] + scope: punctuation.section.group.end.rvasm + - match: ',|\.' + scope: punctuation.separator.rvasm + - match: ';|:' + scope: punctuation.terminator.rvasm \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/lib/template-thesis.typ b/packages/preview/hei-synd-thesis/0.1.1/lib/template-thesis.typ new file mode 100644 index 000000000..c13d240b2 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/lib/template-thesis.typ @@ -0,0 +1,345 @@ +// +// Description: HEVS Thesis Typst Template +// Author : Silvan Zahno +// +#import "helpers.typ": * +#import "pages-thesis.typ": * + +#let thesis( + option: ( + type : "final", // "draft" + lang : "en", // "de", "fr" + template : "thesis", // "midterm" + ), + doc: ( + title : "Thesis Template", + subtitle : "Longer Subtitle", + author: ( + name : "Firstname Lastname", + email : "firstname.lastname@hevs.ch", + degree : "Bachelor", + affiliation : "HEI-Vs", + place : "Sion", + url : "https://synd.hevs.io", + signature : none, + ), + keywords : ("HEI-Vs", "Systems Engineering", "Infotronics", "Thesis", "Template"), + version : "v0.1.0", + ), + summary-page : ( + logo: none, + objective: none, + content: none, + ), + professor: none, + expert: none, + school: none, + date: ( + submission: datetime.today(), + mid-term-submission: datetime.today(), + today: datetime.today(), + ), + tableof : ( + toc: true, + tof: false, + tot: false, + tol: false, + toe: false, + maxdepth: 3, + ), + logos: ( + topleft: none, + topright: none, + bottomleft: none, + bottomright: none, + ), + title-extra-content-top: none, + title-extra-content-bottom: none, + body) = { + // Sanitize inputs + doc.title = doc.at("title", default: none) + doc.subtitle = doc.at("subtitle", default: none) + doc.author = if doc.at("author", default: none) == none { + ( + name: none, + email: none, + degree: none, + affiliation: none, + place: none, + url: none, + signature: none + ) + } else { + doc.author + } + doc.author.name = doc.author.at("name", default: none) + doc.author.email = doc.author.at("email", default: none) + doc.author.degree = doc.author.at("degree", default: none) + doc.author.affiliation = doc.author.at("affiliation", default: none) + doc.author.place = doc.author.at("place", default: none) + doc.author.url = doc.author.at("url", default: none) + doc.author.signature = doc.author.at("signature", default: none) + doc.keywords = doc.at("keywords", default: ("Typst", "Template", "Thesis", "HEI-Vs", "Systems Engineering")) + doc.version = doc.at("version", default: "v0.1.0") + summary-page = if summary-page == none { + ( + logo: none, + objective: none, + content: none, + ) + } else { + summary-page + } + summary-page.logo = summary-page.at("logo", default: none) + summary-page.objective = summary-page.at("objective", default: none) + summary-page.content = summary-page.at("content", default: none) + summary-page = if summary-page.logo == none and summary-page.objective == none and summary-page.content == none { + none + } else { + summary-page + } + professor = if professor == none { + ( + name: none, + email: none, + affiliation: none, + ) + } else { + professor + } + professor.name = professor.at("name", default: none) + professor.email = professor.at("email", default: none) + professor.affiliation = professor.at("affiliation", default: none) + expert = if expert == none { + ( + name: none, + email: none, + affiliation: none, + ) + } else { + expert + } + expert.name = expert.at("name", default: none) + expert.email = expert.at("email", default: none) + expert.affiliation = expert.at("affiliation", default: none) + school = if school == none { + ( + name: none, + shortname: none, + orientation: none, + specialisation: none, + ) + } else { + school + } + school.name = school.at("name", default: none) + school.shortname = school.at("shortname", default: none) + school.orientation = school.at("orientation", default: none) + school.specialisation = school.at("specialisation", default: none) + date = if date == none { + ( + submission: datetime.today(), + mid-term-submission: datetime.today(), + today: datetime.today(), + ) + } else { + date + } + date.submission = date.at("submission", default: datetime.today()) + date.mid-term-submission = date.at("mid-term-submission", default: datetime.today()) + date.today = date.at("today", default: datetime.today()) + tableof = if tableof == none { + ( + toc: true, + tof: false, + tot: false, + tol: false, + toe: false, + maxdepth: 3, + ) + } else { + tableof + } + tableof.toc = tableof.at("toc", default: true) + tableof.tof = tableof.at("tof", default: false) + tableof.tot = tableof.at("tot", default: false) + tableof.tol = tableof.at("tol", default: false) + tableof.toe = tableof.at("toe", default: false) + tableof.maxdepth = tableof.at("maxdepth", default: 3) + logos = if logos == none { + ( + topleft: none, + topright: none, + bottomleft: none, + bottomright: none, + ) + } else { + logos + } + logos.topleft = logos.at("topleft", default: none) + logos.topright = logos.at("topright", default: none) + logos.bottomleft = logos.at("bottomleft", default: none) + logos.bottomright = logos.at("bottomright", default: none) + // basic properties + set document(author: if doc.author.name != none {doc.author.name} else {""} , title: doc.title, keywords: doc.keywords, date: date.today) + set page(margin: (top:3.5cm, bottom:3.5cm, rest:3.5cm)) + + // header and footer + set page( + header: context(if here().page() >=2 [ + #set text(small) + #h(1fr) #smallcaps(doc.title) + ]), + footer: context( if here().page() >=2 [ + #set text(small) + #h(1fr) #counter(page).display("I / 1", both: false) + ]), + ) + + // font & language + set text( + font: ( + "Libertinus Serif", + "Fira Sans", + ), + fallback: true, + lang: option.lang + ) + // paragraph + show par: set par(spacing: 1em) + + // heading + show heading: set block(above: 1.2em, below: 1.2em) + set heading(numbering: "1.1") + + show heading.where(level: 1): (it) => { + set text(size: huge) + set block(above: 1.2em, below: 1.2em) + if it.numbering != none { + let num = numbering(it.numbering, ..counter(heading).at(it.location())) + let prefix = num + h(0.5em) + text(code-border)[|] + h(0.5em) + unshift-prefix(prefix, it.body) + } else { + it + } + } + + show heading.where(level: 2): (it) => { + if it.numbering != none { + let num = numbering(it.numbering, ..counter(heading).at(it.location())) + unshift-prefix(num + h(0.8em), it.body) + } else { + it + } + } + + // link color + //show link: it => text(fill:blue, underline(it)) + show link: it => text(fill:hei-blue, it) + + // code blocks + set raw(syntaxes:"syntax/VHDL.sublime-syntax") + set raw(syntaxes:"syntax/riscv.sublime-syntax") + + show raw.where(block: false): set text(weight: "semibold") + //show raw.where(block: false): it => { + // highlight( + // fill:code-bg, + // top-edge: "ascender", + // bottom-edge: "bounds", + // extent:1pt, it) + //} + show raw.where(block: true): set text(size: tiny) + show raw.where(block: true): it => { + block( + fill: code-bg, + width:100%, + inset: 10pt, + radius: 4pt, + stroke: 0.1pt + code-border, + it, + ) + } + + // Title page + page-title-thesis( + title: doc.title, + subtitle: doc.subtitle, + date: date.submission, + lang: option.lang, + template: option.template, + school: school, + author: doc.author, + professor: professor, + expert: expert, + logos: logos, + extra-content-top: title-extra-content-top, + extra-content-bottom: title-extra-content-bottom, + ) + + // Table of Todos if draft + if option.type == "draft" { + pagebreak() + outline-todos() + } + + // Summary + if option.template == "thesis" and summary-page != none { + pagebreak() + summary( + title: doc.title, + student: doc.author.name, + year: date.submission.display("[year]"), + degree: school.orientation, + field: school.specialisation, + professor: professor, + //partner: partner, + logos: ( + main: summary-page.logo, + topleft: logos.topleft, + bottomright: logos.bottomright, + ), + objective: summary-page.objective, + address: summary-page.address, + lang: option.lang, + )[#summary-page.content] + } + + // Report info + pagebreak() + page-reportinfo( + author: doc.author, + date: date.today, + lang: option.lang, + ) + + // Table of ... + pagebreak() + toc( + tableof: tableof, + titles: ( + toc: i18n("toc-title", lang: option.lang), + tot: i18n("tot-title", lang: option.lang), + tof: i18n("tof-title", lang: option.lang), + tol: i18n("tol-title", lang: option.lang), + toe: i18n("toe-title", lang: option.lang), + ), + before: + ) + + // Main body + set par(justify: true) + set page( + header: context(if here().page() >=2 [ + #set text(small) + #h(1fr) #smallcaps(doc.title) + ]), + footer: context( if here().page() >=2 [ + #set text(small) + #h(1fr) #counter(page).display("1 / 1", both: true) + ]), + ) + counter(page).update(1) + + body +} diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/main/00-acknowledgements.typ b/packages/preview/hei-synd-thesis/0.1.1/template/main/00-acknowledgements.typ new file mode 100644 index 000000000..4ce2f764c --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/main/00-acknowledgements.typ @@ -0,0 +1,14 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * +#pagebreak() +#heading(numbering:none)[#i18n("ack-title", lang:option.lang)] + +#option-style(type:option.type)[ + While optional, acknowledgements provide an opportunity to express gratitude to individuals, institutions, or organizations that have supported you throughout your academic journey. + + Despite not impacting the evaluation, acknowledgements contribute to the overall tone and appreciation within your thesis. +] + +#lorem(50) + +#lorem(50) diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/main/01-abstract.typ b/packages/preview/hei-synd-thesis/0.1.1/template/main/01-abstract.typ new file mode 100644 index 000000000..32931f142 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/main/01-abstract.typ @@ -0,0 +1,29 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * +#pagebreak() +#heading(numbering:none)[#i18n("abstract-title", lang:option.lang)] + +#option-style(type:option.type)[ + The abstract serves as a concise summary of your entire thesis, encapsulating key elements on a single page such as: + - General background information + - Objective(s) + - Approach and method + - Conclusions +] + +#lorem(50) + +#lorem(50) + +#lorem(50) + +#v(2em) +#if doc.at("keywords", default:none) != none {[ + + _*#i18n("keywords", lang: option.lang)*_: + + #enumerating-items( + items: doc.keywords, + italic: true + ) +]} diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/main/02-introduction.typ b/packages/preview/hei-synd-thesis/0.1.1/template/main/02-introduction.typ new file mode 100644 index 000000000..cd9945a2f --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/main/02-introduction.typ @@ -0,0 +1,177 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * +#pagebreak() += #i18n("introduction-title", lang:option.lang) + +#option-style(type:option.type)[ + Your introduction serves to introduce the topic of your Bachelor thesis and to arouse the reader’s curiosity with an overview. Why it is important and how it is structured, we explain here. + + You can consider an introduction as a teaser for your bachelor thesis. You arouse interest and give a foretaste by presenting your motivation, your method and the state of research in your introduction. + + Convince your examiners already in the introduction that your Bachelor thesis will be exciting. If your professor starts reading your thesis with anticipation and interest, the chances of getting good grades are higher. + + Pay particular attention to the following in your introduction: + + - *Introduce the topic* - What characterizes the topic? + - *Introduce the goal* - What do you want to achieve with your thesis? + - *Make the reader curious* - What motivates the reader to read on? + - *Describe the relevance* - Why is this bachelor thesis scientifically relevant? + + The introduction should have the following content: + + - *Initial situation presentation of the topic* - You introduce the topic with an exciting ‘bait’. You provide initial information on the topic and the object of research and explain the current state of research. + - *Relevance of the topic motivation* - You justify the relevance of your topic (scientifically) and place it in the context of your field. In addition, it is often required that you disclose your personal motivation. + - *Objectives* - Your introduction should clearly state what the goal of your paper is and what outcome you hope to achieve upon completion of the bachelor thesis. + - *Method* - You explain the approach and justify the choice of method. + - *Structure of the Bachelor’s thesis* - Finally, you give the reader a general overview of your Bachelor’s thesis by explaining the structure, showing the red thread and how the research question is answered. +] + +#infobox()[Welcome to the template’s introductory chapter! Instead of boring you with lorem ipsum, here’s a quick guide to what you can do in Typst and, more specifically, in this template. + + Need more? Check out the #link("https://github.com/hei-templates/hei-synd-report/blob/main/guide-to-typst.pdf")[Guide to Typst].] + +== Basic markup + +Typst lets you create bold, italic, or monospaced text with ease. You can also sprinkle in equations like $e^(i pi) + 1 = 0$ or even inline code like #raw(lang:"rust", "fn main() { println!(\"Hello, World!\") }"). And because life is better in color: #text(fill:hei-pink)[pink], #text(fill:hei-blue)[blue], #text(fill:hei-yellow)[yellow], #text(fill:hei-orange)[orange], #text(fill:hei-green)[green], and more! #text(fill:color-fire)[Boldly colorize!] + +You can also write numbered or unnumbered lists: +- First item +- Second item + + First Subitem + + Second Subitem +- Third item + +Need equations? Sure! They look great as blocks too: + +#figure( + [$ sin(x) = x - x^3/(3!) + x^5/(5!) - ... = sum_(n=0)^infinity (-1)^n/((2n+1)!)x^(2n+1) $] +) + +== Images + +As they say, a picture is worth a thousand words. Let’s add one: + +#figure( + project-logo, + caption: "Project logo" +) + +== Tables + +Tables are great for organizing data. From simple to complex, Typst handles them all: + +#figure( + table( + columns: 3, + stroke:none, + align:(left+horizon), + table.header([*Name*], [*Age*], [*City*]), + [Albert Einstein], [25], [Bern], + [Marie Curie], [22], [Paris], + [Isaac Newton], [30], [London], + ), + caption: "Simple table" +) + +#figure( + table( + columns: 8, + stroke: none, + align: center, + inset: 3pt, + table.vline(x:0, start:1, end:2, stroke:0.5pt), + table.vline(x:1, start:1, end:2, stroke:0.5pt), + table.vline(x:2, start:1, end:2, stroke:0.5pt), + table.vline(x:3, start:1, end:2, stroke:0.5pt), + table.vline(x:4, start:1, end:2, stroke:0.5pt), + table.vline(x:5, start:1, end:2, stroke:0.5pt), + table.vline(x:6, start:1, end:2, stroke:0.5pt), + table.vline(x:7, start:1, end:2, stroke:0.5pt), + table.vline(x:8, start:1, end:2, stroke:0.5pt), + [\[31:27\]], [], [], [\[24:20\]], [\[19:15\]], [\[14:12\]], [\[11:7\]], [\[6:0\]], table.hline(stroke:0.5pt), + [funct5], [aq], [rl], [rs2], [rs1], [funct3], [rd], [opcode], table.hline(stroke:0.5pt), + [#align(center)[5]], [], [], [#align(center)[5]], [#align(center)[5]], [#align(center)[3]], [#align(center)[5]], [#align(center)[7]], + ), + caption: [Complex table] +) + +== Boxes + +Highlight key points with these fun boxes (and more): + +#table( + columns: 2, + stroke: none, + [ #infobox()[Infobox: For highlighting information.] ], + [ #ideabox()[Ideabox: Share a brilliant idea.] ], + [ #warningbox()[Warningbox: Proceed with caution!] ], + [ #firebox()[Firebox: This is 🔥!] ], + [ #rocketbox()[Rocketbox: Shoot for the moon!] ], + [ #todobox()[Todobox: Just do it!] ], + ) + #todo[Personnal todo before marking this thesis as final] + +== Citations, Acronyms and Glossary + +Add citations with `@` like @zahnoDynamicProjectPlanning2023 or #cite(, supplement:[p.7ff]) (stored in `/tail/bibliography.bib`). + +Acronym terms like #gls("it") expand on first use and abbreviate after #gls("it"). Glossary items such as #gls("rust") can also be used to show their description as such: #gls-description("rust"). Acronyms and glossary entries auto-generate at the document’s end (defined in `/tail/glossary.typ`). + +#pagebreak() + +== Code + +Besides writing inline code as such #raw(lang:"rust", "fn main() { println!(\"Hello World\") }") you can also write code blocks like this: + +#figure( + sourcecode()[ + ```rust +fn main() { + let ship = Starship::new("USS Rustacean", (0.0, 0.0, 0.0)); + let destination = (42.0, 13.0, 7.0); + let warp = ship.optimal_warp(ship.distance_to(destination)); + + println!("🖖 {} traveling to {:?} at Warp {:.2}", ship.name, destination, warp); + if warp <= 9.0 { + println!("✨ Warp engaged!"); + } else { + println!("⚠️ Warp failed!"); + } +} +```], + caption:"First part of the USS-Rustacean code", +) +or directly from a file +#let code_sample = read("/resources/code/uss-rustacean.rs") +#figure( + sourcecode()[ + #raw(code_sample, lang: "rust") + ], +caption: [Second part of the USS-Rustacean code from `/resources/code/uss-rustacean.rs`] +) + +== Context Problem + + +#gls("hei") +#gls("rust") #glspl("rust") + + +#cite() +#cite(, supplement:[p.7ff]) + +```rust +fn main() { + println!("Hello World!"); +} +``` + +#lorem(50) + +== Objectives + +#lorem(50) + +== Structure of this report + +#lorem(50) diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/main/03-analysis.typ b/packages/preview/hei-synd-thesis/0.1.1/template/main/03-analysis.typ new file mode 100644 index 000000000..26ad9ac74 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/main/03-analysis.typ @@ -0,0 +1,46 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * +#pagebreak() += #i18n("analysis-title", lang:option.lang) + +#option-style(type:option.type)[ + In the analysis part a so called ”State of the Art” research is done. It describes the knowledge about the studied matter through the analysis of similar or related published work. It provides a comprehensive overview of what was done, what has been done in the field and what should be further investigated. + + A State of the Art is done in multiple phases: + + + Problem formulation (Research questions) + + Literature search + + Literature evaluation + + Analysis and interpretation + + Presentation + + Good sources for a literature search depend on your subject matter. For engineering hereafter a incomplete list: + - #link("https://ieeexplore.ieee.org/")[IEEE Xplore] + - #link("https://www.sciencedirect.com")[Science Direct] + - #link("https://scholar.google.com")[Google Scholar] + - #link("https://link.springer.com")[Springer Link] + - #link("https://www.proquest.com")[ProQuest] + - #link("https://www.jstor.org")[JSTOR] + - #link("https://books.google.com")[Google Books] +] + +#lorem(50) + +#add-chapter( + after: , + before: , + minitoc-title: i18n("toc-title", lang: option.lang) +)[ + #pagebreak() + == Section 1 + + #lorem(50) + + == Section 2 + + #lorem(50) + + == Conclusion + + #lorem(50) +] diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/main/04-design.typ b/packages/preview/hei-synd-thesis/0.1.1/template/main/04-design.typ new file mode 100644 index 000000000..329baeb82 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/main/04-design.typ @@ -0,0 +1,37 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * +#pagebreak() += #i18n("design-title", lang:option.lang) + +#option-style(type:option.type)[ + In the design section of your bachelor thesis, you have the opportunity to provide a detailed blueprint of the system you intend to develop or analyze. This section serves as the foundation upon which your implementation will be built. Here's how you can enrich and expand upon this section: + + - *System Overview*: Begin by providing a comprehensive overview of the system under consideration. + - *Requirements Specification*: Outline the specific requirements that your system must fulfill. + - *Architecture and Design Principles*: Delve into the architectural design of your system, elucidating the underlying principles and design decisions that govern its structure. + - *Technology Stack*: Detail the technologies and tools that will be employed in the development of your system. + - *Data Management and Storage*: If your system involves the management or manipulation of data, provide insights into how data will be structured, stored, and accessed. + - * User Interface (UI) Design*: If applicable, describe the user interface of your system, focusing on usability, accessibility, and user experience (UX) design principles. + - *Integration and Interoperability*: Address how your system will integrate with existing systems or external services, if relevant. +] + +#lorem(50) + +#add-chapter( + after: , + before: , + minitoc-title: i18n("toc-title", lang: option.lang) +)[ + #pagebreak() + == Section 1 + + #lorem(50) + + == Section 2 + + #lorem(50) + + == Conclusion + + #lorem(50) +] diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/main/05-implementation.typ b/packages/preview/hei-synd-thesis/0.1.1/template/main/05-implementation.typ new file mode 100644 index 000000000..a54909e66 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/main/05-implementation.typ @@ -0,0 +1,37 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * +#pagebreak() += #i18n("implementation-title", lang:option.lang) + +#option-style(type:option.type)[ + In the implementation phase of your bachelor thesis, you translate the design specifications into tangible, functional artifacts. This section offers insights into the practical execution of your research, detailing the steps taken to realize the proposed system. Here are some ways to enhance and elaborate on this section: + + - *Development Methodology*: Describe the methodology or approach employed in the development process. + - *Prototyping and Iterative Development*: If applicable, discuss any prototyping or iterative development techniques utilized during the implementation phase. + - *Coding Practices and Standards*: Provide insights into the coding practices, standards, and conventions adhered to during development. + - *Testing and Quality Assurance*: Detail the testing strategies and quality assurance measures employed to validate the correctness and robustness of the implemented system. + - *Performance Optimization*: Address any performance considerations or optimizations made during the implementation phase. + - *Deployment and Configuration*: Describe the deployment process and configuration management practices involved in deploying the system to production or testing environments. + - *Documentation and Knowledge Transfer*: Highlight the importance of documentation in facilitating knowledge transfer and ensuring the sustainability of the implemented system. +] + +#lorem(50) + +#add-chapter( + after: , + before: , + minitoc-title: i18n("toc-title", lang: option.lang) +)[ + #pagebreak() + == Section 1 + + #lorem(50) + + == Section 2 + + #lorem(50) + + == Conclusion + + #lorem(50) +] diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/main/06-validation.typ b/packages/preview/hei-synd-thesis/0.1.1/template/main/06-validation.typ new file mode 100644 index 000000000..7f7a13bbd --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/main/06-validation.typ @@ -0,0 +1,35 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * +#pagebreak() += #i18n("validation-title", lang:option.lang) + +#option-style(type:option.type)[ + In addition to presenting the *results of your research in relation to your research question*, it is imperative that the validation section of your bachelor's thesis adheres to certain principles to ensure clarity, coherence, and rigor. Here are some additional considerations to enhance the validation process: + + - *Objective Description of Data*: Provide an objective and detailed description of the data used in your analysis. + - *Utilize Graphs and Tables*: Visual aids such as graphs, charts, and tables can greatly enhance the clarity and impact of your results presentation. + - *Link Results to Research Questions*: For each result presented, explicitly link it back to the corresponding research question or hypothesis. + - *Ranking Results by Importance*: Prioritize your results by ranking them in order of importance or relevance to your research objectives. + - *Confirmation or Rejection of Hypotheses*: Evaluate each result in light of the hypotheses formulated in your thesis. +] + +#lorem(50) + +#add-chapter( + after: , + before: , + minitoc-title: i18n("toc-title", lang: option.lang) +)[ + #pagebreak() + == Section 1 + + #lorem(50) + + == Section 2 + + #lorem(50) + + == Conclusion + + #lorem(50) +] diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/main/07-conclusion.typ b/packages/preview/hei-synd-thesis/0.1.1/template/main/07-conclusion.typ new file mode 100644 index 000000000..f17946f1e --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/main/07-conclusion.typ @@ -0,0 +1,31 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * +#pagebreak() += #i18n("conclusion-title", lang:option.lang) + +#option-style(type:option.type)[ + In the concluding section of your bachelor's thesis, you consolidate the essence of your research journey, encapsulating the most pivotal insights garnered throughout your study. Here's how to enhance and structure your conclusion: + + - *Project Summary*: Offer a succinct recapitulation of the core elements of your project, including its objectives, methodologies employed, and the main findings obtained. + - *Comparison with Initial Objectives*: Reflect upon how your research outcomes align with the initial objectives set forth at the outset of your thesis. + - *Encountered Difficulties*: Acknowledge and address any challenges or obstacles encountered during the course of your research. + - *Future Perspectives*: Offer insights into potential avenues for future research or practical applications stemming from your findings. + + While you keep the conclusion of your bachelor thesis short and to the point, you deal with your results in more details in the discussion. There is no new informations in the conclusion. +] + +== Project summary + +#lorem(50) + +== Comparison with the initial objectives + +#lorem(50) + +== Encountered difficulties + +#lorem(50) + +== Future perspectives + +#lorem(50) diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/metadata.typ b/packages/preview/hei-synd-thesis/0.1.1/template/metadata.typ new file mode 100644 index 000000000..cd2961eb0 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/metadata.typ @@ -0,0 +1,128 @@ +//------------------------------------- +// Document options +// +#let option = ( + //type : "final", + type : "draft", + lang : "en", + //lang : "de", + //lang : "fr", + template : "thesis", + //template : "midterm" +) +//------------------------------------- +// Optional generate titlepage image +// +#import "@preview/fractusist:0.1.1":* +#let project-logo= dragon-curve( + 12, + step-size: 10, + stroke-style: stroke( + paint: gradient.radial(..color.map.rocket), + thickness: 3pt, join: "round" + ), + height: 5cm, + fit: "contain", +) + +//------------------------------------- +// Metadata of the document +// +#let doc= ( + title : "Thesis Template", + subtitle : "Longer Subtitle", + author: ( + name : "Firstname Lastname", + email : "firstname.lastname@hevs.ch", + degree : "Bachelor", + affiliation : "HEI-Vs", + place : "Sion", + url : "https://synd.hevs.io", + signature : image("/resources/img/signature.svg", width:3cm), + ), + keywords : ("HEI-Vs", "Systems Engineering", "Infotronics", "Thesis", "Template"), + version : "v0.1.0", +) + +#let summary-page = ( + logo: project-logo, + //one sentence with max. 240 characters, with spaces. + objective: [ + The objective of this thesis is to analyze and improve the performance of a predictive maintenance system in industrial IoT environments by implementing advanced data processing algorithms and evaluating their effectiveness through case studies. + ], + //summary max. 1200 characters, with spaces. + content: [ + This bachelor thesis focuses on the optimization of predictive maintenance systems within industrial IoT environments. Predictive maintenance is a key aspect of modern manufacturing, enabling the anticipation of equipment failures and reducing downtime. The research begins by outlining the theoretical foundations of predictive maintenance, including sensor data acquisition, processing, and analysis. The study then introduces advanced data processing algorithms, such as machine learning techniques, to enhance prediction accuracy and reliability. A case study approach is employed, using real-world industrial data to evaluate the system’s performance. The results demonstrate significant improvements in fault detection rates and decision-making efficiency. The thesis concludes by discussing the implications for industry and providing recommendations for future development. This work aims to contribute to the advancement of smart maintenance systems, supporting industry 4.0 transformation efforts. + ], + address: [HES-SO Valais Wallis • rue de l'Industrie 23 • 1950 Sion \ +41 58 606 85 11 • #link("mailto"+"info@hevs.ch")[info\@hevs.ch] • #link("www.hevs.ch")[www.hevs.ch]] +) + +#let professor= ( + affiliation: "HEI-Vs", + name: "Prof. Silvan Zahno", + email: "silvan.zahno@hevs.ch", +) +#let expert= ( + affiliation: "Company", + name: "Expert Name", + email: "expert@domain.ch", +) +#let school= ( + name: none, + orientation: none, + specialisation: none, +) +#if option.lang == "de" { + school.name = "Hochschule für Ingenieurwissenschaften Wallis, HES-SO" + school.orientation = "Systemtechnik" + school.specialisation = "Infotronics" +} else if option.lang == "fr" { + school.name = "Haute École d'Ingénierie du Valais, HES-SO" + school.shortname = "HEI-Vs" + school.orientation = "Systèmes industriels" + school.specialisation = "Infotronics" +} else { + school.name = "University of Applied Sciences Western Switzerland, HES-SO Valais Wallis" + school.shortname = "HEI-Vs" + school.orientation = "Systems Engineering" + school.specialisation = "Infotronics" +} + +#let date = ( + submission: datetime(year: 2025, month: 8, day: 14), + mid-term-submission: datetime(year: 2025, month: 5, day: 2), + today: datetime.today(), +) + +#let logos = ( + main: project-logo, + topleft: if option.lang == "fr" or option.lang == "de" { + image("/resources/img/logos/hei-defr.svg", width: 6cm) + } else { + image("/resources/img/logos/hei-en.svg", width: 6cm) + }, + topright: image("/resources/img/logos/hesso-logo.svg", width: 4cm), + bottomleft: image("/resources/img/logos/hevs-pictogram.svg", width: 4cm), + bottomright: image("/resources/img/logos/swiss_universities-valais-excellence-logo.svg", width: 5cm), + ) +) + +//------------------------------------- +// Settings +// +#let tableof = ( + toc: true, + tof: false, + tot: false, + tol: false, + toe: false, + maxdepth: 3, +) + +#let gloss = true +#let appendix = false +#let bib = ( + display : true, + path : "/tail/bibliography.bib", + style : "ieee", //"apa", "chicago-author-date", "chicago-notes", "mla" +) diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/code/uss-rustacean.rs b/packages/preview/hei-synd-thesis/0.1.1/template/resources/code/uss-rustacean.rs new file mode 100644 index 000000000..3ff95f7e8 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/code/uss-rustacean.rs @@ -0,0 +1,22 @@ +struct Starship { + name: String, + position: (f64, f64, f64), +} + +impl Starship { + fn new(name: &str, position: (f64, f64, f64)) -> Self { + Self { + name: name.into(), + position, + } + } + fn distance_to(&self, dest: (f64, f64, f64)) -> f64 { + ((dest.0 - self.position.0).powi(2) + + (dest.1 - self.position.1).powi(2) + + (dest.2 - self.position.2).powi(2)) + .sqrt() + } + fn optimal_warp(&self, distance: f64) -> f64 { + (distance / 10.0).sqrt().min(9.0) + } +} diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/icon.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/icon.svg new file mode 100644 index 000000000..e9f580c1c --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/icon.svg @@ -0,0 +1,459 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hei-defr.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hei-defr.svg new file mode 100644 index 000000000..f973db49c --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hei-defr.svg @@ -0,0 +1,280 @@ + +image/svg+xml diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hei-en.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hei-en.svg new file mode 100644 index 000000000..a0ff283ed --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hei-en.svg @@ -0,0 +1,170 @@ + +image/svg+xml diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hesso-logo.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hesso-logo.svg new file mode 100644 index 000000000..c7fda57a8 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hesso-logo.svg @@ -0,0 +1,390 @@ + +image/svg+xml \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hevs-pictogram.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hevs-pictogram.svg new file mode 100644 index 000000000..48ae8ceda --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/hevs-pictogram.svg @@ -0,0 +1,130 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/swiss_universities-valais-excellence-logo.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/swiss_universities-valais-excellence-logo.svg new file mode 100644 index 000000000..ffc4f1169 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/swiss_universities-valais-excellence-logo.svg @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/synd.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/synd.svg new file mode 100644 index 000000000..a4626abde --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/logos/synd.svg @@ -0,0 +1,44 @@ + + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/placeholder.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/placeholder.svg new file mode 100644 index 000000000..1911dab8f --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/placeholder.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/project-logo.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/project-logo.svg new file mode 100644 index 000000000..803c4aa4b --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/project-logo.svg @@ -0,0 +1,1057 @@ + + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/signature.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/signature.svg new file mode 100644 index 000000000..6a92d19cc --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/signature.svg @@ -0,0 +1,121 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/specifications.svg b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/specifications.svg new file mode 100644 index 000000000..97593a67f --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/resources/img/specifications.svg @@ -0,0 +1,3442 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HES-SO Valais + SYND + ETE + TEVI + + + + + + + + + + + + + + X + X + X + + + + + + + + + + + + + + + + + + + + + Données du travail de diplôme + Daten der Di + p + lomarbeit + FO 1.2.02.07.CB + haj/11/01/2016 + + + + + + + + + + + Rapport reçu le / + + Visa du secrétariat / + + Filière / StudiengangSYNDAnnée académique / Studienjahryyyy/yyNo TD / Nr. DAit/2019/84 + + + + + + + + + + + + + + Mandant / Auftraggeber + + + + HES + + SO Valais + + Industrie + + Etablissement partenaire PartnerinstitutionEtudiant / StudentSurname Name + + / Ausführungsort + + + + HES + + SO Valais + + Industrie + + Etablissement partenaire Partnerinstitution + + + + + + + + + + + + Professeur / DozentSilvan Zahno + + + + + + + + + + Travail confidentiel / vertrauliche Arbeit + + oui / ja + 1 + + + + non / nein Expert / Experte + (données complètes) + + + + + + + + + + + + + + + + + + Titre / Titel + Titel + + + + + + + + Description / Beschreibung + Objectifs / Ziele: + + + + + + + + + + + Signature ou visa / Unterschrift oder Visum + Délais / Termine + + + + + + + + + + + + + Leiter der Vertiefungsrichtung / Studiengang: + + + Etudiant / Student : + + + Attribution du thème / Ausgabe des Auftrags: + dd.mm.yyyy + Présentation intermédiaire / Zwischenpräsentation + dd + + dd.mm.yyyy + Remise du rapport / Abgabe des Schlussberichts: + dd.mm.yyyy, hh:mm + Expositions / Ausstellungen der Diplomarbeiten: + dd,dd + + dd.mm.yyyy + Défense orale / Mündliche Verfechtung: + dd + + dd.mm.yyyy + + + + + + + + + + + + 1 + + + - + + diplôme. + Durch seine Unterschrift verpflichtet sich der/die Student/in, sich an die Richtlinie DI.1.2.02.07 der Diplomarbeit zu halten. + + + diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/tail/a-appendix.typ b/packages/preview/hei-synd-thesis/0.1.1/template/tail/a-appendix.typ new file mode 100644 index 000000000..317bf07bf --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/tail/a-appendix.typ @@ -0,0 +1,6 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * +#pagebreak() += #i18n("appendix-title", lang: option.lang) + +#lorem(50) diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/tail/bibliography.bib b/packages/preview/hei-synd-thesis/0.1.1/template/tail/bibliography.bib new file mode 100644 index 000000000..9f04cefe9 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/tail/bibliography.bib @@ -0,0 +1,17 @@ +@article{zahnoDynamicProjectPlanning2023, + title = {Dynamic Project Planning with Digital Twin}, + author = {Zahno, Silvan and Corre, Jérôme and Petrovic, Darko and Mottiez, Gilles and Fracheboud, Loïc and Amand, Axel and Devènes, Steve and Maître, Gilbert and Carrino, Francesco}, + date = {2023-05-09}, + journaltitle = {Frontiers in Manufacturing Technology}, + shortjournal = {Front. Manuf. Technol.}, + volume = {3}, + publisher = {Frontiers}, + issn = {2813-0359}, + doi = {10.3389/fmtec.2023.1009633}, + url = {https://www.frontiersin.org/journals/manufacturing-technology/articles/10.3389/fmtec.2023.1009633/full}, + urldate = {2025-01-08}, + abstract = {{$<$}p{$>$}The digital twin (DT) concept plays a crucial role in Industry 4.0 and the digitalization of manufacturing processes. A DT is a virtual representation of a physical object, system, or process, designed to accurately reflect its real-world counterpart. In manufacturing, existing process data are often incomplete and do not qualify as a DT. However, with the help of specialized communication frameworks and cheaper, easier-to-use sensors, it is possible to integrate the existing manufacturing execution system (MES) and enterprise resource planning (ERP) data with the missing data gathered from the shop floor to create a comprehensive DT. In this paper, we present a digital shop floor decision support system (DSS) for non-linear aluminum manufacturing production. The system is split into five main components: digitization of shop floor orders; merging and sorting of MES, ERP, and shop floor data; custom and genetic optimization algorithms for the aging furnace production step; layout construction mechanism for optimal placement and stacking of orders in the furnace; and a user-friendly graphical user interface (GUI). The system’s performance was evaluated through three tests. The first test measured the efficiency of digitization, the second aimed to quantify time saved in finding packets in the hall, and the last test measured the impact of the optimizer on furnace productivity. The results revealed a 23.5\% improvement in furnace capacity, but limitations were identified due to usability and human intervention.{$<$}/p{$>$}}, + langid = {english}, + keywords = {3D packaging,genetic algorithms,Greed Algorithms (GA),Real-time monitoring,Real-time optimization,shop floor optimization,user-center design}, + file = {/Users/zas/Zotero/storage/XFE2V7Y8/Zahno et al. - 2023 - Dynamic project planning with digital twin.pdf} +} diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/tail/bibliography.typ b/packages/preview/hei-synd-thesis/0.1.1/template/tail/bibliography.typ new file mode 100644 index 000000000..3193a05a9 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/tail/bibliography.typ @@ -0,0 +1,20 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * +#pagebreak() + +#let make_bibliography( + bib:( + display: true, + path: "/tail/bibliography.bib", + style: "ieee", //"apa", "chicago-author-date", "chicago-notes", "mla" + ), + title: i18n("bib-title", lang: option.lang), +) = {[ + #if bib.display == true {[ + #pagebreak() + #bibliography(title: title, bib.path, style:bib.style) + ]} else{[ + #set text(size: 0pt) + #bibliography(title: "", bib.path, style:bib.style) + ]} +]} diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/tail/glossary.typ b/packages/preview/hei-synd-thesis/0.1.1/template/tail/glossary.typ new file mode 100644 index 000000000..080af520b --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/tail/glossary.typ @@ -0,0 +1,59 @@ +#import "@preview/hei-synd-thesis:0.1.1": * +#import "/metadata.typ": * + +#let entry-list = ( + ( + key: "hei", + short: "HEI", + long: "Haute École d'Ingénierie", + group: "University" + ), + ( + key: "synd", + short: "SYND", + long: "Systems Engineering", + group: "University" + ), + ( + key: "it", + short: "IT", + long: "Infotronics", + group: "University" + ), + ( + key: "rust", + short: "Rust", + plural: "Rust programs", + long: "Rust Programming Language", + description: "Rust is a modern systems programming language focused on safety, speed, and concurrency. It prevents common programming errors such as null pointer dereferencing and data races at compile time, making it a preferred choice for performance-critical applications.", + group: "Programming Language" + ), +) + +#let make_glossary( + gloss:true, + title: i18n("gloss-title", lang: option.lang), +) = {[ + #if gloss == true {[ + #pagebreak() + #set heading(numbering: none) + = #title + #print-glossary( + entry-list, + // show all term even if they are not referenced, default to true + show-all: false, + // disable the back ref at the end of the descriptions + disable-back-references: false, + ) + ]} else{[ + #set text(size: 0pt) + #title + #print-glossary( + entry-list, + // show all term even if they are not referenced, default to true + show-all: false, + // disable the back ref at the end of the descriptions + disable-back-references: false, + ) + ]} +]} diff --git a/packages/preview/hei-synd-thesis/0.1.1/template/thesis.typ b/packages/preview/hei-synd-thesis/0.1.1/template/thesis.typ new file mode 100644 index 000000000..b1b5c45d8 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/template/thesis.typ @@ -0,0 +1,55 @@ +// +// Description: Main document to stitch everything together +// +#import "@preview/hei-synd-report:0.1.1": * +#import "/metadata.typ": * +#import "/tail/bibliography.typ": * +#import "/tail/glossary.typ": * +#show:make-glossary +#register-glossary(entry-list) + +//------------------------------------- +// Template config +// +#show: thesis.with( + option: option, + doc: doc, + summary-page: summary-page, + professor: professor, + expert: expert, + school: school, + date: date, + tableof: tableof, + logos: logos, +) + +//------------------------------------- +// Content +// +#include("/main/00-acknowledgements.typ") +#include "/main/01-abstract.typ" +#include "/main/02-introduction.typ" +#include "/main/03-analysis.typ" +#include "/main/04-design.typ" +#include "/main/05-implementation.typ" +#include "/main/06-validation.typ" +#include "/main/07-conclusion.typ" + +//------------------------------------- +// Glossary +// +#make_glossary(gloss:gloss, title:i18n("gloss-title", lang: option.lang)) + +//------------------------------------- +// Bibliography +// +#make_bibliography(bib:bib, title:i18n("bib-title", lang: option.lang)) + +//------------------------------------- +// Appendix +// +#if appendix == true {[ + #counter(heading).update(0) + #set heading(numbering:"A") + #include "/tail/a-appendix.typ" +]} diff --git a/packages/preview/hei-synd-thesis/0.1.1/thumbnail.png b/packages/preview/hei-synd-thesis/0.1.1/thumbnail.png new file mode 100644 index 000000000..c3d23b820 Binary files /dev/null and b/packages/preview/hei-synd-thesis/0.1.1/thumbnail.png differ diff --git a/packages/preview/hei-synd-thesis/0.1.1/typst.toml b/packages/preview/hei-synd-thesis/0.1.1/typst.toml new file mode 100644 index 000000000..d5639ea00 --- /dev/null +++ b/packages/preview/hei-synd-thesis/0.1.1/typst.toml @@ -0,0 +1,35 @@ +[package] +name = "hei-synd-thesis" +version = "0.1.1" +compiler = "0.13.0" +authors = [ + "Silvan Zahno ", + "Rémi Heredero ", + "HEI-Vs ", +] +repository = "https://github.com/hei-templates/hei-synd-thesis" +homepage = "https://synd.hevs.io" +license = "MIT" +description = "A thesis template tailored to the Systems Engineering (Synd) program at the HEI-Vs School of Engineering, Sion, Switzerland." +entrypoint = "lib/template-thesis.typ" +categories = ["thesis", "report", "paper"] +disciplines = ["engineering", "computer-science", "education"] +keywords = [ + "Thesis", + "Report", + "Project", + "University", + "HES-SO Valais//Wallis", + "HEI", + "HEI-Vs", + "School of engineering", + "Synd", + "Systems Engineering", + "Infotronics", + "Sion", +] + +[template] +path = "template" +entrypoint = "thesis.typ" +thumbnail = "thumbnail.png"