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

Potential presentation MathML items to deprecate in MathML 4 #304

Open
4 tasks
NSoiffer opened this issue Mar 31, 2022 · 5 comments
Open
4 tasks

Potential presentation MathML items to deprecate in MathML 4 #304

NSoiffer opened this issue Mar 31, 2022 · 5 comments

Comments

@NSoiffer
Copy link
Contributor

NSoiffer commented Mar 31, 2022

#303 is about previously deprecated items. This is about presentation MathML items that we should think about deprecating in MathML 4 based on not been used. The "not being used" part is based on my experience and needs to be verified.

Here is a list of potential items to deprecated based on usage:

  • mspace@linebreak -- was added for compatibility with MathML when MathML 3's linebreaking was added. It's a wart and I don't think it is used (not that MathML 3's linebreaking was used outside of DSI's tools and the polyfil I wrote).
  • malignmark/malgingroup -- these were added to allow sub-alignment in a table. They are very hard to implement and few systems have done so.
  • maction -- this really should be done with JavaScript. At the very least, we should pull some of the example actiontype values such as statusline, tooltip, and input.
  • menclose -- remove radical notation (Removal of the menclose notation "radical" #3); maybe also remove longdiv since it too is duplicative
@NSoiffer NSoiffer changed the title Potential presentation MathML items to deprecated in MathML 4 Potential presentation MathML items to deprecate in MathML 4 Mar 31, 2022
@davidcarlisle
Copy link
Collaborator

One other (that I think I would remove raher than deprecate is

  • namespaced atributes for undefined behaviour.

Not specifying these will have no effect on anything except validators, and validators can choose to use mathml4-legacy schema that makes them valid (currently they are valid in the draft full schema, but I think we could change that). Currently (inherited from core) mathml-presentation allows data-* attributes I think we should allow that in Content as well then drop other and namespaced attributes.

@dginev
Copy link
Contributor

dginev commented Apr 7, 2022

This comment confirms the keywords mentioned in David's comment from issue #294 are indeed not used by mainstream conversion tools in early 2022.

The attributes themselves are quite rare, and what little use I spotted was with numeric values (largely in em or px units, if anyone is curious).


From the full conversion engines I surveyed: latexml, tex4ht, tralics, pandoc, plastex. They do not seem to emit the attribute-keyword pairs in question.

From the formula conversion tools, TeXzilla and katex have no reliance on the keywords.

From what I can see, the MathJax-src repository has most thorough coverage on the subject, but the code is already defensive - e.g. in "MathML 2 compatibility" input guards, or in test files. I don't see reliance on the keywords for present-day output.

I used local grep and github's code search functionality to conduct this survey - hopefully no major oversights.

@NSoiffer
Copy link
Contributor Author

At the June 19 meeting we agreed to:

  1. Deprecate linebreak on mspace
  2. Leave maction in but remove the text for the samples since they are implementation specific
  3. Deprecate longdiv and radical from menclose (they are only suggested, so not really deprecated, just delisted)

@NSoiffer
Copy link
Contributor Author

@davidcarlisle: you wrote

One other (that I think I would remove raher than deprecate is

  • namespaced atributes for undefined behaviour.

What attrs are you referring to? other was removed long ago but you list it further down in your comment.

@davidcarlisle
Copy link
Collaborator

@NSoiffer mathml2 and 3 suggested attributes in (any) namespace should be allowed (and the schema does allow them) for local use for any purpose not specified in the spec. so

<math xmlns:my="http://example.com/whatever">
    <mi my:thing="foo">x</mi>
...

This is very natural in an XML namespace world, but it really reacts badly with the html parser. xmlns:my and my:thing end up as attributes in no-namespace with local names xmlns:my and my:thing and so a DOM that can not be serialised as XML (as the web platform xml serialiser enforces namespace well formed xml)

we added data-thing="foo" to match HTML which uses data-* for the same purpose as the namespaced attributes were used. It does not sit so well with RelaxNG Schema which can not specify that but custom validators such as validator.nu can remove data-* before validating.

So, the suggestion was to deprecate using namespaced attributes in favo(u)r of data-* attributes

Specifically

https://w3c.github.io/mathml/#fund_globatt

Also allowed are attributes from the xml namespace, such as xml:lang, and attributes from namespaces other than MathML, which are ignored by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants