Compare commits

...

149 Commits
devel ... main

Author SHA1 Message Date
Sven Vogel 56f330693d Merge pull request 'feat/fira-fonts' (#61) from feat/fira-fonts into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 1m59s Details
Reviewed-on: #61
2024-09-27 15:49:43 +00:00
Sven Vogel 1a263f66ac chore: added font directory to ci
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 2m0s Details
2024-09-27 17:47:08 +02:00
Sven Vogel 75d50f3207 feat: added fira fonts
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 2m16s Details
2024-09-27 17:43:58 +02:00
Sven Vogel 6a4d78ba8b Merge pull request 'removed: install of package sudo in github action' (#59) from fix/ci-failing-on-github into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 1m43s Details
Reviewed-on: #59
2024-08-27 19:38:31 +00:00
Sven Vogel 4da04a195c removed: install of package sudo in github action
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 1m48s Details
2024-08-27 21:35:27 +02:00
Sven Vogel 572d505701 added nix pipeline to github
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 1m46s Details
2024-08-27 21:20:17 +02:00
Sven Vogel 255cdfeae1 Merge branch 'feature/typstyle'
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 2m48s Details
2024-08-27 21:16:23 +02:00
Sven Vogel 1548bf8c5b changed release pipeline to make use of nix
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 1m43s Details
2024-08-27 20:58:01 +02:00
Sven Vogel dabe0a2ef5 fixed failing tests
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 1m41s Details
2024-08-27 20:54:33 +02:00
Sven Vogel 6c8f94e4b7 fixed test local import 2024-08-27 20:36:21 +02:00
Sven Vogel ae729230bb made generate-theme executable 2024-08-27 20:28:50 +02:00
Sven Vogel 9c3ae5c9e7 switched to unstable nix channel 2024-08-27 20:27:41 +02:00
Sven Vogel 093ed09293 fixed format of template for (#13)
Gitea Action for checking typst compilation / run-ci-linux (push) Failing after 1m47s Details
2024-08-27 19:52:07 +02:00
Sven Vogel 946a16fce6 add typstyle check to CI (#13) 2024-08-27 19:50:31 +02:00
Sven Vogel 7ad138dc00 fix CI failing (#18) 2024-08-27 19:50:09 +02:00
Sven Vogel 201e991ac4 added sudo to action runner
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 1m52s Details
2024-08-27 19:36:24 +02:00
Sven Vogel 2daf7bb6c9 updated nix action to v27
Gitea Action for checking typst compilation / run-ci-linux (push) Failing after 11s Details
2024-08-27 19:34:46 +02:00
Sven Vogel 37e60a315e make long titles break on title page but not on content (#54)
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 28s Details
2024-08-27 14:07:16 +02:00
Sven Vogel 9f9225910f fix lock notice spelling mistake (#53)
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 31s Details
2024-08-27 13:52:50 +02:00
Sven Vogel e1b8eceea6 fix heading supplement not translated (#52)
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 27s Details
2024-08-26 16:10:52 +02:00
Sven Vogel 0438d73ab5 only show used acronyms (#51)
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 28s Details
2024-08-26 15:26:28 +02:00
Sven Vogel 410c753339 fix wrong glossary and acronym group language (#50)
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 27s Details
2024-08-26 15:08:03 +02:00
Sven Vogel dd6a9ccce0 decrease padding between acronyms and glossary entries (#49)
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 27s Details
2024-08-26 14:47:37 +02:00
Sven Vogel eb21aeee99 bumped version to 0.4.1
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 25s Details
release / release (push) Successful in 1m9s Details
2024-08-22 11:23:28 +02:00
Sven Vogel f237beb6fa deprecate theme (#48) 2024-08-22 11:22:34 +02:00
Sven Vogel 2b966e42a0 fix confidentiality statement not showing up in outline (#47) 2024-08-22 10:53:37 +02:00
Sven Vogel 39c620c270 add domain name after url text (#46) 2024-08-22 10:51:35 +02:00
Sven Vogel c60d81bd2d add acronym to glossary if specified (#45) 2024-08-22 10:43:13 +02:00
Sven Vogel a95b42bac3 make weight of list of figures regular (#44) 2024-08-22 10:23:09 +02:00
Sven Vogel 4084960737 add URL function (#42)
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 26s Details
release / release (push) Successful in 1m11s Details
2024-08-20 14:17:50 +02:00
Sven Vogel dd902adebd Merge branch 'main' of https://git.montehaselino.de/DHBW/dhbw-abb-typst-template
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 34s Details
2024-08-20 09:56:39 +02:00
Sven Vogel 3026dc1a1e fixed spelling mistakes 2024-08-20 09:49:13 +02:00
Sven Vogel 418992d27f changed glossarium format
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 31s Details
2024-08-14 11:57:27 +02:00
Sven Vogel b1aca1b18b format with typstyle (#40)
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 29s Details
release / release (push) Successful in 1m11s Details
2024-08-12 18:09:14 +02:00
Sven Vogel 08a6eaf79f add inline color block (#39) 2024-08-12 18:07:44 +02:00
Sven Vogel a4e6e6c47a reset use of code theme (#39) 2024-08-12 18:01:03 +02:00
Sven Vogel a90678ffab added border around raw figures and inline raws
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 27s Details
release / release (push) Successful in 1m7s Details
2024-07-26 09:38:02 +02:00
Sven Vogel dd8ed6e2f5 fixed error when lang of raw figure was empty
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 30s Details
release / release (push) Successful in 1m3s Details
2024-07-22 08:41:02 +02:00
Sven Vogel 4e82edce06 Merge pull request 'added prettier code blocks' (#36) from feature/pretty-codeblocks into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 30s Details
release / release (push) Successful in 1m7s Details
Reviewed-on: #36
2024-07-19 13:09:01 +00:00
Sven Vogel ce94168b13 added prettier code blocks
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 27s Details
2024-07-19 15:08:11 +02:00
Sven Vogel acf8b73315 Merge pull request 'added push mirror notice to README.md' (#35) from github-readme into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 25s Details
Reviewed-on: #35

Refs: #34
2024-07-19 08:45:30 +00:00
Sven Vogel 8436a4a99a added push mirror notice to README.md
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 26s Details
2024-07-19 10:42:47 +02:00
Sven Vogel d7502e8e6b changed to PAT instead of GITHUB_TOKEN for release
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 26s Details
release / release (push) Successful in 1m2s Details
2024-07-19 09:58:26 +02:00
Sven Vogel 8988ab1491 Merge pull request 'feature/github-workflow' (#33) from feature/github-workflow into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 30s Details
release / release (push) Successful in 1m4s Details
Reviewed-on: #33

Refs: #32
2024-07-19 07:47:34 +00:00
Sven Vogel e1dd12cdfd added release on tag github action
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 25s Details
2024-07-19 09:45:23 +02:00
Sven Vogel b827520692 added python setup action
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 26s Details
2024-07-19 09:36:48 +02:00
Sven Vogel cc56ccecd7 changed install path for typst
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 30s Details
2024-07-19 09:31:17 +02:00
Sven Vogel 8dc61c01fe added github workflow
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 29s Details
2024-07-19 09:23:39 +02:00
Sven Vogel 0f7c6257d9 Merge pull request 'improvement/refine-readme' (#30) from improvement/refine-readme into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 25s Details
release / release (push) Has been cancelled Details
Reviewed-on: #30

Refs: #28
2024-07-18 13:11:31 +00:00
Sven Vogel d24d4a34e9 moved section preview on below of features
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 26s Details
2024-07-18 15:09:45 +02:00
Sven Vogel 30f011f24c updated README.md
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 27s Details
2024-07-18 15:07:59 +02:00
Sven Vogel 0c89695cda Merge pull request 'improvement/bold-figure-captions' (#27) from improvement/bold-figure-captions into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 25s Details
Reviewed-on: #27
2024-07-18 10:24:15 +00:00
Sven Vogel b80351fb70 added numbering format for listing caption
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 25s Details
2024-07-18 12:20:38 +02:00
Sven Vogel baba65ef41 changed display supplement for code blocks 2024-07-18 12:19:35 +02:00
Sven Vogel 6371459259 changed display supplement to bold text 2024-07-18 12:18:01 +02:00
Sven Vogel 2c801036dd Merge pull request 'feature/header-footer-format' (#25) from feature/header-footer-format into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 24s Details
Reviewed-on: #25
2024-07-18 09:01:12 +00:00
Sven Vogel ca4312bfde changed header numbering title spacing to 0.5em
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 34s Details
2024-07-18 10:58:23 +02:00
Sven Vogel 9ae921d52a changed footer alignment to center 2024-07-18 10:49:47 +02:00
Sven Vogel a709ad2765 changed style of header and footer 2024-07-17 15:48:15 +02:00
Sven Vogel 72d1fd84a7 Merge pull request 'added watermark stripes' (#23) from feature/header-footer-format into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 26s Details
Reviewed-on: #23
2024-07-12 13:08:04 +00:00
Sven Vogel 43da04143a added watermark stripes
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 26s Details
2024-07-12 15:06:32 +02:00
Sven Vogel bbd88494d7 added dhbw template note to README
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 28s Details
2024-07-11 15:46:28 +02:00
Sven Vogel b842747c3b aaadded 0.5pt line between data cells of tables 2024-07-11 15:36:55 +02:00
Sven Vogel 25adc2df91 changed appendix heading to be invisable but still show up in toc 2024-07-11 15:22:19 +02:00
Sven Vogel a7f4937f9e fixed wrong header title being used
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 27s Details
2024-07-11 14:58:18 +02:00
Sven Vogel b46660e605 changed header style to omit last dot 2024-07-11 11:41:04 +02:00
Sven Vogel 9ba1fea4d7 changed: ci action syntax
Gitea Action for checking typst compilation / run-ci-linux (push) Failing after 10s Details
2024-07-08 22:58:13 +02:00
Sven Vogel 4a1fcd0a35 changed: CI runs on nix shell
Gitea Action for checking typst compilation / run-ci-linux (push) Failing after 0s Details
2024-07-08 22:56:56 +02:00
Sven Vogel d648d5121c changed: formatted source files 2024-07-08 21:57:23 +02:00
Sven Vogel 4fd088ce3f added: format script 2024-07-08 21:50:13 +02:00
Sven Vogel 7262caeee7 fixed: spelling mistake in glossary.typ
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 24s Details
2024-07-08 14:52:35 +02:00
Sven Vogel dfb2cdbebe added: auto grouping for glossary
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 24s Details
2024-07-08 14:50:07 +02:00
Sven Vogel c06fecec4c changed: read glossary from YAML file
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 28s Details
2024-07-08 14:25:56 +02:00
Sven Vogel 5ea73081a6 changed: outline only lists heading supplemented with chapter 2024-07-08 13:55:57 +02:00
Sven Vogel 39a33e327b added: custom glossarium theme 2024-07-08 13:49:04 +02:00
Sven Vogel 256827d07b changed: disabled back glossary references 2024-07-08 10:27:48 +02:00
Sven Vogel 18979f8f81 changed: raw block font is option in config 2024-07-08 10:18:03 +02:00
Sven Vogel fb03bfc414 added: numbering to equations 2024-07-08 09:58:46 +02:00
Sven Vogel 600d348b13 added: ABB branding colors 2024-07-08 09:55:38 +02:00
Sven Vogel c3d65f93b2 added: APA style table 2024-07-08 09:34:33 +02:00
Sven Vogel f30c0fe950 added: -y option to CI update
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 24s Details
release / release (push) Successful in 1m2s Details
2024-07-05 15:06:11 +02:00
Sven Vogel bf21b8c6e5 added: update to python install
Gitea Action for checking typst compilation / run-ci-linux (push) Failing after 13s Details
2024-07-05 15:05:07 +02:00
Sven Vogel d3638b0957 changed: replaced setup-python with manual install
Gitea Action for checking typst compilation / run-ci-linux (push) Failing after 12s Details
2024-07-05 15:03:54 +02:00
Sven Vogel bdb82db2d3 changed: bumped setup-python to version 4
Gitea Action for checking typst compilation / run-ci-linux (push) Failing after 29s Details
2024-07-05 14:58:42 +02:00
Sven Vogel b3dac40f15 changed: CI python version to 3.12
Gitea Action for checking typst compilation / run-ci-linux (push) Failing after 10s Details
2024-07-05 14:54:14 +02:00
Sven Vogel fedf9d8833 added: ABB branded theme based on Base16
Gitea Action for checking typst compilation / run-ci-linux (push) Failing after 29s Details
2024-07-05 14:50:31 +02:00
Sven Vogel ccd8e89131 changed: layout and formatting
added: source code header
2024-07-05 13:04:27 +02:00
Sven Vogel eb8e457a0c removed: header ascent and footer descent 2024-07-05 10:31:14 +02:00
Sven Vogel 04705b2003 changed: rotation of draft watermark set to -22.5° 2024-07-05 10:18:53 +02:00
Sven Vogel 9c71251771 removed: code snippet line numbers 2024-07-05 09:50:36 +02:00
Sven Vogel 5f4044111e added: figures spanning multiple pages break now 2024-07-05 09:49:08 +02:00
Sven Vogel c1af367b67 removed: unecessary release files
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 10s Details
release / release (push) Successful in 45s Details
2024-07-04 16:32:40 +02:00
Sven Vogel d06752cf33 added missing go dependency
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 11s Details
release / release (push) Successful in 58s Details
2024-07-04 16:29:12 +02:00
Sven Vogel e96b64cd46 Merge pull request 'added: missing CI run' (#17) from fix/missing-run-ci into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 10s Details
release / release (push) Failing after 13s Details
Reviewed-on: #17
2024-07-04 14:21:14 +00:00
Sven Vogel 60ad15e11c added: missing CI run
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 10s Details
2024-07-04 16:20:33 +02:00
Sven Vogel 8c3534f8d4 Merge pull request 'added: release on tag CI and changed CI script' (#16) from feature/release-on-tag into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 10s Details
Reviewed-on: #16
2024-07-04 14:17:32 +00:00
Sven Vogel afb8e89bd4 added: release on tag CI and changed CI script
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 11s Details
2024-07-04 16:16:28 +02:00
Sven Vogel 41bcf480e2 added: preface
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 10s Details
2024-07-04 15:09:05 +02:00
Sven Vogel dfa1590936 fixed: outline showing wrong numbering format
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 11s Details
2024-07-03 15:24:01 +02:00
Sven Vogel 8d7cd78c34 changed: page counter update location moved before bibliography
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 11s Details
2024-07-03 14:27:12 +02:00
Sven Vogel c92bff7d00 fixed: wrong page count in content
Refs: #14
2024-07-03 14:25:37 +02:00
Sven Vogel 5b44a7c591 added: watermark and draft config value
Refs: #15
2024-07-03 14:16:00 +02:00
Sven Vogel 6567210ac4 change: llleft aligned text in README
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 11s Details
2024-07-02 12:39:03 +02:00
Sven Vogel 54956cadf2 change: added tests for invalid configurations
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 10s Details
2024-07-02 11:11:33 +02:00
Sven Vogel f8f80dfa52 change: added template compilation to CI
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 11s Details
2024-07-02 10:59:19 +02:00
Sven Vogel 40bf0af544 feat: added default configuration and configuration validation 2024-07-02 10:57:38 +02:00
Sven Vogel ed9a5beac5 added: environment variable to set explicit typst version in CI
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 11s Details
Refs: #12
2024-07-02 08:15:08 +02:00
Sven Vogel b9a8d22bcf docs: fixed text not being centered
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 10s Details
Fixed description text, title, badges and preview image not being centered

#Refs: #10
2024-07-01 21:02:42 +00:00
Sven Vogel c73087be36 docs: updated readme
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 9s Details
Add coloful badges, an image of the titlepage, FAQ section, Legal section and Feature section

Refs #9
2024-07-01 22:50:01 +02:00
Sven Vogel cd325b7076 Merge pull request 'feature/templae-rewrite' (#8) from feature/templae-rewrite into main
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 9s Details
Reviewed-on: #8
2024-07-01 18:21:30 +00:00
Sven Vogel 6bda6ba539 fixed run-ci script
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 9s Details
2024-07-01 19:25:45 +02:00
Sven Vogel 5058a407ff added install script for typst
Gitea Action for checking typst compilation / run-ci-linux (push) Failing after 11s Details
2024-07-01 19:14:48 +02:00
Sven Vogel 4ab95760c8 change to typst setup action
Gitea Action for checking typst compilation / Explore-Gitea-Actions (push) Failing after 5s Details
2024-07-01 18:56:27 +02:00
Sven Vogel 4465d125bf changed from typst setup to latest rust
Gitea Action for checking typst compilation / Explore-Gitea-Actions (push) Has been cancelled Details
2024-07-01 18:45:16 +02:00
Sven Vogel fbf52d75e3 added test and gitea action workflow
Gitea Action for checking typst compilation / Explore-Gitea-Actions (push) Failing after 7s Details
2024-07-01 16:17:54 +02:00
Sven Vogel ca5448e9d3 refactored example folder to template 2024-07-01 16:02:42 +02:00
Sven Vogel 968f63be78 fixed: outline including appendices 2024-07-01 14:46:32 +02:00
Sven Vogel ac70aade96 added: appendix 2024-07-01 13:50:54 +02:00
Sven Vogel 77d197c029 updated style and example 2024-07-01 12:13:57 +02:00
Sven Vogel 5ec79a536d added: glossary 2024-06-28 15:52:45 +02:00
Sven Vogel 26f947a0d3 added: outline 2024-06-28 15:20:58 +02:00
Sven Vogel 381e8d5d42 added: prelude of document 2024-06-28 11:54:30 +02:00
Sven Vogel 84d9133b9a added: new template structure 2024-06-27 15:57:04 +02:00
Sven Vogel ad004376c7 refined appendix 2024-04-08 10:03:51 +02:00
Sven Vogel 4e01b2f85c changed document meta data 2024-04-04 13:04:20 +02:00
Sven Vogel 4c22a19cc7 fixed appendix page header 2024-04-04 12:55:30 +02:00
Sven Vogel edda30e460 Merge pull request 'added appendix page' (#6) from appendix into main
Reviewed-on: DHBW/Praxisbericht-Template-Typst#6
2024-04-04 10:50:55 +00:00
Sven Vogel 07db0024db added appendix page 2024-04-04 12:49:59 +02:00
Sven Vogel 3e2aa9a699 Merge pull request 'refactor' (#5) from refactor into main
Reviewed-on: DHBW/Praxisbericht-Template-Typst#5
2024-04-04 10:25:04 +00:00
Sven Vogel 68c2e4ae49 fixed missing page header when changing page counter 2024-04-04 12:12:19 +02:00
Sven Vogel 8fd96d77e9 added log file to gitignore 2024-04-03 09:04:13 +02:00
Sven Vogel b8127bf735 changed font from Noto Serif to TeX Gyre Termes 2024-04-03 08:57:46 +02:00
Sven Vogel 410742999a refactored content into multiple files 2024-03-30 18:40:06 +01:00
Sven Vogel aab64c8e89 added abstract 2024-03-29 12:26:02 +01:00
Sven Vogel e0ebab37e9 moved info.yaml to conf 2024-03-29 12:23:36 +01:00
Sven Vogel 5d3eb2ea29 Merge pull request 'refractored includes after source file rename' (#4) from translation-support into main
Reviewed-on: DHBW/Praxisbericht-Template-Typst#4
2024-03-29 10:56:06 +00:00
Sven Vogel fea5119a5b refractored includes after source file rename 2024-03-29 11:55:20 +01:00
Sven Vogel ce0301f065 Merge pull request 'translation-support' (#3) from translation-support into main
Reviewed-on: DHBW/Praxisbericht-Template-Typst#3
2024-03-29 10:52:47 +00:00
Sven Vogel c12386b9a1 translated missing files 2024-03-29 11:51:31 +01:00
Sven Vogel fa76d50d4c translated file names 2024-03-29 11:51:05 +01:00
Sven Vogel cc5b355bfc added translation for main 2024-03-28 23:08:23 +01:00
Sven Vogel 0e07d9cbd8 added translation for working packages 2024-03-28 22:44:29 +01:00
Sven Vogel 3cfb0cf9c8 added translation for title page 2024-03-28 21:27:28 +01:00
Sven Vogel 50639bce0a added translation for confidential clause 2024-03-28 20:06:03 +01:00
Sven Vogel 7f0bfd28e6 added translation for declaration of indipendence 2024-03-28 19:58:16 +01:00
Sven Vogel 3067ab6bac added translation for gender note 2024-03-28 19:24:42 +01:00
Sven Vogel 9694701024 make utils follow font size 2024-03-28 17:15:34 +01:00
Sven Vogel 5968727bbe changed default font to Noto Serif 2024-03-28 17:01:13 +01:00
Sven Vogel ca168bdd79 updated style 2024-03-26 11:25:07 +01:00
89 changed files with 3003 additions and 345 deletions

20
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,20 @@
name: Gitea Action for checking typst compilation
run-name: Performing Typst compilation
on: [push]
jobs:
run-ci-linux:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install dependencies for Nix setup action
run: |
apt update -y
apt install sudo -y
- name: Setup Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run CI
run: nix-shell --run ./run-ci.sh

View File

@ -0,0 +1,34 @@
name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install dependencies for Nix setup action
run: |
apt update -y
apt install sudo -y
- name: Setup Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run CI
run: nix-shell --run ./run-ci.sh
- name: Setup go
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Create release
id: create-release
uses: https://gitea.com/actions/release-action@main
with:
files: |-
example.pdf
api_key: '${{secrets.RELEASE_TOKEN}}'

16
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: GitHub Action for checking typst compilation
run-name: Performing Typst compilation
on: [push]
jobs:
run-ci-linux:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run CI
run: nix-shell --run ./run-ci.sh

30
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run CI
run: nix-shell --run ./run-ci.sh
- name: Setup go
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Create release
id: create-release
uses: https://gitea.com/actions/release-action@main
with:
files: |-
example.pdf
api_key: '${{secrets.RELEASE_TOKEN}}'

3
.gitignore vendored
View File

@ -1 +1,2 @@
*.pdf
*.pdf
*.log

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2024 DHBW
Copyright (c) 2024 Sven Vogel
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:

183
README.md
View File

@ -1,17 +1,170 @@
# Praxisbericht-Template-Typst
Tempalte für Praxisberichte, T100, T200, T3000 und Bechelor Arbeiten. Im Gegensatz zu https://git.montehaselino.de/DHBW/Praxisbericht-Template wird Typst und nicht LaTeX als typsetting sprache verwendet.
<div align="center">
<h1>DHBW-ABB template for Typst</h1>
<img src="https://img.shields.io/gitea/last-commit/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de">
<img src="https://img.shields.io/github/actions/workflow/status/Servostar/dhbw-abb-typst-template/ci.yml?label=build">
<img src="https://img.shields.io/gitea/v/release/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de&display_name=release">
<img src="https://img.shields.io/badge/license-MIT-ff0000">
<img src="https://img.shields.io/badge/Typst-2B9CB0">
<img src="https://img.shields.io/gitea/languages/count/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de">
<br>
<br>
<b>Unofficial</b> but feature rich Typst template for writing a thesis or report at DHBW<br>
with according ABB AG branding in mind.
<br>
<br>
<img width="1000pt" src="./assets/banner.png">
</div>
## Geplante Features:
- Inhaltsverzeichnis
- Quelltextverzeichnis
- Abbildungsverzechnis
- Tabellenverzeichnis
- Literaturverzeichnis
- Glossar
- Abkürzungsverzeichnis
- Ligratures in code blöcken
- Diagramme
- Literatur
- Fußnoten
- Anhang
## Table of Contents
1. [Contribution](#contribution)
1. [Features](#features)
2. [Usage](#usage)
2. [Preview of pages](#preview)
3. [Relation to DHBW docx template](#dhbw-docx-template)
4. [Format and branding conformance](#format)
5. [Fonts](#fonts)
6. [Legal](#legal)
7. [For LaTeX users](#for-users-jumping-over-from-latex)
8. [FAQ](#faq)
1. [Typst vs LaTeX](#why-typst-instead-of-latex)
2. [Source of logos](#where-are-the-logos-from)
## Contribution
> ⚠️ **Important** <br>
> Development happens at an external site [here](https://git.montehaselino.de/DHBW/dhbw-abb-typst-template).
> The GitHub repository is only a push mirror, but issues are still welcome at any time!
## Features
> ⚠️ **Notice** <br>
> Typst ist under active development and thus may lack features an experienced LaTeX is used to.
This template includes designs for a titlepage, confidantiality statement, declaration of authorship and more with a consistent design inspired by various unofficial works made by students at DHBW. Layout and the choise fonts are based on the unofficial [supercharged-dhbw](https://github.com/DannySeidel/typst-dhbw-template) Typst template. It comes with automatic generation of outlines for figures, tables, code snippets and appendices.
The template can generate sections for a glossary, combinging acronyms and technical terms into a singular section.
A short overview of all features the template is capable of:
- Acronyms
- Glossary
- Table of Contents for: headings, figures, tables and listings and appendecis
- Appendix
- Extra page for:
- Declaration of Authorship
- Confidentiality Statement
- Preleminary notice
- Watermark for draft versions
- Automatic form filling for data provided via configuration
- Styles for captions, tables and equations
- ABB branding inspired code theme
## Preview
![](./assets/page-preview.png)
## Usage
### Without Typst package manager
Clone the repository into a subfolder of your project or add it a git submodule. The you can import the `lib.typ` file from `src`.
Once thats done calling the following snippet `#show: dhbw-template.with(conf)` will setup the template. You can provide a configuration for the template to use.
The default configuration can be found in `src/conf.typ`.
```typst
#import "src/lib.typ": *
#show: dhbw-template.with((
lang: "en",
region: "en",
author: (
name: "Sven Vogel",
semester: 4,
program: "Informationtechnology",
course: "TINF19IT1",
faculty: "Technik",
university: "DHBW Mannheim",
company: "ABB AG",
supervisor: "Benny Goodman",
matriculation-number: 123456789),
thesis: (
title: "Unofficial ABB/DHBW Typst template",
subtitle: "for reports and thesises",
submission-date: "23rd march 2020",
timeframe: "1st january 2020 - 20th march 2020",
kind: "T2000",
summary: summary,
abstract: abstract,
preface: include "preface.typ",
keywords: ( "IT", "other stuff" ),
bibliography: bibliography("refs.bib"),
glossary: yaml("glossary.yml"),
appendices: include "appendix.typ")))
// Your document code goes here!
= Introduction
lorem(50)
= Chapter 1
#lorem(230)
```
## DHBW DOCX template
The official [DHBW template for Word](https://blog.fakultaet-technik.de/wp-content/uploads/2015/06/Studienarbeitsvorlage.docx) was used a strong inspiration but not as base template.
## Format
All pages have a margin of 2.5cm between header/footer/content and the page border.
Header and footer do not overlap into this margin in order to conform to university requirements.
Bibliography is formated with the IEEE style. <br>
Appendecies make use of an abbreviation of APA style.
Complies with ABB branding guidelines such as:
- proper usage of the logo
- respecting the logo safe area
- brand colors (in syntax highlightning)
## Fonts
Both fonts used in the document are licensed under the [Open Font License](https://openfontlicense.org/) and can be used for non-commercial as well as commercial purposes:
- [Fira Sans](https://github.com/bBoxType/FiraSans)
- [Fira Math](https://github.com/firamath/firamath)
- [Fira Code NF](https://www.nerdfonts.com/font-downloads)
Consider giving the creators of the font credit for their amazing work!
## For users jumping over from LaTeX
The developers around Typst have made pretty handy comparison guide between LaTeX and Typst syntax and features. You can find it [here](https://typst.app/docs/guides/guide-for-latex-users/).
## Legal
This template and its content is in no way officially affiliaterd with either DHBW or ABB AG.
Its only purpose is to simplify the process of getting started with the typsetting language Typst for writing a university report or thesis.
As author and owner of the reposity I claim no copyright of the logos used in the document, the software used to compile the source or the documents based on this template.
## FAQ
### Why Typst instead of LaTeX?
LaTeX is quite old. Which does not make it bad just because. But with its age and historically grown way of dealing with pretty much any kind of task - has made LaTeX cumbersome to work with. The syntax is outdated for sure but the most annoying issues (for me personally) are the following:
- long compilation times
- poor documentation of build systems such as `latexmk`
- lots of stuff requires extra programs to be run in between
- page layout is easy to mess up
- HUGE installation size
Typst in comparison is serval orders of magnitudes faster and has native support for UTF-8. It automatically runs several times to generate the proper layout and links. Additionally being open source and written in Rust it is contained within a single handy binary.
**TLDR;** I find Typst easier and faster to work with.
### Where are the logos from?
The logos for both ABB AG and DHBW are freely available at Wikimedia Commons:
- [ABB logo as svg](https://commons.wikimedia.org/wiki/File:ABB_logo.svg)
- [DHBW logo as svg](https://upload.wikimedia.org/wikipedia/de/1/1d/DHBW-Logo.svg)

BIN
assets/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

BIN
assets/page-preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
assets/thumbnail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

93
fonts/Fira Code/LICENSE Normal file
View File

@ -0,0 +1,93 @@
Copyright (c) 2014, The Fira Code Project Authors (https://github.com/tonsky/FiraCode)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

48
fonts/Fira Code/README.md Normal file
View File

@ -0,0 +1,48 @@
# Nerd Fonts
This is an archived font from the Nerd Fonts release v3.2.1.
For more information see:
* https://github.com/ryanoasis/nerd-fonts/
* https://github.com/ryanoasis/nerd-fonts/releases/latest/
# Fira Code
**Fira Code** is a free monospaced font with programming ligatures.
For more information have a look at the upstream website: https://github.com/tonsky/FiraCode
Version: 6.2
## Which font?
### TL;DR
* Pick your font family:
* If you are limited to monospaced fonts (because of your terminal, etc) then pick a font with `Nerd Font Mono` (or `NFM`).
* If you want to have bigger icons (usually around 1.5 normal letters wide) pick a font without `Mono` i.e. `Nerd Font` (or `NF`). Most terminals support this, but ymmv.
* If you work in a proportional context (GUI elements or edit a presentation etc) pick a font with `Nerd Font Propo` (or `NFP`).
### Ligatures
Ligatures are generally preserved in the patched fonts.
Nerd Fonts `v2.0.0` had no ligatures in the `Nerd Font Mono` fonts, this has been dropped with `v2.1.0`.
If you have a ligature-aware terminal and don't want ligatures you can (usually) disable them in the terminal settings.
### Explanation
Once you narrow down your font choice of family (`Droid Sans`, `Inconsolata`, etc) and style (`bold`, `italic`, etc) you have 2 main choices:
#### `Option 1: Download already patched font`
* For a stable version download a font package from the [release page](https://github.com/ryanoasis/nerd-fonts/releases)
* Or download the development version from the folders here
#### `Option 2: Patch your own font`
* Patch your own variations with the various options provided by the font patcher (i.e. not include all symbols for smaller font size)
For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ-and-Troubleshooting#which-font)
[SIL-RFN]:http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web_fonts_and_RFNs#14cbfd4a

Binary file not shown.

92
fonts/Fira Math/LICENSE Normal file
View File

@ -0,0 +1,92 @@
Copyright (C) 2018--2023 by Xiangdong Zeng <xdzeng96@gmail.com>
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION AND CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

4
generate-theme.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
pip install -r base16/requirements.txt
python base16/generator.py base16/abb.yml base16/template.tmTheme src/res/abb.tmTheme

53
run-ci.sh Executable file
View File

@ -0,0 +1,53 @@
#!/bin/bash
function log() {
local timestamp=$(date +"%Y-%m-%d %H:%M:%S")
echo "$1 at $timestamp: $2"
}
function abort() {
log "ERROR" "test case $1 has failed"
exit 1
}
function print-box() {
printf "\\n"
echo ".----------------------------------------------------------------."
printf "| %-62s |\\n" "$1"
echo "'----------------------------------------------------------------'"
}
function enter-section() {
print-box "$1"
log "INFO" "running task in section $1: $2"
log "INFO" "section output following..."
printf "\\n"
eval "$2"
exit_status=$?
if [ "$3" == "should fail" ]; then
log "INFO" "expected to fail..."
if [ $exit_status -eq 0 ]; then
abort "command: $2 failed in section: $1 with: $exit_status"
fi
else
log "INFO" "expected to pass..."
if [ ! $exit_status -eq 0 ]; then
abort "command: $2 failed in section: $1 with: $exit_status"
fi
fi
printf "\\n"
log "INFO" "section $1 completed successfully"
}
enter-section "Typstyle checking" "./run-fmt.sh --check src/lib.typ" 0
enter-section "Compiling template..." "typst compile template/main.typ --root . --font-path fonts example.pdf"
enter-section "TEST: local template import" "typst compile tests/local-import/main.typ --root . --font-path fonts"
enter-section "TEST: invalid config case 1" "typst compile tests/invalid-config/test-case-1.typ --root . --font-path fonts" "should fail"
enter-section "TEST: invalid config case 2" "typst compile tests/invalid-config/test-case-2.typ --root . --font-path fonts"
enter-section "TEST: invalid config case 3" "typst compile tests/invalid-config/test-case-3.typ --root . --font-path fonts" "should fail"
log "INFO" "CI completed successfully"

42
run-fmt.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
function format() {
# format file
# typstyle --format $1
if [ -z "$1" ]; then
return
fi
local wd=$(dirname $(realpath "$1"))
echo "processing file $1..."
typstyle "$2" "$1" > /dev/null
if [ $? -eq 1 ]; then
echo "failed format validation: $1"
exit 1
fi
local imports=$(rg "#import \"([a-z0-9/\-]+\.typ)\"" -Nor '$1' "$1")
# format all included files
while IFS= read -r line; do
if [ -z "$line" ]; then
continue
fi
format "$wd/$line" "$2"
done <<< "$imports"
}
case $1 in
"--format")
format "$2" "--inplace"
;;
"--check")
format "$2" "--check"
;;
*)
echo "unknown option: $1"
exit 1
;;
esac

13
shell.nix Normal file
View File

@ -0,0 +1,13 @@
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable";
pkgs = import nixpkgs { config = {}; overlays = []; };
in
pkgs.mkShellNoCC {
packages = with pkgs; [
python312
python312Packages.pyyaml
typst
typstyle
];
}

18
src/branding.typ Normal file
View File

@ -0,0 +1,18 @@
// Reference color scheme can be found here:
// https://brand.abb/portal/en/branding-principles/basic-brand-elements/color
// ABB branding colors
#let ABB-RED = cmyk(0%, 100%, 95%, 0%)
#let ABB-BLACK = cmyk(0%, 0%, 0%, 100%)
#let ABB-GRAY-01 = cmyk(0%, 0%, 0%, 90%)
#let ABB-GRAY-02 = cmyk(0%, 0%, 0%, 75%)
#let ABB-GRAY-03 = cmyk(0%, 0%, 0%, 55%)
#let ABB-GRAY-04 = cmyk(0%, 0%, 0%, 35%)
#let ABB-GRAY-05 = cmyk(0%, 0%, 0%, 15%)
#let ABB-GRAY-06 = cmyk(0%, 0%, 0%, 5%)
#let ABB-WHITE = cmyk(0%, 0%, 0%, 0%)
// ABB branding functinal colors
#let ABB-BLUE = cmyk(100%, 53%, 2%, 16%)
#let ABB-GREEN = cmyk(91%, 4%, 100%, 25%)
#let ABB-YELLOW = cmyk(0%, 9%, 100%, 0%)

106
src/conf.typ Normal file
View File

@ -0,0 +1,106 @@
// .--------------------------------------------------------------------------.
// | Configuration |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 27.06.2024
// License: MIT
#import "branding.typ": *
// default configuration
#let default-config = (
// language settings used to make decisions about hyphenation and others
lang: "en", // ISO 3166 language code of text: "de", "en"
region: "en", // region code
// mark this thesis as draft
// Adds preleminarry note page and watermark
draft: true,
// information about author(s)
author: (
name: "Sven Vogel",
semester: 4,
program: "Informationtechnology",
course: "TINF19IT1",
faculty: "Technik",
university: "DHBW Mannheim",
company: "ABB AG",
supervisor: "Benny Goodman",
matriculation-number: 123456789),
// information about thesis
thesis: (
title: "Unofficial ABB/DHBW Typst template",
subtitle: "for reports and thesises", // subtitle may be none
submission-date: "23rd march 2020",
timeframe: "1st january 2020 - 20th march 2020",
kind: "T2000",
// translated version of abstract, only used in case language is not english
summary: none,
abstract: none,
preface: none,
keywords: ( "IT", "other stuff" ),
bibliography: none /* bibliography("refs.bib") */,
glossary: none,
appendices: none),
style: (
header: (
content-padding: 1.5em,
underline-top-padding: 0pt,
logo-height: 3em),
footer: (
content-padding: 1.5em),
page: (
format: "a4",
margin: (
left: 3cm,
right: 2.5cm,
top: 2.5cm,
bottom: 2.5cm)),
text: (
size: 12pt,
font: "Fira Sans"),
heading: (
font: "Fira Sans"),
code: (
theme: "res/abb.tmTheme",
font: "FiraCode Nerd Font",
lines: false,
size: 10pt,
tab-size: 4),
link: (
color: ABB-GRAY-02)))
// Insert a dictionary `update` into `base` but only the entries of update that also exist in base
// Runs recursively on all sub dictionaries
#let deep-insert-checked(base, update) = {
if base == none {
panic("target dictionary is none")
}
if update == none {
return base
}
for (key, val) in base {
if key in update {
let update_val = update.at(key)
if type(val) == dictionary and type(update_val) == dictionary {
base.insert(key, deep-insert-checked(val, update_val))
} else if val == none or type(val) == type(update_val) {
base.insert(key, update_val)
} else {
panic("missmatched dictionary entry `" + key + "` type: expected `" + type(val) + "` got `" + type(update_val) + "`")
}
} else {
base.insert(key, val)
}
}
return base
}
#let validate-config(config) = {
return deep-insert-checked(default-config, config)
}

255
src/glossarium.typ Normal file
View File

@ -0,0 +1,255 @@
// .--------------------------------------------------------------------------.
// | Glossarium@4.1.0 with custom format |
// '--------------------------------------------------------------------------'
// Authors: ENIB-Community
// Changed: Sven Vogel
// Edited: 08.07.2024
// License: MIT
// Customized version of https://github.com/ENIB-Community/glossarium/tree/release-0.4.1
// in order to conform to DHBW requirements in terms of format
/* 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.*/
// glossarium figure kind
#let __glossarium_figure = "glossarium_entry"
// prefix of label for references query
#let __glossary_label_prefix = "glossary:"
// global state containing the glossary entry and their location
#let __glossary_entries = state("__glossary_entries", (:))
#let __glossarium_error_prefix = "glossarium error : "
#let __query_labels_with_key(loc, key, before: false) = {
if before {
query(
selector(label(__glossary_label_prefix + key)).before(
loc,
inclusive: false,
),
loc,
)
} else {
query(selector(label(__glossary_label_prefix + key)), loc)
}
}
// key not found error
#let __not-found-panic-error-msg(key) = {
__glossarium_error_prefix + "key '" + key + "' not found"
}
// Reference a term
#let gls(key, suffix: none, long: none, display: none) = {
context {
let __glossary_entries = __glossary_entries.final(here())
if key in __glossary_entries {
let entry = __glossary_entries.at(key)
let gloss = __query_labels_with_key(here(), key, before: true)
let is_first = gloss == ()
let entlong = entry.at("long", default: "")
let textLink = if display != none {
[#display]
} else if (
is_first or long == true
) and entlong != [] and entlong != "" and long != false {
[#entlong (#entry.short#suffix)]
} else {
[#entry.short#suffix]
}
[#link(
label(entry.key),
textLink,
)#label(__glossary_label_prefix + entry.key)]
} else {
panic(__not-found-panic-error-msg(key))
}
}
}
// Reference to term with pluralisation
#let glspl(key, long: none) = {
let suffix = "s"
context {
let __glossary_entries = __glossary_entries.final(here())
if key in __glossary_entries {
let entry = __glossary_entries.at(key)
let gloss = __query_labels_with_key(here(), key, before: true)
let is_first = gloss == ()
let entlongplural = entry.at("longplural", default: "")
let entlong = if entlongplural == [] or entlongplural == "" {
// if the entry long plural is not provided, then fallback to adding 's' suffix
let entlong = entry.at("long", default: "")
if entlong != [] and entlong != "" {
[#entlong#suffix]
} else {
entlong
}
} else {
[#entlongplural]
}
let entplural = entry.at("plural", default: "")
let short = if entplural == [] or entplural == "" {
[#entry.short#suffix]
} else {
[#entplural]
}
let textLink = if (
is_first or long == true
) and entlong != [] and entlong != "" and long != false {
[#entlong (#short)]
} else {
[#short]
}
[#link(
label(entry.key),
textLink,
)#label(__glossary_label_prefix + entry.key)]
} else {
panic(__not-found-panic-error-msg(key))
}
}
}
// show rule to make the references for glossarium
#let make-glossary(body) = {
show ref: r => {
if r.element != none and r.element.func() == figure and r
.element
.kind == __glossarium_figure {
// call to the general citing function
gls(str(r.target), suffix: r.citation.supplement)
} else {
r
}
}
body
}
#let __normalize-entry-list(entry_list) = {
let new-list = ()
for entry in entry_list {
new-list.push((
key: entry.key,
short: entry.short,
plural: entry.at("plural", default: ""),
long: entry.at("long", default: ""),
longplural: entry.at("longplural", default: ""),
desc: entry.at("desc", default: ""),
group: entry.at("group", default: ""),
))
}
return new-list
}
#let print-glossary(
entry_list,
show-all: false,
disable-back-references: false,
enable-group-pagebreak: false,
) = {
let entries = __normalize-entry-list(entry_list)
__glossary_entries.update(x => {
for entry in entry_list {
x.insert(entry.key, entry)
}
x
})
let groups = entries.map(x => x.at("group")).dedup()
for group in groups.sorted() {
if group != "" [#heading(group, level: 1, outlined: false) ]
for entry in entries.sorted(key: x => x.key) {
if entry.group == group {
[
#show figure.where(kind: __glossarium_figure): it => it.caption
#figure(
supplement: "",
kind: __glossarium_figure,
numbering: none,
caption: {
context {
let key = if entry.key.ends-with("__glossary_entry") {
entry.key.replace("__glossary_entry", "")
} else {
entry.key
}
let term_references = __query_labels_with_key(here(), key)
if term_references.len() != 0 or show-all [
#let desc = entry.at("desc", default: "")
#let long = entry.at("long", default: "")
#let hasLong = long != "" and long != []
#let hasDesc = desc != "" and desc != []
#block(
below: 1.5em,
par(hanging-indent: 1em)[
#text(weight: "bold", entry.short)
#if hasLong and hasDesc [
(#text(entry.long))
] else if hasLong {
text(entry.long)
}
#if hasDesc [ #sym.dash.en ]
#if hasDesc [ #desc ]
#if disable-back-references != true {
term_references
.map(x => x.location())
.sorted(key: x => x.page())
.fold(
(values: (), pages: ()),
((values, pages), x) => if pages.contains(
x.page(),
) {
(values: values, pages: pages)
} else {
values.push(x)
pages.push(x.page())
(values: values, pages: pages)
},
)
.values
.map(x => {
let page-numbering = x.page-numbering()
if page-numbering == none {
page-numbering = "1"
}
link(x)[#numbering(
page-numbering,
..counter(page).at(x),
)]
}
)
.join(", ")
}
],
)
]
}
},
)[] #label(entry.key)
]
}
}
if enable-group-pagebreak {
pagebreak(weak: true)
}
}
};

100
src/glossary.typ Normal file
View File

@ -0,0 +1,100 @@
// .--------------------------------------------------------------------------.
// | Glossary Utilities |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 08.07.2024
// License: MIT
#let glossary(entries, config) = {
assert(
type(entries) == dictionary,
message: "The glossary is not a dictionary",
)
let processed_glossary = (:)
for (k, v) in entries.pairs() {
assert(
type(v) == dictionary,
message: "The glossary entry `" + k + "` is not a dictionary",
)
for key in v.keys() {
assert(
key in ("short", "long", "desc", "group"),
message: "Found unexpected key `" + key + "` in glossary entry `" + k,
)
}
assert(
type(v.short) == str,
message: "The short form of glossary entry `" + k + "` is not a string",
)
if "long" in v {
assert(
type(v.long) == str,
message: "The long form of glossary entry `" + k + "` is not a string",
)
}
if "desc" in v {
assert(
type(v.desc) == str,
message: "The description of glossary entry `" + k + "` is not a string",
)
}
if "group" in v {
assert(
type(v.group) == str,
message: "The optional group of glossary entry `" + k + "` is not a string",
)
} else {
let acronym_group = if config.lang == "de" {
"Abkürzungsverzeichnis"
} else {
"List of Acronyms"
}
let glossary_group = if config.lang == "de" {
"Begriffe"
} else {
"Glossary"
}
let group = if "long" in v {
acronym_group
} else {
glossary_group
}
// create dedicated entries for
// acronym and glossary
if "long" in v and "desc" in v {
processed_glossary.insert(
k,
(short: v.short, long: v.long, group: acronym_group),
)
processed_glossary.insert(
k + "__glossary_entry",
(short: v.short, desc: v.desc, long: v.long, group: glossary_group),
)
} else {
processed_glossary.insert(k, v)
processed_glossary.at(k).group = group
}
}
}
return processed_glossary.pairs().map(((key, entry)) => (
key: key,
short: entry.short,
long: eval(entry.at("long", default: ""), mode: "markup"),
desc: eval(entry.at("desc", default: ""), mode: "markup"),
group: entry.at("group", default: ""),
))
}

View File

@ -1,30 +0,0 @@
autor: Sven Vogel
titel: Konfiguration & Integration von PROFINET
untertitel: für die AC500 SPS
typ: T2000
semester: 3
fakultät: Technik
studiengang: Informationstechnik
universität: DHBW Mannheim
matrikelnummer: 1191225
betrieb: ABB AG
betreuer: Florian Miedniak
abgabe: 20. März 2024
bearbeitungszeitraum: 1. Januar 2024 - 20. März 2024
stichwörter:
- informatik
- profinet
# Berechent automatisch die Wochen Anzahl
# Start- und Endzeit müssen im Format dd-mm-yyyy sein.
arbeits-pakete:
- thema: Konfiguration des Stacks
start: 08.01.2024
ende: 31.01.2024
- thema: Integration in die Laufzeit
start: 01.02.2024
ende: 01.03.2024
- thema: Testen und Evaluation
start: 04.03.2024
ende: 20.03.2024

136
src/lib.typ Normal file
View File

@ -0,0 +1,136 @@
// .--------------------------------------------------------------------------.
// | Template of DHBW thesis |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 27.06.2024
// License: MIT
#import "conf.typ": validate-config, default-config
#import "branding.typ": *
#import "style.typ": global_styled_doc, content_styled, end_styled
#import "glossary.typ": glossary
#import "pages/titlepage.typ": new_title_page
#import "pages/declaration-of-authorship.typ": new_declaration_of_authorship
#import "pages/confidentiality-statement.typ": new_confidentiality_statement_page
#import "pages/prerelease-note.typ": new_prerelease_note
#import "pages/outline.typ": new_outline
#import "pages/abstract.typ": new_abstract
#import "pages/preface.typ": new-preface
#import "pages/appendix.typ": show-appendix
#let group-break() = {
[#pagebreak()]
}
#let inline-color(color, content) = {
box(
stroke: 1pt + ABB-GRAY-05,
radius: 2pt,
inset: (left: 2pt, right: 2pt),
outset: (top: 4pt, bottom: 4pt),
fill: ABB-GRAY-06,
[#box(
fill: rgb(color),
radius: 2pt,
inset: 0pt,
width: 0.75em,
height: 0.75em,
) #text(
font: default-config.style.code.font,
size: default-config.style.code.size,
content,
)],
)
}
#let url(label, content) = {
link(label)[#underline(
offset: 2pt,
stroke: 0.5pt + blue,
text(fill: blue)[
#content
#let domain = label.find(regex("\w+\.\w+(?:\.\w+)*"))
#if domain.len() > 0 [
(#domain)
]
],
)]
}
// start of template pages and styles
#let dhbw-template(config, body) = [
#let config = validate-config(config)
#let doc = body
// apply global style to every element in the argument content
#global_styled_doc(config)[
// set document properties
#set document(
author: config.author.name,
keywords: config.thesis.keywords,
title: config.thesis.title,
)
// configure text locale
#set text(
lang: config.lang,
region: config.region,
)
// preppend title page
#new_title_page(config)
// prelude includes: title, declaration of authorship, confidentiality statement, outline and abstract
// these will have roman page numbers
#new_declaration_of_authorship(config)
#new_confidentiality_statement_page(config)
#if config.draft {
new_prerelease_note(config)
}
#new_abstract(config)
#new-preface(config)
#new_outline()
// glossary is built inline here because the links must be
// exposed to the entire document
#import "glossarium.typ": *
#show: make-glossary
#pagebreak(weak: true)
#if "glossary" in config.thesis and config.thesis.glossary != none {
print-glossary(
show-all: false,
disable-back-references: true,
enable-group-pagebreak: true,
glossary(config.thesis.glossary, config),
)
pagebreak(weak: true)
}
#counter(page).update(1)
// mark end of prelude
#metadata("prelude terminate") <end-of-prelude>
#content_styled(config, doc)
#metadata("content terminate") <end-of-content>
#end_styled(config)[
// add bibliography if set
#if "bibliography" in config.thesis and config.thesis.bibliography != none {
pagebreak(weak: true)
counter(page).update(1)
set bibliography(style: "ieee")
config.thesis.bibliography
}
// appendix
#show-appendix(config: config)
]
]
]

View File

@ -1,73 +0,0 @@
// style text
#set text(
ligatures: true,
size: 12pt // global font size
)
// page geometry
#set page(
margin: (left: 3cm, right: 2cm, top: 2cm + 2em + 2em, bottom: 2cm),
paper: "a4",
)
#let info = yaml("info.yaml")
// set PDF meta information
#set document(
author: info.autor,
date: datetime.today(),
keywords: info.stichwörter
)
#include "pages/titel.typ"
#include "pages/selbständigkeitserklärung.typ"
#include "pages/sperrvermerk.typ"
#include "pages/gender-hinweis.typ"
#include "pages/übersicht-arbeitspakete.typ"
#set page(
binding: left,
header-ascent: 2em,
header: locate(loc => {
align(right, counter(page).display("I."))
v(-0.75em)
line(length: 100%)
}),
footer: ""
)
// vorwort
#outline(title: "Inhaltsverzeichnis")
#pagebreak()
#outline(
title: [Abbildungsverzeichnis],
target: figure.where(kind: image),
)
#pagebreak()
#outline(
title: [Tabellensverzeichnis],
target: figure.where(kind: table),
)
#pagebreak()
#outline(
title: [Quelltextverzeichnis],
target: figure.where(kind: raw),
)
#pagebreak()
#set page(
header: locate(loc => {
align(right, counter(page).display("1."))
line(length: 100%)
}),
footer: ""
)

29
src/pages/abstract.typ Normal file
View File

@ -0,0 +1,29 @@
// .--------------------------------------------------------------------------.
// | Abstract |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 28.06.2024
// License: MIT
#let new_abstract(config) = (
context {
set align(center + horizon)
// only include summary when a language other than english is used
if text.lang == "de" [
// Summary is supposed to be on separate page
#pagebreak(weak: true)
= Zusammenfassung
#config.thesis.summary
]
// abstract is supposed to be on separate page
pagebreak(weak: true)
heading("Abstract")
config.thesis.abstract
}
)

46
src/pages/appendix.typ Normal file
View File

@ -0,0 +1,46 @@
// .--------------------------------------------------------------------------.
// | Appendix |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 28.06.2024
// License: MIT
#let show-appendix(config: dictionary) = (
context {
counter(heading).update(0)
let title = if text.lang == "en" {
"Appendix"
} else {
"Anhang"
}
if "appendices" in config.thesis {
pagebreak(weak: true)
// appendix will be invisible on the appendecies page
// but still listed in the ToC
show heading: it => []
heading(level: 1, numbering: none, title)
// APA style appendix
show heading: it => {
let number = if it.numbering != none {
counter(heading).display(it.numbering)
}
block()[
#title #number - #it.body
]
}
show heading.where(level: 1): it => v(2em) + it + v(1em)
show heading.where(level: 2): it => v(1em) + it + v(0.5em)
show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
set heading(numbering: "A.1", supplement: title)
config.thesis.appendices
}
}
)

View File

@ -0,0 +1,64 @@
// .--------------------------------------------------------------------------.
// | Confidentiality Statement |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 28.06.2024
// License: MIT
#let new_confidentiality_statement_page(config) = (
context {
pagebreak(weak: true)
let thesis = config.thesis
let author = config.author
if text.lang == "de" [
#heading(level: 1, "Sperrvermerk")
] else if text.lang == "en" [
#heading(level: 1, "Confidentiality Statement")
]
if text.lang == "de" [
Der Inhalt dieser Arbeit mit dem Thema
] else if text.lang == "en" [
The content of this work with the topic
]
v(1em)
set align(center)
text(weight: "bold", thesis.title)
if thesis.subtitle != none {
linebreak()
thesis.subtitle
}
set align(left)
v(1em)
set par(justify: true)
if text.lang == "de" [
darf weder als Ganzes noch in Auszügen Personen außerhalb des Prüfungsprozesses und des Evaluationsverfahrens zugänglich gemacht werden, sofern keine anderslautende Genehmigung der Ausbildungsstätte vorliegt.
] else if text.lang == "en" [
may not be made accessible to persons outside the examination process and the evaluation procedure, either as a whole or in excerpts, unless otherwise authorized by the training institution.
]
set align(horizon)
grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
row-gutter: 0.75em,
align(left, {line(length: 6cm)}),
align(left, {line(length: 6cm)}),
align(left, if text.lang == "de" [ Ort, Datum ] else if text.lang == "en" [ Place, Date ] else { panic("no translation for language: ", text.lang) }),
align(left, if text.lang == "de" [ Unterschrift ] else if text.lang == "en" [ Signature ] else { panic("no translation for language: ", text.lang) }))
}
)

View File

@ -0,0 +1,66 @@
// .--------------------------------------------------------------------------.
// | Declaration of Authorship |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 28.06.2024
// License: MIT
#let new_declaration_of_authorship(config) = (
context {
pagebreak(weak: true)
let thesis = config.thesis
let author = config.author
if text.lang == "de" [
#heading("Selbständigkeitserklärung")
] else if text.lang == "en" [
#heading("Declaration of Authorship")
]
v(1em)
if text.lang == "de" [
Ich versichere hiermit, dass ich meine Prüfung mit dem Thema
] else if text.lang == "en" [
I hereby confirm that I have written this thesis with the subject
]
v(1em)
set align(center)
text(weight: "bold", thesis.title)
if thesis.subtitle != none {
linebreak()
thesis.subtitle
}
set align(left)
v(1em)
set par(justify: true)
if text.lang == "de" [
selbständig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel benutzt habe. Ich versichere zudem, dass die eingereichte elektronische Fassung mit der gedruckten Fassung übereinstimmt.
] else if text.lang == "en" [
independently and have not used any sources or aids other than those specified. I also confirm that the electronic version submitted is identical to the printed version.
]
set align(horizon)
grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
row-gutter: 0.75em,
align(left, {line(length: 6cm)}),
align(left, {line(length: 6cm)}),
align(left, if text.lang == "de" [ Ort, Datum ] else if text.lang == "en" [ Place, Date ] else { panic("no translation for language: ", text.lang) }),
align(left, if text.lang == "de" [ Unterschrift ] else if text.lang == "en" [ Signature ] else { panic("no translation for language: ", text.lang) }))
}
)

View File

@ -1,21 +0,0 @@
// load general information from YAML
#let info = yaml("../info.yaml")
#v(8em)
// title
#text(size: 2em, weight: "semibold", align(center, "Gender-Hinweis"))
#v(3em)
#set par(justify: true)
#text(size: 1.25em)[
Zur besseren Lesbarkeit wird in dieser Hausarbeit das gene-
rische Maskulinum verwendet. Die in dieser Arbeit verwendeten
Personenbezeichnungen beziehen sich - sofern nicht anders kennt-
lich gemacht - auf alle Geschlechter.
]
#pagebreak()

140
src/pages/outline.typ Normal file
View File

@ -0,0 +1,140 @@
// .--------------------------------------------------------------------------.
// | Document Outline |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 28.06.2024
// License: MIT
// render an outline of figures
// with a specific title and filter by a specifc kind of figure
// can optionally insert a pagebreak after the outline
// NOTE: will not render in case the listing is empty
#let render_filtered_outline(title: str, kind: selector) = (
context {
let elems = query(figure.where(kind: kind), here())
let count = elems.len()
show outline.entry: it => {
link(it.element.location())[
#v(12pt, weak: true)
#text(weight: "regular", it.body)
#box(width: 1fr, it.fill)
#[ #it.page]
]
}
// only show outline if there is something to list
if count > 0 {
pagebreak(weak: true)
outline(
title: title,
target: figure.where(kind: kind),
)
}
}
)
#let render_figures_outline() = (
context {
let title = if (text.lang == "de") {
"Abbildungsverzeichnis"
} else if text.lang == "en" {
"List of Figures"
}
render_filtered_outline(title: title, kind: image)
}
)
#let render_table_outline() = (
context {
let title = if (text.lang == "de") {
"Tabellenverzeichnis"
} else if text.lang == "en" {
"List of Tables"
}
render_filtered_outline(title: title, kind: table)
}
)
#let render_raw_outline() = (
context {
let title = if (text.lang == "de") {
"Quelltextverzeichnis"
} else if text.lang == "en" {
"Code Snippets"
}
render_filtered_outline(title: title, kind: raw)
}
)
#let render_heading_outline() = (
context {
let title = if (text.lang == "de") {
"Inhaltsverzeichnis"
} else if text.lang == "en" {
"Table of Contents"
}
let header-supplement = if (text.lang == "de") {
"Kapitel"
} else {
"chapter"
}
pagebreak(weak: true)
outline(
target: heading.where(supplement: [#header-supplement]),
title: title,
indent: auto,
)
}
)
#let render_appendix_outline() = (
context {
let supplement = if text.lang == "en" {
[Appendix]
} else {
[Anhang]
}
if query(heading.where(supplement: supplement)).len() > 0 {
let title = if (text.lang == "de") {
"Anhangsverzeichnis"
} else if text.lang == "en" {
"Table of Appendices"
}
pagebreak(weak: true)
outline(
target: heading.where(supplement: supplement),
title: title,
indent: auto,
)
}
}
)
#let new_outline() = {
pagebreak(weak: true)
show outline.entry.where(level: 1): it => {
v(1.5em, weak: true)
strong(it)
}
render_heading_outline()
render_figures_outline()
render_table_outline()
render_raw_outline()
render_appendix_outline()
}

14
src/pages/preface.typ Normal file
View File

@ -0,0 +1,14 @@
// .--------------------------------------------------------------------------.
// | Preface |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 28.06.2024
// License: MIT
#let new-preface(config) = {
if config.thesis.preface != none {
pagebreak(weak: true)
config.thesis.preface
}
}

View File

@ -0,0 +1,58 @@
// .--------------------------------------------------------------------------.
// | Preleminary release Notice |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 28.06.2024
// License: MIT
#let new_prerelease_note(config) = (
context {
pagebreak(weak: true)
let thesis = config.thesis
let author = config.author
if text.lang == "de" [
#heading("Vorabfassung")
] else if text.lang == "en" [
#heading("Preliminary Version")
]
v(1em)
if text.lang == "de" [
Bei dieser Ausgabe der Arbeit mit dem Thema
] else if text.lang == "en" [
This edition of the work with the subject
]
v(1em)
set align(center)
text(weight: "bold", thesis.title)
if thesis.subtitle != none {
linebreak()
thesis.subtitle
}
set align(left)
v(1em)
set par(justify: true)
if text.lang == "de" [
handelt es sich _nicht_ um die fertige Fassung. Das Dokument kann Inhaltliche-, Grammatikalische- sowie Format-Fehler enthalten. Das Dokument ist im Rahmen der Aufgabenstellung von Seiten der #author.university nicht zur Bewertung freigegeben und ein anderer Verwendungszweck als eine Vorschau ist nicht gestattet.
] else if text.lang == "en" [
is not the final version. The document may contain errors in content, grammar and formatting. The document may not be released for evaluation to #author.university as part of the assignment, and any use other than a preview is not permitted.
]
v(1em)
h(1em)
[#author.name, #datetime.today().display()]
}
)

View File

@ -1,46 +0,0 @@
// load general information from YAML
#let info = yaml("../info.yaml")
#set align(center)
// title
#pad(top: 7em, text(size: 2em, weight: "semibold", "Selbständigkeitserklärung"))
#pad(top: 7em, text(size: 1.25em)[
Ich versichere hiermit, dass ich meine #linebreak() Prüfung mit dem Thema
])
#pad(
top: 4em,
{
text(size: 1.5em, weight: "semibold", info.titel)
linebreak()
text(size: 1.5em, info.untertitel)
}
)
#pad(top: 6em, text(size: 1.5em)[
selbständig verfasst und keine anderen als die angegebenen
Quellen und Hilfsmittel benutzt habe. Ich versichere zudem, dass die
eingereichte elektronische Fassung mit der gedruckten Fassung
übereinstimmt.
])
#set align(bottom)
#pad(
top: 3em,
grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
row-gutter: 0.75em,
align(left, {line(length: 16em)}),
align(left, {line(length: 16em)}),
align(left, "Ort, Datum"),
align(left, "Unterschrift")
)
)
#pagebreak()

View File

@ -1,34 +0,0 @@
// load general information from YAML
#let info = yaml("../info.yaml")
#box(height: 7em)
// title
#text(size: 2em, weight: "semibold", align(center, "Sperrvermerk"))
#box(height: 2em)
#set par(justify: true)
#text(size: 1.25em)[
Der Inhalt dieser Arbeit darf weder als Ganzes noch in
Auszügen Personen außerhalb des Prüfungsprozesses
und des Evaluationsverfahrens zugänglich gemacht werden,
sofern keine anders lautende Genehmigung der Ausbildungsstätte vorliegt.
]
#box(height: 7em)
#grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
row-gutter: 0.75em,
align(left, {line(length: 16em)}),
align(left, {line(length: 16em)}),
align(left, "Ort, Datum"),
align(left, "Unterschrift")
)
#pagebreak()

View File

@ -1,88 +0,0 @@
// load general information from YAML
#let info = yaml("../info.yaml")
#set align(center)
// logo of ABB and DHBW
#pad(
top: 3em,
grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
// left align logo of ABB
align(left, image("../../res/svg/ABB.svg", height: 35pt)),
// right align logo of DHBW
align(right, image("../../res/svg/DHBW.svg", height: 40pt))
)
)
// title
#pad(top: 4em, text(size: 2em, weight: "semibold", info.titel))
// subtitle
#pad(top: 1em, text(size: 1.5em, info.untertitel))
// subtitle
#pad(top: 4em, text(size: 1.5em, weight: "bold", info.typ))
// number of semester
#pad(top: 2em)[
Praxisphase des #info.semester Studienjahrs
]
// fakulty
#pad(top: 0.5em)[
an der Fakultät für #info.fakultät
#linebreak()
im Studiengang #info.studiengang
]
// university
#pad(top: 1.5em)[
an der
#linebreak()
#info.universität
]
#set align(bottom + left)
#table(
columns: 2,
align: left,
stroke: none,
"Verfasser:",
info.autor,
"Bearbeitungszeitraum:",
info.bearbeitungszeitraum,
"Matrikelnummer, Kurs:",
str(info.matrikelnummer) + ", " + info.studiengang,
"Ausbildungsbetrieb:",
info.betrieb,
"Betr. Betreuer:",
info.betreuer,
"Abgabedatum:",
info.abgabe
)
#pad(
top: 3em,
grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
align(left, "Unterschrift des betrieblichen Betreuers"),
align(right, {line(length: 16em)})
)
)
#pagebreak()
#counter(page).update(1)

