https://github.com/wooorm/mathml-tag-names
List of known MathML tag names
https://github.com/wooorm/mathml-tag-names
element mathml name tag
Last synced: about 1 year ago
JSON representation
List of known MathML tag names
- Host: GitHub
- URL: https://github.com/wooorm/mathml-tag-names
- Owner: wooorm
- License: mit
- Created: 2016-03-19T10:27:23.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2025-02-17T13:39:06.000Z (about 1 year ago)
- Last Synced: 2025-03-29T07:22:34.789Z (about 1 year ago)
- Topics: element, mathml, name, tag
- Language: JavaScript
- Homepage:
- Size: 99.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: funding.yml
- License: license
Awesome Lists containing this project
README
# mathml-tag-names
[![Build][badge-build-image]][badge-build-url]
[![Coverage][badge-coverage-image]][badge-coverage-url]
[![Downloads][badge-downloads-image]][badge-downloads-url]
[![Size][badge-size-image]][badge-size-url]
List of known MathML tag names.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`mathmlTagNames`](#mathmltagnames)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This is a list of MathML tag names.
It includes all tag names from [MathML 1][w3-mathml1],
[MathML 2][w3-mathml2],
[MathML 3][w3-mathml3],
and
[MathML 4][w3-mathml4].
The repo includes scripts to regenerate the data from the specs.
## When should I use this?
You can use this package when you need to know what tag names are allowed in
any version of MathML.
## Install
This package is [ESM only][github-gist-esm].
In Node.js (version 16+),
install with [npm][npmjs-install]:
```sh
npm install mathml-tag-names
```
In Deno with [`esm.sh`][esmsh]:
```js
import {mathmlTagNames} from 'https://esm.sh/mathml-tag-names@4'
```
In browsers with [`esm.sh`][esmsh]:
```html
import {mathmlTagNames} from 'https://esm.sh/mathml-tag-names@4?bundle'
```
## Use
```js
import {mathmlTagNames} from 'mathml-tag-names'
console.log(mathmlTagNames.length) // => 201
console.log(mathmlTagNames.slice(0, 10))
```
Yields:
```js
[
'abs',
'and',
'annotation',
'annotation-xml',
'apply',
'approx',
'arccos',
'arccosh',
'arccot',
'arccoth'
]
```
## API
This package exports the identifier `mathmlTagNames`.
There is no default export.
### `mathmlTagNames`
List of known (lowercase) MathML tag names (`ReadonlyArray`).
## Types
This package is fully typed with [TypeScript][].
It exports no additional types.
## Compatibility
This package is at least compatible with all maintained versions of Node.js.
As of now,
that is Node.js 16+.
It also works in Deno and modern browsers.
## Security
This package is safe.
## Related
* [`wooorm/html-tag-names`](https://github.com/wooorm/html-tag-names)
— list of HTML tag names
* [`wooorm/svg-tag-names`](https://github.com/wooorm/svg-tag-names)
— list of SVG tag names
* [`wooorm/svg-element-attributes`](https://github.com/wooorm/svg-element-attributes)
— map of SVG elements to attributes
* [`wooorm/html-element-attributes`](https://github.com/wooorm/html-element-attributes)
— map of HTML elements to attributes
* [`wooorm/aria-attributes`](https://github.com/wooorm/aria-attributes)
— list of ARIA attributes
## Contribute
Yes please!
See [*How to Contribute to Open Source*][opensource-guide].
## License
[MIT][file-license] © [Titus Wormer][wooorm]
[badge-build-image]: https://github.com/wooorm/mathml-tag-names/workflows/main/badge.svg
[badge-build-url]: https://github.com/wooorm/mathml-tag-names/actions
[badge-coverage-image]: https://img.shields.io/codecov/c/github/wooorm/mathml-tag-names.svg
[badge-coverage-url]: https://codecov.io/github/wooorm/mathml-tag-names
[badge-downloads-image]: https://img.shields.io/npm/dm/mathml-tag-names.svg
[badge-downloads-url]: https://www.npmjs.com/package/mathml-tag-names
[badge-size-image]: https://img.shields.io/bundlejs/size/mathml-tag-names
[badge-size-url]: https://bundlejs.com/?q=mathml-tag-names
[esmsh]: https://esm.sh
[file-license]: license
[github-gist-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[npmjs-install]: https://docs.npmjs.com/cli/install
[opensource-guide]: https://opensource.guide/how-to-contribute/
[typescript]: https://www.typescriptlang.org
[w3-mathml1]: https://www.w3.org/TR/1998/REC-MathML-19980407/appendixF.html
[w3-mathml2]: https://www.w3.org/TR/MathML2/appendixl.html
[w3-mathml3]: https://www.w3.org/TR/MathML3/appendixi.html
[w3-mathml4]: https://www.w3.org/TR/mathml4/#mmlindex_elements
[wooorm]: https://wooorm.com