w3c / w3c/mathml

MathML-Next Elements and Attributes

Open
#79 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement MathML-Next
Dominant language
HTML
Stars
82
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Introduction

Combining and summarizing ideas from both https://github.com/mathml-refresh/mathml/issues/68 and https://github.com/mathml-refresh/mathml/issues/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 (https://github.com/mathml-refresh/mathml/issues/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 (https://github.com/mathml-refresh/mathml/issues/68)
notation string none An attribute for specifying mathematical notation. proposed (https://github.com/mathml-refresh/mathml/issues/68)
media string none An attribute for specifying media queries. proposed (https://github.com/mathml-refresh/mathml/issues/68)
q numbers between 0.0 and 1.0 none An attribute for specifying the relative quality of alternatives. proposed (https://github.com/mathml-refresh/mathml/issues/68)
pattern string none An attribute which utilizes string interpolation to generate values for the src attribute. proposed (https://github.com/mathml-refresh/mathml/issues/68)
method "get" | "post" "get" An attribute for HTTP POST indicating the HTTP verb or method.

See also: HTML5 <form> element.
proposed (https://github.com/mathml-refresh/mathml/issues/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 (https://github.com/mathml-refresh/mathml/issues/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 (https://github.com/mathml-refresh/mathml/issues/74)
data string none The data of an HTTP POST specified as a string value which utilizes string interpolation. proposed (https://github.com/mathml-refresh/mathml/issues/74)
Two annotation elements or one?

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the MathML4 elements and attributes tabulations in the issue, including the related discussions in issues 68 and 74. Resolve the open questions around deprecations, proposed annotation attributes, and whether annotation and annotation-xml should remain separate; done requires an agreed specification direction.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.