fixed: outline including appendices
This commit is contained in:
parent
ac70aade96
commit
968f63be78
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
= Ein Text im Anhang
|
= Ein Text im Anhang
|
||||||
|
#label("Anhang-A")
|
||||||
|
|
||||||
#lorem(50)
|
#lorem(50)
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -29,15 +29,13 @@
|
||||||
key: "oidc",
|
key: "oidc",
|
||||||
short: "OIDC",
|
short: "OIDC",
|
||||||
long: "OpenID Connect",
|
long: "OpenID Connect",
|
||||||
desc: [OpenID is an open standard and decentralized authentication protocol promoted by the non-profit #link("https://en.wikipedia.org/wiki/OpenID#OpenID_Foundation")[OpenID Foundation].],
|
desc: [OpenID is an open standard and decentralized authentication protocol promoted by the non-profit #link("https://en.wikipedia.org/wiki/OpenID#OpenID_Foundation")[OpenID Foundation].]
|
||||||
group: "Akronyme",
|
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
key: "potato",
|
key: "potato",
|
||||||
short: "potato",
|
short: "potato",
|
||||||
plural: "potatoes",
|
plural: "potatoes",
|
||||||
desc: [#lorem(10)],
|
desc: [#lorem(10)]
|
||||||
group: "Begriffe"
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
appendices: include "appendix.typ"
|
appendices: include "appendix.typ"
|
||||||
|
@ -51,6 +49,7 @@
|
||||||
@oidc
|
@oidc
|
||||||
|
|
||||||
#lorem(100)
|
#lorem(100)
|
||||||
|
@Anhang-A
|
||||||
|
|
||||||
== Lorem Ipsum 2
|
== Lorem Ipsum 2
|
||||||
|
|
||||||
|
|
|
@ -8,25 +8,28 @@
|
||||||
"Anhang"
|
"Anhang"
|
||||||
}
|
}
|
||||||
|
|
||||||
// APA style appendix
|
|
||||||
show heading: it => {
|
|
||||||
let number = if it.numbering != none {
|
|
||||||
counter(heading).display(it.numbering)
|
|
||||||
}
|
|
||||||
block()[
|
|
||||||
#title #number - #it.body
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
show heading.where(level: 1): it => v(2em) + it + v(1em)
|
|
||||||
show heading.where(level: 2): it => v(1em) + it + v(0.5em)
|
|
||||||
show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
|
|
||||||
|
|
||||||
set heading(numbering: "A.1", supplement: [appendix])
|
|
||||||
|
|
||||||
if "appendices" in config.thesis {
|
if "appendices" in config.thesis {
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
|
heading(level: 1, numbering: none, title)
|
||||||
|
v(-2em)
|
||||||
|
|
||||||
|
// APA style appendix
|
||||||
|
show heading: it => {
|
||||||
|
let number = if it.numbering != none {
|
||||||
|
counter(heading).display(it.numbering)
|
||||||
|
}
|
||||||
|
block()[
|
||||||
|
#title #number - #it.body
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
show heading.where(level: 1): it => v(2em) + it + v(1em)
|
||||||
|
show heading.where(level: 2): it => v(1em) + it + v(0.5em)
|
||||||
|
show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
|
||||||
|
|
||||||
|
set heading(numbering: "A.1", supplement: title)
|
||||||
|
|
||||||
config.thesis.appendices
|
config.thesis.appendices
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,21 +55,28 @@
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
outline(
|
outline(
|
||||||
|
target: heading.where(supplement: [chapter]),
|
||||||
title: heading(level: 3, title),
|
title: heading(level: 3, title),
|
||||||
indent: auto)
|
indent: auto)
|
||||||
}
|
}
|
||||||
|
|
||||||
#let render_appendix_outline() = context {
|
#let render_appendix_outline() = context {
|
||||||
if query(heading.where(supplement: [appendix])).len() > 0 {
|
let supplement = if text.lang == "en" {
|
||||||
|
[Appendix]
|
||||||
|
} else {
|
||||||
|
[Anhang]
|
||||||
|
}
|
||||||
|
|
||||||
|
if query(heading.where(supplement: supplement)).len() > 0 {
|
||||||
let title = if (text.lang == "de") {
|
let title = if (text.lang == "de") {
|
||||||
"Anhangsverzeichnis"
|
"Anhangsverzeichnis"
|
||||||
} else if text.lang == "en" {
|
} else if text.lang == "en" {
|
||||||
"Table of Appendices"
|
"Table of Appendices"
|
||||||
}
|
}
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
outline(
|
outline(
|
||||||
target: heading.where(supplement: [appendix]),
|
target: heading.where(supplement: supplement),
|
||||||
title: heading(level: 3, title),
|
title: heading(level: 3, title),
|
||||||
indent: auto)
|
indent: auto)
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,8 @@
|
||||||
font: "Montserrat",
|
font: "Montserrat",
|
||||||
weight: "semibold")
|
weight: "semibold")
|
||||||
|
|
||||||
|
#set heading(supplement: [chapter])
|
||||||
|
|
||||||
// Set header spacing
|
// Set header spacing
|
||||||
#show heading.where(level: 1): it => v(2em) + it + v(1em)
|
#show heading.where(level: 1): it => v(2em) + it + v(1em)
|
||||||
#show heading.where(level: 2): it => v(1em) + it + v(0.5em)
|
#show heading.where(level: 2): it => v(1em) + it + v(0.5em)
|
||||||
|
@ -54,6 +56,7 @@
|
||||||
leading: 1em)
|
leading: 1em)
|
||||||
|
|
||||||
#show link: set text(fill: red.darken(15%))
|
#show link: set text(fill: red.darken(15%))
|
||||||
|
#show ref: set text(fill: red.darken(15%))
|
||||||
|
|
||||||
#set heading(numbering: none)
|
#set heading(numbering: none)
|
||||||
#set page(
|
#set page(
|
||||||
|
@ -123,11 +126,6 @@
|
||||||
#body
|
#body
|
||||||
]
|
]
|
||||||
|
|
||||||
#let prelude_styled(config: dictionary, body: content) = context [
|
|
||||||
|
|
||||||
#body
|
|
||||||
]
|
|
||||||
|
|
||||||
#let content_styled(config: dictionary, body: content) = [
|
#let content_styled(config: dictionary, body: content) = [
|
||||||
// setup equate for sub equation labeling
|
// setup equate for sub equation labeling
|
||||||
#import "@preview/equate:0.2.0": equate
|
#import "@preview/equate:0.2.0": equate
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// start of template pages and styles
|
// start of template pages and styles
|
||||||
#let dhbw-template(config: dictionary, doc: content) = [
|
#let dhbw-template(config: dictionary, doc: content) = [
|
||||||
|
|
||||||
#import "style.typ": global_styled_doc, prelude_styled, content_styled, end_styled
|
#import "style.typ": global_styled_doc, content_styled, end_styled
|
||||||
|
|
||||||
// set document properties
|
// set document properties
|
||||||
#set document(
|
#set document(
|
||||||
|
@ -37,22 +37,18 @@
|
||||||
|
|
||||||
// prelude includes: title, declaration of authorship, confidentiality statement, outline and abstract
|
// prelude includes: title, declaration of authorship, confidentiality statement, outline and abstract
|
||||||
// these will have roman page numbers
|
// these will have roman page numbers
|
||||||
#prelude_styled(config: config, body: [
|
|
||||||
#pagebreak(weak: true)
|
|
||||||
#new_declaration_of_authorship(config)
|
|
||||||
|
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
#new_confidentiality_statement_page(config)
|
#new_declaration_of_authorship(config)
|
||||||
|
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
#new_prerelease_note(config)
|
#new_confidentiality_statement_page(config)
|
||||||
|
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
#new_outline()
|
#new_prerelease_note(config)
|
||||||
|
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
#new_abstract(config)
|
#new_outline()
|
||||||
])
|
|
||||||
|
|
||||||
// glossary is built inline here because the links must be
|
// glossary is built inline here because the links must be
|
||||||
// exposed to the entire document
|
// exposed to the entire document
|
||||||
|
@ -60,7 +56,14 @@
|
||||||
#show: make-glossary
|
#show: make-glossary
|
||||||
|
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
|
|
||||||
|
#heading(supplement: [outline], "Glossar")
|
||||||
|
|
||||||
#print-glossary(config.thesis.glossary)
|
#print-glossary(config.thesis.glossary)
|
||||||
|
|
||||||
|
#pagebreak(weak: true)
|
||||||
|
#new_abstract(config)
|
||||||
|
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
#counter(page).update(1)
|
#counter(page).update(1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue