Skip to content

Elementary math #67

Closed
Closed

Description

@NSoiffer

One thing that continues to puzzle me is the lack of support for elementary math in many editors despite it being used by every student in every math class for at least five years of their life. Textbook publishers really need it and there are tons of (often poorly displayed) examples and tutorials on the web that use it. It was added to MathML 3 although support in many implementations of MathML has been poor to non-existent (including in MathJax).

I don't know if this is a sign that implementers don't care about elementary math (even Knuth left out support in TeX and someone had to write a complicated macro package to make it work). Or maybe this is a sign that it is hard. I implemented it in MathPlayer by using the table implementation and spreading the digits out into their own columns. Hence, it wasn't that complicated, but I did need to tweak MathPlayer's internal table code to add support for partial lines between rows (i.e., lines that start in column i and end in column j). Perhaps this can be done by using a colspan and the border property for where the mline should go.

The other alternative (and I suspect the likely one) is to exclude elementary math from core and write some JS that implements it via table. It loses some semantics that way, but maybe whatever solution is developed to help disambiguate presentation MathML (#64) can be used if such a translation is done.

Activity

  1. fred-wang commented on Mar 5, 2019

    @fred-wang

    First, this feature is different from e.g. matrix in the sense that it is not a mathematical object but a notation for a calculation: We can take the square root or power of a matrix but of a "elementary sum calculation". So that suggests it could be a separate spec / layout / document from what is currently in MathML Core.

    One issue with elementary math is that you don't have data or layout rules from OpenType / TeX so we would have to invent/add these if we want to specify (and test, and implement) things properly. As you indicate it is also a bit more complex than HTML/CSS tables so we cannot exclusively rely on existing code. BTW, we have the same issue with tabular MathML in general, that's why core is restricted to basic support aligned with HTML / CSS tables for now.

    The idea of automatically splitting and layouting text nodes is something that might make things complicate for browser implementation. I think we do this kind of thing for line breaking but I don't know if that would be easy.

    Last but not least, for our current MathML project, we (Igalia) don't have any plan to implement elementary math support in browsers. I don't know whether any other browser implementer intends to work on it.

    I think the rule of thumb in that situation (no clear spec rules, lack of compatibility with CSS/HTML,
    no implementation plan) is to hold off putting anything in core and instead experiment with polyfills. So I agree with your "likely" solution.

  2. added
    MathML Core
    on Mar 30, 2019
  3. changed the title [-]Does elementary math belong in core?[/-] [+]Elementary math[/+] on May 16, 2019
  4. added
    MathML 4
    need polyfill
    and removed
    MathML Core
    on May 16, 2019
  5. NSoiffer commented on May 18, 2020

    @NSoiffer
    ContributorAuthor

    I wrote a polyfill that transforms elementary math to an HTML table. I'd rather be able to use a MathML to make use of menclose for strikeouts, but those currently aren't in the igalia implementation.

  6. removed
    MathML 4
    need polyfill
    on May 18, 2020
  7. NSoiffer commented on May 18, 2020

    @NSoiffer
    ContributorAuthor

    Closing this because no labels remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions