recursal/MDN huggingface dataset:
<menclose>
==========

**Non-standard:** This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The **`<menclose>`** MathML element renders its content inside an enclosing notation specified by the `notation` attribute.

Attributes
----------

This element's attributes include the global MathML attributes.

`notation` 
Non-standard

A list of notations, separated by white space, to apply to the child elements. The symbols are each drawn as if the others are not present, and therefore may overlap. Possible values are:

| Value | Sample Rendering | Rendering in your browser | Description |
| --- | --- | --- | --- |
| `longdiv` (default) | longdiv | 

a
2

+

b
2

 | long division symbol |
| `actuarial` | actuarial | 

a
2

+

b
2

 | actuarial symbol |
| `box` | box | 

a
2

+

b
2

 | box |
| `roundedbox` | roundedbox | 

a
2

+

b
2

 | rounded box |
| `circle` | circle | 

a
2

+

b
2

 | circle |
| `left` | left | 

a
2

+

b
2

 | line to the left of the contents |
| `right` | right | 

a
2

+

b
2

 | line to the right of the contents |
| `top` | top | 

a
2

+

b
2

 | line above of the contents |
| `bottom` | bottom | 

a
2

+

b
2

 | line below of the contents |
| `updiagonalstrike` | updiagonalstrike | 

a
2

+

b
2

 | strikeout line through contents from lower left to upper right |
| `downdiagonalstrike` | downdiagonalstrike | 

a
2

+

b
2

 | strikeout line through contents from upper left to lower right |
| `verticalstrike` | verticalstrike | 

a
2

+

b
2

 | vertical strikeout line through contents |
| `horizontalstrike` | horizontalstrike | 

a
2

+

b
2

 | horizontal strikeout line through contents |
| `madruwb` | madruwb | 

a
2

+

b
2

 | Arabic factorial symbol |
| `updiagonalarrow` | Arrow pointing up and to the right. | 

a
2

+

b
2

 | diagonal arrow |
| `phasorangle` | Screenshot of the phasorangle notation | 

a
2

+

b
2

 | phasor angle |

Examples
--------


```html
<math display="block">
  <menclose notation="circle box">
    <mi>x</mi>
    <mo>+</mo>
    <mi>y</mi>
  </menclose>
</math>
```

Specifications
--------------

The `<menclose>` element is not defined in any browser-oriented specification but you can find a description in MathML 4.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
scriptlevel
===========

The **`scriptlevel`** global attribute sets the math-depth of a MathML element. It allows overriding rules from the user agent stylesheet that define automatic calculation of font-size within MathML formulas.

Example
-------


```html
<!-- math-depth defaults to 0 on the <math> root. -->
<math style="font-size: 64pt">
  <msubsup>
    <!-- math-depth and font-size remain unchanged on the base. -->
    <mtext>BASE</mtext>
    <!-- math-depth defaults to add(1) within the subscript, so it
 is incremented by 1 and the font-size is scaled down once. -->
    <mtext>SUBSCRIPT</mtext>
    <!-- math-depth defaults to add(1) within the superscript too, but
 the scriptlevel attribute tells to increment it by 2 instead,
 so the font-size is actually scaled down twice. -->
    <mtext scriptlevel="+2">SUPERSCRIPT</mtext>
  </msubsup>
</math>
```

Syntax
------


```html
<math scriptlevel="-1"> <!-- decrease math-depth by 1 -->
<math scriptlevel="+2"> <!-- increase math-depth by 2 -->
<math scriptlevel="0"> <!-- reset math-depth to 0 -->
```

### Values

If `<U>` is an unsigned integer (i.e. with prefix sign symbol removed) then the accepted values are:

`<U>`

Sets the `math-depth` to value `<U>`. This will set `font-size` of the element to the same value as the one of elements at the specified depth.

`+<U>`

Sets the `math-depth` to value `add(<U>)`. This will scale down `font-size` on the element `<U>` times.

`-<U>`

Sets the `math-depth` to value `add(-<U>)`. This will scale up `font-size` on the element `<U>` times.