110
src/pages/titlepage.typ Normal file
View File

@ -0,0 +1,110 @@
// .--------------------------------------------------------------------------.
// | Titlepage |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 28.06.2024
// License: MIT
#let new_title_page(config) = (
context [
#let thesis = config.thesis
#let author = config.author
#set align(center)
// title
#v(2cm)
#par(justify: false, leading: 1.5em)[
#text(size: 2em, weight: "bold", hyphenate: false, thesis.title)
#linebreak()
// subtitle
#text(size: 2em, weight: "light", thesis.subtitle)
]
#set align(center + horizon)
// type of paper
#text(size: 1.5em, weight: "medium", thesis.kind)
// faculty
#pad()[
#if text.lang == "de" [
Praxisphase des #author.semester Semesters an der Fakultät für #author.faculty
#linebreak()
im Studiengang #author.program
] else if text.lang == "en" [
Practical phase of the #author.semester semester at the Faculty of #author.faculty
#linebreak()
in the degree program #author.program
] else [
#context panic("no translation for language: ", text.lang)
]
]
// university
#pad()[
#if text.lang == "de" [
an der
] else if text.lang == "en" [
at
] else [
#context panic("no translation for language: ", text.lang)
]
#linebreak()
#author.university
]
#set align(bottom + left)
#if text.lang == "de" [
#table(
columns: 2,
column-gutter: 1cm,
align: left,
stroke: none,
[*Verfasser:*], author.name,
[*Bearbeitungszeitraum:*], thesis.timeframe,
[*Matrikelnummer, Kurs:*], str(author.matriculation-number) + ", " + author.course,
[*Ausbildungsbetrieb:*], author.company,
[*Betrieblicher Betreuer:*], author.supervisor,
[*Abgabedatum:*], thesis.submission-date,
)
] else if text.lang == "en" [
#table(
columns: 2,
column-gutter: 1cm,
align: left,
stroke: none,
[*Author:*], author.name,
[*Editing period:*], thesis.timeframe,
[*Matriculation number, course:*], str(author.matriculation-number) + ", " + author.course,
[*Training company:*], author.company,
[*Company supervisor:*], author.supervisor,
[*Submission date:*], thesis.submission-date,
)
] else [
#context panic("no translation for language: ", text.lang)
]
#align(
bottom,
grid(
// set width of columns
// we need two, so make both half the page width
columns: (60%, 40%),
align(left, if text.lang == "de" [
Unterschrift des betrieblichen Betreuers
] else if text.lang == "en" [
Signature of the company supervisor
] else [
#context panic("no translation for language: ", text.lang)
]
),
align(right, {line(length: 6cm)})),
)
#counter(page).update(0)
]
)

