Drop lots of legacy code. Support Python 3.7-3.11.
[librarian.git] / src / librarian / elements / styles / mat.py
1 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
3 #
4 from copy import copy
5 from ..base import WLElement
6
7
8 class Mat(WLElement):
9     def html_build(self, builder):
10         e = copy(self)
11         e.tag = 'math'
12         e.attrib['xmlns'] = 'http://www.w3.org/1998/Math/MathML'
13         builder.cursor.append(e)
14
15     def epub_build(self, builder):
16         builder.start_element('img', {"src": builder.mathml(self)})
17         builder.end_element()