Write abstract

This commit is contained in:
2026-06-05 12:28:07 +02:00
parent 832e69bfd9
commit 1aebf20019
4 changed files with 85 additions and 3 deletions
+62
View File
@@ -336,3 +336,65 @@
body
} // /zut-template
/// Funkcja rysująca abstrakt polska wersja u góry, angielska na dole, jedna strona A4.
///
/// Parametry:
/// pl-title nagłówek sekcji polskiej (domyślnie "Streszczenie")
/// pl-body treść streszczenia po polsku
/// pl-keywords słowa kluczowe (pojedynczy ciąg, np. "A, B, C")
/// en-title nagłówek sekcji angielskiej (domyślnie "Abstract")
/// en-body treść abstraktu po angielsku
/// en-keywords keywords (pojedynczy ciąg, np. "A, B, C")
#let abstract(
pl-title: "Streszczenie",
pl-body: str,
pl-keywords: "",
en-title: "Abstract",
en-body: str,
en-keywords: "",
) = {
set page(
paper: "a4",
margin: (
top: 3.2cm,
bottom: 3.5cm,
inside: 3.5cm,
outside: 2.5cm,
),
header: none,
footer: none,
numbering: none,
)
set text(font: "New Computer Modern", size: 12pt, lang: "pl")
set par(justify: true, leading: 0.65em)
set heading(numbering: none)
show heading: it => {
if it.level == 1 {
align(center)[
#text(size: 17pt, fill: blue-zut, weight: "regular", font: "Fira Sans", it.body)
]
}
}
// polish version of the abstract
v(0.7cm)
[= #pl-title]
v(0.5cm)
par(pl-body, first-line-indent: 2em)
if pl-keywords != "" {
[*słowa kluczowe:* #pl-keywords]
}
v(1fr)
// english version
[= #en-title]
set text(lang: "en")
v(0.5cm)
par(en-body)
if en-keywords != "" {
[*keywords:* #en-keywords]
}
}