Compare commits
47 Commits
Author | SHA1 | Date |
---|---|---|
Sven Vogel | b1255bdbab | |
Sven Vogel | 490765d713 | |
Sven Vogel | 208357eeb1 | |
Sven Vogel | 93f0a30109 | |
Sven Vogel | 0181e710b8 | |
Sven Vogel | 674c783a4f | |
Sven Vogel | a6d0d70f08 | |
Sven Vogel | a8d2161efa | |
Sven Vogel | a99f1aca86 | |
Sven Vogel | 0a34cfe3e7 | |
Sven Vogel | 96ff7a93af | |
Sven Vogel | ac1968bb12 | |
Sven Vogel | 77ed9621bd | |
Sven Vogel | ef5400ea43 | |
Sven Vogel | bdbf641fd4 | |
Sven Vogel | 1d6a900fca | |
Sven Vogel | 04efd8251e | |
Sven Vogel | 081fea5a4c | |
Sven Vogel | 564a3f7b95 | |
Sven Vogel | 4e51d4f70e | |
Sven Vogel | 6b8ecbfc8a | |
Sven Vogel | cc855667cc | |
Sven Vogel | 728e451e66 | |
Sven Vogel | 3512cc66cc | |
Sven Vogel | 2e02619fdb | |
Sven Vogel | f1df70aa96 | |
Sven Vogel | 70f2bde4d1 | |
Sven Vogel | 44d995fd28 | |
Sven Vogel | b0fc412b57 | |
Sven Vogel | 4bb731ca66 | |
Sven Vogel | faf7d24677 | |
Sven Vogel | 08602bc9ab | |
Sven Vogel | bcc5d6ba22 | |
Sven Vogel | b4e87c0d1b | |
Sven Vogel | 6572d67320 | |
Sven Vogel | 36f8ffdc4b | |
Sven Vogel | 9e3567a0df | |
Sven Vogel | 4d1bbcab53 | |
Sven Vogel | 4df961b5e3 | |
Sven Vogel | 6f25d3e918 | |
Sven Vogel | ddfec22fe8 | |
Sven Vogel | f3ebfaf538 | |
Sven Vogel | d9e7d875d6 | |
Sven Vogel | 26f77f3690 | |
Sven Vogel | 0856fb4570 | |
Sven Vogel | f03c1e0554 | |
Sven Vogel | 14dd8ab115 |
|
@ -1,10 +1,22 @@
|
||||||
name: Gitea Action for checking typst compilation
|
name: Build'n check
|
||||||
run-name: Performing Typst compilation
|
run-name: Performing Typst compilation
|
||||||
on: [push]
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-ci-linux:
|
run-ci-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# run action mutally exclusive on PRs or
|
||||||
|
# push with commit containing "Run-Checks"
|
||||||
|
if: >
|
||||||
|
(contains(github.event.head_commit.message, 'Run-Checks') &&
|
||||||
|
github.event_name == 'push') ||
|
||||||
|
github.event_name == 'pull_request'
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -16,5 +28,9 @@ jobs:
|
||||||
uses: cachix/install-nix-action@v27
|
uses: cachix/install-nix-action@v27
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- name: Run CI
|
- name: Stylecheck
|
||||||
run: nix-shell --run ./run-ci.sh
|
run: nix-shell --run "./run-fmt.sh --check src/lib.typ"
|
||||||
|
- id: build
|
||||||
|
name: Build
|
||||||
|
run: |
|
||||||
|
nix-shell --run ./run-ci.sh
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
name: Create Release Commit
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
tags-ignore:
|
||||||
|
- v*.*.*
|
||||||
|
jobs:
|
||||||
|
prepare:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: contains(github.event.head_commit.message, 'Release-As:')
|
||||||
|
env:
|
||||||
|
USERNAME: servostar
|
||||||
|
EMAIL: sven.vogel123@web.de
|
||||||
|
GIT_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: 'main'
|
||||||
|
token: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
- 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: Setup Git
|
||||||
|
run: |
|
||||||
|
git config --global user.name "${USERNAME}"
|
||||||
|
git config --global user.email "${EMAIL}"
|
||||||
|
- name: Update Typst.toml
|
||||||
|
run: |
|
||||||
|
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
||||||
|
sed -i "/version/c\version = \"${VERSION#v}\"" typst.toml
|
||||||
|
git add typst.toml
|
||||||
|
git commit -m "chore: bump release version to $VERSION" -m "Generated-By: ${{ gitea.actor }}"
|
||||||
|
- name: Generate Example Document
|
||||||
|
run: nix-shell --run ./run-ci.sh
|
||||||
|
- name: Generate Assets
|
||||||
|
if: contains(github.event.head_commit.message, 'Generate-Assets')
|
||||||
|
run: |
|
||||||
|
./run-bake-assets.sh
|
||||||
|
git add assets/banner.png
|
||||||
|
git add assets/page-preview.png
|
||||||
|
git commit -m "chore: update assets" -m "Generated-By: ${{ gitea.actor }}"
|
||||||
|
- name: Tag and Push Changes
|
||||||
|
run: |
|
||||||
|
git push origin main
|
||||||
|
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
||||||
|
git tag -m "Release" "${VERSION}"
|
||||||
|
git push origin "${VERSION}"
|
|
@ -1,12 +1,11 @@
|
||||||
name: release
|
name: Create Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
build:
|
||||||
|
name: Check Template and Build example
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
|
@ -19,16 +18,48 @@ jobs:
|
||||||
uses: cachix/install-nix-action@v27
|
uses: cachix/install-nix-action@v27
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- name: Run CI
|
- name: Stylecheck
|
||||||
run: nix-shell --run ./run-ci.sh
|
run: nix-shell --run "./run-fmt.sh --check src/lib.typ"
|
||||||
|
- id: build
|
||||||
|
name: Build
|
||||||
|
run: |
|
||||||
|
nix-shell --run ./run-ci.sh
|
||||||
|
- name: Upload artifact
|
||||||
|
id: artifact-upload
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: example-document
|
||||||
|
path: ${{ github.workspace }}/example.pdf
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
- name: Output artifact ID
|
||||||
|
run: echo 'Artifact ID is ${{ steps.artifact-upload.outputs.artifact-id }}'
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: https://github.com/actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: '>=1.20.1'
|
go-version: '>=1.20.1'
|
||||||
|
- name: Download Artifact
|
||||||
|
id: download
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: example-document
|
||||||
|
path: ${{ github.workspace }}/Example.pdf
|
||||||
|
- name: 'Artifact Download Path'
|
||||||
|
run: echo ${{ steps.download.outputs.download-path }}
|
||||||
|
- name: Prepare Release
|
||||||
|
run: echo ${{ github.sha }} > Release.txt
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create-release
|
id: create-release
|
||||||
uses: https://gitea.com/actions/release-action@main
|
uses: https://gitea.com/actions/release-action@main
|
||||||
with:
|
with:
|
||||||
files: |-
|
files: |-
|
||||||
example.pdf
|
Example.pdf
|
||||||
|
Release.txt
|
||||||
|
LICENSE
|
||||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
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
|
|
|
@ -1,12 +1,13 @@
|
||||||
name: release
|
name: Build'n check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
build:
|
||||||
|
name: Check Template and Build example
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
|
@ -15,16 +16,49 @@ jobs:
|
||||||
uses: cachix/install-nix-action@v27
|
uses: cachix/install-nix-action@v27
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- name: Run CI
|
- name: Stylecheck
|
||||||
run: nix-shell --run ./run-ci.sh
|
run: nix-shell --run "./run-fmt.sh --check src/lib.typ"
|
||||||
|
- id: build
|
||||||
|
name: Build
|
||||||
|
run: |
|
||||||
|
nix-shell --run ./run-ci.sh
|
||||||
|
- name: Upload artifact
|
||||||
|
id: artifact-upload
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: example-document
|
||||||
|
path: ${{ github.workspace }}/example.pdf
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
- name: Output artifact ID
|
||||||
|
run: echo 'Artifact ID is ${{ steps.artifact-upload.outputs.artifact-id }}'
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: https://github.com/actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: '>=1.20.1'
|
go-version: '>=1.20.1'
|
||||||
- name: Create release
|
- name: Download Artifcat
|
||||||
id: create-release
|
id: download
|
||||||
uses: https://gitea.com/actions/release-action@main
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
files: |-
|
name: example-document
|
||||||
example.pdf
|
path: ${{ github.workspace }}/Example.pdf
|
||||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
- name: 'Artifact Download Path'
|
||||||
|
run: echo ${{ steps.download.outputs.download-path }}
|
||||||
|
- name: Prepare Release
|
||||||
|
run: echo ${{ github.sha }} > Release.txt
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
Example.pdf
|
||||||
|
Release.txt
|
||||||
|
LICENSE
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
*.pdf
|
*.pdf
|
||||||
*.log
|
*.log
|
||||||
|
images/
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Contributing
|
||||||
|
|
||||||
|
Development of this template happens at
|
||||||
|
[git.montehaselino.de](https://git.montehaselino.de/DHBW/dhbw-abb-typst-template).
|
||||||
|
For this reason pull request opened at any mirror such as on GitHub, will not be
|
||||||
|
merged as this would compromise the push mirror.
|
||||||
|
|
||||||
|
Pull requests shall be opened exclusively in the official
|
||||||
|
[repository](https://git.montehaselino.de/DHBW/dhbw-abb-typst-template).
|
||||||
|
Issues may be created at GitHub or the official repository.
|
||||||
|
Beware, that linked pull requests and issues in commits messages refer to those
|
||||||
|
in the official instance and may be broken or invalid on mirrors such as GitHub.
|
||||||
|
|
||||||
|
Direct pushes to the `main` branch are discouraged. In order to make a change
|
||||||
|
create a new pull request and wait for a maintainer to merge it. Note that in
|
||||||
|
order to be able to merge, the continuous integration pipeline must run
|
||||||
|
successfully.
|
18
LICENSE
18
LICENSE
|
@ -2,8 +2,20 @@ MIT License
|
||||||
|
|
||||||
Copyright (c) 2024 Sven Vogel
|
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:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
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.
|
||||||
|
|
79
README.md
79
README.md
|
@ -2,7 +2,7 @@
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<h1>DHBW-ABB template for Typst</h1>
|
<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/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/github/actions/workflow/status/Servostar/dhbw-abb-typst-template/release.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/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/license-MIT-ff0000">
|
||||||
<img src="https://img.shields.io/badge/Typst-2B9CB0">
|
<img src="https://img.shields.io/badge/Typst-2B9CB0">
|
||||||
|
@ -75,31 +75,78 @@ The default configuration can be found in `src/conf.typ`.
|
||||||
#import "src/lib.typ": *
|
#import "src/lib.typ": *
|
||||||
|
|
||||||
#show: dhbw-template.with((
|
#show: dhbw-template.with((
|
||||||
lang: "en",
|
// language settings used to make decisions about hyphenation and others
|
||||||
region: "en",
|
lang: "en", // ISO 3166 language code of text: "de", "en"
|
||||||
author: (
|
region: "en", // region code
|
||||||
name: "Sven Vogel",
|
// mark this thesis as draft
|
||||||
semester: 4,
|
// Adds preleminarry note page and watermark
|
||||||
|
draft: true,
|
||||||
|
// information about author(s)
|
||||||
|
university: (
|
||||||
program: "Informationtechnology",
|
program: "Informationtechnology",
|
||||||
course: "TINF19IT1",
|
|
||||||
faculty: "Technik",
|
faculty: "Technik",
|
||||||
university: "DHBW Mannheim",
|
name: "dualen Hochschule Baden-Württemberg",
|
||||||
|
campus: "Eppelheim"
|
||||||
|
),
|
||||||
|
authors: (
|
||||||
|
(
|
||||||
|
name: "Sven Vogel",
|
||||||
|
course: "TINF19IT1",
|
||||||
company: "ABB AG",
|
company: "ABB AG",
|
||||||
supervisor: "Benny Goodman",
|
supervisor: "Benny Goodman",
|
||||||
matriculation-number: 123456789),
|
matriculation-number: 123456789
|
||||||
|
),
|
||||||
|
(
|
||||||
|
name: "Kurt Jammer",
|
||||||
|
course: "TINF24AI2",
|
||||||
|
company: "Siemens",
|
||||||
|
supervisor: "Henry Badman",
|
||||||
|
matriculation-number: 478568763
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// information about thesis
|
||||||
thesis: (
|
thesis: (
|
||||||
title: "Unofficial ABB/DHBW Typst template",
|
title: "Unofficial ABB/DHBW Typst template",
|
||||||
subtitle: "for reports and thesises",
|
subtitle: "for reports and thesises", // subtitle may be none
|
||||||
submission-date: "23rd march 2020",
|
submission-date: "23rd march 2020",
|
||||||
timeframe: "1st january 2020 - 20th march 2020",
|
timeframe: "1st january 2020 - 20th march 2020",
|
||||||
kind: "T2000",
|
kind: "T2000",
|
||||||
summary: summary,
|
// translated version of abstract, only used in case language is not english
|
||||||
abstract: abstract,
|
summary: none,
|
||||||
preface: include "preface.typ",
|
abstract: none,
|
||||||
|
preface: none,
|
||||||
keywords: ( "IT", "other stuff" ),
|
keywords: ( "IT", "other stuff" ),
|
||||||
bibliography: bibliography("refs.bib"),
|
bibliography: none /* bibliography("refs.bib") */,
|
||||||
glossary: yaml("glossary.yml"),
|
glossary: none,
|
||||||
appendices: include "appendix.typ")))
|
appendices: none),
|
||||||
|
style: (
|
||||||
|
header: (
|
||||||
|
content-padding: 1.5em,
|
||||||
|
underline-top-padding: 0pt,
|
||||||
|
logo-height: 5em,
|
||||||
|
logo-image: "res/ABB.svg"),
|
||||||
|
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)))
|
||||||
|
|
||||||
// Your document code goes here!
|
// Your document code goes here!
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 9.0 MiB |
|
@ -0,0 +1,59 @@
|
||||||
|
#import "@preview/shadowed:0.1.2": shadowed
|
||||||
|
|
||||||
|
#let LE = 10cm
|
||||||
|
#let shadow = 0.25cm
|
||||||
|
|
||||||
|
#set page(margin: 0pt, width: 2 * LE, height: LE, fill: rgb(0, 0, 0, 0))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 3cm,
|
||||||
|
dy: 1.1cm,
|
||||||
|
rotate(
|
||||||
|
-9deg,
|
||||||
|
shadowed(
|
||||||
|
radius: 0pt,
|
||||||
|
inset: 0pt,
|
||||||
|
blur: shadow,
|
||||||
|
image("./images/21.svg", height: LE * 0.6))))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 1cm,
|
||||||
|
dy: 3.25cm,
|
||||||
|
rotate(
|
||||||
|
-20deg,
|
||||||
|
shadowed(
|
||||||
|
radius: 0pt,
|
||||||
|
inset: 0pt,
|
||||||
|
blur: shadow,
|
||||||
|
image("./images/51.svg", height: LE * 0.55))))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 14cm,
|
||||||
|
dy: 1.5cm,
|
||||||
|
rotate(
|
||||||
|
6deg,
|
||||||
|
shadowed(
|
||||||
|
radius: 0pt,
|
||||||
|
inset: 0pt,
|
||||||
|
blur: shadow,
|
||||||
|
image("./images/41.svg", height: LE * 0.65))))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 11cm,
|
||||||
|
dy: 2cm,
|
||||||
|
rotate(
|
||||||
|
25deg,
|
||||||
|
shadowed(
|
||||||
|
radius: 0pt,
|
||||||
|
inset: 0pt,
|
||||||
|
blur: shadow,
|
||||||
|
image("./images/31.svg", height: LE * 0.6))))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 7cm,
|
||||||
|
dy: 0.75cm,
|
||||||
|
shadowed(
|
||||||
|
radius: 0pt,
|
||||||
|
inset: 0pt,
|
||||||
|
blur: shadow,
|
||||||
|
image("./images/11.svg", height: LE * 0.75)))
|
|
@ -0,0 +1,34 @@
|
||||||
|
|
||||||
|
#let gap = 0.5cm
|
||||||
|
|
||||||
|
#set page(margin: 0pt, width: 210mm * 3 + 2 * gap, height: 297mm * 2 + gap, fill: rgb(0, 0, 0, 0))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 0mm,
|
||||||
|
dy: 0mm,
|
||||||
|
image("./images/11.svg", height: 297mm))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 210mm + gap,
|
||||||
|
dy: 0mm,
|
||||||
|
image("./images/21.svg", height: 297mm))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: (210mm + gap) * 2,
|
||||||
|
dy: 0mm,
|
||||||
|
image("./images/31.svg", height: 297mm))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: 210mm * 0,
|
||||||
|
dy: 297mm + gap,
|
||||||
|
image("./images/71.svg", height: 297mm))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: (210mm + gap) * 1,
|
||||||
|
dy: 297mm + gap,
|
||||||
|
image("./images/41.svg", height: 297mm))
|
||||||
|
|
||||||
|
#place(
|
||||||
|
dx: (210mm + gap) * 2,
|
||||||
|
dy: 297mm + gap,
|
||||||
|
image("./images/51.svg", height: 297mm))
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "==> generate images"
|
||||||
|
mkdir images || true
|
||||||
|
|
||||||
|
# extract images from document created by action
|
||||||
|
mutool convert -o images/1.svg "$1" 1
|
||||||
|
mutool convert -o images/2.svg "$1" 2
|
||||||
|
mutool convert -o images/2.svg "$1" 2
|
||||||
|
mutool convert -o images/3.svg "$1" 5
|
||||||
|
mutool convert -o images/7.svg "$1" 7
|
||||||
|
mutool convert -o images/4.svg "$1" 15
|
||||||
|
mutool convert -o images/5.svg "$1" 16
|
||||||
|
|
||||||
|
echo "==> generate banner"
|
||||||
|
typst compile banner.typ --ppi 360 ../assets/banner.png
|
||||||
|
echo "==> generate preview"
|
||||||
|
typst compile preview.typ --ppi 360 ../assets/page-preview.png
|
|
@ -0,0 +1,14 @@
|
||||||
|
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
|
||||||
|
mupdf-headless
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd baker
|
||||||
|
|
||||||
|
echo "==> generate assets"
|
||||||
|
nix-shell --run "./run-bake-banner.sh ../example.pdf"
|
48
run-ci.sh
48
run-ci.sh
|
@ -1,49 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function log() {
|
typst compile template/main.typ --root . --font-path fonts example.pdf
|
||||||
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"
|
|
||||||
|
|
||||||
log "INFO" "CI completed successfully"
|
|
||||||
|
|
12
run-fmt.sh
12
run-fmt.sh
|
@ -17,7 +17,7 @@ function format() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local imports=$(rg "#import \"([a-z0-9/\-]+\.typ)\"" -Nor '$1' "$1")
|
local imports=$(rg "#import \"([a-z0-9/\-.]+\.typ)\"" -Nor '$1' "$1")
|
||||||
|
|
||||||
# format all included files
|
# format all included files
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
|
@ -26,6 +26,16 @@ function format() {
|
||||||
fi
|
fi
|
||||||
format "$wd/$line" "$2"
|
format "$wd/$line" "$2"
|
||||||
done <<< "$imports"
|
done <<< "$imports"
|
||||||
|
|
||||||
|
local includes=$(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 <<< "$includes"
|
||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
|
@ -9,5 +9,6 @@ pkgs.mkShellNoCC {
|
||||||
python312Packages.pyyaml
|
python312Packages.pyyaml
|
||||||
typst
|
typst
|
||||||
typstyle
|
typstyle
|
||||||
|
ripgrep
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,16 @@
|
||||||
// https://brand.abb/portal/en/branding-principles/basic-brand-elements/color
|
// https://brand.abb/portal/en/branding-principles/basic-brand-elements/color
|
||||||
|
|
||||||
// ABB branding colors
|
// ABB branding colors
|
||||||
#let ABB-RED = cmyk(0%, 100%, 95%, 0%)
|
#let ABB-RED = rgb(255, 0, 13)
|
||||||
#let ABB-BLACK = cmyk(0%, 0%, 0%, 100%)
|
#let ABB-BLACK = rgb(0, 0, 0)
|
||||||
#let ABB-GRAY-01 = cmyk(0%, 0%, 0%, 90%)
|
#let ABB-GRAY-01 = rgb(25, 25, 25)
|
||||||
#let ABB-GRAY-02 = cmyk(0%, 0%, 0%, 75%)
|
#let ABB-GRAY-02 = rgb(64, 64, 64)
|
||||||
#let ABB-GRAY-03 = cmyk(0%, 0%, 0%, 55%)
|
#let ABB-GRAY-03 = rgb(115, 115, 115)
|
||||||
#let ABB-GRAY-04 = cmyk(0%, 0%, 0%, 35%)
|
#let ABB-GRAY-04 = rgb(166, 166, 166)
|
||||||
#let ABB-GRAY-05 = cmyk(0%, 0%, 0%, 15%)
|
#let ABB-GRAY-05 = rgb(217, 217, 217)
|
||||||
#let ABB-GRAY-06 = cmyk(0%, 0%, 0%, 5%)
|
#let ABB-GRAY-06 = rgb(242, 242, 242)
|
||||||
#let ABB-WHITE = cmyk(0%, 0%, 0%, 0%)
|
#let ABB-WHITE = rgb(255, 255, 255)
|
||||||
// ABB branding functinal colors
|
// ABB branding functinal colors
|
||||||
#let ABB-BLUE = cmyk(100%, 53%, 2%, 16%)
|
#let ABB-BLUE = rgb(0, 101, 210)
|
||||||
#let ABB-GREEN = cmyk(91%, 4%, 100%, 25%)
|
#let ABB-GREEN = rgb(17, 184, 0)
|
||||||
#let ABB-YELLOW = cmyk(0%, 9%, 100%, 0%)
|
#let ABB-YELLOW = rgb(255, 232, 0)
|
||||||
|
|
52
src/conf.typ
52
src/conf.typ
|
@ -22,24 +22,10 @@
|
||||||
program: "Informationtechnology",
|
program: "Informationtechnology",
|
||||||
faculty: "Technik",
|
faculty: "Technik",
|
||||||
name: "dualen Hochschule Baden-Württemberg",
|
name: "dualen Hochschule Baden-Württemberg",
|
||||||
campus: "Eppelheim"
|
campus: "Eppelheim",
|
||||||
),
|
|
||||||
authors: (
|
|
||||||
(
|
|
||||||
name: "Sven Vogel",
|
|
||||||
course: "TINF19IT1",
|
|
||||||
company: "ABB AG",
|
|
||||||
supervisor: "Benny Goodman",
|
|
||||||
matriculation-number: 123456789
|
|
||||||
),
|
|
||||||
(
|
|
||||||
name: "Kurt Jammer",
|
|
||||||
course: "TINF24AI2",
|
|
||||||
company: "Siemens",
|
|
||||||
supervisor: "Henry Badman",
|
|
||||||
matriculation-number: 478568763
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
supervisor-signature: false,
|
||||||
|
authors: ((), ()),
|
||||||
// information about thesis
|
// information about thesis
|
||||||
thesis: (
|
thesis: (
|
||||||
title: "Unofficial ABB/DHBW Typst template",
|
title: "Unofficial ABB/DHBW Typst template",
|
||||||
|
@ -51,38 +37,49 @@
|
||||||
summary: none,
|
summary: none,
|
||||||
abstract: none,
|
abstract: none,
|
||||||
preface: none,
|
preface: none,
|
||||||
keywords: ( "IT", "other stuff" ),
|
keywords: ("IT", "other stuff"),
|
||||||
bibliography: none /* bibliography("refs.bib") */,
|
bibliography: none, /* bibliography("refs.bib") */
|
||||||
glossary: none,
|
glossary: none,
|
||||||
appendices: none),
|
appendices: none,
|
||||||
|
),
|
||||||
style: (
|
style: (
|
||||||
header: (
|
header: (
|
||||||
content-padding: 1.5em,
|
content-padding: 1.5em,
|
||||||
underline-top-padding: 0pt,
|
underline-top-padding: 0pt,
|
||||||
logo-height: 5em,
|
logo-height: 5em,
|
||||||
logo-image: "res/ABB.svg"),
|
logo-image: "res/ABB.svg",
|
||||||
|
),
|
||||||
footer: (
|
footer: (
|
||||||
content-padding: 1.5em),
|
content-padding: 1.5em,
|
||||||
|
),
|
||||||
page: (
|
page: (
|
||||||
format: "a4",
|
format: "a4",
|
||||||
margin: (
|
margin: (
|
||||||
left: 3cm,
|
left: 3cm,
|
||||||
right: 2.5cm,
|
right: 2.5cm,
|
||||||
top: 2.5cm,
|
top: 2.5cm,
|
||||||
bottom: 2.5cm)),
|
bottom: 2.5cm,
|
||||||
|
),
|
||||||
|
),
|
||||||
text: (
|
text: (
|
||||||
size: 12pt,
|
size: 12pt,
|
||||||
font: "Fira Sans"),
|
font: "Fira Sans",
|
||||||
|
),
|
||||||
heading: (
|
heading: (
|
||||||
font: "Fira Sans"),
|
font: "Fira Sans",
|
||||||
|
),
|
||||||
code: (
|
code: (
|
||||||
theme: "res/abb.tmTheme",
|
theme: "res/abb.tmTheme",
|
||||||
font: "FiraCode Nerd Font",
|
font: "FiraCode Nerd Font",
|
||||||
lines: false,
|
lines: false,
|
||||||
size: 10pt,
|
size: 10pt,
|
||||||
tab-size: 4),
|
tab-size: 4,
|
||||||
|
),
|
||||||
link: (
|
link: (
|
||||||
color: ABB-GRAY-02)))
|
color: ABB-GRAY-02,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
// Insert a dictionary `update` into `base` but only the entries of update that also exist in base
|
// Insert a dictionary `update` into `base` but only the entries of update that also exist in base
|
||||||
// Runs recursively on all sub dictionaries
|
// Runs recursively on all sub dictionaries
|
||||||
|
@ -101,6 +98,7 @@
|
||||||
|
|
||||||
if type(val) == array {
|
if type(val) == array {
|
||||||
// ignore checking arraay
|
// ignore checking arraay
|
||||||
|
base.insert(key, update_val)
|
||||||
} else if type(val) == dictionary and type(update_val) == dictionary {
|
} else if type(val) == dictionary and type(update_val) == dictionary {
|
||||||
base.insert(key, deep-insert-checked(val, update_val))
|
base.insert(key, deep-insert-checked(val, update_val))
|
||||||
} else if val == none or type(val) == type(update_val) {
|
} else if val == none or type(val) == type(update_val) {
|
||||||
|
|
|
@ -34,10 +34,9 @@ SOFTWARE.*/
|
||||||
loc,
|
loc,
|
||||||
inclusive: false,
|
inclusive: false,
|
||||||
),
|
),
|
||||||
loc,
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
query(selector(label(__glossary_label_prefix + key)), loc)
|
query(selector(label(__glossary_label_prefix + key)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +48,7 @@ SOFTWARE.*/
|
||||||
// Reference a term
|
// Reference a term
|
||||||
#let gls(key, suffix: none, long: none, display: none) = {
|
#let gls(key, suffix: none, long: none, display: none) = {
|
||||||
context {
|
context {
|
||||||
let __glossary_entries = __glossary_entries.final(here())
|
let __glossary_entries = __glossary_entries.final()
|
||||||
if key in __glossary_entries {
|
if key in __glossary_entries {
|
||||||
let entry = __glossary_entries.at(key)
|
let entry = __glossary_entries.at(key)
|
||||||
|
|
||||||
|
@ -200,7 +199,10 @@ SOFTWARE.*/
|
||||||
|
|
||||||
#block(
|
#block(
|
||||||
below: 1.5em,
|
below: 1.5em,
|
||||||
par(hanging-indent: 1em)[
|
width: 100%,
|
||||||
|
par(
|
||||||
|
hanging-indent: 1em,
|
||||||
|
align(left)[
|
||||||
#text(weight: "bold", entry.short)
|
#text(weight: "bold", entry.short)
|
||||||
#if hasLong and hasDesc [
|
#if hasLong and hasDesc [
|
||||||
(#text(entry.long))
|
(#text(entry.long))
|
||||||
|
@ -240,6 +242,7 @@ SOFTWARE.*/
|
||||||
.join(", ")
|
.join(", ")
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let glossary(entries, config) = {
|
#let glossary(entries, config) = {
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
type(entries) == dictionary,
|
type(entries) == dictionary,
|
||||||
message: "The glossary is not a dictionary",
|
message: "The glossary is not a dictionary",
|
||||||
|
|
16
src/lib.typ
16
src/lib.typ
|
@ -122,17 +122,27 @@
|
||||||
|
|
||||||
#metadata("content terminate") <end-of-content>
|
#metadata("content terminate") <end-of-content>
|
||||||
|
|
||||||
#end_styled(config)[
|
#end_styled(
|
||||||
|
config,
|
||||||
|
context [
|
||||||
// add bibliography if set
|
// add bibliography if set
|
||||||
#if "bibliography" in config.thesis and config.thesis.bibliography != none {
|
#if "bibliography" in config.thesis and config.thesis.bibliography != none {
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
counter(page).update(1)
|
counter(page).update(1)
|
||||||
set bibliography(style: "ieee")
|
set bibliography(
|
||||||
|
style: "ieee",
|
||||||
|
title: if (text.lang == "de") {
|
||||||
|
"Literaturverzeichnis"
|
||||||
|
} else if text.lang == "en" {
|
||||||
|
"Bibliography"
|
||||||
|
},
|
||||||
|
)
|
||||||
config.thesis.bibliography
|
config.thesis.bibliography
|
||||||
}
|
}
|
||||||
|
|
||||||
// appendix
|
// appendix
|
||||||
#show-appendix(config: config)
|
#show-appendix(config: config)
|
||||||
]
|
],
|
||||||
|
)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#let new_abstract(config) = (
|
#let new_abstract(config) = (
|
||||||
context {
|
context {
|
||||||
|
|
||||||
set align(center + horizon)
|
set align(center + horizon)
|
||||||
|
|
||||||
// only include summary when a language other than english is used
|
// only include summary when a language other than english is used
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#let new_confidentiality_statement_page(config) = (
|
#let new_confidentiality_statement_page(config) = (
|
||||||
context {
|
context {
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#let new_declaration_of_authorship(config) = (
|
#let new_declaration_of_authorship(config) = (
|
||||||
context {
|
context {
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
// NOTE: will not render in case the listing is empty
|
// NOTE: will not render in case the listing is empty
|
||||||
#let render_filtered_outline(title: str, kind: selector) = (
|
#let render_filtered_outline(title: str, kind: selector) = (
|
||||||
context {
|
context {
|
||||||
|
let elems = query(figure.where(kind: kind))
|
||||||
let elems = query(figure.where(kind: kind), here())
|
|
||||||
let count = elems.len()
|
let count = elems.len()
|
||||||
|
|
||||||
show outline.entry: it => {
|
show outline.entry: it => {
|
||||||
|
|
|
@ -8,11 +8,9 @@
|
||||||
|
|
||||||
#let new_prerelease_note(config) = (
|
#let new_prerelease_note(config) = (
|
||||||
context {
|
context {
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
let author = config.author
|
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
#heading("Vorabfassung")
|
#heading("Vorabfassung")
|
||||||
|
@ -46,13 +44,9 @@
|
||||||
set par(justify: true)
|
set par(justify: true)
|
||||||
|
|
||||||
if text.lang == "de" [
|
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.
|
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 #university.name nicht zur Bewertung freigegeben und ein anderer Verwendungszweck als eine Vorschau ist nicht gestattet.
|
||||||
] else if text.lang == "en" [
|
] 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.
|
is not the final version. The document may contain errors in content, grammar and formatting. The document may not be released for evaluation to #config.university.name as part of the assignment, and any use other than a preview is not permitted.
|
||||||
]
|
]
|
||||||
|
|
||||||
v(1em)
|
|
||||||
h(1em)
|
|
||||||
[#author.name, #datetime.today().display()]
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -49,9 +49,17 @@
|
||||||
// faculty
|
// faculty
|
||||||
#pad()[
|
#pad()[
|
||||||
#if text.lang == "de" [
|
#if text.lang == "de" [
|
||||||
aus dem Studiengang #config.university.program | #config.university.faculty
|
aus dem Studiengang #config.university.program
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
from the course of studies #config.university.program | #config.university.faculty
|
from the course of studies #config.university.program
|
||||||
|
] else [
|
||||||
|
#context panic("no translation for language: ", text.lang)
|
||||||
|
]
|
||||||
|
|
||||||
|
#if text.lang == "de" [
|
||||||
|
an der Fakultät #config.university.faculty
|
||||||
|
] else if text.lang == "en" [
|
||||||
|
at the faculty of #config.university.faculty
|
||||||
] else [
|
] else [
|
||||||
#context panic("no translation for language: ", text.lang)
|
#context panic("no translation for language: ", text.lang)
|
||||||
]
|
]
|
||||||
|
@ -68,14 +76,19 @@
|
||||||
]
|
]
|
||||||
#config.university.name
|
#config.university.name
|
||||||
#linebreak()
|
#linebreak()
|
||||||
|
#if text.lang == "de" [
|
||||||
|
in
|
||||||
|
] else if text.lang == "en" [
|
||||||
|
in
|
||||||
|
] else [
|
||||||
|
#context panic("no translation for language: ", text.lang)
|
||||||
|
]
|
||||||
#config.university.campus
|
#config.university.campus
|
||||||
]
|
]
|
||||||
|
|
||||||
#pad(top: 1em)[
|
#pad(top: 1.5em)[
|
||||||
#let names = ()
|
#let names = ()
|
||||||
#for author in config.authors {
|
|
||||||
names.push(author.name)
|
|
||||||
}
|
|
||||||
#if text.lang == "de" [
|
#if text.lang == "de" [
|
||||||
von
|
von
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
|
@ -83,71 +96,43 @@
|
||||||
] else [
|
] else [
|
||||||
#context panic("no translation for language: ", text.lang)
|
#context panic("no translation for language: ", text.lang)
|
||||||
]
|
]
|
||||||
#set text(size: 16pt)
|
|
||||||
#grid(columns: 1, row-gutter: 1em, ..names)
|
#v(1.5em)
|
||||||
|
|
||||||
|
#let rows = int(config.authors.len() / 3 + 0.5)
|
||||||
|
|
||||||
|
#for i in range(0, rows) {
|
||||||
|
let cols = calc.min(config.authors.len() - i * 3, 3)
|
||||||
|
|
||||||
|
grid(columns: cols, column-gutter: 1.5em, ..config
|
||||||
|
.authors
|
||||||
|
.slice(i * 3, i * 3 + cols)
|
||||||
|
.map(author => par([
|
||||||
|
#if author.at("name", default: none) != none {
|
||||||
|
text(size: 1.25em, author.name)
|
||||||
|
linebreak()
|
||||||
|
}
|
||||||
|
#if author.at("company", default: none) != none {
|
||||||
|
text(size: 1em, author.company)
|
||||||
|
linebreak()
|
||||||
|
}
|
||||||
|
#if author.at("contact", default: none) != none {
|
||||||
|
text(size: 1em, author.contact)
|
||||||
|
linebreak()
|
||||||
|
}
|
||||||
|
#str(author.matriculation-number), #author.course
|
||||||
|
])))
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
#pad(top: 1em)[
|
#set align(bottom)
|
||||||
|
|
||||||
|
#pad(top: 1.5em)[
|
||||||
#thesis.timeframe
|
#thesis.timeframe
|
||||||
]
|
]
|
||||||
|
|
||||||
#set align(bottom + left)
|
#if config.supervisor-signature {
|
||||||
|
align(
|
||||||
#if text.lang == "de" [
|
|
||||||
#grid(
|
|
||||||
columns: 2,
|
|
||||||
column-gutter: 1cm,
|
|
||||||
row-gutter: 0.5cm,
|
|
||||||
align: top + left,
|
|
||||||
stroke: none,
|
|
||||||
[Matrikelnummer, Kurs:],
|
|
||||||
par(
|
|
||||||
leading: 0.5em,
|
|
||||||
for author in config.authors {
|
|
||||||
str(author.matriculation-number) + ", " + author.course
|
|
||||||
linebreak()
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
[Betrieb, Betreuer:],
|
|
||||||
par(
|
|
||||||
leading: 0.5em,
|
|
||||||
for author in config.authors {
|
|
||||||
author.company + ", " + author.supervisor
|
|
||||||
linebreak()
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
] else if text.lang == "en" [
|
|
||||||
#grid(
|
|
||||||
columns: 2,
|
|
||||||
column-gutter: 1cm,
|
|
||||||
row-gutter: 0.5cm,
|
|
||||||
align: top + left,
|
|
||||||
stroke: none,
|
|
||||||
[Student ID, Course:],
|
|
||||||
par(
|
|
||||||
leading: 0.5em,
|
|
||||||
for author in config.authors {
|
|
||||||
str(author.matriculation-number) + ", " + author.course
|
|
||||||
linebreak()
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
[Company, Supervisor:],
|
|
||||||
par(
|
|
||||||
leading: 0.5em,
|
|
||||||
for author in config.authors {
|
|
||||||
author.company + ", " + author.supervisor
|
|
||||||
linebreak()
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
] else [
|
|
||||||
#context panic("no translation for language: ", text.lang)
|
|
||||||
]
|
|
||||||
|
|
||||||
#align(
|
|
||||||
bottom,
|
bottom,
|
||||||
grid(
|
grid(
|
||||||
// set width of columns
|
// set width of columns
|
||||||
|
@ -163,6 +148,7 @@
|
||||||
),
|
),
|
||||||
align(right, {line(length: 6cm)})),
|
align(right, {line(length: 6cm)})),
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
#counter(page).update(0)
|
#counter(page).update(0)
|
||||||
]
|
]
|
||||||
|
|
|
@ -184,7 +184,7 @@
|
||||||
show figure.caption: c => [
|
show figure.caption: c => [
|
||||||
#if c.body.fields().len() > 0 {
|
#if c.body.fields().len() > 0 {
|
||||||
text(weight: "medium")[
|
text(weight: "medium")[
|
||||||
#c.supplement #c.counter.display("1.1.1")
|
#c.supplement #context c.counter.display("1.1.1")
|
||||||
]
|
]
|
||||||
c.separator
|
c.separator
|
||||||
}
|
}
|
||||||
|
@ -241,6 +241,7 @@
|
||||||
set page(
|
set page(
|
||||||
paper: style.page.format,
|
paper: style.page.format,
|
||||||
foreground: watermark(config),
|
foreground: watermark(config),
|
||||||
|
background: [#rect(width: 100%, height: 100%, fill: white)],
|
||||||
header-ascent: style.header.content-padding,
|
header-ascent: style.header.content-padding,
|
||||||
footer-descent: style.header.content-padding,
|
footer-descent: style.header.content-padding,
|
||||||
margin: (
|
margin: (
|
||||||
|
@ -295,7 +296,6 @@
|
||||||
|
|
||||||
if current-page == 1 {
|
if current-page == 1 {
|
||||||
// logo moved to content
|
// logo moved to content
|
||||||
|
|
||||||
} else if query(<end-of-content>)
|
} else if query(<end-of-content>)
|
||||||
.first()
|
.first()
|
||||||
.location()
|
.location()
|
||||||
|
|
|
@ -6,16 +6,23 @@
|
||||||
lang: "de",
|
lang: "de",
|
||||||
region: "de",
|
region: "de",
|
||||||
draft: false,
|
draft: false,
|
||||||
author: (
|
authors: (
|
||||||
|
(
|
||||||
|
name: "Sven Vogel",
|
||||||
|
course: "TINF19IT1",
|
||||||
|
company: none,
|
||||||
|
supervisor: "Benny Goodman",
|
||||||
|
matriculation-number: 123456789,
|
||||||
|
contact: "sven.vogel123@web.de"
|
||||||
|
),
|
||||||
|
(
|
||||||
name: "Sven Vogel",
|
name: "Sven Vogel",
|
||||||
semester: 4,
|
|
||||||
program: "Informationtechnology",
|
|
||||||
course: "TINF19IT1",
|
course: "TINF19IT1",
|
||||||
faculty: "Technik",
|
|
||||||
university: "DHBW Mannheim",
|
|
||||||
company: "ABB AG",
|
company: "ABB AG",
|
||||||
supervisor: "Benny Goodman",
|
supervisor: "Benny Goodman",
|
||||||
matriculation-number: 123456789,
|
matriculation-number: 123456789,
|
||||||
|
contact: "sven.vogel123@web.de"
|
||||||
|
)
|
||||||
),
|
),
|
||||||
thesis: (
|
thesis: (
|
||||||
title: "Unofficial ABB/DHBW Typst template",
|
title: "Unofficial ABB/DHBW Typst template",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dhbw-abb-typst-template"
|
name = "dhbw-abb-typst-template"
|
||||||
version = "0.4.1"
|
version = "0.6.3"
|
||||||
entrypoint = "src/template.typ"
|
entrypoint = "src/template.typ"
|
||||||
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
|
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
Loading…
Reference in New Issue