{"id":20079551,"url":"https://github.com/transpect/mml-normalize","last_synced_at":"2026-03-06T15:31:14.241Z","repository":{"id":93859556,"uuid":"91549063","full_name":"transpect/mml-normalize","owner":"transpect","description":"MathML normalization","archived":false,"fork":false,"pushed_at":"2026-01-30T12:15:38.000Z","size":138,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-31T05:20:07.735Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"XSLT","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/transpect.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-05-17T07:56:47.000Z","updated_at":"2026-01-30T12:15:54.000Z","dependencies_parsed_at":"2023-12-22T19:25:51.013Z","dependency_job_id":"c5e395e4-63ab-465c-898c-5a40c858b99a","html_url":"https://github.com/transpect/mml-normalize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/transpect/mml-normalize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transpect%2Fmml-normalize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transpect%2Fmml-normalize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transpect%2Fmml-normalize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transpect%2Fmml-normalize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transpect","download_url":"https://codeload.github.com/transpect/mml-normalize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transpect%2Fmml-normalize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30183429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T14:42:24.748Z","status":"ssl_error","status_checked_at":"2026-03-06T14:42:14.925Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-13T15:23:23.885Z","updated_at":"2026-03-06T15:31:14.180Z","avatar_url":"https://github.com/transpect.png","language":"XSLT","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mathml-normalize\n\nAn XSLT library to normalize MathML equations with heuristic methods.\n\n## Description\n\nThe authoring of math equations is an error-prone process, especially with WYSIWYG editors such as MathType and Microsoft Word Equation Editor. For example, authors tend to write symbols accidentally in text mode instead of changing the font-style to normal. This results most likely in wrong MathML markup for the symbol, like `mtext` where `mi` is appropriate.\n\nConsider this MathML equation with wrong markup:\n\n```xml\n\u003cmath xmlns=\"http://www.w3.org/1998/Math/MathML\"\u003e\n  \u003cmtext\u003eE=m\u003c/mtext\u003e\n  \u003cmsubsup\u003e\n    \u003cmtext\u003ec\u003c/mtext\u003e\n    \u003cmi\u003e\u0026#x2009;\u003c/mi\u003e\n    \u003cmn\u003e2\u003c/mn\u003e\n  \u003c/msubsup\u003e\n\u003c/math\u003e\n```\n\nAfter mml-normalize, the `mtext` was resolved and the text was properly tagged with `mi` and `mo` elements. Furthermore, the `msubsup` was replaced with `msup`:\n\n```xml\n\u003cmath xmlns=\"http://www.w3.org/1998/Math/MathML\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\u003e\n  \u003cmrow\u003e\n    \u003cmi mathvariant=\"normal\"\u003eE\u003c/mi\u003e\n    \u003cmo\u003e=\u003c/mo\u003e\n    \u003cmi mathvariant=\"normal\"\u003em\u003c/mi\u003e\n  \u003c/mrow\u003e\n  \u003cmsup\u003e\n    \u003cmi mathvariant=\"normal\"\u003ec\u003c/mi\u003e\n    \u003cmn\u003e2\u003c/mn\u003e\n  \u003c/msup\u003e\n\u003c/math\u003e\n```\n\n## Invoke with Saxon\n\nmml-normalize contains two XSLT modes. First, you should invoke `mml2tex-grouping` and afterwards `mml2tex-preprocess`.\n\n```\n$ saxon -xsl:mml-normalize/xsl/mml-normalize.xsl -s:eq.xml -o:eq-nrmlzd.xml -im:mml2tex-grouping\n$ saxon -xsl:mml-normalize/xsl/mml-normalize.xsl -s:eq.xml -o:eq-nrmlzd.xml -im:mml2tex-preprocess\n\n```\n## Note\n\nIn our experience of working with poorly formatted equations, this XSLT improved the markup plenty of times. However, due to the nature of heuristic methods, there can be cases where this XSLT is no help at all or changes something for the worse. We suggest to include Schematron checking and a certain level of math proofreading in your process.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftranspect%2Fmml-normalize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftranspect%2Fmml-normalize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftranspect%2Fmml-normalize/lists"}