Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abtract away the element/attribute structure #10

Closed
fred-wang opened this issue Jan 23, 2014 · 1 comment
Closed

Abtract away the element/attribute structure #10

fred-wang opened this issue Jan 23, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@fred-wang
Copy link
Owner

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:

  • an element name
  • a list of (attribute, value) pairs on that element.
  • a string representing the children

This will allow to:

  • avoid duplicate attributes (not well-forme XML). As in itex2MML, this may happen with table attributes.
  • avoid to use useless mstyle or mrow. For example the mathvariant or color attributes can just be set on token elements.
@ghost ghost assigned fred-wang Jan 23, 2014
rgaiacs pushed a commit to rgaiacs/TeXZilla that referenced this issue Feb 12, 2014
@fred-wang fred-wang assigned rgaiacs and unassigned fred-wang Feb 22, 2014
fred-wang added a commit that referenced this issue Mar 31, 2019
This is a first step for more abstraction of the output (issue #10).
It also fixes potential invalid markup with tables (duplicate attributes, which is not well-formed XML). A test is added for that.
fred-wang added a commit that referenced this issue Mar 31, 2019
@fred-wang
Copy link
Owner Author

* 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.

fred-wang added a commit that referenced this issue Mar 31, 2019
This is one more step towards better element/attribute abstraction #10
fred-wang added a commit that referenced this issue Apr 13, 2019
fred-wang added a commit that referenced this issue Apr 13, 2019
…loses #10

Use strings to access tag/content/attributes to avoid issues after minification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants