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

MathML-Next Elements and Attributes #79

Open
AdamSobieski opened this issue Mar 23, 2019 · 3 comments
Open

MathML-Next Elements and Attributes #79

AdamSobieski opened this issue Mar 23, 2019 · 3 comments
Labels
enhancement New feature or request MathML-Next Ideas for future releases

Comments

@AdamSobieski
Copy link

AdamSobieski commented Mar 23, 2019

Introduction

Combining and summarizing ideas from both #68 and #74, a tabulation of potential MathML4 elements and their attributes is presented. This document is a work in progress. Comments and discussion are welcomed.

The <math> element

Attribute Values Default Description Status
id string none The id attribute specifies its element’s unique identifier (ID).

See also: HTML5 id attribute
-
style string none See also: HTML5 style attribute, CSS Style Attributes -
class string none The class attribute’s value must be a set of space-separated tokens representing the various classes that the element belongs to.

See also: HTML5 class attribute
-
display "block" | "inline" "inline" Specifies whether the enclosed MathML expression should be rendered as a separate vertical block (in display style) or inline, aligned with adjacent text. -
maxwidth length available width Specifies the maximum width to be used for linebreaking. The default is the maximum width available in the surrounding environment. If that value cannot be determined, the renderer should assume an infinite rendering width. -
overflow "linebreak" | "scroll" | "elide" | "truncate" | "scale" "linebreak" Specifies the preferred handing in cases where an expression is too long to fit in the allowed width. -
altimg URI none Provides a URI referring to an image to display as a fall-back for user agents that do not support embedded MathML. deprecate?
altimg-width length width of altimg Specifies the width to display altimg, scaling the image if necessary; See altimg-height. deprecate?
altimg-height length height of altimg Specifies the height to display altimg, scaling the image if necessary; if only one of the attributes altimg-width and altimg-height are given, the scaling should preserve the image's aspect ratio; if neither attribute is given, the image should be shown at its natural size. deprecate?
altimg-valign length | "top" | "middle" | "bottom" 0ex Specifies the vertical alignment of the image with respect to adjacent inline material. deprecate?
alttext string none Provides a textual alternative as a fall-back for user agents that do not support embedded MathML or images. deprecate?
cdgroup URI none Specifies a CD group file that acts as a catalogue of CD bases for locating OpenMath content dictionaries of csymbol, annotation, and annotation-xml elements in this math element. deprecate?
src URI none The location of an external MathML resource.

See also: HTML5 <img> element and <object> element
proposed (#68)

Deprecating alttext

Instead of the alttext attribute on the top-level <math> element, “presentation” annotations of type text/plain could be utilized.

<math id="eq1">
  <semantics>
    <mrow>default</mrow>
    <annotation encoding="text/plain">Alternative text version of expression.</annotation>
  </semantics>
</math>
<math id="eq1">
  <semantics>
    <mrow>default</mrow>
    <annotation encoding="text/plain" src="eq1.txt" />
  </semantics>
</math>
<math id="eq1">
  <semantics>
    <mrow>default</mrow>
    <annotation encoding="text/plain" lang="en fr es de" pattern="eq1-{lang}.txt" />
  </semantics>
</math>

Deprecating altimg, altimg-width, altimg-height, and altimg-valign

Instead of the altimg, altimg-width, altimg-height, altimg-valign attributes on the top-level <math> element, “presentation” annotations of types image/* could be utilized with CSS styling.

<math id="eq1">
  <semantics>
    <mrow>default</mrow>
    <annotation encoding="image/png" src="data:..." />
  </semantics>
</math>
<math id="eq1">
  <semantics>
    <mrow>default</mrow>
    <annotation encoding="image/png" src="eq1.png" />
  </semantics>
</math>
<math id="eq1">
  <semantics>
    <mrow>default</mrow>
    <annotation encoding="image/png" lang="en fr es de" pattern="eq1-{lang}.png" />
  </semantics>
</math>

The <semantics> element

Attribute Values Default Description Status
annotated "first" | "none" "first" Indicates the behavior of the element proposed

The <annotation> and <annotation-xml> elements

Attribute Values Default Description Status
id string none The id attribute specifies its element’s unique identifier (ID).

See also: HTML5 id attribute
-
definitionURL URI none The location of the annotation key symbol. deprecate?
encoding string none The encoding of the semantic information in the annotation. -
cd string "mathmlkeys" The content dictionary that contains the annotation key symbol. deprecate?
name string "alternate-representation" The name of the annotation key symbol. deprecate?
src URI none The location of an external resource. -
lang string none A BCP47 attribute for internationalization. proposed (#68)
notation string none An attribute for specifying mathematical notation. proposed (#68)
media string none An attribute for specifying media queries. proposed (#68)
q numbers between 0.0 and 1.0 none An attribute for specifying the relative quality of alternatives. proposed (#68)
pattern string none An attribute which utilizes string interpolation to generate values for the src attribute. proposed (#68)
method "get" | "post" "get" An attribute for HTTP POST indicating the HTTP verb or method.

See also: HTML5 <form> element.
proposed (#74)
enctype "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain" "application/x-www-form-urlencoded" The enctype attribute is an enumerated attribute that specifies how data should be encoded in an HTTP POST.

See also: HTML5 <form> element.
proposed (#74)
accept-charset string none The accept-charset attribute gives the character encodings that are to be used in an HTTP POST.

See also: HTML5 <form> element.
proposed (#74)
data string none The data of an HTTP POST specified as a string value which utilizes string interpolation. proposed (#74)

Two annotation elements or one?

Do we need two annotation elements, <annotation> and <annotation-xml>, or might one element, <annotation>, suffice?

@davidcarlisle davidcarlisle added enhancement New feature or request MathML 4 Issues affecting the MathML 4 specification labels Mar 30, 2019
This was referenced May 23, 2019
@Jamesernator
Copy link

I'm definitely a fan of deprecating cdgroup as suggested. Without it, even an unattached <csymbol> will have a meaningful definition, which helps a lot for programmatic manipulation of content mathml elements.

@Jamesernator
Copy link

Jamesernator commented Dec 24, 2020

In regards to deprecating cd/definitionURL/name on <annotation-xml>/<annotation>, how should mathmltypes be rewritten? e.g. For now you can do:

<semantics>
  <ci>x</ci>
  <annotation-xml cd="mathmltypes" name="type" encoding="MathML-Content">
    <apply>
      <csymbol cd="sts2">vector_n</csymbol>
      <cn type="integer">3</cn>
      <complexes/>
    </apply>
  </annotation-xml>
</semantics>

@davidcarlisle davidcarlisle added MathML-Next Ideas for future releases and removed MathML 4 Issues affecting the MathML 4 specification labels Jun 17, 2022
@dginev
Copy link
Contributor

dginev commented Sep 28, 2023

[minor admin] In the MathML Full WG meeting on Sep 28th, 2023, we agreed to re-title issues scheduled for the next charter with "MathML-Next", to avoid confusion.

@dginev dginev changed the title MathML4 Elements and Attributes MathML-Next Elements and Attributes Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request MathML-Next Ideas for future releases
Projects
None yet
Development

No branches or pull requests

4 participants