1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
6 from librarian import get_resource
7 from . import TreeEmbed, create_embed, downgrades_to
10 class MathML(TreeEmbed):
11 @downgrades_to('application/x-latex')
13 xslt = etree.parse(get_resource('res/embeds/mathml/mathml2latex.xslt'))
14 output = self.tree.xslt(xslt)
15 return create_embed('application/x-latex', data=six.text_type(output))