diff --git a/mathics/builtin/graphics.py b/mathics/builtin/graphics.py index c07f60794b..24245a1c82 100644 --- a/mathics/builtin/graphics.py +++ b/mathics/builtin/graphics.py @@ -3226,14 +3226,15 @@ def boxes_to_xml(self, leaves=None, **options): svg, ) - return ( - '' - % ( + # mglyph, which is what we have been using, is bad because MathML standard changed. + # metext does not work beacause the way in which we produce the svg images is also based on this outdated mglyph behaviour. + # format = "" + template = '' + return template % ( int(width), int(height), base64.b64encode(svg_xml.encode("utf8")).decode("utf8"), ) - ) def axis_ticks(self, xmin, xmax): def round_to_zero(value):