refined appendix

This commit is contained in:
Sven Vogel 2024-04-08 10:03:51 +02:00
parent 4e01b2f85c
commit ad004376c7
6 changed files with 72 additions and 27 deletions

View File

@ -18,7 +18,7 @@
#import "../prelude.typ" as prelude
#set heading(numbering: none)
#set heading(numbering: none, supplement: [Heading])
#set page(numbering: "I.", footer: "")
#include "../pages/title.typ"

View File

@ -28,54 +28,69 @@
footer: ""
)
#let heading_outline_title = if prelude.format.language == "de" [
Inhaltsverzeichnis
#set heading(supplement: [Heading])
#set page(numbering: "I.", footer: "")
#if prelude.format.language == "de" [
= Inhaltsverzeichnis
] else if prelude.format.language == "en" [
Table of contents
= Table of contents
] else [
#panic("no translation for language: ", prelude.format.language)
]
#outline(title: heading_outline_title, indent: auto)
#par(first-line-indent: 0pt)[
#show outline.entry.where(
level: 1
): it => {
strong(it)
}
#outline(title: none, indent: auto, target: heading.where(supplement: [Heading]))
]
#pagebreak()
#let image_outline_title = if prelude.format.language == "de" [
Abbildungsverzeichnis
#if prelude.format.language == "de" [
= Abbildungsverzeichnis
] else if prelude.format.language == "en" [
List of figures
= List of figures
] else [
#panic("no translation for language: ", prelude.format.language)
]
#outline(
title: image_outline_title,
title: none,
target: figure.where(kind: image),
)
#pagebreak()
#let table_outline_title = if prelude.format.language == "de" [
Tabellensverzeichnis
#if prelude.format.language == "de" [
= Tabellensverzeichnis
] else if prelude.format.language == "en" [
List of tables
= List of tables
] else [
#panic("no translation for language: ", prelude.format.language)
]
#outline(
title: table_outline_title,
title: none,
target: figure.where(kind: table),
)
#pagebreak()
#let raw_outline_title = if prelude.format.language == "de" [
Quelltextverzeichnis
#if prelude.format.language == "de" [
= Quelltextverzeichnis
] else if prelude.format.language == "en" [
Table of source code
= List of source code
] else [
#panic("no translation for language: ", prelude.format.language)
]
#outline(
title: raw_outline_title,
title: none,
target: figure.where(kind: raw),
)
@ -98,7 +113,7 @@
// destination array
#let glossary_entries = ()
// parse TOML entries into correct format
// parse YAML entries into correct format
#if glossary.glossary != none {
for entry in glossary.glossary {
let short = entry.at("short", default: none)
@ -115,5 +130,20 @@
#print-glossary(glossary_entries)
#pagebreak()
#if prelude.format.language == "de" [
= Anhangsverzeichnis
] else if prelude.format.language == "en" [
= List of appendencies
] else [
#panic("no translation for language: ", prelude.format.language)
]
#outline(
title: none,
target: heading.where(supplement: [Appendix]),
)
// reset page counter
#counter(page).update(0)

View File

@ -12,6 +12,9 @@
#import "../prelude.typ" as prelude
#set heading(supplement: [Heading])
#set page(numbering: "I.", footer: "")
#set page(
binding: left,
header-ascent: 2em,

View File

@ -131,6 +131,8 @@
footer: ""
)
#set heading(supplement: [Heading])
#include "pages/introduction.typ"
// ------------------------------------------

View File

@ -28,13 +28,28 @@
#set heading(numbering: none)
= Appendix
#if prelude.format.language == "de" [
= Anhang
] else if prelude.format.language == "en" [
= Appendix
] else [
#panic("no translation for language: ", prelude.format.language)
]
#set heading(numbering: "A.1")
// reset page counter
#counter(heading).update(1)
#let appendix(text) = [
#heading(
supplement: [Appendix],
level: 2,
numbering: "A.1",
)[#text]
<#text>
]
// ------------------------------------------
// Put your appendencies here and link them
// to correclty reference them in the document
@ -42,10 +57,9 @@
// Example:
//
// == Appendix title
// <appendix-section-link-name>
// #appendix([Titel])
//
// Some appendix content goes here
// Then reference with in the document:
// @appendix-section-link-name
// Then reference it in the document:
// @Titel

View File

@ -2,7 +2,3 @@
#import "../prelude.typ" as prelude
= Einleitung
#pagebreak()
= Test