From 73f09a9151b77b986576abd1f303c5f0b7156182 Mon Sep 17 00:00:00 2001 From: rocky Date: Thu, 1 Jul 2021 12:35:38 -0400 Subject: [PATCH] Avoid MathML for Symbols and Integers --- mathics_django/web/format.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mathics_django/web/format.py b/mathics_django/web/format.py index 9ff652495..22537e5fd 100644 --- a/mathics_django/web/format.py +++ b/mathics_django/web/format.py @@ -105,6 +105,10 @@ def eval_boxes(result, fn, obj, **options): form_expr = Expression("StandardForm", expr) result = form_expr.format(obj, "System`StandardForm") return eval_boxes(result, result.boxes_to_svg, obj) + elif head in ("System`Symbol", "System`Integer"): + # What obviously doesn't need MathML? Note: System`Real is kept in MathML + # because we might have exponents, e.g. 3 * 10^8. + result = Expression("StandardForm", expr).format(obj, "System`OutputForm") else: result = Expression("StandardForm", expr).format(obj, "System`MathMLForm") else: