aboutsummaryrefslogtreecommitdiff
path: root/scripts/.local/bin/personal/compile
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/.local/bin/personal/compile')
-rwxr-xr-xscripts/.local/bin/personal/compile11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/.local/bin/personal/compile b/scripts/.local/bin/personal/compile
index c5643b8..3f666c1 100755
--- a/scripts/.local/bin/personal/compile
+++ b/scripts/.local/bin/personal/compile
@@ -38,9 +38,14 @@ MD_TO_PDF() {
sed '/^!.*/d' "$1" > "$TMP" && # This enables comments with "!"
sed 's/^\\!/!/g' "$TMP" "$TMP" && # This enables escaping with "\!"
- pandoc "$TMP" --template "$HOME/documents/templates/abgaben.latex" -o "$2.pdf" &&
- printf "Successfully compiled %s to %s\n" "$1" "$2.pdf" ||
- printf "[ Error ] Couldn't compile %s\n" "$1"
+ if [[ "${1#*"hackpapier"}" != "$1" ]]; then
+ pandoc "$TMP" --toc --template "/home/me/documents/templates/hackpapier.latex" -o "$2.pdf"
+ else
+ pandoc "$TMP" --template "$HOME/documents/templates/abgaben.latex" -o "$2.pdf"
+ fi
+
+ # printf "Successfully compiled %s to %s\n" "$1" "$2.pdf" ||
+ # printf "[ Error ] Couldn't compile %s\n" "$1"
}
# Function to run the make command if possible