{"id":23082593,"url":"https://github.com/runarberg/mathup","last_synced_at":"2026-06-11T01:01:10.881Z","repository":{"id":28521951,"uuid":"32038723","full_name":"runarberg/mathup","owner":"runarberg","description":"Easy MathML authoring tool with a quick to write syntax","archived":false,"fork":false,"pushed_at":"2025-07-22T08:59:21.000Z","size":6115,"stargazers_count":86,"open_issues_count":2,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-26T14:39:09.845Z","etag":null,"topics":["asciimath","javascript","markup-language","mathematical-expressions","mathml"],"latest_commit_sha":null,"homepage":"http://mathup.xyz/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/runarberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-03-11T20:09:46.000Z","updated_at":"2025-08-12T08:35:21.000Z","dependencies_parsed_at":"2024-06-07T22:42:25.301Z","dependency_job_id":"256882bb-23f3-44bd-babc-12d5f6ca7215","html_url":"https://github.com/runarberg/mathup","commit_stats":{"total_commits":179,"total_committers":7,"mean_commits":"25.571428571428573","dds":"0.11173184357541899","last_synced_commit":"bf765da56941f1b61b5bb19e3ae07dea5f80e4c9"},"previous_names":["runarberg/ascii2mathml"],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/runarberg/mathup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runarberg%2Fmathup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runarberg%2Fmathup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runarberg%2Fmathup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runarberg%2Fmathup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runarberg","download_url":"https://codeload.github.com/runarberg/mathup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runarberg%2Fmathup/sbom","scorecard":{"id":789651,"data":{"date":"2025-08-11","repo":{"name":"github.com/runarberg/mathup","commit":"f4a65c18a529742541eb851a7f49a9dfb1ba64eb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/docs.yml:9","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":6,"reason":"dependency not pinned by hash detected -- score normalized to 6","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:89: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:101: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/runarberg/mathup/docs.yml/main?enable=pin","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   6 out of   6 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.0.0 not signed: https://api.github.com/repos/runarberg/mathup/releases/205710930","Warn: release artifact v1.0.0-alpha.3 not signed: https://api.github.com/repos/runarberg/mathup/releases/22777839","Warn: release artifact v1.0.0-alpha.2 not signed: https://api.github.com/repos/runarberg/mathup/releases/22774969","Warn: release artifact v0.7.1 not signed: https://api.github.com/repos/runarberg/mathup/releases/22008921","Warn: release artifact v0.7.0 not signed: https://api.github.com/repos/runarberg/mathup/releases/22009019","Warn: release artifact v1.0.0 does not have provenance: https://api.github.com/repos/runarberg/mathup/releases/205710930","Warn: release artifact v1.0.0-alpha.3 does not have provenance: https://api.github.com/repos/runarberg/mathup/releases/22777839","Warn: release artifact v1.0.0-alpha.2 does not have provenance: https://api.github.com/repos/runarberg/mathup/releases/22774969","Warn: release artifact v0.7.1 does not have provenance: https://api.github.com/repos/runarberg/mathup/releases/22008921","Warn: release artifact v0.7.0 does not have provenance: https://api.github.com/repos/runarberg/mathup/releases/22009019"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T07:08:53.107Z","repository_id":28521951,"created_at":"2025-08-23T07:08:53.108Z","updated_at":"2025-08-23T07:08:53.108Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34177444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asciimath","javascript","markup-language","mathematical-expressions","mathml"],"created_at":"2024-12-16T14:55:49.725Z","updated_at":"2026-06-11T01:01:10.832Z","avatar_url":"https://github.com/runarberg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mathup\n\n[![Build Status](https://github.com/runarberg/mathup/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/runarberg/mathup/actions/workflows/ci.yml?query=branch%3Amain)\n[![Coverage Status](https://coveralls.io/repos/github/runarberg/mathup/badge.svg)](https://coveralls.io/github/runarberg/mathup)\n[![License](https://img.shields.io/npm/l/mathup)](LICENSE)\n[![npm](https://img.shields.io/npm/v/mathup.svg)](https://www.npmjs.com/package/mathup)\n[![Downloads](https://img.shields.io/npm/dm/mathup)](https://npm-stat.com/charts.html?package=mathup)\n\n#### Installation\n\n##### npm\n\n```bash\nnpm install mathup\n```\n\n```js\nimport mathup from \"mathup\";\n```\n\n##### Client\n\nDownload or link one or more of the [released assets](https://www.jsdelivr.com/package/npm/mathup?tab=files\u0026path=dist)\nand include the **module**:\n\n```html\n\u003cscript type=\"module\" src=\"mathup.js\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" href=\"mathup.css\" /\u003e\n```\n\n…the **custom element**:\n\n```html\n\u003cscript type=\"module\" src=\"math-up-element.js\"\u003e\u003c/script\u003e\n```\n\n…or the **script**:\n\n```html\n\u003cscript src=\"mathup.iife.js\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" href=\"mathup.css\" /\u003e\n```\n\n#### Usage\n\n```js\nconst expression = \"1+1 = 2\";\nconst options = {}; // optional\nconst mathml = mathup(expression, options);\n\nmathml.toString();\n// =\u003e \"\u003cmath\u003e\u003cmrow\u003e\u003cmn\u003e1\u003c/mn\u003e\u003cmo\u003e+\u003c/mo\u003e\u003cmn\u003e1\u003c/mn\u003e\u003c/mrow\u003e\u003cmo\u003e=\u003c/mo\u003e\u003cmn\u003e2\u003c/mn\u003e\u003c/math\u003e\"\n\nconst mathNode = mathml.toDOM();\n// =\u003e [object MathMLElement]\n\n// Update existing \u003cmath\u003e node in place\nmathup(\"3-2 = 1\", { bare: true }).updateDOM(mathNode);\n```\n\n##### Custom Element\n\n```html\n\u003cmath-up display=\"inline\" dir=\"ltr\" decimal-mark=\",\" col-sep=\";\" row-sep=\";;\"\u003e\n  1+1 = 2\n\u003c/math-up\u003e\n```\n\n##### Command Line\n\n```bash\nnpm install -g mathup\n\nmathup [options] -- \u003cexpression\u003e\n\n# or from stdin\necho \u003cexpression\u003e | mathup [options]\n```\n\n#### Options (with defaults)\n\n\u003c!-- prettier-ignore --\u003e\n```js\nconst options = {\n  decimalMark: \".\",   // -m,  --decimalmark=\".\"\n  colSep: \",\",        // -c,  --colsep=\",\"\n  rowSep: \";\",        // -r,  --rowsep=\";\"\n  display: \"inline\",  // -d,  --display\n  dir: \"ltr\",         //      --rtl\n  bare: false,        // -b,  --bare\n}\n```\n\n## Reference\n\n[See here](http://runarberg.github.io/mathup/#reference)\n\n## Easy MathML authoring tool with a quick to write syntax\n\nThis package exposes a single function `mathup` that intuitively takes\nsimple mathematical expressions—written in a markup language inspired\nby [_AsciiMath_](http://asciimath.org/)—and outputs structured\n[_MathML_](http://www.w3.org/Math/).\n\nYou can use it on the command line or on the server as an\n[npm](https://npmjs.com) package, or in the browser by including the\nscript source. In the browser, you choose how to parse the math in\nyour document—by looking hard for any math-y substrings, parsing all\nexpressions wrapped in `$`…`$`, or using some other excellent tools out\nthere that does it for you. And you can choose what to do with the\noutput as well—piping it to another program, inject it streight to the\nDOM, or just logging it to the console.\n\n## Why not just use _MathJax_?\n\n[_MathJax_](http://www.mathjax.org/) is an excellent tool that you can\nsafely use if all you want to do is include complex mathematical\nexpressions in a document. However, MathJax is a complex piece of\nsoftware that does a great deal more than just translate simple\nexpression into structured form, and if that is all you want to do,\nthen MathJax is definitely overkill. Mathup promises to be a lot\nfaster (by doing less) then MathJax. While MathJax will search for\nexpressions, parse them, translate and render them. Mathup only parses\nand translates them, and let the browser do the rendering.\n\n## Why AsciiMath / Why not TeΧ?\n\nI wrote this tool, because I wanted to be able to author mathematical\nexpressions quickly, with no overhead (imagine `1/2` instead of\n`\\frac{1}{2}`). TeΧ expressions can easily become verbose and annoying\nto write (especially on keyboards with complex access to the\n\u003ckbd\u003e \\ \u003c/kbd\u003e, \u003ckbd\u003e{\u003c/kbd\u003e, and \u003ckbd\u003e}\u003c/kbd\u003e keys). However, the\npurpose of this package is _not_ to give people complete control over\nMathML in a non-verbose way, the purpose is to make it simple for\npeople to write simple expression. Of course I’ll try to give as much\nexpressive power as possible in the way, but I won’t promise to make\nall complex things possible.\n\nIf you want full support of MathML, and don’t want to write all those\ntags perhaps you should look for another tool. There are other great\nefforts to enable people to author MathML in TeX format, take a look\nat [TeXZilla](https://github.com/fred-wang/TeXZilla) for example.\n\n## Testing\n\nRun the test suites with:\n\n```bash\nnpm test\n```\n\nAs for manual and visual tests, if you are running node 13 or newer,\nyou don’t need to compile between edit and run as the code is written\nwithout transpilation in mind. The code works in both browsers and\nnode without any transcompilation.\n\nFor a simple test do:\n\n```bash\n./bin/mathup.js -- 'my expression'\n```\n\nYou can open a\n[playground](http://localhost:8000/demo/playground.html) and [test\ncases](http://localhost:8000/demo/test-cases.html) on\n\u003chttp://localhost:8000/demo\u003e by running:\n\n```bash\nnpm run server\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunarberg%2Fmathup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunarberg%2Fmathup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunarberg%2Fmathup/lists"}