diff --git a/.gitignore b/.gitignore index 031838c326775fe234cfd0cb7c6f18cbca7b0eaa..5b208faa5526d4746d7dbb80d09acd56f0a90c40 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ __pycache__/ output/* notes.html -.DS_Store \ No newline at end of file +.DS_Store +*.sublime-workspace diff --git a/README.md b/README.md index 8975f1ea13ce979a0b2955512e53ff7ae89b109f..351926924bb7d3fc2425df3b98010c36c58d4b03 100644 --- a/README.md +++ b/README.md @@ -41,5 +41,5 @@ data and assumes unknown properties) ### LaTeX Support Hallgrim supports the native latex approach by ILIAS. To typeset a formula just -put it in brackets like this `[[\\suam_{i=1}^n i = \\frac{n(n+1)}{2}]]`. Special +put it in brackets like this `[[\\sum_{i=1}^n i = \\frac{n(n+1)}{2}]]`. Special caretakers (mostly `\`) have to be escaped unless you use raw strings (`r'a raw string'`). diff --git a/hallgrim/custom_markdown.py b/hallgrim/custom_markdown.py index a315559ce0e3e8da5b31d68baef75c3400b87cc4..4af555c793320d52490775c4ee6dfa8170e01bcf 100644 --- a/hallgrim/custom_markdown.py +++ b/hallgrim/custom_markdown.py @@ -40,7 +40,8 @@ def markdown(value): class LaTeXRenderer(Renderer): def latex(self, formula): - return '<span class="latex">{}</span>'.format(formula) + return r'\({}\)'.format(formula) + # alternative return '<span class="latex">{}</span>'.format(formula) def block_code(self, code, lang): if not lang: diff --git a/scripts/nur_sterne_sehen.py b/scripts/nur_sterne_sehen.py index 8f7473ebef5363e0e60f44403c70bc74122f215e..f9e07c93a0e9ccb9a23888d28ba69db6d0e5841a 100644 --- a/scripts/nur_sterne_sehen.py +++ b/scripts/nur_sterne_sehen.py @@ -30,7 +30,8 @@ choices = """ [ ] [[2^n]] [ ] [[2n+1]]""" -feedback = r""" Die erste Zeile ergibt genau die Ausgabe `1`. In jeder folgenden +feedback = r""" +Die erste Zeile ergibt genau die Ausgabe `1`. In jeder folgenden Zeile wird die Anzahl der Zahlen verdoppelt und um eine weitere Zahl ergänzt. Die Anzahl der Zahlen [[a_n]] im Schritt [[n]] ist daher: [[a_n = 2a_{n-1} + 1]].