From 81772d771888569acbffcccab53a27ae782c70f4 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 16:45:17 +0100 Subject: [PATCH 1/3] feat: add custom bilbiography titles --- src/lib.typ | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/lib.typ b/src/lib.typ index 18f269d..812412d 100644 --- a/src/lib.typ +++ b/src/lib.typ @@ -122,17 +122,27 @@ #metadata("content terminate") - #end_styled(config)[ - // add bibliography if set - #if "bibliography" in config.thesis and config.thesis.bibliography != none { - pagebreak(weak: true) - counter(page).update(1) - set bibliography(style: "ieee") - config.thesis.bibliography - } + #end_styled( + config, + context [ + // add bibliography if set + #if "bibliography" in config.thesis and config.thesis.bibliography != none { + pagebreak(weak: true) + counter(page).update(1) + set bibliography( + style: "ieee", + title: if (text.lang == "de") { + "Literaturverzeichnis" + } else if text.lang == "en" { + "Bibliography" + }, + ) + config.thesis.bibliography + } - // appendix - #show-appendix(config: config) - ] + // appendix + #show-appendix(config: config) + ], + ) ] ] -- 2.40.1 From 1a09a0251d62b689e7ed9e307c1af97082c3cf09 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 15:49:21 +0000 Subject: [PATCH 2/3] ci/run-ci-on-push (#108) Reviewed-on: https://git.montehaselino.de/DHBW/dhbw-abb-typst-template/pulls/108 Co-authored-by: servostar Co-committed-by: servostar --- .gitea/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 3a04e93..3834a8a 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,11 +2,12 @@ name: Build'n check run-name: Performing Typst compilation on: pull_request: - types: - - opened - - synchronize branches: - main + push: + branches-ignore: + - main + jobs: run-ci-linux: runs-on: ubuntu-latest @@ -14,7 +15,8 @@ jobs: # push with commit containing "Run-Checks" if: > (contains(github.event.head_commit.message, 'Run-Checks') && - github.event_name == 'push') + github.event_name == 'push') || + github.event_name == 'pull_request' steps: - name: Check out repository code uses: actions/checkout@v3 -- 2.40.1 From 6d84cf4a1936f75dfbf9b378eaaf5d96daddd72f Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 25 Nov 2024 16:55:44 +0100 Subject: [PATCH 3/3] feat: add option to make supervisor signature optional --- src/conf.typ | 1 + src/pages/titlepage.typ | 34 ++++++++++++++++++---------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/conf.typ b/src/conf.typ index e369388..028f367 100644 --- a/src/conf.typ +++ b/src/conf.typ @@ -24,6 +24,7 @@ name: "dualen Hochschule Baden-Württemberg", campus: "Eppelheim" ), + supervisor-signature: false, authors: ( ( name: "Sven Vogel", diff --git a/src/pages/titlepage.typ b/src/pages/titlepage.typ index 4b6f952..a91ff8c 100644 --- a/src/pages/titlepage.typ +++ b/src/pages/titlepage.typ @@ -147,22 +147,24 @@ #context panic("no translation for language: ", text.lang) ] - #align( - bottom, - grid( - // set width of columns - // we need two, so make both half the page width - columns: (60%, 40%), - align(left, if text.lang == "de" [ - Unterschrift des betrieblichen Betreuers - ] else if text.lang == "en" [ - Signature of the company supervisor - ] else [ - #context panic("no translation for language: ", text.lang) - ] - ), - align(right, {line(length: 6cm)})), - ) + #if config.supervisor-signature { + align( + bottom, + grid( + // set width of columns + // we need two, so make both half the page width + columns: (60%, 40%), + align(left, if text.lang == "de" [ + Unterschrift des betrieblichen Betreuers + ] else if text.lang == "en" [ + Signature of the company supervisor + ] else [ + #context panic("no translation for language: ", text.lang) + ] + ), + align(right, {line(length: 6cm)})), + ) + } #counter(page).update(0) ] -- 2.40.1