0.0.9 • Published 14 days ago

@sonnetjs/mathml v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
14 days ago

sonnetjs/mathml

sonnetjs/mathml is a library for creating MathML elements in JavaScript. It provides a set of functions to create MathML elements and provides chainable methods to set attributes, properties, and children.

Features

  • Create MathML elements using functions.
  • Set attributes and properties of MathML elements using chainable methods.
  • Add children to MathML elements using children method.

Usage

  1. Run the following command to create a new SonnetJS project.
npx create-sonnet-app@latest
  1. Change directory to the newly created project.
cd [my-sonnet-app]
  1. Install the dependencies
npm i
  1. Install sonnetjs/mathml
npm i @sonnetjs/mathml
  1. Start the development server
npm run dev

Documentation

MathML Elements

You can create MathML elements using functions.

import { math, mrow, mi, mo } from '@sonnetjs/mathml';

const element = math()
  .children(
    mrow()
      .children(
        mi().innerText('x').get(),
        mo().innerText('+').get(),
        mi().innerText('y').get(),
      )
      .get(),
  )
  .get();

License

sonnetjs/mathml is licensed under the MIT license.

0.0.9

14 days ago

0.0.8

23 days ago

0.0.5

29 days ago

0.0.7

29 days ago

0.0.6

29 days ago

0.0.4

1 month ago

0.0.3

1 month ago

0.0.2

1 month ago

0.0.1

1 month ago