Compare commits
No commits in common. "main" and "v0.5.3" have entirely different histories.
|
@ -2,12 +2,11 @@ name: Build'n check
|
||||||
run-name: Performing Typst compilation
|
run-name: Performing Typst compilation
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-ci-linux:
|
run-ci-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -15,8 +14,7 @@ jobs:
|
||||||
# push with commit containing "Run-Checks"
|
# push with commit containing "Run-Checks"
|
||||||
if: >
|
if: >
|
||||||
(contains(github.event.head_commit.message, 'Run-Checks') &&
|
(contains(github.event.head_commit.message, 'Run-Checks') &&
|
||||||
github.event_name == 'push') ||
|
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
|
||||||
|
|
|
@ -12,44 +12,27 @@ jobs:
|
||||||
env:
|
env:
|
||||||
USERNAME: servostar
|
USERNAME: servostar
|
||||||
EMAIL: sven.vogel123@web.de
|
EMAIL: sven.vogel123@web.de
|
||||||
GIT_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
||||||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: 'main'
|
ref: 'main'
|
||||||
token: ${{ secrets.RELEASE_TOKEN }}
|
token: ${{ secrets.RELEASE_TOKEN }}
|
||||||
- name: Install dependencies for Nix setup action
|
- name: Tag Release Commit
|
||||||
run: |
|
env:
|
||||||
apt update -y
|
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
||||||
apt install sudo -y
|
GIT_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
- name: Setup Nix
|
|
||||||
uses: cachix/install-nix-action@v27
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
- name: Setup Git
|
|
||||||
run: |
|
run: |
|
||||||
|
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
||||||
git config --global user.name "${USERNAME}"
|
git config --global user.name "${USERNAME}"
|
||||||
git config --global user.email "${EMAIL}"
|
git config --global user.email "${EMAIL}"
|
||||||
- name: Update Typst.toml
|
echo "==> Update typst.toml version"
|
||||||
run: |
|
|
||||||
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
|
||||||
sed -i "/version/c\version = \"${VERSION#v}\"" typst.toml
|
sed -i "/version/c\version = \"${VERSION#v}\"" typst.toml
|
||||||
git add typst.toml
|
git add typst.toml
|
||||||
git commit -m "chore: bump release version to $VERSION" -m "Generated-By: ${{ gitea.actor }}"
|
git commit -m "chore: bump release version to $VERSION"
|
||||||
- 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
|
git push origin main
|
||||||
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
echo "::endgroup::"
|
||||||
|
echo "::group::{Tag commit}"
|
||||||
git tag -m "Release" "${VERSION}"
|
git tag -m "Release" "${VERSION}"
|
||||||
git push origin "${VERSION}"
|
git push origin "${VERSION}"
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
name: Build'n check
|
name: Build'n check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
tags:
|
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Check Template and Build example
|
name: Check Template and Build example
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
*.pdf
|
*.pdf
|
||||||
*.log
|
*.log
|
||||||
images/
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
# 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.
|
|
|
@ -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/release.yml?label=build">
|
<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/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">
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 2.8 MiB |
Binary file not shown.
Before Width: | Height: | Size: 9.0 MiB After Width: | Height: | Size: 2.2 MiB |
|
@ -1,59 +0,0 @@
|
||||||
#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)))
|
|
|
@ -1,34 +0,0 @@
|
||||||
|
|
||||||
#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))
|
|
|
@ -1,18 +0,0 @@
|
||||||
#!/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
|
|
|
@ -1,14 +0,0 @@
|
||||||
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
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cd baker
|
|
||||||
|
|
||||||
echo "==> generate assets"
|
|
||||||
nix-shell --run "./run-bake-banner.sh ../example.pdf"
|
|
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,16 +26,6 @@ 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
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable";
|
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.11";
|
||||||
pkgs = import nixpkgs { config = {}; overlays = []; };
|
pkgs = import nixpkgs { config = {}; overlays = []; };
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
|
@ -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 = rgb(255, 0, 13)
|
#let ABB-RED = cmyk(0%, 100%, 95%, 0%)
|
||||||
#let ABB-BLACK = rgb(0, 0, 0)
|
#let ABB-BLACK = cmyk(0%, 0%, 0%, 100%)
|
||||||
#let ABB-GRAY-01 = rgb(25, 25, 25)
|
#let ABB-GRAY-01 = cmyk(0%, 0%, 0%, 90%)
|
||||||
#let ABB-GRAY-02 = rgb(64, 64, 64)
|
#let ABB-GRAY-02 = cmyk(0%, 0%, 0%, 75%)
|
||||||
#let ABB-GRAY-03 = rgb(115, 115, 115)
|
#let ABB-GRAY-03 = cmyk(0%, 0%, 0%, 55%)
|
||||||
#let ABB-GRAY-04 = rgb(166, 166, 166)
|
#let ABB-GRAY-04 = cmyk(0%, 0%, 0%, 35%)
|
||||||
#let ABB-GRAY-05 = rgb(217, 217, 217)
|
#let ABB-GRAY-05 = cmyk(0%, 0%, 0%, 15%)
|
||||||
#let ABB-GRAY-06 = rgb(242, 242, 242)
|
#let ABB-GRAY-06 = cmyk(0%, 0%, 0%, 5%)
|
||||||
#let ABB-WHITE = rgb(255, 255, 255)
|
#let ABB-WHITE = cmyk(0%, 0%, 0%, 0%)
|
||||||
// ABB branding functinal colors
|
// ABB branding functinal colors
|
||||||
#let ABB-BLUE = rgb(0, 101, 210)
|
#let ABB-BLUE = cmyk(100%, 53%, 2%, 16%)
|
||||||
#let ABB-GREEN = rgb(17, 184, 0)
|
#let ABB-GREEN = cmyk(91%, 4%, 100%, 25%)
|
||||||
#let ABB-YELLOW = rgb(255, 232, 0)
|
#let ABB-YELLOW = cmyk(0%, 9%, 100%, 0%)
|
||||||
|
|
136
src/conf.typ
136
src/conf.typ
|
@ -11,75 +11,78 @@
|
||||||
|
|
||||||
// default configuration
|
// default configuration
|
||||||
#let default-config = (
|
#let default-config = (
|
||||||
// language settings used to make decisions about hyphenation and others
|
// language settings used to make decisions about hyphenation and others
|
||||||
lang: "en", // ISO 3166 language code of text: "de", "en"
|
lang: "en", // ISO 3166 language code of text: "de", "en"
|
||||||
region: "en", // region code
|
region: "en", // region code
|
||||||
// mark this thesis as draft
|
// mark this thesis as draft
|
||||||
// Adds preleminarry note page and watermark
|
// Adds preleminarry note page and watermark
|
||||||
draft: true,
|
draft: true,
|
||||||
// information about author(s)
|
// information about author(s)
|
||||||
university: (
|
university: (
|
||||||
program: "Informationtechnology",
|
program: "Informationtechnology",
|
||||||
faculty: "Technik",
|
faculty: "Technik",
|
||||||
name: "dualen Hochschule Baden-Württemberg",
|
name: "dualen Hochschule Baden-Württemberg",
|
||||||
campus: "Eppelheim",
|
campus: "Eppelheim"
|
||||||
),
|
|
||||||
supervisor-signature: false,
|
|
||||||
authors: ((), ()),
|
|
||||||
// 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: 5em,
|
|
||||||
logo-image: "res/ABB.svg",
|
|
||||||
),
|
),
|
||||||
footer: (
|
authors: (
|
||||||
content-padding: 1.5em,
|
(
|
||||||
),
|
name: "Sven Vogel",
|
||||||
page: (
|
course: "TINF19IT1",
|
||||||
format: "a4",
|
company: "ABB AG",
|
||||||
margin: (
|
supervisor: "Benny Goodman",
|
||||||
left: 3cm,
|
matriculation-number: 123456789
|
||||||
right: 2.5cm,
|
),
|
||||||
top: 2.5cm,
|
(
|
||||||
bottom: 2.5cm,
|
name: "Kurt Jammer",
|
||||||
|
course: "TINF24AI2",
|
||||||
|
company: "Siemens",
|
||||||
|
supervisor: "Henry Badman",
|
||||||
|
matriculation-number: 478568763
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
text: (
|
// information about thesis
|
||||||
size: 12pt,
|
thesis: (
|
||||||
font: "Fira Sans",
|
title: "Unofficial ABB/DHBW Typst template",
|
||||||
),
|
subtitle: "for reports and thesises", // subtitle may be none
|
||||||
heading: (
|
submission-date: "23rd march 2020",
|
||||||
font: "Fira Sans",
|
timeframe: "1st january 2020 - 20th march 2020",
|
||||||
),
|
kind: "T2000",
|
||||||
code: (
|
// translated version of abstract, only used in case language is not english
|
||||||
theme: "res/abb.tmTheme",
|
summary: none,
|
||||||
font: "FiraCode Nerd Font",
|
abstract: none,
|
||||||
lines: false,
|
preface: none,
|
||||||
size: 10pt,
|
keywords: ( "IT", "other stuff" ),
|
||||||
tab-size: 4,
|
bibliography: none /* bibliography("refs.bib") */,
|
||||||
),
|
glossary: none,
|
||||||
link: (
|
appendices: none),
|
||||||
color: ABB-GRAY-02,
|
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)))
|
||||||
|
|
||||||
// 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
|
||||||
|
@ -98,7 +101,6 @@
|
||||||
|
|
||||||
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) {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
// 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",
|
||||||
|
|
32
src/lib.typ
32
src/lib.typ
|
@ -122,27 +122,17 @@
|
||||||
|
|
||||||
#metadata("content terminate") <end-of-content>
|
#metadata("content terminate") <end-of-content>
|
||||||
|
|
||||||
#end_styled(
|
#end_styled(config)[
|
||||||
config,
|
// add bibliography if set
|
||||||
context [
|
#if "bibliography" in config.thesis and config.thesis.bibliography != none {
|
||||||
// add bibliography if set
|
pagebreak(weak: true)
|
||||||
#if "bibliography" in config.thesis and config.thesis.bibliography != none {
|
counter(page).update(1)
|
||||||
pagebreak(weak: true)
|
set bibliography(style: "ieee")
|
||||||
counter(page).update(1)
|
config.thesis.bibliography
|
||||||
set bibliography(
|
}
|
||||||
style: "ieee",
|
|
||||||
title: if (text.lang == "de") {
|
|
||||||
"Literaturverzeichnis"
|
|
||||||
} else if text.lang == "en" {
|
|
||||||
"Bibliography"
|
|
||||||
},
|
|
||||||
)
|
|
||||||
config.thesis.bibliography
|
|
||||||
}
|
|
||||||
|
|
||||||
// appendix
|
// appendix
|
||||||
#show-appendix(config: config)
|
#show-appendix(config: config)
|
||||||
],
|
]
|
||||||
)
|
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#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,6 +8,7 @@
|
||||||
|
|
||||||
#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,6 +8,7 @@
|
||||||
|
|
||||||
#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,6 +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))
|
||||||
let count = elems.len()
|
let count = elems.len()
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#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
|
||||||
|
@ -46,7 +47,7 @@
|
||||||
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 #university.name 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 #config.university.name 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 #university.name as part of the assignment, and any use other than a preview is not permitted.
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -49,17 +49,9 @@
|
||||||
// faculty
|
// faculty
|
||||||
#pad()[
|
#pad()[
|
||||||
#if text.lang == "de" [
|
#if text.lang == "de" [
|
||||||
aus dem Studiengang #config.university.program
|
aus dem Studiengang #config.university.program | #config.university.faculty
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
from the course of studies #config.university.program
|
from the course of studies #config.university.program | #config.university.faculty
|
||||||
] 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)
|
||||||
]
|
]
|
||||||
|
@ -76,19 +68,14 @@
|
||||||
]
|
]
|
||||||
#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: 1.5em)[
|
#pad(top: 1em)[
|
||||||
#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" [
|
||||||
|
@ -96,59 +83,86 @@
|
||||||
] else [
|
] else [
|
||||||
#context panic("no translation for language: ", text.lang)
|
#context panic("no translation for language: ", text.lang)
|
||||||
]
|
]
|
||||||
|
#set text(size: 16pt)
|
||||||
#v(1.5em)
|
#grid(columns: 1, row-gutter: 1em, ..names)
|
||||||
|
|
||||||
#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
|
|
||||||
])))
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
#set align(bottom)
|
#pad(top: 1em)[
|
||||||
|
|
||||||
#pad(top: 1.5em)[
|
|
||||||
#thesis.timeframe
|
#thesis.timeframe
|
||||||
]
|
]
|
||||||
|
|
||||||
#if config.supervisor-signature {
|
#set align(bottom + left)
|
||||||
align(
|
|
||||||
bottom,
|
#if text.lang == "de" [
|
||||||
grid(
|
#grid(
|
||||||
// set width of columns
|
columns: 2,
|
||||||
// we need two, so make both half the page width
|
column-gutter: 1cm,
|
||||||
columns: (60%, 40%),
|
row-gutter: 0.5cm,
|
||||||
align(left, if text.lang == "de" [
|
align: top + left,
|
||||||
Unterschrift des betrieblichen Betreuers
|
stroke: none,
|
||||||
] else if text.lang == "en" [
|
[Matrikelnummer, Kurs:],
|
||||||
Signature of the company supervisor
|
par(
|
||||||
] else [
|
leading: 0.5em,
|
||||||
#context panic("no translation for language: ", text.lang)
|
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()
|
||||||
|
},
|
||||||
),
|
),
|
||||||
align(right, {line(length: 6cm)})),
|
|
||||||
)
|
)
|
||||||
}
|
] 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,
|
||||||
|
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)
|
#counter(page).update(0)
|
||||||
]
|
]
|
||||||
|
|
|
@ -241,7 +241,6 @@
|
||||||
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: (
|
||||||
|
@ -296,6 +295,7 @@
|
||||||
|
|
||||||
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,23 +6,16 @@
|
||||||
lang: "de",
|
lang: "de",
|
||||||
region: "de",
|
region: "de",
|
||||||
draft: false,
|
draft: false,
|
||||||
authors: (
|
author: (
|
||||||
(
|
name: "Sven Vogel",
|
||||||
name: "Sven Vogel",
|
semester: 4,
|
||||||
course: "TINF19IT1",
|
program: "Informationtechnology",
|
||||||
company: none,
|
course: "TINF19IT1",
|
||||||
supervisor: "Benny Goodman",
|
faculty: "Technik",
|
||||||
matriculation-number: 123456789,
|
university: "DHBW Mannheim",
|
||||||
contact: "sven.vogel123@web.de"
|
company: "ABB AG",
|
||||||
),
|
supervisor: "Benny Goodman",
|
||||||
(
|
matriculation-number: 123456789,
|
||||||
name: "Sven Vogel",
|
|
||||||
course: "TINF19IT1",
|
|
||||||
company: "ABB AG",
|
|
||||||
supervisor: "Benny Goodman",
|
|
||||||
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.6.3"
|
version = "0.5.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