Specifications
--------------

| Specification |
| --- |
| MathML Core # dfn-scriptlevel |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* All global attributes.
* The displaystyle global attribute.
* `font-size`
* `math-depth`
* `math-style`
displaystyle
============

The **`displaystyle`** global attribute is a boolean setting the math-style of a MathML element.

Example
-------

In this example, an munder element is used to attach a script "A" to a base "∑". By default, the summation symbol is rendered with the font-size inherited from its parent and the A as a scaled down subscript. With the explicit `displaystyle="true"` attribute, the summation symbol is instead drawn bigger and the "A" becomes an underscript.


```html
<math>
  <munder>
    <mo>∑</mo>
    <mi>A</mi>
  </munder>
  <munder displaystyle="true">
    <mo>∑</mo>
    <mi>A</mi>
  </munder>
</math>
```

Syntax
------


```html
<math displaystyle="true"></math>
<math displaystyle="false"></math>
```

### Values

`true`

Sets the display style to `normal`.

`false`

Sets the display style to `compact`.

Specifications
--------------

| Specification |
| --- |
| MathML Core # dfn-displaystyle |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* All global attributes.
* The scriptlevel global attribute.
* `font-size`
* `math-depth`
* `math-style`
href
====

**Non-standard:** This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The **`href`** global attribute creates a hyperlink on the MathML element pointing to the specified URL.

Example
-------


```html
<!-- Make this math equation a link to Wikipedia's article
 about the Pythagorean theorem. -->
<math href="https://en.wikipedia.org/wiki/Pythagorean\_theorem">
  <mi>c</mi>
  <mo>=</mo>
  <!-- Make this square root a link to corresponding
 SageMath's calculation. -->
  <msqrt href="https://sagecell.sagemath.org/?z=eJwrLiwq0TCOM9I2iTPSBAAeqgPO">
    <msup>
      <mn>3</mn>
      <mn>2</mn>
    </msup>
    <mo>+</mo>
    <msup>
      <mn>4</mn>
      <mn>2</mn>
    </msup>
  </msqrt>
  <mo>=</mo>
  <mn>5</mn>
</math>
```

Specifications
--------------

The `href` attribute is not defined in any browser-oriented specification but you can find a description in MathML 4.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* All global attributes.
dir
===

The **`dir`** global attribute is an enumerated attribute that indicates the directionality of the MathML element.

Syntax
------


```html
<!-- Moroccan style -->
<math dir="ltr">
  <msqrt>
    <mi>س</mi>
  </msqrt>
  <mo>=</mo>
  <msup>
    <mn>3</mn>
    <mi>ب</mi>
  </msup>
</math>

<!-- Maghreb/Machrek style -->
<math dir="rtl">
  <msqrt>
    <mi>س</mi>
  </msqrt>
  <mo>=</mo>
  <msup>
    <mn>٣</mn>
    <mi>ب</mi>
  </msup>
</math>
```

### Values

* `ltr`, which means *left to right* and is used to render mathematical expressions from the left to the right (e.g. English or Moroccan style);
* `rtl`, which means *right to left* and is used to render mathematical expressions from the right to the left (e.g. Maghreb or Machrek style);

**Note:**

* This attribute can be overridden by the CSS property `direction`, if a CSS page is active and the element supports these properties.
* As the directionality of mathematics is semantically related to its content and not to its presentation, it is recommended that web developers use this attribute instead of the related CSS properties when possible. That way, the formulas will display correctly even on a browser that doesn't support CSS or has the CSS deactivated.
* The `dir` attribute is used to set the directionality of math formulas, which is often from right to left in Arabic-speaking world. However, languages written from right to left often embed mathematical content written from left to right. Consequently, the `auto` keyword from the HTML `dir` attribute is not recognized and by default the user agent stylesheet resets the direction property on the `math` element.

Specifications
--------------

| Specification |
| --- |
| MathML Core # dfn-dir |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* All global attributes.
* `direction`
* The HTML `dir` global attribute
mathcolor
=========

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The **`mathcolor`** global attribute sets the color of a MathML element.

