aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-01 12:33:38 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-01 12:33:38 +0100
commit2b4ce11c8bb9e0d5a0e10947c1f3fc62efd2325e (patch)
tree67d30875d91acd9782ae54d82ed8555fbf955706
parentfix(common/init): Move the description to the copyright header (diff)
downloadflake-templates-2b4ce11c8bb9e0d5a0e10947c1f3fc62efd2325e.zip
fix(common/inits/latex): Use `-` instead of `_` as separator in languages
LTex does not support the `<language>_<region>` syntax.
-rwxr-xr-xcommon/inits/latex/init.local26
1 files changed, 13 insertions, 13 deletions
diff --git a/common/inits/latex/init.local b/common/inits/latex/init.local
index 123e349..0e61b4d 100755
--- a/common/inits/latex/init.local
+++ b/common/inits/latex/init.local
@@ -1,16 +1,16 @@
#!/usr/bin/env sh
-prompt LANGUAGE "The language to use in the latex documents" "en_GB"
+prompt LANGUAGE "The language to use in the latex documents" "en-GB"
bable_language=""
case "$LANGUAGE" in
-"en_GB")
+en-GB)
bable_language="british"
;;
-en_*)
+en-*)
bable_language="english"
;;
-de_DE | de_*)
+de-DE | de-*)
bable_language="ngerman"
;;
@@ -30,29 +30,29 @@ fi
siunitx_language=""
# locales UK, US, DE (Germany), PL (Poland), FR (French), SI (Slovene) and ZA (South Africa).
case "$LANGUAGE" in
-"en_GB")
+en-GB)
siunitx_language="UK" # United Kingdom
;;
-"en_US")
+en-US)
siunitx_language="US" # United States of Amerika
;;
-en_ZA)
+en-ZA)
siunitx_language="ZA" # South Africa
;;
-en_*)
+en-*)
echo "'$LANGUAGE' is not yet recognized! But it seems english, thus we set SIUNITX_LANGUAGE='UK'."
siunitx_language="UK"
;;
-de_DE)
+de-DE)
siunitx_language="DE" # Germany
;;
-pl_PL)
+pl-PL)
siunitx_language="PL" # Poland
;;
-fr_FR)
+fr-FR)
siunitx_language="FR" # French
;;
-sl_SL)
+sl-SL)
siunitx_language="SI" # Slovene
;;
*)
@@ -63,7 +63,7 @@ sl_SL)
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 DATE_TIME_LANGUAGE "The language to use for the datetime2 package" "$LANGUAGE" "dont_ask"
prompt SIUNITX_LANGUAGE "The language to use for the siunitx package" "$siunitx_language" "dont_ask"
prompt TODONOTES_LANGUAGE "The language to use for the todonotes package" "$todonotes_language" "dont_ask"