summaryrefslogtreecommitdiffstats
path: root/trivia/sensommarfest/sed
diff options
context:
space:
mode:
Diffstat (limited to 'trivia/sensommarfest/sed')
-rw-r--r--trivia/sensommarfest/sed/answers.sed3
-rw-r--r--trivia/sensommarfest/sed/latex.sed14
-rw-r--r--trivia/sensommarfest/sed/questions.sed9
3 files changed, 26 insertions, 0 deletions
diff --git a/trivia/sensommarfest/sed/answers.sed b/trivia/sensommarfest/sed/answers.sed
new file mode 100644
index 0000000..165c122
--- /dev/null
+++ b/trivia/sensommarfest/sed/answers.sed
@@ -0,0 +1,3 @@
+/^# / i \\\newpage
+
+/^\.\.\.$/ i geometry: margin=1cm
diff --git a/trivia/sensommarfest/sed/latex.sed b/trivia/sensommarfest/sed/latex.sed
new file mode 100644
index 0000000..bfdfa27
--- /dev/null
+++ b/trivia/sensommarfest/sed/latex.sed
@@ -0,0 +1,14 @@
+# Translate
+#
+# \begin{enumerate}
+# \def\labelenumi{\arabic{enumi}.}
+# \tightlist
+#
+# to
+#
+# \begin{enumerate}[label=\triviaenum*]
+
+/^.def.labelenumi/ d
+/^.tightlist/ d
+
+/begin.*enumerate/ s/$/[label=\\triviaenum*]/
diff --git a/trivia/sensommarfest/sed/questions.sed b/trivia/sensommarfest/sed/questions.sed
new file mode 100644
index 0000000..e6e2bc0
--- /dev/null
+++ b/trivia/sensommarfest/sed/questions.sed
@@ -0,0 +1,9 @@
+
+/^# / i \\\newpage
+
+/^## /,/^# / {
+ /^# / p
+ d
+}
+
+/^\.\.\.$/ i geometry: margin=2cm