feat: rename CS template to formal template

This commit is contained in:
Popa committed 2026-09-11 16:18:33 +02:00
1 parent 11b70aea9a
commit 80036332eb
5 files changed
+17 -17

No files matched your search

+2 -2
View File
@@ -61,7 +61,7 @@ Optional arguments:
- `show-credits`: display the package credit (`false`)
- `credits`: custom credit content
### `computer-science-template`
### `formal-template`
A denser layout with (German) submission and attestation dates, optional digit
grouping, and decimal-comma formatting. Required arguments are `sheetnumber`,
@@ -107,7 +107,7 @@ Optional arguments:
- `qed`: right-aligned square; `jb`: justified line break
- `smallcaps` and `upper`: tracked small-cap and uppercase helpers
See `examples/base.typ` and `examples/computer-science.typ` for complete source
See `examples/base.typ` and `examples/formal.typ` for complete source
examples.
## Fonts
@@ -1,6 +1,6 @@
#import "@preview/clean-sheets:0.3.0": Cal, chevrons, computer-science-template, definition, exercise, korollar, lemma, qed
#import "@preview/clean-sheets:0.3.0": Cal, chevrons, formal-template, definition, exercise, korollar, lemma, qed
#show: body => computer-science-template(
#show: body => formal-template(
1,
subtitle: [Vorlesung 1: Einführung in die Grundlagen],
[Exemplarische Grundlagen I],
@@ -17,7 +17,7 @@
attestations-until: datetime(day: 8, month: 1, year: 2027, hour: 10, minute: 0, second: 0),
info-text: lorem(40),
track-heading-counter: true,
page-numbering: "Blatt I von I",
page-numbering: "I von I",
group-digits: true,
decimal-comma: true,
text-font: "Libertinus Serif",
+1 -1
View File
@@ -1,5 +1,5 @@
#import "src/templates/base.typ": base-template
#import "src/templates/computer-science.typ": computer-science-template
#import "src/templates/formal.typ": formal-template
#import "src/helpers.typ": Cal, Complement, chevrons, german-date-time, group-digits-text, jb, qed
#import "src/components/boxes.typ": axiom, corollary, definition, exercise, korollar, lemma, satz, theorem
@@ -1,9 +1,9 @@
#import "../config.typ": custom-raw-syntaxes
#import "../theme.typ": code-theme, common-theme, computer-science-theme, smallcaps
#import "../theme.typ": code-theme, common-theme, formal-theme, smallcaps
#import "../helpers.typ": german-date-time, group-digits-text, render-footnote-entry
/// Computer science exercise sheet template.
#let computer-science-template(
/// Formal exercise sheet template.
#let formal-template(
sheetnumber,
subtitle: none,
course,
@@ -21,25 +21,25 @@
group-digits: false,
decimal-comma: true,
raw-syntaxes: custom-raw-syntaxes,
text-font: computer-science-theme.text-font,
math-font: computer-science-theme.math-font,
text-font: formal-theme.text-font,
math-font: formal-theme.math-font,
table-header-smallcaps: false,
no-pagebreak: false,
body,
) = {
let font-size = computer-science-theme.font-size
let font-size = formal-theme.font-size
set page(
header: context {
if counter(page).get().first() > 1 [
#set text(computer-science-theme.header-size)
#set text(formal-theme.header-size)
#grid(
columns: (3fr, 2fr, 3fr),
align(start)[_#course _],
align(center)[*Übungsblatt #sheetnumber*],
align(end)[#students.map(((name, matrNr)) => name).join(", ")],
)
#line(length: 100%, stroke: 0.4pt + computer-science-theme.divider)
#line(length: 100%, stroke: 0.4pt + formal-theme.divider)
]
},
numbering: page-numbering,
@@ -76,7 +76,7 @@
size: font-size - code-theme.size-offset,
)
show raw.where(block: true): box.with(..computer-science-theme.raw-block)
show raw.where(block: true): box.with(..formal-theme.raw-block)
show raw.where(block: false): box.with(..code-theme.inline)
show figure.where(kind: table): set block(breakable: true)
@@ -126,7 +126,7 @@
)
#v(0.2cm)
#line(length: 100%, stroke: 0.4pt + computer-science-theme.divider)
#line(length: 100%, stroke: 0.4pt + formal-theme.divider)
#v(0.3cm)
#align(center)[
+1 -1
View File
@@ -91,7 +91,7 @@
raw-block: code-theme.block,
)
#let computer-science-theme = (
#let formal-theme = (
font-size: 10.5pt,
text-font: fonts.cmu,
math-font: fonts.cmu-math,