**Note:** Use CSS for styling MathML whenever possible. The `mathcolor` attribute should only be included for applications that are not CSS-aware and will be overridden by the CSS `color` property, if set.

Syntax
------


```html
<!-- Keyword values -->
<math mathcolor="currentcolor">

<!-- <named-color> values -->
<math mathcolor="red">
<math mathcolor="orange">
<math mathcolor="tan">
<math mathcolor="rebeccapurple">

<!-- <hex-color> values -->
<math mathcolor="#090">
<math mathcolor="#009900">
<math mathcolor="#090a">
<math mathcolor="#009900aa">

<!-- <rgb()> values -->
<math mathcolor="rgb(34, 12, 64, 0.6)">
<math mathcolor="rgb(34 12 64 / 0.6)">
<math mathcolor="rgb(34.6 12 64 / 60%)">

<!-- <hsl()> values -->
<math mathcolor="hsl(30, 100%, 50%, 0.6)">
<math mathcolor="hsl(30 100% 50% / 0.6)">
<math mathcolor="hsl(30.2 100% 50% / 60%)">

<!-- <hwb()> values -->
<math mathcolor="hwb(90 10% 10%)">
<math mathcolor="hwb(90 10% 10% / 0.5)">
<math mathcolor="hwb(90deg 10% 10%)">
<math mathcolor="hwb(1.5708rad 60% 0%)">
<math mathcolor="hwb(.25turn 0% 40% / 50%)">
```

### Values

`<color>`

 Sets the color of the textual and decorative parts of the element,
 including e.g. fraction bars or radical symbols.


Specifications
--------------

| Specification |
| --- |
| MathML Core # dfn-mathcolor |

* In MathML 3 and earlier versions, a more limited set of values was supported.
 Since MathML Core, the syntax matches CSS `<color>`
 values.
* This attribute was designed for MathML applications that are not CSS-aware.
 Since MathML Core, the use of equivalent CSS is recommended instead.
Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* All global attributes.
* `color`
mathbackground
==============

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The **`mathbackground`** global attribute sets the background-color of a MathML element.

**Note:** Use CSS for styling MathML whenever possible. The `mathbackground` attribute should only be included for applications that are not CSS-aware and will be overridden by the CSS `background-color` property value, if set.

Syntax
------


```html
<!-- Keyword values -->
<math mathbackground="red">
<math mathbackground="indigo">

<!-- Hexadecimal value -->
<math mathbackground="#bbff00"> <!-- Fully opaque -->
<math mathbackground="#bf0"> <!-- Fully opaque shorthand -->
<math mathbackground="#11ffee00"> <!-- Fully transparent -->
<math mathbackground="#1fe0"> <!-- Fully transparent shorthand -->
<math mathbackground="#11ffeeff"> <!-- Fully opaque -->
<math mathbackground="#1fef"> <!-- Fully opaque shorthand -->

<!-- RGB value -->
<math mathbackground="rgb(255 255 128)"> <!-- Fully opaque -->
<math mathbackground="rgb(117 190 218 / 50%)"> <!-- 50% transparent -->

<!-- HSL value -->
<math mathbackground="hsl(50 33% 25%)"> <!-- Fully opaque -->
<math mathbackground="hsl(50 33% 25% / 75%)"> <!-- 75% opaque, i.e. 25% transparent -->
```

### Values

`<color>`

The uniform color of the background.

Specifications
--------------

| Specification |
| --- |
| MathML Core # dfn-mathbackground |

* In MathML 3 and earlier versions, a more limited set of values was supported.
 Since MathML Core, the syntax matches CSS `<color>`
 values.
* This attribute was designed for MathML applications that are not CSS-aware.
 Since MathML Core, the use of equivalent CSS is recommended instead.
Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* All global attributes.
* `background-color`
mathsize
========

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The **`mathsize`** global attribute sets the font-size of a MathML element.

**Note:** Use CSS for styling MathML whenever possible. The `mathsize` attribute should only be included for applications that are not CSS-aware and will be overridden by the CSS `font-size` property, if set.