View File

@ -1,34 +0,0 @@
#box(height: 7em)
// title
#text(size: 2em, weight: "semibold", align(center, "Übersicht Arbeitspakete"))
#box(height: 5em)
#let info = yaml("../info.yaml")
#figure(
kind: table,
caption: "Übersicht Arbeitspakete",
table(
columns: 3,
align: right,
inset: 1em,
[*Thema*], [*Zeitraum*], [*Dauer (Wochen)*],
..for packet in info.arbeits-pakete {
let start_split = packet.start.split(".")
let start = datetime(day: int(start_split.at(0)), month: int(start_split.at(1)), year: int(start_split.at(2)))
let end_split = packet.ende.split(".")
let end = datetime(day: int(end_split.at(0)), month: int(end_split.at(1)), year: int(end_split.at(2)))
let dur = end - start
(packet.thema, packet.start + " - " + packet.ende, str(calc.round(dur.weeks())))
}
)
)
#pagebreak()

10
src/requirements.typ Normal file
View File

@ -0,0 +1,10 @@
// .--------------------------------------------------------------------------.
// | Required packages for template use |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 05.07.2024
// License: MIT
#import "glossary.typ": *

View File

@ -1,5 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<!--
.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
| ABB logo |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
Author: N/A
Changed: Sven Vogel
Edited: 05.07.2024
License: MIT
Source: https://commons.wikimedia.org/wiki/File:ABB_logo.svg
Created with Inkscape (http://www.inkscape.org/)
-->
<svg
width="385.80621mm"

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -1,5 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<!--
.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
| DHBW logo |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
Author: N/A
Changed: Sven Vogel
Edited: 05.07.2024
License: MIT
Source: https://upload.wikimedia.org/wikipedia/de/1/1d/DHBW-Logo.svg
Created with Inkscape (http://www.inkscape.org/)
-->
<svg
width="353.7124mm"

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

561
src/res/abb.tmTheme Normal file
View File

@ -0,0 +1,561 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Template: Chris Kempson, Scheme: Sven Vogel</string>
<key>name</key>
<string>Base16 ABB Base16</string>
<key>semanticClass</key>
<string>theme.base16.abb-base16</string>
<key>colorSpaceName</key>
<string>sRGB</string>
<key>gutterSettings</key>
<dict>
<key>background</key>
<string>#fafafa</string>
<key>divider</key>
<string>#fafafa</string>
<key>foreground</key>
<string>#6e6e6e</string>
<key>selectionBackground</key>
<string>#f0f0f0</string>
<key>selectionForeground</key>
<string>#000000</string>
</dict>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>background</key>
<string>#ffffff</string>
<key>caret</key>
<string>#000000</string>
<key>foreground</key>
<string>#000000</string>
<key>invisibles</key>
<string>#6e6e6e</string>
<key>lineHighlight</key>
<string>#6e6e6e55</string>
<key>selection</key>
<string>#f0f0f0</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Text</string>
<key>scope</key>
<string>variable.parameter.function</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>comment, punctuation.definition.comment</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#6e6e6e</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Punctuation</string>
<key>scope</key>
<string>punctuation.definition.string, punctuation.definition.variable, punctuation.definition.string, punctuation.definition.parameters, punctuation.definition.string, punctuation.definition.array</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Delimiters</string>
<key>scope</key>
<string>none</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Operators</string>
<key>scope</key>
<string>keyword.operator</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Keywords</string>
<key>scope</key>
<string>keyword</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ff000f</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Variables</string>
<key>scope</key>
<string>variable</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#262626</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Functions</string>
<key>scope</key>
<string>entity.name.function, meta.require, support.function.any-method, variable.function, variable.annotation, support.macro</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#007a33</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Labels</string>
<key>scope</key>
<string>entity.name.label</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#6e6e6e</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Classes</string>
<key>scope</key>
<string>support.class, entity.name.class, entity.name.type.class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ff000f</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Classes</string>
<key>scope</key>
<string>meta.class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#fafafa</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Methods</string>
<key>scope</key>
<string>keyword.other.special-method</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#007a33</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Storage</string>
<key>scope</key>
<string>storage</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ff000f</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Support</string>
<key>scope</key>
<string>support.function</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#262626</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Strings, Inherited Class</string>
<key>scope</key>
<string>string, constant.other.symbol, entity.other.inherited-class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Integers</string>
<key>scope</key>
<string>constant.numeric</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Floats</string>
<key>scope</key>
<string>none</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Boolean</string>
<key>scope</key>
<string>none</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Constants</string>
<key>scope</key>
<string>constant</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tags</string>
<key>scope</key>
<string>entity.name.tag</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#262626</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Attributes</string>
<key>scope</key>
<string>entity.other.attribute-name</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Attribute IDs</string>
<key>scope</key>
<string>entity.other.attribute-name.id, punctuation.definition.entity</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#007a33</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Selector</string>
<key>scope</key>
<string>meta.selector</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ff000f</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Values</string>
<key>scope</key>
<string>none</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Headings</string>
<key>scope</key>
<string>markup.heading punctuation.definition.heading, entity.name.section</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#007a33</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Units</string>
<key>scope</key>
<string>keyword.other.unit</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Bold</string>
<key>scope</key>
<string>markup.bold, punctuation.definition.bold</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>bold</string>
<key>foreground</key>
<string>#ff000f</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Italic</string>
<key>scope</key>
<string>markup.italic, punctuation.definition.italic</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>italic</string>
<key>foreground</key>
<string>#ff000f</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Code</string>
<key>scope</key>
<string>markup.raw.inline</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Link Text</string>
<key>scope</key>
<string>string.other.link, punctuation.definition.string.end.markdown, punctuation.definition.string.begin.markdown</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#262626</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Link Url</string>
<key>scope</key>
<string>meta.link</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Lists</string>
<key>scope</key>
<string>markup.list</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#262626</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Quotes</string>
<key>scope</key>
<string>markup.quote</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Separator</string>
<key>scope</key>
<string>meta.separator</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#f0f0f0</string>
<key>foreground</key>
<string>#000000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Inserted</string>
<key>scope</key>
<string>markup.inserted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#004c97</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#262626</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Changed</string>
<key>scope</key>
<string>markup.changed</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ff000f</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Colors</string>
<key>scope</key>
<string>constant.other.color</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#262626</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Regular Expressions</string>
<key>scope</key>
<string>string.regexp</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#262626</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Escape Characters</string>
<key>scope</key>
<string>constant.character.escape</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#262626</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Embedded</string>
<key>scope</key>
<string>punctuation.section.embedded, variable.interpolation</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ff000f</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Illegal</string>
<key>scope</key>
<string>invalid.illegal</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#262626</string>
<key>foreground</key>
<string>#fafafa</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Broken</string>
<key>scope</key>
<string>invalid.broken</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#004c97</string>
<key>foreground</key>
<string>#ffffff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Deprecated</string>
<key>scope</key>
<string>invalid.deprecated</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#6e6e6e</string>
<key>foreground</key>
<string>#fafafa</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Unimplemented</string>
<key>scope</key>
<string>invalid.unimplemented</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#6e6e6e</string>
<key>foreground</key>
<string>#fafafa</string>
</dict>
</dict>
</array>
<key>uuid</key>
<string>uuid</string>
</dict>
</plist>

342
src/style.typ Normal file
View File

@ -0,0 +1,342 @@
// .--------------------------------------------------------------------------.
// | Global style of document |
// '--------------------------------------------------------------------------'
// Author: Sven Vogel
// Edited: 27.06.2024
// License: MIT
#import "branding.typ": *
#let watermark-color = luma(50%).transparentize(70%)
#let watermark-pattern = pattern(size: (5pt, 5pt))[
#place(
line(
start: (50%, 0%),
end: (50%, 100%),
stroke: (paint: watermark-color, thickness: 3pt),
),
)
]
#let watermark(config) = if config.draft {
rotate(-22.5deg)[
#rect(
radius: 1em,
inset: 1em,
stroke: watermark-color,
)[
#text(size: 4em, weight: "bold", fill: watermark-pattern, "DRAFT")
#linebreak()
#text(size: 1.25em, weight: "bold", fill: watermark-color)[
This page is part of a preliminary
#linebreak()
document version.
#linebreak()
#text(
size: 0.75em,
"Further usage without the authors consent is not permitted.",
)]]]
}
#let numberingH(c) = {
return numbering(c.numbering, ..counter(heading).at(c.location()))
}
#let currentH(level: 1) = {
let elems = query(selector(heading.where(level: level)).after(here()))
if elems.len() != 0 and elems.first().location().page() == here().page() {
return (numberingH(elems.first()), elems.first().body)
} else {
elems = query(selector(heading.where(level: level)).before(here()))
if elems.len() != 0 {
return (numberingH(elems.last()), elems.last().body)
}
}
return ""
}
// global style of document
#let global_styled_doc(config, body) = {
let thesis = config.thesis
let style = config.style
set text(
size: style.text.size,
ligatures: true,
hyphenate: true,
dir: ltr,
font: style.text.font,
fill: ABB-BLACK,
)
show heading: set text(
font: style.heading.font,
weight: "bold"
)
let header-supplement = if config.lang == "de" {
"Kapitel"
} else {
"chapter"
}
set heading(supplement: [#header-supplement])
set math.equation(numbering: "(1)")
show math.equation: set text(font: "Fira Math", size: 12pt)
// Set header spacing
show heading.where(level: 1): it => v(2em) + it + v(1em)
show heading.where(level: 2): it => v(1em) + it + v(0.5em)
show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
// set theme for code blocks
set raw(tab-size: style.code.tab-size)
show raw.where(block: false): it => box(
stroke: 1pt + ABB-GRAY-05,
radius: 2pt,
inset: (left: 2pt, right: 2pt),
outset: (top: 4pt, bottom: 4pt),
fill: ABB-GRAY-06,
text(font: style.code.font, size: style.code.size, it.text),
)
show figure.where(kind: raw): it => align(left)[
#let content = it.body
#let lang = if content.has("lang") {
it.body.lang
} else {
none
}
#block(
width: 100%,
fill: ABB-GRAY-06,
stroke: 1pt + ABB-GRAY-05,
radius: 0.5em,
inset: 0.75em,
clip: false,
{
let (columns, align, make_row) = {
if style.code.lines {
(
(auto, 1fr),
(right + top, left),
e => {
let (i, l) = e
let n = i + 1
let n_str = if (calc.rem(n, 1) == 0) or (true and i == 0) {
text(
font: style.code.font,
size: style.code.size,
fill: ABB-BLACK,
str(n),
)
} else {
none
}
(n_str + h(0.5em), raw(block: true, lang: lang, l))
},
)
} else {
(
(1fr,),
(left,),
e => {
let (i, l) = e
raw(block: true, lang: lang, l)
},
)
}
}
grid(
stroke: none,
columns: columns,
rows: (auto,),
gutter: 0pt,
inset: 0.25em,
align: (col, _) => align.at(col),
fill: ABB-GRAY-06,
..content
.text
.split("\n")
.enumerate()
.map(make_row)
.flatten()
.map(c => if c.has("text") and c.text == "" {
v(1em)
} else {
c
})
)
},
)
#v(-1em)
#align(center + top, it.caption)
]
show figure: set block(breakable: true)
// make figure supplements bold
// based on: https://github.com/typst/typst/discussions/3871
show figure.caption: c => [
#if c.body.fields().len() > 0 {
text(weight: "medium")[
#c.supplement #c.counter.display("1.1.1")
]
c.separator
}
#c.body
]
// change the display supplement according to the text langugae
// based on: https://github.com/typst/typst/issues/3273
show figure.where(kind: raw): set figure(supplement: context {
if text.lang == "de" {
"Quelltext"
} else {
"Listing"
}
})
// APA style table
set table(
inset: 0.5em,
align: left,
stroke: (x, y) => (
left: none,
right: none,
top: if y == 0 {
1.5pt
} else if y < 2 {
1pt
} else {
0.5pt
},
bottom: if y == 0 {
1pt
} else {
1.5pt
},
),
)
// make table header bold
show table.cell.where(y: 0): set text(weight: "bold")
set block(spacing: 2em)
set par(
justify: true,
first-line-indent: 1em,
leading: 1em,
)
// give links a color
show link: set text(fill: style.link.color)
show ref: set text(fill: style.link.color)
set heading(numbering: none)
set page(
paper: style.page.format,
foreground: watermark(config),
header-ascent: style.header.content-padding,
footer-descent: style.header.content-padding,
margin: (
top: style.page.margin.top + style.header.underline-top-padding + style
.header
.content-padding,
bottom: style.page.margin.bottom + style.footer.content-padding,
left: style.page.margin.left,
right: style.page.margin.right,
),
numbering: (..nums) => {
let current-page = here().page()
if current-page == 1 {
[]
} else if query(<end-of-prelude>)
.first()
.location()
.page() > current-page {
numbering("I", nums.pos().first())
} else if query(<end-of-content>)
.first()
.location()
.page() >= current-page {
numbering("1", nums.pos().first())
} else {
numbering("a", nums.pos().first())
}
},
footer: context [
#let page-counter = counter(page).get().first()
#let page-number = here().page()
#set align(center)
#if page-number == 1 {
[]
} else if query(<end-of-prelude>).first().location().page() > page-number {
set align(center)
numbering("I", page-counter)
} else if query(<end-of-content>).first().location().page() >= page-number {
numbering(
"1 / 1",
page-counter,
counter(page).at(<end-of-content>).last(),
)
} else {
numbering("a", page-counter)
}
],
header: context {
set align(left)
let current-page = here().page()
if current-page == 1 {
// logo of ABB and DHBW
grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
// left align logo of ABB
align(left, image("res/ABB.svg", height: style.header.logo-height)),
// right align logo of DHBW
align(right, image("res/DHBW.svg", height: style.header.logo-height)))
} else if query(<end-of-content>)
.first()
.location()
.page() >= current-page and query(<end-of-prelude>)
.first()
.location()
.page() < current-page + 1 {
let heading = currentH()
heading.at(0)
h(0.5em)
heading.at(1)
v(style.header.underline-top-padding - 1em)
line(length: 100%)
} else {
config.thesis.title
v(style.header.underline-top-padding - 1em)
line(length: 100%)
}
},
)
body
}
#let content_styled(config, body) = {
set heading(numbering: "1.1.1")
body
}
#let end_styled(config, body) = {
set heading(numbering: "1.1.1")
body
}

