about summary refs log tree commit diff stats
path: root/templates/latex/academia/init.local
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-03 18:59:02 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-03 18:59:02 +0200
commit86de16dd27c67732a0e163c46c23314fcddfce5f (patch)
tree5f8a9e5a5d1c2e7a6daa9aa3fa17d56d6ee8296d /templates/latex/academia/init.local
parentfeat(common/init): Support template specific drop-in scripts (diff)
downloadflake-templates-86de16dd27c67732a0e163c46c23314fcddfce5f.tar.gz
flake-templates-86de16dd27c67732a0e163c46c23314fcddfce5f.zip
feat(templates/latex/academia): Support changing the language
Diffstat (limited to '')
-rwxr-xr-xtemplates/latex/academia/init.local28
1 files changed, 28 insertions, 0 deletions
diff --git a/templates/latex/academia/init.local b/templates/latex/academia/init.local
new file mode 100755
index 0000000..ae57756
--- /dev/null
+++ b/templates/latex/academia/init.local
@@ -0,0 +1,28 @@
+#!/usr/bin/env sh
+
+prompt LANGUAGE "The language to use in the latex documents" "en_GB"
+
+bable_language=""
+case "$LANGUAGE" in
+"en_GB")
+    bable_language="british"
+    ;;
+en_*)
+    bable_language="english"
+    ;;
+de_DE | de_*)
+    bable_language="ngerman"
+    ;;
+
+*)
+    echo "'$LANGUAGE' is not yet recognized by the init.local script! Please open an issue." 1>&2
+    echo "set 'BABLE_LANGUAGE' to 'NOT_YET_RECOGNIZED_PLEASE_REPLACE' to help you find instances of the variable use." 1>&2
+    bable_language="NOT_YET_RECOGNIZED_PLEASE_REPLACE"
+    ;;
+esac
+
+prompt BABLE_LANGUAGE "The language to use for the bable package" "$bable_language" "dont_ask"
+prompt DATE_TIME_LANGUAGE "The language to use for the datetime2 package" "$(echo "$LANGUAGE" | sed 's/_/-/g')" "dont_ask"
+prompt SIUNITX_LANGUAGE "The language to use for the siunitx package" "$(echo "$LANGUAGE" | sed 's/\(\w\w\).*/\U\1/')" "dont_ask"
+
+# vim: ft=sh