diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-01-02 11:02:43 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-01-02 11:08:43 +0100 |
| commit | 083e76d71126fd7a32359675a63366c10f76ace1 (patch) | |
| tree | c1164d1041c81c2f2f2526b8a10d92d1602bb54e /test_quiz | |
| parent | 19f7f50dd3863881591e639ec724457b4c6fbc08 (diff) | |
| download | quiz-083e76d71126fd7a32359675a63366c10f76ace1.tar.gz quiz-083e76d71126fd7a32359675a63366c10f76ace1.zip | |
add test quiz setup
Diffstat (limited to 'test_quiz')
| -rw-r--r-- | test_quiz/.gitignore | 4 | ||||
| -rw-r--r-- | test_quiz/Makefile | 21 | ||||
| -rw-r--r-- | test_quiz/done | 1 | ||||
| -rw-r--r-- | test_quiz/q1.tex | 11 | ||||
| -rw-r--r-- | test_quiz/q2.tex | 11 | ||||
| -rw-r--r-- | test_quiz/solutions.csv | 2 |
6 files changed, 50 insertions, 0 deletions
diff --git a/test_quiz/.gitignore b/test_quiz/.gitignore new file mode 100644 index 0000000..61e6b65 --- /dev/null +++ b/test_quiz/.gitignore @@ -0,0 +1,4 @@ +*.png +*.jpg +q*.pdf +.build diff --git a/test_quiz/Makefile b/test_quiz/Makefile new file mode 100644 index 0000000..2b47722 --- /dev/null +++ b/test_quiz/Makefile @@ -0,0 +1,21 @@ +QUESTIONS:=$(wildcard *.tex) +PDFS:=$(QUESTIONS:.tex=.pdf) +PNGS:=$(QUESTIONS:.tex=.png) +JPGS:=$(QUESTIONS:.tex=.jpg) + +.PHONY: all +all: $(PDFS) $(PNGS) $(JPGS) + +.PHONY: clean +clean: + rm -f $(PDFS) $(PNGS) $(JPGS) + +%.pdf: %.tex + rubber --pdf $< && \ + rubber --clean $< + +%.jpg: %.pdf + convert -density 600 -quality 100 $< -flatten -sharpen 0x1.0 $@ + +%.png: %.pdf + convert -density 600 -quality 100 $< -flatten -sharpen 0x1.0 $@ diff --git a/test_quiz/done b/test_quiz/done new file mode 100644 index 0000000..739f726 --- /dev/null +++ b/test_quiz/done @@ -0,0 +1 @@ +q1.png diff --git a/test_quiz/q1.tex b/test_quiz/q1.tex new file mode 100644 index 0000000..e12f190 --- /dev/null +++ b/test_quiz/q1.tex @@ -0,0 +1,11 @@ +\documentclass[margin=0.2cm, varwidth]{standalone} + +\begin{document} +\centering +Frage 1: $1^2 = ?$ \newline + +\begin{tabular}{c c c c} +a) & b) & c) & d) \\ +11 & 1 & 2 & -1 \\ +\end{tabular} +\end{document} diff --git a/test_quiz/q2.tex b/test_quiz/q2.tex new file mode 100644 index 0000000..4845b2e --- /dev/null +++ b/test_quiz/q2.tex @@ -0,0 +1,11 @@ +\documentclass[margin=0.2cm, varwidth]{standalone} + +\begin{document} +\centering +Frage 2: $Foobar = ?$ \newline + +\begin{tabular}{c c c c} +a) & b) & c) & d) \\ +foo & bar & baz & zab \\ +\end{tabular} +\end{document} diff --git a/test_quiz/solutions.csv b/test_quiz/solutions.csv new file mode 100644 index 0000000..2869105 --- /dev/null +++ b/test_quiz/solutions.csv @@ -0,0 +1,2 @@ +q1,B +q2,B |
