{"id":13419176,"url":"https://github.com/mathjax/MathJax","last_synced_at":"2025-03-15T04:32:10.091Z","repository":{"id":1020197,"uuid":"847885","full_name":"mathjax/MathJax","owner":"mathjax","description":"Beautiful and accessible math in all browsers","archived":false,"fork":false,"pushed_at":"2024-07-21T14:59:54.000Z","size":156203,"stargazers_count":10191,"open_issues_count":509,"forks_count":1159,"subscribers_count":246,"default_branch":"master","last_synced_at":"2024-10-30T02:29:30.760Z","etag":null,"topics":["accessibility","asciimath-notation","css","html","javascript","latex","mathematics","mathjax","mathml","svg","typography"],"latest_commit_sha":null,"homepage":"http://www.mathjax.org/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathjax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":["numfocus"],"custom":["https://numfocus.org/donate-to-mathjax"]}},"created_at":"2010-08-19T03:28:53.000Z","updated_at":"2024-10-30T01:41:48.000Z","dependencies_parsed_at":"2024-01-13T10:42:47.448Z","dependency_job_id":"57d04d29-6d69-4370-a269-29b2088c5c09","html_url":"https://github.com/mathjax/MathJax","commit_stats":{"total_commits":2506,"total_committers":42,"mean_commits":"59.666666666666664","dds":0.1616121308858739,"last_synced_commit":"b6922e564070d20888f680a289381702a266718f"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathjax%2FMathJax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathjax%2FMathJax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathjax%2FMathJax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathjax%2FMathJax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathjax","download_url":"https://codeload.github.com/mathjax/MathJax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243685506,"owners_count":20330980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["accessibility","asciimath-notation","css","html","javascript","latex","mathematics","mathjax","mathml","svg","typography"],"created_at":"2024-07-30T22:01:12.344Z","updated_at":"2025-03-15T04:32:10.063Z","avatar_url":"https://github.com/mathjax.png","language":null,"readme":"# MathJax\n## Beautiful math in all browsers\n\n![GitHub release version](https://img.shields.io/github/v/release/mathjax/MathJax-src.svg?sort=semver)\n![GitHub release version (v2)](https://img.shields.io/github/package-json/v/mathjax/MathJax/legacy-v2.svg?label=release-v2)\n![NPM version](https://img.shields.io/npm/v/mathjax.svg?style=flat)\n\u003ca href=\"http://www.numfocus.org\"\u003e![powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat)\u003c/a\u003e  \n![jsdelivr rank](https://flat.badgen.net/jsdelivr/rank/npm/mathjax?color=green)\n![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/mathjax)\n![npm monthly downloads (full)](https://img.shields.io/npm/dm/mathjax?label=npm)\n![npm total downloads](https://img.shields.io/npm/dt/mathjax.svg?style=flat\u0026label=npm%20total)\n\nMathJax is an open-source JavaScript display engine for LaTeX, MathML,\nand AsciiMath notation that works in all modern browsers.  It was\ndesigned with the goal of consolidating the recent advances in web\ntechnologies into a single, definitive, math-on-the-web platform\nsupporting the major browsers and operating systems.  It requires no\nsetup on the part of the user (no plugins to download or software to\ninstall), so the page author can write web documents that include\nmathematics and be confident that users will be able to view it\nnaturally and easily.  Simply include MathJax and some mathematics in\na web page, and MathJax does the rest.\n\nSome of the main features of MathJax include:\n\n- High-quality display of LaTeX, MathML, and AsciiMath notation in HTML pages\n\n- Supported in most browsers with no plug-ins, extra fonts, or special\n  setup for the reader\n\n- Easy for authors, flexible for publishers, extensible for developers\n\n- Supports math accessibility, cut-and-paste interoperability, and other\n  advanced functionality\n\n- Powerful API for integration with other web applications\n\nSee \u003chttp://www.mathjax.org/\u003e for additional details about MathJax,\nand \u003chttps://docs.mathjax.org\u003e for the MathJax documentation.\n\n## MathJax Components\n\nMathJax version 3 uses files called *components* that contain the\nvarious MathJax modules that you can include in your web pages or\naccess on a server through NodeJS.  Some components combine all the\npieces you need to run MathJax with one or more input formats and a\nparticular output format, while other components are pieces that can\nbe loaded on demand when needed, or by a configuration that specifies\nthe pieces you want to combine in a custom way.  For usage\ninstructions, see the [MathJax documentation](https://docs.mathjax.org).\n\nComponents provide a convenient packaging of MathJax's modules, but it\nis possible for you to form your own custom components, or to use\nMathJax's modules directly in a node application on a server.  There\nare [web examples](https://github.com/mathjax/MathJax-demos-web)\nshowing how to use MathJax in web pages and how to build your own\ncomponents, and [node\nexamples](https://github.com/mathjax/MathJax-demos-node) illustrating\nhow to use components in node applications or call MathJax modules\ndirectly.\n\n## What's in this Repository\n\nThis repository contains only the component files for MathJax, not the\nsource code for MathJax (which are available in a separate [MathJax\nsource repository](https://github.com/mathjax/MathJax-src/)).  These\ncomponent files are the ones served by the CDNs that offer MathJax to\nthe web.  In version 2, the files used on the web were also the source\nfiles for MathJax, but in version 3, the source files are no longer on\nthe CDN, as they are not what are run in the browser.\n\nThe components are stored in the `es5` directory, and are in ES5 format\nfor the widest possible compatibility.  In the future, we may make an\n`es6` directory containing ES6 versions of the components.\n\n## Installation and Use\n\n### Using MathJax components from a CDN on the web\n\nIf you are loading MathJax from a CDN into a web page, there is no\nneed to install anything.  Simply use a `script` tag that loads\nMathJax from the CDN.  E.g.,\n\n``` html\n\u003cscript id=\"MathJax-script\" async src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js\"\u003e\u003c/script\u003e\n```\n\nSee the [MathJax\ndocumentation](https://docs.mathjax.org/en/latest/index.html#browser-components),\nthe [MathJax Web Demos](https://github.com/mathjax/MathJax-demos-web),\nand the [MathJax Component\nRepository](https://github.com/mathjax/MathJax-demos-web) for more information.\n\n### Hosting your own copy of the MathJax Components\n\nIf you want to host MathJax from your own server, you can do so by\ninstalling the `mathjax` package using `npm` and moving the `es5`\ndirectory to an appropriate location on your server:\n\n``` bash\nnpm install mathjax@3\nmv node_modules/mathjax/es5 \u003cpath-to-server-location\u003e/mathjax\n```\n\nNote that we are still making updates to version 2, so include `@3`\nwhen you install, since the latest chronological version may not be\nversion 3.\n\nAlternatively, you can get the files via GitHub:\n\n``` bash\ngit clone https://github.com/mathjax/MathJax.git mj-tmp\nmv mj-tmp/es5 \u003cpath-to-server-location\u003e/mathjax\nrm -rf mj-tmp\n```\n\nThen (in either case) you can use a script tag like the following:\n\n``` html\n\u003cscript id=\"MathJax-script\" async src=\"\u003curl-to-your-site\u003e/mathjax/tex-chtml.js\"\u003e\u003c/script\u003e\n```\n\nwhere `\u003curl-to-your-site\u003e` is replaced by the URL to the location\nwhere you moved the MathJax files above.\n\nSee the\n[documentation](https://docs.mathjax.org/en/latest/web/hosting.html)\nfor details.\n\n### Using MathJax components in a node application\n\nTo use MathJax components in a node application, install the `mathjax` package:\n\n``` bash\nnpm install mathjax@3\n```\n\n(we are still making updates to version 2, so you should include `@3`\nsince the latest chronological version may not be version 3).\n\nThen require `mathjax` within your application:\n\n```js\nrequire('mathjax').init({ ... }).then((MathJax) =\u003e { ... });\n```\n    \nwhere the first `{ ... }` is a MathJax configuration, and the second\n`{ ... }` is the code to run after MathJax has been loaded.  E.g.\n\n```js\nrequire('mathjax').init({\n  loader: {load: ['input/tex', 'output/svg']}\n}).then((MathJax) =\u003e {\n  const svg = MathJax.tex2svg('\\\\frac{1}{x^2-1}', {display: true});\n  console.log(MathJax.startup.adaptor.outerHTML(svg));\n}).catch((err) =\u003e console.log(err.message));\n```\n\n**Note:** this technique is for node-based application only, not for\nbrowser applications.  This method sets up an alternative DOM\nimplementation, which you don't need in the browser, and tells MathJax\nto use node's `require()` command to load external modules.  This\nsetup will not work properly in the browser, even if you webpack it or\nbundle it in other ways.\n\nSee the\n[documentation](https://docs.mathjax.org/en/latest/index.html#server-nodejs)\nand the [MathJax Node\nRepository](https://github.com/mathjax/MathJax-demos-node) for more details.\n\n## Reducing the Size of the Components Directory\n\nSince the `es5` directory contains *all* the component files, so if\nyou are only planning one use one configuration, you can reduce the\nsize of the MathJax directory by removing unused components. For\nexample, if you are using the `tex-chtml.js` component, then you can\nremove the `tex-mml-chtml.js`, `tex-svg.js`, `tex-mml-svg.js`,\n`tex-chtml-full.js`, and `tex-svg-full.js` configurations, which will\nsave considerable space.  Indeed, you should be able to remove\neverything other than `tex-chtml.js`, and the `input/tex/extensions`,\n`output/chtml/fonts/woff-v2`, `adaptors`, `a11y`, and `sre`\ndirectories.  If you are using the results only on the web, you can\nremove `adaptors` as well.\n\nIf you are not using A11Y support (e.g., speech generation, or\nsemantic enrichment), then you can remove `a11y` and `sre` as well\n(though in this case you may need to disable the assistive tools in\nthe MathJax contextual menu in order to avoid MathJax trying to load\nthem when they aren't there).\n\nIf you are using SVG rather than CommonHTML output (e.g., `tex-svg.js`\nrather than `tex-chtml.js`), you can remove the\n`output/chtml/fonts/woff-v2` directory.  If you are using MathML input\nrather than TeX (e.g., `mml-chtml.js` rather than `tex-chtml.js`),\nthen you can remove `input/tex/extensions` as well.\n\n\n## The Component Files and Pull Requests\n\nThe `es5` directory is generated automatically from the contents of the\nMathJax source repository.  You can rebuild the components using the\ncommand\n\n``` bash\nnpm run make-es5 --silent\n```\n\nNote that since the contents of this repository are generated\nautomatically, you should not submit pull requests that modify the\ncontents of the `es5` directory.  If you wish to submit a modification\nto MathJax, you should make a pull request in the [MathJax source\nrepository](https://github.com/mathjax/MathJax-src).\n\n## MathJax Community\n\nThe main MathJax website is \u003chttp://www.mathjax.org\u003e, and it includes\nannouncements and other important information.  A [MathJax user\nforum](http://groups.google.com/group/mathjax-users) for asking\nquestions and getting assistance is hosted at Google, and the [MathJax\nbug tracker](https://github.com/mathjax/MathJax/issues) is hosted\nat GitHub.\n\nBefore reporting a bug, please check that it has not already been\nreported.  Also, please use the bug tracker (rather than the help\nforum) for reporting bugs, and use the user's forum (rather than the\nbug tracker) for questions about how to use MathJax.\n\n## MathJax Resources\n\n* [MathJax Documentation](https://docs.mathjax.org)\n* [MathJax Components](https://github.com/mathjax/MathJax)\n* [MathJax Source Code](https://github.com/mathjax/MathJax-src)\n* [MathJax Web Examples](https://github.com/mathjax/MathJax-demos-web)\n* [MathJax Node Examples](https://github.com/mathjax/MathJax-demos-node)\n* [MathJax Bug Tracker](https://github.com/mathjax/MathJax/issues)\n* [MathJax Users' Group](http://groups.google.com/group/mathjax-users)\n\n","funding_links":["https://github.com/sponsors/numfocus","https://numfocus.org/donate-to-mathjax"],"categories":["JavaScript","Others"],"sub_categories":["UI Widget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathjax%2FMathJax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathjax%2FMathJax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathjax%2FMathJax/lists"}