Syntax
------


```html
<!-- <length> values -->
<math mathsize="12px">
<math mathsize="0.8em">

<!-- <percentage> values -->
<math mathsize="80%">
```

### Values

`<length>`

A positive `<length>` value. For most font-relative units (such as `em` and `ex`), the font size is relative to the parent element's font size.

`<percentage>`

A positive `<percentage>` value, relative to the parent element's font size.


**Note:** Some browsers may also accept legacy MathML lengths.

Specifications
--------------

| Specification |
| --- |
| MathML Core # dfn-mathsize |

* In MathML 3 and earlier versions, keywords `small`, `normal`, and `big` as
 well as the MathML3-specific syntax for lengths was supported.
 Since MathML Core, the syntax matches CSS
 `<length-percentage>` values.
* This attribute was designed for MathML applications that are not CSS-aware.
 Since MathML Core, the use of equivalent CSS is recommended instead.
Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* All global attributes.
* `font-size`
Common XSLT Errors
==================

### MIME types

Your server needs to send both the source and the stylesheet with a XML mime type, `text/xml` or `application/xml`. To find out the current type, load the file in Mozilla and look at the page info. Or use a download tool, those usually tell the mime type.

In Firefox 6 and forward, you can also use the official XSLT mimetype: `application/xslt+xml`.

### Namespace

The XSLT 1.0 namespace is `http://www.w3.org/1999/XSL/Transform`. Older versions of IE used a different namespace. However these versions also used a draft version of XSLT which is incompatible with what eventually became the XSLT 1.0 specification. Firefox only supports the official XSLT 1.0 version.

### Missing features

There are some features in the XSLT 1.0 specification which Firefox unfortunately does not yet support. Specifically:

* The `namespace::` axis in XPath expressions. Support for this will hopefully be available in the future.
* The `disable-output-escaping` attribute. This feature controls how serializing the constructed output document works. However Firefox never serializes the output document and so the attribute isn't really applicable. While we could try to add some heuristics to serialize and reparse just the part of the output document which has `disable-output-escaping` applied, heuristics often get things wrong and lead to surprising results, hence we've been reluctant to add this so far. Often times stylesheets contain code like `<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>`, this is equivalent to putting `&#160;` in the stylesheet which will work great in all XSLT engines. We do realize that the lack of `disable-output-escaping` is a problem and we'd like to find a solution for it, however so far we haven't found any good solutions.
* The `<xsl:namespace-alias>` element.

If you'd like to help out with any of the above features, help would be greatly appreciated.
XSLT elements reference
=======================

There are two types of elements discussed here: top-level elements and instructions. A top-level element must appear as the child of either `<xsl:stylesheet>` or `<xsl:transform>`. An instruction, on the other hand, is associated with a template. A stylesheet may include several templates. A third type of element, not discussed here, is the literal result element (LRE). An LRE also appears in a template. It consists of any non-instruction element that should be copied as-is to the result document, for example, an `<hr>` element in an HTML conversion stylesheet.

On a related note, any attribute in an LRE and some attributes of a limited number of XSLT elements can also include what is known as an attribute value template. An attribute value template is a string that includes an embedded XPath expression which is used to specify the value of an attribute. At run-time the expression is evaluated and the result of the evaluation is substituted for the XPath expression. For example, assume that a variable "`image-dir`" is defined as follows:


```xml
<xsl:variable name="image-dir">/images</xsl:variable>
```


The expression to be evaluated is placed inside curly braces:


```xml
<img src="{$image-dir}/mygraphic.jpg"/>
```


This would result in the following:


```xml
<img src="/images/mygraphic.jpg"/>
```


The element annotations that follow include a description, a syntax listing, a list of required and optional attributes, a description of type and position, its source in the W3C Recommendation and an explanation of the degree of present Gecko support.

