aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-11-04 14:53:42 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2023-11-04 14:53:42 +0100
commitc58d6ae5252f9abcf0dfbe54a0db0946ccd44287 (patch)
tree245296dcb48907164fdfd3b554f6ce4f4b64ff66
parentb22d2f8dd7eda90e4a7b19307f8eea7bd7f03197 (diff)
downloadunterricht-c58d6ae5252f9abcf0dfbe54a0db0946ccd44287.tar.gz
unterricht-c58d6ae5252f9abcf0dfbe54a0db0946ccd44287.zip
add quiz template
-rw-r--r--templates/quiz/.gitignore2
-rw-r--r--templates/quiz/Makefile17
-rw-r--r--templates/quiz/q.tex11
-rw-r--r--templates/quiz/solutions.csv1
4 files changed, 31 insertions, 0 deletions
diff --git a/templates/quiz/.gitignore b/templates/quiz/.gitignore
new file mode 100644
index 00000000..225c3815
--- /dev/null
+++ b/templates/quiz/.gitignore
@@ -0,0 +1,2 @@
+*.png
+*.jpg
diff --git a/templates/quiz/Makefile b/templates/quiz/Makefile
new file mode 100644
index 00000000..1d424dec
--- /dev/null
+++ b/templates/quiz/Makefile
@@ -0,0 +1,17 @@
+QUESTIONS:=$(wildcard *.tex)
+PDFS:=$(QUESTIONS:.tex=.pdf)
+PNGS:=$(QUESTIONS:.tex=.png)
+JPGS:=$(QUESTIONS:.tex=.jpg)
+
+.PHONY: all
+all: $(PDFS) $(PNGS) $(JPGS)
+
+%.jpg: %.pdf
+ convert -density 600 -quality 100 $< -flatten -sharpen 0x1.0 $@
+
+%.png: %.pdf
+ convert -density 600 -quality 100 $< -flatten -sharpen 0x1.0 $@
+
+COMMON_MK = $(shell bash -c 'upfind() { [[ -f "$$1" ]] && printf "$$1" || ([ "$$(realpath $$(dirname "$$1"))" == "/" ] || upfind "../$$1") }; upfind common.mk')
+include $(COMMON_MK)
+
diff --git a/templates/quiz/q.tex b/templates/quiz/q.tex
new file mode 100644
index 00000000..5f527c26
--- /dev/null
+++ b/templates/quiz/q.tex
@@ -0,0 +1,11 @@
+\documentclass[margin=0.2cm, varwidth]{standalone}
+
+\begin{document}
+\centering
+Frage: $1^2 = ?$ \newline
+
+\begin{tabular}{c c c c}
+a) & b) & c) & d) \\
+11 & 1 & 2 & -1 \\
+\end{tabular}
+\end{document}
diff --git a/templates/quiz/solutions.csv b/templates/quiz/solutions.csv
new file mode 100644
index 00000000..cf05410b
--- /dev/null
+++ b/templates/quiz/solutions.csv
@@ -0,0 +1 @@
+q,B