fred-wang / TeXZilla

LALR Javascript LaTeX-to-MathML converter compatible with Unicode
http://fred-wang.github.io/TeXZilla/
130 stars 21 forks source link

Abtract away the element/attribute structure #10

Closed fred-wang closed 5 years ago

fred-wang commented 10 years ago

In general, the structure handled by TeXZilla is a string representing an element.

The serialization could be defered and we could instead handle a structure containing:

This will allow to:

fred-wang commented 5 years ago
* avoid duplicate attributes (not well-forme XML). As in itex2MML, this may happen with table attributes.

I committed a first refactoring that should get rid of duplicate attributes in tables. For example, that used to be the case for \array{ \arrayopts{\collayout{left right}\colalign{right left}} a & b} (unit test added). Reading the code, I didn't find any other case when that can happen.