12
template/abstract.typ Normal file
View File

@ -0,0 +1,12 @@
// English summary "abstract" is content of this block:
#let abstract = [
#lorem(100)
]
// Other languages abstract translation is content of this block:
// NOTE: An abstract is required in case the thesis is not written primarily in english
// if writing in english (and the language is set to "en") this can be let empty or set to none
#let summary = [
#lorem(100)
]

12
template/appendix.typ Normal file
View File

@ -0,0 +1,12 @@
= Raw data
#label("Anhang-A")
#lorem(50)
== More raw data
#lorem(50)
#figure(```
```)

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

13
template/glossary.yml Normal file
View File

@ -0,0 +1,13 @@
oidc:
short: OIDC
long: OpenID Connect
desc: "OpenID is an open standard and decentralized authentication protocol promoted by the non-profit #link(\"https://en.wikipedia.org/wiki/OpenID#OpenID_Foundation\")[OpenID Foundation]."
potato:
short: potato
desc: "#lorem(50)"
HTTP:
short: HTTP
long: Hyper Text Transfer Protocol

117
template/main.typ Normal file
View File

@ -0,0 +1,117 @@
#import "../src/lib.typ": *
#import "abstract.typ": abstract, summary
#show: dhbw-template.with((
lang: "de",
region: "de",
draft: false,
author: (
name: "Sven Vogel",
semester: 4,
program: "Informationtechnology",
course: "TINF19IT1",
faculty: "Technik",
university: "DHBW Mannheim",
company: "ABB AG",
supervisor: "Benny Goodman",
matriculation-number: 123456789,
),
thesis: (
title: "Unofficial ABB/DHBW Typst template",
subtitle: "for reports and thesises",
submission-date: "23rd march 2020",
timeframe: "1st january 2020 - 20th march 2020",
kind: "T2000",
summary: summary,
abstract: abstract,
preface: include "preface.typ",
keywords: ("IT", "other stuff"),
bibliography: bibliography("refs.bib"),
glossary: yaml("glossary.yml"),
appendices: include "appendix.typ",
),
))
#import "@preview/wrap-it:0.1.0": wrap-content
= Lorem Ipsum
#text(fill: ABB-RED, "Hello ABB branding")
#lorem(25)
@oidc
@potato
#lorem(100)
@Anhang-A
== Lorem Ipsum 2
#lorem(200)
@einstein
= Lorem Ipsum 3 <sec:hello>
#lorem(15) t `Hello, World!` #lorem(50)
$
angle.l a, b angle.r &= arrow(a) dot arrow(b) \
&= a_1 b_1 + a_2 b_2 + ... a_n b_n \
&= sum_(i=1)^n a_i b_i. \
integral_2^4(3x + 4x^2)
$
#lorem(140)
#wrap-content(
figure(image("assets/digitaldog.jpg", width: 200pt), caption: [ Some image caption ]),
lorem(200),
)
#url("https://github.com", "text") @sec:hello
#lorem(50)
#figure(
table(
columns: 3,
table.header[Date][Exercise Type][Calories Burned],
[2023-03-15], [Swimming], [400],
[2023-03-17], [Weightlifting], [250],
[2023-03-18], [Yoga], [200],
[2023-03-15], [Swimming], [400],
[2023-03-17], [Weightlifting], [250],
[2023-03-18], [Yoga], [200],
[2023-03-15], [Swimming], [400],
[2023-03-17], [Weightlifting], [250],
[2023-03-18], [Yoga], [200],
),
caption: [ Some table ],
)
#pagebreak()
#lorem(100)
#inline-color("#ff0000", "red") @HTTP
#figure(
```rust
use std::env;
use std::fs::OpenOptions;
use std::io::Write;
fn main() {
println!("Hello, World!!!");
}
```,
caption: [Some code],
)
#lorem(100)
#pagebreak()
= Conclusion
#lorem(320)

4
template/preface.typ Normal file
View File

@ -0,0 +1,4 @@
= Vorwort
#lorem(50)

12
template/refs.bib Normal file
View File

@ -0,0 +1,12 @@
@article{einstein,
author = "Albert Einstein",
title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
[{On} the electrodynamics of moving bodies]",
journal = "Annalen der Physik",
volume = "322",
number = "10",
pages = "891--921",
year = "1905",
DOI = "http://dx.doi.org/10.1002/andp.19053221004",
keywords = "physics"
}

View File

@ -0,0 +1,28 @@
#import "../../src/lib.typ": dhbw-template
#show: dhbw-template.with((
lang: none,
region: "en",
author: (
name: "Sven Vogel",
semester: 4,
program: "Informationtechnology",
course: "TINF19IT1",
faculty: "Technik",
university: "DHBW Mannheim",
company: "ABB AG",
supervisor: "Benny Goodman",
matriculation-number: 123456789),
thesis: (
title: "Unofficial ABB/DHBW Typst template",
subtitle: "for reports and thesises",
submission-date: "23rd march 2020",
timeframe: "1st january 2020 - 20th march 2020",
kind: "T2000",
summary: none,
abstract: none,
keywords: ( "IT", "other stuff" ),
bibliography: none,
glossary: none,
appendices: none)))

View File

@ -0,0 +1,34 @@
#import "../../src/lib.typ": dhbw-template
#show: dhbw-template.with((
lang: "en",
this-key-is-not-in-config: "Ha Ha",
region: "en",
author: (
name: "Sven Vogel",
semester: 4,
program: "Informationtechnology",
course: "TINF19IT1",
faculty: "Technik",
university: "DHBW Mannheim",
company: "ABB AG",
supervisor: "Benny Goodman",
matriculation-number: 123456789,
),
thesis: (
title: "Unofficial ABB/DHBW Typst template",
subtitle: "for reports and thesises",
submission-date: "23rd march 2020",
timeframe: "1st january 2020 - 20th march 2020",
kind: "T2000",
summary: none,
abstract: none,
keywords: ("IT", "other stuff"),
bibliography: none,
glossary: none,
appendices: none,
),
))
= Heading

View File

@ -0,0 +1,26 @@
#import "../../src/lib.typ": dhbw-template
#show: dhbw-template.with((
lang: "en",
region: "en",
author: (
university: "DHBW Mannheim",
company: "ABB AG",
supervisor: none,
matriculation-number: 123456789,
),
thesis: (
title: "Unofficial ABB/DHBW Typst template",
subtitle: "for reports and thesises",
submission-date: "23rd march 2020",
timeframe: "1st january 2020 - 20th march 2020",
kind: "T2000",
summary: none,
abstract: none,
keywords: ("IT", "other stuff"),
bibliography: none,
glossary: none,
appendices: none,
),
))

View File

@ -0,0 +1,30 @@
#import "../../src/lib.typ": dhbw-template
#show: dhbw-template.with((
lang: "en",
region: "en",
author: (
name: "Sven Vogel",
semester: 4,
program: "Informationtechnology",
course: "TINF19IT1",
faculty: "Technik",
university: "DHBW Mannheim",
company: "ABB AG",
supervisor: "Benny Goodman",
matriculation-number: 123456789),
thesis: (
title: "Unofficial ABB/DHBW Typst template",
subtitle: "for reports and thesises",
submission-date: "23rd march 2020",
timeframe: "1st january 2020 - 20th march 2020",
kind: "T2000",
summary: none,
abstract: none,
keywords: ( "IT", "other stuff" ),
bibliography: none,
glossary: none,
appendices: none)))
= Heading

16
typst.toml Normal file
View File

@ -0,0 +1,16 @@
[package]
name = "dhbw-abb-typst-template"
version = "0.4.1"
entrypoint = "src/template.typ"
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
license = "MIT"
description = "Unoffical typst DHBW/ABB template for use as thesis and report works"
repository = "https://git.montehaselino.de/DHBW/dhbw-abb-typst-template"
keywords = ["dhbw", "abb", "thesis"]
categories = ["paper", "thesis", "report"]
exclude = ["examples"]
[template]
path = "template"
entrypoint = "main.typ"
thumbnail = "assets/thumbnail.png"