fixed spelling mistakes

This commit is contained in:
Sven Vogel 2024-08-20 09:49:13 +02:00
parent a90678ffab
commit 3026dc1a1e
4 changed files with 99 additions and 63 deletions

View File

@ -43,7 +43,7 @@
set par(justify: true) set par(justify: true)
if text.lang == "de" [ if text.lang == "de" [
darf weder als Ganzes noch in Auszügen Personen außerhalb des Prüfungsprozesses und des Evalua-tionsverfahrens zugänglich gemacht werden, sofern keine anderslautende Genehmigung der Ausbildungsstätte vorliegt. darf weder als Ganzes noch in Auszügen Personen außerhalb des Prüfungsprozesses und des Evaluationsverfahrens zugänglich gemacht werden, sofern keine anderslautende Genehmigung der Ausbildungsstätte vorliegt.
] else if text.lang == "en" [ ] else if text.lang == "en" [
may not be made accessible to persons outside the examination process and the evaluation procedure, either as a whole or in excerpts, unless otherwise authorized by the training institution. may not be made accessible to persons outside the examination process and the evaluation procedure, either as a whole or in excerpts, unless otherwise authorized by the training institution.
] ]

View File

@ -27,11 +27,11 @@
// faculty // faculty
#pad(top: 0.5cm)[ #pad(top: 0.5cm)[
#if text.lang == "de" [ #if text.lang == "de" [
Praxisphase des #author.semester Studienjahrs an der Fakultät für #author.faculty Praxisphase des #author.semester Semesters an der Fakultät für #author.faculty
#linebreak() #linebreak()
im Studiengang #author.program im Studiengang #author.program
] else if text.lang == "en" [ ] else if text.lang == "en" [
Practical phase of the #author.semester academic year at the Faculty of #author.faculty Practical phase of the #author.semester semester at the Faculty of #author.faculty
#linebreak() #linebreak()
in the degree program #author.program in the degree program #author.program
] else [ ] else [

View File

@ -9,7 +9,7 @@
#import "branding.typ": * #import "branding.typ": *
#let watermark-color = luma(50%).transparentize(70%) #let watermark-color = luma(50%).transparentize(70%)
#let watermark-pattern = pattern(size: (5pt, 5pt))[ #let watermark-pattern = pattern(size: (5pt, 5pt))[
#place(line(start: (50%, 0%), end: (50%, 100%), stroke: (paint: watermark-color, thickness: 3pt))) #place(line(start: (50%, 0%), end: (50%, 100%), stroke: (paint: watermark-color, thickness: 3pt)))
@ -18,9 +18,10 @@
#let watermark(config) = if config.draft { #let watermark(config) = if config.draft {
rotate(-22.5deg)[ rotate(-22.5deg)[
#rect( #rect(
radius: 1em, radius: 1em,
inset: 1em, inset: 1em,
stroke: watermark-color)[ stroke: watermark-color,
)[
#text(size: 4em, weight: "bold", fill: watermark-pattern, "DRAFT") #text(size: 4em, weight: "bold", fill: watermark-pattern, "DRAFT")
#linebreak() #linebreak()
#text(size: 1.25em, weight: "bold", fill: watermark-color)[ #text(size: 1.25em, weight: "bold", fill: watermark-color)[
@ -28,13 +29,14 @@
#linebreak() #linebreak()
document version. document version.
#linebreak() #linebreak()
#text(size: 0.75em, "Further usage without the authors consent is not permitted.")]]]} #text(size: 0.75em, "Further usage without the authors consent is not permitted.")]]]
#let numberingH(c)={
return numbering(c.numbering,..counter(heading).at(c.location()))
} }
#let currentH(level: 1)={ #let numberingH(c) = {
return numbering(c.numbering, ..counter(heading).at(c.location()))
}
#let currentH(level: 1) = {
let elems = query(selector(heading.where(level: level)).after(here())) let elems = query(selector(heading.where(level: level)).after(here()))
if elems.len() != 0 and elems.first().location().page() == here().page() { if elems.len() != 0 and elems.first().location().page() == here().page() {
@ -59,11 +61,13 @@
hyphenate: true, hyphenate: true,
dir: ltr, dir: ltr,
font: style.text.font, font: style.text.font,
fill: ABB-BLACK) fill: ABB-BLACK,
)
show heading: set text( show heading: set text(
font: style.heading.font, font: style.heading.font,
weight: "semibold") weight: "semibold",
)
set heading(supplement: [chapter]) set heading(supplement: [chapter])
@ -75,10 +79,15 @@
show heading.where(level: 3): it => v(0.5em) + it + v(0.25em) show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
// set theme for code blocks // set theme for code blocks
set raw( set raw(tab-size: style.code.tab-size)
tab-size: style.code.tab-size, show raw.where(block: false): it => box(
theme: style.code.theme) stroke: 1pt + ABB-GRAY-05,
show raw.where(block: false): it => box(stroke: 1pt + ABB-GRAY-05, radius: 2pt, inset: (left: 2pt, right: 2pt), outset: (top: 4pt, bottom: 4pt), fill: ABB-GRAY-06, text(font: style.code.font, size: style.code.size, it.text)) radius: 2pt,
inset: (left: 2pt, right: 2pt),
outset: (top: 4pt, bottom: 4pt),
fill: ABB-GRAY-06,
text(font: style.code.font, size: style.code.size, it.text),
)
show figure.where(kind: raw): it => align(left)[ show figure.where(kind: raw): it => align(left)[
#let content = it.body #let content = it.body
#let lang = if content.has("lang") { #let lang = if content.has("lang") {
@ -87,51 +96,61 @@
none none
} }
#block( #block(
width: 100%, width: 100%,
fill: ABB-GRAY-06, fill: ABB-GRAY-06,
stroke: 1pt + ABB-GRAY-05, stroke: 1pt + ABB-GRAY-05,
radius: 0.5em, radius: 0.5em,
inset: 0.75em, inset: 0.75em,
clip: false, clip: false,
{ {
let (columns, align, make_row) = { let (columns, align, make_row) = {
if style.code.lines {( if style.code.lines {
(
(auto, 1fr), (auto, 1fr),
(right + top, left), (right + top, left),
e => { e => {
let (i, l) = e let (i, l) = e
let n = i + 1 let n = i + 1
let n_str = if (calc.rem(n, 1) == 0) or (true and i == 0) { text(font: style.code.font, size: style.code.size, fill: ABB-BLACK, str(n)) } else { none } let n_str = if (calc.rem(n, 1) == 0) or (true and i == 0) {
text(font: style.code.font, size: style.code.size, fill: ABB-BLACK, str(n))
} else {
none
}
(n_str + h(0.5em), raw(block: true, lang: lang, l)) (n_str + h(0.5em), raw(block: true, lang: lang, l))
}) },
} )
else { } else {
( ( 1fr, ), (
( left, ), (1fr,),
e => { (left,),
let (i, l) = e e => {
raw(block: true, lang: lang, l) let (i, l) = e
} raw(block: true, lang: lang, l)
) },
} )
} }
grid( }
stroke: none, grid(
columns: columns, stroke: none,
rows: (auto,), columns: columns,
gutter: 0pt, rows: (auto,),
inset: 0.25em, gutter: 0pt,
align: (col, _) => align.at(col), inset: 0.25em,
fill: ABB-GRAY-06, align: (col, _) => align.at(col),
..content fill: ABB-GRAY-06,
.text ..content.text.split("\n").enumerate().map(make_row).flatten().map(c => if c.has("text") and c.text == "" {
.split("\n") v(1em)
.enumerate() } else {
.map(make_row) c
.flatten() })
.map(c => if c.has("text") and c.text == "" { v(1em) } else { c }) )
if lang != none {
place(
top + right,
text(font: style.code.font, size: style.code.size, ligatures: true, fill: ABB-GRAY-03, lang),
) )
} }
},
) )
#v(-1em) #v(-1em)
#align(center + top, it.caption) #align(center + top, it.caption)
@ -168,8 +187,20 @@
stroke: (x, y) => ( stroke: (x, y) => (
left: none, left: none,
right: none, right: none,
top: if y == 0 { 1.5pt } else if y < 2 { 1pt } else { 0.5pt }, top: if y == 0 {
bottom: if y == 0 { 1pt } else { 1.5pt } )) 1.5pt
} else if y < 2 {
1pt
} else {
0.5pt
},
bottom: if y == 0 {
1pt
} else {
1.5pt
},
),
)
// make table header bold // make table header bold
show table.cell.where(y: 0): set text(weight: "bold") show table.cell.where(y: 0): set text(weight: "bold")
@ -178,7 +209,8 @@
set par( set par(
justify: true, justify: true,
first-line-indent: 1em, first-line-indent: 1em,
leading: 1em) leading: 1em,
)
// give links a color // give links a color
show link: set text(fill: style.link.color) show link: set text(fill: style.link.color)
@ -194,10 +226,11 @@
top: style.page.margin.top + style.header.underline-top-padding + style.header.content-padding, top: style.page.margin.top + style.header.underline-top-padding + style.header.content-padding,
bottom: style.page.margin.bottom + style.footer.content-padding, bottom: style.page.margin.bottom + style.footer.content-padding,
left: style.page.margin.left, left: style.page.margin.left,
right: style.page.margin.right), right: style.page.margin.right,
),
numbering: (..nums) => { numbering: (..nums) => {
let current-page = here().page() let current-page = here().page()
if current-page == 1{ if current-page == 1 {
[] []
} else if query(<end-of-prelude>).first().location().page() > current-page { } else if query(<end-of-prelude>).first().location().page() > current-page {
numbering("I", nums.pos().first()) numbering("I", nums.pos().first())
@ -238,7 +271,10 @@
// right align logo of DHBW // right align logo of DHBW
align(right, image("res/DHBW.svg", height: style.header.logo-height))) align(right, image("res/DHBW.svg", height: style.header.logo-height)))
} else if query(<end-of-content>).first().location().page() >= current-page and query(<end-of-prelude>).first().location().page() < current-page + 1 { } else if query(<end-of-content>).first().location().page() >= current-page and query(<end-of-prelude>)
.first()
.location()
.page() < current-page + 1 {
let heading = currentH() let heading = currentH()
heading.at(0) heading.at(0)
@ -251,7 +287,8 @@
v(style.header.underline-top-padding - 1em) v(style.header.underline-top-padding - 1em)
line(length: 100%) line(length: 100%)
} }
}) },
)
body body
} }

View File

@ -98,7 +98,6 @@ fn main() {
#pagebreak() #pagebreak()
= Conclusion = Conclusion
#lorem(320) #lorem(320)