feat: logo customizable by template user & license

This commit is contained in:
Ansgar Lichter 2024-12-30 16:34:16 +01:00
parent fb3b63f05e
commit be73f81b09
6 changed files with 171 additions and 60 deletions

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Ansgar Lichter
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

32
lib.typ
View file

@ -1,4 +1,4 @@
#import "modules/titlepage.typ": *
#import "modules/titlePage.typ": *
#import "@preview/glossarium:0.5.1": print-glossary, register-glossary
#let in-outline = state("in-outline", false)
@ -7,36 +7,8 @@
}
#let preface(
settings: (),
degree: "",
program: "",
title: "",
subtitle: "",
author: "",
matriculationNumber: "",
placeOfWork: "",
supervisor: "",
advisor: "",
startDate: none,
submissionDate: none
settings: ()
) = {
set document(title: title, author: author)
titlepage(
settings: settings,
degree: degree,
program: program,
title: title,
subtitle: subtitle,
author: author,
placeOfWork: placeOfWork,
matriculationNumber: matriculationNumber,
supervisor: supervisor,
advisor: advisor,
startDate: startDate,
submissionDate: submissionDate
)
// Page Setup
set page(
margin: (

View file

@ -1,20 +1,4 @@
#let titlepage(
settings: (),
degree: "",
program: "",
title: "",
subtitle: "",
titleGerman: "",
subtitleGerman: "",
author: "",
matriculationNumber: "",
placeOfWork: "",
supervisor: "",
advisor: "",
startDate: none,
submissionDate: none,
) = {
set document(title: title, author: author)
#let openTitlePage(settings: ()) = {
set page(
paper: "a4",
margin: (left: 30mm, right: 30mm, top: 40mm, bottom: 40mm),
@ -30,19 +14,24 @@
)
set par(leading: 1em)
}
// Title Page
//TODO: How to apply company logo?
grid(
columns: (1fr, 1fr),
align(left)[
#image("/assets/company.svg", height: 1.5cm)
],
align(right)[
#image("/assets/HKALogo.png", height: 2cm)
]
)
#let finishTitlePage(
settings: (),
degree: "",
program: "",
title: "",
subtitle: "",
titleGerman: "",
subtitleGerman: "",
author: "",
matriculationNumber: "",
placeOfWork: "",
supervisor: "",
advisor: "",
startDate: none,
submissionDate: none,
) = {
v(5mm)
align(center, text(font: settings.fontHeading, 1.9em, weight: 700, "University of Applied Sciences Karlsruhe"))

BIN
template/logo/HKALogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

114
template/logo/company.svg Normal file
View file

@ -0,0 +1,114 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="360.000000pt" height="360.000000pt" viewBox="0 0 360.000000 360.000000"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,360.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M1670 2816 c-25 -13 -58 -42 -75 -65 -24 -35 -30 -54 -33 -111 -4
-60 -1 -75 22 -116 25 -44 26 -54 26 -185 0 -126 2 -139 18 -139 15 0 17 11
17 97 0 68 4 98 13 100 9 4 12 -20 12 -96 l0 -101 130 0 130 0 0 136 c0 116 3
140 18 162 78 112 41 261 -79 323 -55 28 -142 26 -199 -5z m199 -55 c35 -25
59 -74 67 -135 6 -38 4 -46 -10 -46 -12 0 -16 10 -16 40 0 70 -46 132 -107
145 -18 3 -33 11 -33 17 0 16 66 2 99 -21z"/>
<path d="M1316 2164 c-9 -8 -16 -24 -16 -35 0 -18 15 -19 470 -21 l470 -3 0
27 c0 17 -8 31 -19 38 -13 6 -174 10 -455 10 -382 0 -436 -2 -450 -16z"/>
<path d="M1670 1995 l0 -85 105 0 105 0 0 85 0 85 -105 0 -105 0 0 -85z"/>
<path d="M1900 1985 c0 -19 13 -40 40 -67 162 -162 4 -442 -220 -388 -70 17
-122 58 -154 121 -45 90 -32 187 36 264 34 39 51 85 30 85 -19 0 -80 -63 -106
-109 -102 -188 35 -414 250 -413 158 1 274 119 274 276 0 105 -37 173 -132
245 -16 12 -18 11 -18 -14z"/>
<path d="M1617 1902 c-25 -27 -57 -104 -57 -137 0 -80 58 -173 127 -202 76
-31 186 -9 240 49 69 73 71 209 4 286 -23 26 -31 28 -31 7 0 -13 -19 -15 -127
-13 -96 2 -127 6 -125 16 3 17 -12 15 -31 -6z"/>
<path d="M1850 1224 c0 -3 9 -22 20 -44 11 -22 20 -51 20 -65 0 -18 5 -25 20
-25 13 0 20 7 20 20 0 12 9 38 20 60 24 48 25 50 2 50 -11 0 -23 -11 -29 -27
l-10 -28 -11 26 c-8 21 -52 49 -52 33z"/>
<path d="M917 1202 c-22 -24 -22 -75 1 -95 20 -18 59 -22 81 -8 20 13 3 32
-23 25 -28 -7 -50 17 -41 46 5 17 13 20 38 18 23 -2 32 1 32 12 0 24 -67 25
-88 2z"/>
<path d="M1067 1202 c-38 -41 -10 -112 44 -112 30 0 43 9 58 37 33 64 -54 128
-102 75z m68 -23 c12 -19 -4 -59 -24 -59 -22 0 -34 25 -26 51 7 20 40 26 50 8z"/>
<path d="M1220 1155 c0 -51 3 -65 15 -65 10 0 15 10 15 33 l0 32 20 -25 c20
-26 21 -26 38 5 10 18 11 17 12 -12 0 -26 4 -33 20 -33 18 0 20 7 20 65 0 62
-1 65 -24 65 -18 0 -27 -8 -35 -32 l-12 -33 -16 33 c-9 19 -23 32 -34 32 -17
0 -19 -8 -19 -65z"/>
<path d="M1410 1155 c0 -51 3 -65 15 -65 8 0 15 9 15 19 0 14 8 21 27 23 19 2
30 11 37 30 13 37 -6 58 -55 58 l-39 0 0 -65z m60 20 c0 -8 -7 -15 -15 -15 -8
0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z"/>
<path d="M1556 1168 c-10 -29 -21 -59 -23 -65 -3 -8 3 -13 15 -13 11 0 22 5
24 12 6 17 36 18 42 2 3 -8 14 -14 25 -14 18 0 18 3 -7 65 -32 81 -50 85 -76
13z m40 -25 c-11 -11 -19 6 -11 24 8 17 8 17 12 0 3 -10 2 -21 -1 -24z"/>
<path d="M1690 1155 c0 -58 2 -65 20 -65 16 0 20 7 20 33 l0 32 26 -32 c40
-52 54 -44 54 32 0 51 -3 65 -15 65 -10 0 -15 -10 -15 -30 0 -16 -4 -30 -8
-30 -4 0 -16 14 -25 30 -10 17 -27 30 -38 30 -17 0 -19 -7 -19 -65z"/>
<path d="M2050 1155 c0 -51 3 -65 15 -65 10 0 15 10 15 30 0 38 10 38 35 0 11
-16 28 -30 38 -30 14 0 17 10 17 65 0 58 -2 65 -20 65 -16 0 -20 -7 -20 -32
l0 -33 -26 33 c-40 51 -54 43 -54 -33z"/>
<path d="M2231 1161 c-26 -71 -26 -71 -1 -71 11 0 20 7 20 15 0 8 9 15 20 15
11 0 20 -7 20 -15 0 -8 9 -15 20 -15 25 0 25 0 -1 71 -15 41 -27 59 -39 59
-12 0 -24 -18 -39 -59z m45 -18 c-11 -11 -19 6 -11 24 8 17 8 17 12 0 3 -10 2
-21 -1 -24z"/>
<path d="M2370 1155 c0 -59 2 -65 21 -65 18 0 21 5 17 30 -5 33 7 41 15 10 3
-11 10 -20 17 -20 7 0 14 9 17 20 8 32 26 23 21 -10 -4 -24 -1 -30 14 -30 16
0 18 9 18 65 0 59 -2 65 -20 65 -12 0 -25 -10 -32 -25 -6 -14 -15 -25 -19 -25
-5 0 -11 11 -15 25 -4 18 -13 25 -30 25 -23 0 -24 -3 -24 -65z"/>
<path d="M2560 1155 l0 -65 50 0 c38 0 50 4 50 15 0 10 -10 15 -30 15 -16 0
-30 5 -30 10 0 6 11 10 25 10 16 0 25 6 25 15 0 9 -9 15 -24 15 -14 0 -28 5
-31 10 -4 6 6 10 23 10 17 0 32 6 36 15 4 12 -4 15 -44 15 l-50 0 0 -65z"/>
<path d="M1040 1014 c1 -5 6 -19 13 -31 l13 -23 11 30 c6 17 7 30 2 30 -5 0
-9 -5 -9 -11 0 -8 -5 -8 -15 1 -8 7 -15 9 -15 4z"/>
<path d="M1103 1004 c-3 -8 2 -23 11 -32 15 -15 17 -15 32 0 21 21 11 48 -16
48 -11 0 -23 -7 -27 -16z m37 -9 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8
5 15 10 15 6 0 10 -7 10 -15z"/>
<path d="M1183 995 c2 -23 7 -30 22 -30 14 0 21 8 23 28 2 15 -1 27 -7 27 -6
0 -11 -9 -11 -20 0 -27 -17 -25 -23 3 -4 15 -5 12 -4 -8z"/>
<path d="M1250 991 c0 -31 14 -42 23 -18 4 10 6 10 6 0 2 -26 17 -12 16 15 0
20 -6 28 -22 30 -20 3 -23 -1 -23 -27z"/>
<path d="M1338 1013 c6 -2 12 -16 12 -29 0 -34 17 -30 22 6 4 27 2 30 -21 29
-14 0 -20 -3 -13 -6z"/>
<path d="M1402 995 c-15 -33 -16 -32 17 -32 27 0 28 2 19 29 -12 35 -21 35
-36 3z"/>
<path d="M1464 1005 c-4 -8 -4 -22 0 -30 7 -20 46 -19 46 1 0 11 -6 14 -20 9
-28 -9 -26 13 3 25 l22 9 -23 0 c-12 1 -25 -6 -28 -14z"/>
<path d="M1530 990 c0 -23 4 -30 20 -30 11 0 20 5 20 10 0 6 -4 10 -10 10 -5
0 -10 9 -10 20 0 11 -4 20 -10 20 -5 0 -10 -13 -10 -30z"/>
<path d="M1590 990 c0 -16 5 -30 10 -30 6 0 10 14 10 30 0 17 -4 30 -10 30 -5
0 -10 -13 -10 -30z"/>
<path d="M1631 988 c1 -19 3 -25 6 -15 5 18 6 18 24 1 18 -17 19 -16 19 17 0
27 -3 31 -11 19 -8 -11 -12 -12 -16 -2 -9 24 -23 12 -22 -20z"/>
<path d="M1700 990 c0 -26 4 -30 26 -30 14 0 23 4 19 10 -4 6 -11 8 -16 5 -5
-4 -9 -1 -9 4 0 6 6 11 13 11 8 0 8 3 -2 9 -11 7 -10 10 5 14 13 3 11 5 -8 6
-25 1 -28 -3 -28 -29z"/>
<path d="M1785 994 c-24 -37 -11 -41 15 -5 12 17 17 31 12 31 -5 0 -17 -12
-27 -26z"/>
<path d="M1840 1009 c0 -7 8 -18 18 -26 16 -14 16 -14 0 -9 -10 3 -18 1 -18
-4 0 -12 37 -13 44 -1 3 5 -1 14 -10 21 -12 11 -12 15 -2 21 9 6 6 9 -9 9 -13
0 -23 -5 -23 -11z"/>
<path d="M1900 990 c0 -26 4 -30 28 -30 24 1 25 2 10 14 -10 7 -18 21 -18 30
0 9 -4 16 -10 16 -5 0 -10 -13 -10 -30z"/>
<path d="M1964 1005 c-8 -21 2 -45 19 -45 21 0 38 25 31 44 -8 20 -43 21 -50
1z m36 -10 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7
10 -15z"/>
<path d="M2036 1004 c-4 -9 -1 -23 5 -30 16 -19 49 -18 49 2 0 11 -6 14 -20 9
-15 -5 -20 -2 -20 10 0 11 5 15 15 11 8 -3 15 -1 15 4 0 17 -37 11 -44 -6z"/>
<path d="M2124 1004 c3 -8 2 -13 -3 -10 -5 3 -11 -2 -13 -12 -4 -15 1 -19 22
-19 26 0 27 2 18 29 -6 15 -14 28 -20 28 -6 0 -7 -7 -4 -16z"/>
<path d="M2172 990 c0 -16 4 -30 9 -30 5 0 9 8 9 18 1 16 1 16 11 0 15 -27 29
-21 29 12 0 17 -4 30 -10 30 -5 0 -10 -5 -10 -12 0 -9 -3 -9 -12 0 -19 19 -25
14 -26 -18z"/>
<path d="M2271 990 c0 -30 1 -32 11 -16 11 19 11 19 24 1 13 -17 14 -16 13 16
0 19 -3 28 -6 22 -2 -7 -11 -13 -18 -13 -7 0 -16 6 -18 13 -3 6 -6 -4 -6 -23z"/>
<path d="M2340 990 c0 -26 4 -30 26 -30 14 0 23 4 19 10 -4 6 -11 8 -16 5 -5
-4 -9 -1 -9 4 0 6 6 11 13 11 8 0 8 3 -2 9 -11 7 -10 10 5 14 13 3 11 5 -8 6
-25 1 -28 -3 -28 -29z"/>
<path d="M2400 990 c0 -16 5 -30 10 -30 6 0 10 5 10 11 0 8 5 8 15 -1 13 -11
15 -8 15 19 0 26 -4 31 -25 31 -21 0 -25 -5 -25 -30z m40 16 c0 -3 -4 -8 -10
-11 -5 -3 -10 -1 -10 4 0 6 5 11 10 11 6 0 10 -2 10 -4z"/>
<path d="M2470 990 c0 -26 4 -30 26 -30 14 0 23 4 19 10 -4 6 -11 8 -16 5 -5
-4 -9 -1 -9 4 0 6 6 11 13 11 8 0 8 3 -2 9 -11 7 -10 10 5 14 13 3 11 5 -8 6
-25 1 -28 -3 -28 -29z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

@ -6,7 +6,20 @@
#show: make-glossary
#preface(
#set document(title: titleEnglish, author: author)
#openTitlePage(settings: settings)
// Customize your company logo or just use the one from the university
#grid(
columns: (1fr, 1fr),
align(left)[
#image("/logo/company.svg", height: 1.5cm)
],
align(right)[
#image("/logo/HKALogo.png", height: 2cm)
]
)
#finishTitlePage(
settings: settings,
degree: degree,
program: program,
@ -21,6 +34,8 @@
submissionDate: submissionDate,
)
#preface(settings: settings)
// Citations - applied here so that you are able to use a local CSL file to define the citation style
#set cite(style: settings.citationStyle)