* `<xsl:apply-imports>`
* `<xsl:apply-templates>`
* `<xsl:attribute>`
* `<xsl:attribute-set>`
* `<xsl:call-template>`
* `<xsl:choose>`
* `<xsl:comment>`
* `<xsl:copy>`
* `<xsl:copy-of>`
* `<xsl:decimal-format>`
* `<xsl:element>`
* `<xsl:fallback>` *(not supported)*
* `<xsl:for-each>`
* `<xsl:if>`
* `<xsl:import>` *(mostly supported)*
* `<xsl:include>`
* `<xsl:key>`
* `<xsl:message>`
* `<xsl:namespace-alias>` *(not supported)*
* `<xsl:number>` *(partially supported)*
* `<xsl:otherwise>`
* `<xsl:output>` *(partially supported)*
* `<xsl:param>`
* `<xsl:preserve-space>`
* `<xsl:processing-instruction>`
* `<xsl:sort>`
* `<xsl:strip-space>`
* `<xsl:stylesheet>` *(partially supported)*
* `<xsl:template>`
* `<xsl:text>` *(partially supported)*
* `<xsl:transform>`
* `<xsl:value-of>` *(partially supported)*
* `<xsl:variable>`
* `<xsl:when>`
* `<xsl:with-param>`
The Netscape XSLT/XPath Reference
=================================

The following is an alphabetized and annotated list of the elements, axes, and functions from the W3C's 1.0 Recommendation for XSLT, as well as from the appropriate sections of the XPath Recommendation. Development of the XSLT processor is ongoing, and this document will be updated as functionality is expanded.

### Elements

* xsl:apply-imports *(supported)*
* xsl:apply-templates *(supported)*
* xsl:attribute *(supported)*
* xsl:attribute-set *(supported)*
* xsl:call-template *(supported)*
* xsl:choose *(supported)*
* xsl:comment *(supported)*
* xsl:copy *(supported)*
* xsl:copy-of *(supported)*
* xsl:decimal-format *(supported)*
* xsl:element *(supported)*
* xsl:fallback *(not supported)*
* xsl:for-each *(supported)*
* xsl:if *(supported)*
* xsl:import *(mostly supported)*
* xsl:include *(supported)*
* xsl:key *(supported)*
* xsl:message *(supported)*
* xsl:namespace-alias *(not supported)*
* xsl:number *(partially supported)*
* xsl:otherwise *(supported)*
* xsl:output *(partially supported)*
* xsl:param *(supported)*
* xsl:preserve-space *(supported)*
* xsl:processing-instruction
* xsl:sort *(supported)*
* xsl:strip-space *(supported)*
* xsl:stylesheet *(partially supported)*
* xsl:template *(supported)*
* xsl:text *(partially supported)*
* xsl:transform *(supported)*
* xsl:value-of *(partially supported)*
* xsl:variable *(supported)*
* xsl:when *(supported)*
* xsl:with-param *(supported)*
### Axes

* ancestor
* ancestor-or-self
* attribute
* child
* descendant
* descendant-or-self
* following
* following-sibling
* namespace *(not supported)*
* parent
* preceding
* preceding-sibling
* self
### Functions

* boolean() *(supported)*
* ceiling() *(supported)*
* concat() *(supported)*
* contains() *(supported)*
* count() *(supported)*
* current() *(supported)*
* document() *(supported)*
* element-available() *(supported)*
* false() *(supported)*
* floor() *(supported)*
* format-number() *(supported)*
* function-available() *(supported)*
* generate-id() *(supported)*
* id() *(partially supported)*
* key() *(supported)*
* lang() *(supported)*
* last() *(supported)*
* local-name() *(supported)*
* name() *(supported)*
* namespace-uri() *(supported)*
* normalize-space() *(supported)*
* not() *(supported)*
* number() *(supported)*
* position() *(supported)*
* round() *(supported)*
* starts-with() *(supported)*
* string() *(supported)*
* string-length() *(supported)*
* substring() *(supported)*
* substring-after() *(supported)*
* substring-before() *(supported)*
* sum() *(supported)*
* system-property() *(supported)*
* translate() *(supported)*
* true() *(supported)*
* unparsed-entity-url() *(not supported)*