diff --git a/judge/management/commands/render_pdf.py b/judge/management/commands/render_pdf.py index f8b2966..238000f 100644 --- a/judge/management/commands/render_pdf.py +++ b/judge/management/commands/render_pdf.py @@ -96,7 +96,7 @@ class Command(BaseCommand): .replace("'//", "'https://") ) maker.title = problem_name - for file in ("style.css", "pygment-github.css", "mathjax_config.js"): + for file in ("style.css", "pygment-github.css", "mathjax3_config.js"): maker.load(file, os.path.join(settings.DMOJ_RESOURCES, file)) maker.make(debug=True) if not maker.success: diff --git a/judge/views/problem.py b/judge/views/problem.py index 9f74b82..4810869 100644 --- a/judge/views/problem.py +++ b/judge/views/problem.py @@ -394,7 +394,7 @@ class ProblemPdfView(ProblemMixin, SingleObjectMixin, View): maker.title = problem_name assets = ["style.css", "pygment-github.css"] if maker.math_engine == "jax": - assets.append("mathjax_config.js") + assets.append("mathjax3_config.js") for file in assets: maker.load(file, os.path.join(settings.DMOJ_RESOURCES, file)) maker.make() diff --git a/judge/widgets/pagedown.py b/judge/widgets/pagedown.py index 0c0ef48..f9d3636 100644 --- a/judge/widgets/pagedown.py +++ b/judge/widgets/pagedown.py @@ -59,7 +59,7 @@ else: class MathJaxPagedownWidget(PagedownWidget): class Media: js = [ - "mathjax_config.js", + "mathjax3_config.js", "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js", "pagedown_math.js", ] diff --git a/resources/mathjax_config.js b/resources/mathjax3_config.js similarity index 100% rename from resources/mathjax_config.js rename to resources/mathjax3_config.js diff --git a/templates/chat/chat.html b/templates/chat/chat.html index 87a6077..e11af87 100644 --- a/templates/chat/chat.html +++ b/templates/chat/chat.html @@ -4,7 +4,7 @@ {% block title %} {{_('Chat Box')}} {% endblock %} {% block js_media %} - + diff --git a/templates/comments/media-js.html b/templates/comments/media-js.html index 3e0f56f..b876dd7 100644 --- a/templates/comments/media-js.html +++ b/templates/comments/media-js.html @@ -8,7 +8,7 @@ if (!("MathJax" in window)) { $.ajax({ type: "GET", - url: '{{ static('mathjax_config.js') }}', + url: '{{ static('mathjax3_config.js') }}', dataType: "script", cache: true, success: function () { diff --git a/templates/comments/preview.html b/templates/comments/preview.html index 65935f9..82e7cb1 100644 --- a/templates/comments/preview.html +++ b/templates/comments/preview.html @@ -1,4 +1,4 @@ {{ preview_data|markdown|reference|str|safe }} {% if REQUIRE_JAX %} -
+
{% endif %} \ No newline at end of file diff --git a/templates/common-content.html b/templates/common-content.html index 861edaf..52f195b 100644 --- a/templates/common-content.html +++ b/templates/common-content.html @@ -76,31 +76,5 @@ {% block bodyend %} {% if REQUIRE_JAX %} {% include "mathjax-load.html" %} - {% endif %} {% endblock %} diff --git a/templates/contest/preview.html b/templates/contest/preview.html index 65935f9..82e7cb1 100644 --- a/templates/contest/preview.html +++ b/templates/contest/preview.html @@ -1,4 +1,4 @@ {{ preview_data|markdown|reference|str|safe }} {% if REQUIRE_JAX %} -
+
{% endif %} \ No newline at end of file diff --git a/templates/mathjax-load.html b/templates/mathjax-load.html index 27878dc..487459e 100644 --- a/templates/mathjax-load.html +++ b/templates/mathjax-load.html @@ -1,2 +1,2 @@ - + diff --git a/templates/organization/preview.html b/templates/organization/preview.html index 65935f9..82e7cb1 100644 --- a/templates/organization/preview.html +++ b/templates/organization/preview.html @@ -1,4 +1,4 @@ {{ preview_data|markdown|reference|str|safe }} {% if REQUIRE_JAX %} -
+
{% endif %} \ No newline at end of file diff --git a/templates/problem/preview.html b/templates/problem/preview.html index 65935f9..82e7cb1 100644 --- a/templates/problem/preview.html +++ b/templates/problem/preview.html @@ -1,4 +1,4 @@ {{ preview_data|markdown|reference|str|safe }} {% if REQUIRE_JAX %} -
+
{% endif %} \ No newline at end of file diff --git a/templates/problem/raw.html b/templates/problem/raw.html index 4444cf2..a620d22 100644 --- a/templates/problem/raw.html +++ b/templates/problem/raw.html @@ -93,8 +93,8 @@ {{ description|markdown|reference|absolutify(url)|str|safe }} - - + +