feat: revamp template API and box components

This commit is contained in:
Popa committed 2026-09-11 14:00:59 +02:00
1 parent 51fc2ef3c3
commit 337ff33853
8 files changed
+211 -130

No files matched your search

+49 -12
View File
@@ -1,31 +1,39 @@
#import "@preview/clean-sheets:0.3.0": Cal, chevrons, computer-science-template, def, ex_box, qed, satz
#import "@preview/clean-sheets:0.3.0": Cal, chevrons, computer-science-template, exercise, lemma, qed
#show: body => computer-science-template(
1,
subtitle: [Vorlesung 1: Einführung in die Grundlagen],
[Exemplarische Grundlagen I],
(
([Max Mustermann], [1234567]),
([Erika Musterfrau], [7654321]),
),
[Wintersemester 2025/26],
[Wintersemester 2026/27],
[Beispiel-Universität Musterstadt],
[Institut für Exemplarisches],
sheetnumber: 1,
subtitle: lorem(5),
department: [Abteilung Beispiel],
submit_until: datetime(day: 1, month: 1, year: 2026, hour: 14, minute: 0, second: 0),
testats_from: datetime(day: 1, month: 1, year: 2026, hour: 18, minute: 0, second: 0),
testats_until: datetime(day: 8, month: 1, year: 2026, hour: 10, minute: 0, second: 0),
submit-until: datetime(day: 1, month: 1, year: 2027, hour: 14, minute: 0, second: 0),
attestations-from: datetime(day: 1, month: 1, year: 2027, hour: 18, minute: 0, second: 0),
attestations-until: datetime(day: 8, month: 1, year: 2027, hour: 10, minute: 0, second: 0),
info-text: lorem(40),
page-numbering: "Blatt I von I",
group-digits: true,
decimal-comma: true,
text-font: "Libertinus Serif",
math-font: "Libertinus Math",
table-header-smallcaps: true,
no-pagebreak: false,
body,
)
= Aufgabe 1
#ex_box(
heading: [Aufgabe 1],
points: [10 Punkte],
#exercise(
heading: [Listen],
points: [$10000.5$ Punkte],
color: fuchsia,
stroke-color: fuchsia.lighten(50%),
text-color: fuchsia.darken(25%),
)[
Zeigen Sie eine einfache Aussage über Listen.
]
@@ -40,8 +48,37 @@ DEF magic_recursive(string s, string p):
#table(
columns: 6,
[Heading 1], [Heading 2], [Heading 3], [Heading 4], [Heading 5], [Heading 6],
table.header([Heading 1], [Heading 2], [Heading 3], [Heading 4], [Heading 5], [Heading 6]),
[Cell 1], [Cell 2], [Cell 3], [Cell 4], [Cell 5], [Cell 6],
[Cell 7], [Cell 8], [Cell 9], [Cell 10], [Cell 11], [Cell 12],
)
#lemma(label: [Pumping-Lemma], lang: "de")[
Sei $L subset.eq Sigma^*$ eine unendliche reguläre Sprache. Dann existiert eine Zahl $k in NN$ (die Pumping-Konstante), sodass jedes Wort $w in L$ mit $|w| >= k$ in drei Teile $w = x y z$ zerlegt werden kann, wobei
#set enum(numbering: "(i)")
+ $|x y| <= k$,
+ $|y| >= 1$ und
+ $forall i in NN_0: x y^i z in L$.
]
= Aufgabe 2
#exercise(
color: fuchsia,
stroke-color: fuchsia.lighten(50%),
)[
Unter _Rekursion_ versteht man in der Informatik die Eigenschaft einer Funktion, sich selbst aufzurufen. Geben Sie ein Beispiel für eine rekursive Funktion an und erläutern Sie ihre Funktionsweise.
]
#lorem(50) #qed
$
bold("B")(P) =
mu_0 / (4 pi)
integral
(I times bold(hat("r"))) / r^2 dif bold(l)
= (mu_0 I) / (4 pi)
integral
(dif bold(l) times bold(hat("r"))) / r^2
$