0.0.3 • Published 4 years ago

@innodoc/mathjax-num v0.0.3

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
4 years ago

mathjax-num

A MathJax v3 extension that adds a \num command for printing a localized decimal marker.

Version License

Installation

Enable the extension by configuring MathJax appropriately, e.g.:

MathJax = {
   loader: {
      load: '[mathjaxnum]/num.min.js'],
      paths: {
        mathjaxnum: 'https://cdn.jsdelivr.net/npm/@innodoc/mathjax-num@latest/dist',
      },
   },
   tex: {
      packages: {
        '[+]': ['num'],
      },
   },
};

Usage

\num{3.5} (also \num{3,5}) can be used to render a decimal number with a localized decimal separator. The separator is determined by the html lang attribute.

Also, it is possible to output only the localized decimal marker by using the \decmarker command.

License

MIT