{"id":15030061,"url":"https://github.com/mathjax/mathjax-src","last_synced_at":"2026-02-19T23:30:34.678Z","repository":{"id":4208776,"uuid":"52348698","full_name":"mathjax/MathJax-src","owner":"mathjax","description":"MathJax source code for version 3 and beyond","archived":false,"fork":false,"pushed_at":"2025-05-13T18:50:21.000Z","size":46629,"stargazers_count":2192,"open_issues_count":28,"forks_count":219,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-05-14T09:05:31.000Z","etag":null,"topics":["mathjax","next-generation"],"latest_commit_sha":null,"homepage":"https://www.mathjax.org/","language":"TypeScript","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":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},"funding":{"github":["numfocus"],"custom":["https://numfocus.org/donate-to-mathjax"]}},"created_at":"2016-02-23T09:52:03.000Z","updated_at":"2025-05-13T23:23:58.000Z","dependencies_parsed_at":"2024-11-06T03:21:15.784Z","dependency_job_id":"c6be0e56-948c-4504-aa7a-83614c668308","html_url":"https://github.com/mathjax/MathJax-src","commit_stats":{"total_commits":2518,"total_committers":20,"mean_commits":125.9,"dds":0.4177918983320096,"last_synced_commit":"844ad7513005fa096a07d2468bf59c7f6a6c3a50"},"previous_names":["mathjax/mathjax-v3"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathjax%2FMathJax-src","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathjax%2FMathJax-src/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathjax%2FMathJax-src/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathjax%2FMathJax-src/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathjax","download_url":"https://codeload.github.com/mathjax/MathJax-src/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254110374,"owners_count":22016391,"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":["mathjax","next-generation"],"created_at":"2024-09-24T20:12:20.569Z","updated_at":"2026-02-14T09:07:55.977Z","avatar_url":"https://github.com/mathjax.png","language":"TypeScript","funding_links":["https://github.com/sponsors/numfocus","https://numfocus.org/donate-to-mathjax"],"categories":[],"sub_categories":[],"readme":"# MathJax (Source Repository)\n\n![GitHub release version](https://img.shields.io/github/v/release/mathjax/MathJax-src.svg?sort=semver)\n![GitHub release version (v3)](https://img.shields.io/github/package-json/v/mathjax/MathJax/legacy-v3.svg?label=release-v3)\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![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 monthly downloads (full)](https://img.shields.io/npm/dm/mathjax-full?label=npm%20%28full%29)\n![npm total downloads](https://img.shields.io/npm/dt/mathjax.svg?style=flat\u0026label=npm%20total)\n![npm total downloads](https://img.shields.io/npm/dt/mathjax-full.svg?style=flat\u0026label=npm%20total%20%28full%29)\n![test workflow](https://github.com/MathJax/MathJax-src/actions/workflows/test.js.yml/badge.svg?branch=develop)\n[![codecov](https://codecov.io/gh/mathjax/mathjax-src/branch/develop/graph/badge.svg)](https://codecov.io/gh/mathjax/mathjax-src/tree/develop)\n\n## Beautiful math in all browsers\n\nMathJax is an open-source JavaScript display engine for LaTeX, MathML,\nand AsciiMath notation that works in all modern browsers, with\nbuilt-in support for assistive technology like screen readers,\nincluding automatic speech generation and an expression explorer that\ncan be used to investigate typeset mathematics on a more granular\nlevel than the complete expression.  It requires no setup on the part\nof the user (no plugins to download or software to install), so the\npage author can write web documents that include mathematics and be\nconfident that users will be able to view it naturally and easily.\nSimply include MathJax and some mathematics in a web page, and MathJax\ndoes 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## What's in this Repository\n\nThis repository contains the source files for MathJax, which are\nwritten in TypeScript.  These are compiled into JavaScript files and\nthen combined into component files for use on the web.  The component\nfiles are available from several [CDN services that host\nMathJax](https://docs.mathjax.org/en/latest/web/start.html#using-mathjax-from-a-content-delivery-network-cdn),\nand also from the [MathJax Component\nRepository](https://github.com/mathjax/MathJax).  Node applications\ncan use either the component files, or call the MathJax JavaScript\nfiles directly.\n\n## Installation and Use\n\n### Using MathJax in web browsers\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 src=\"https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js\" defer\u003e\u003c/script\u003e\n```\n\nSee the [MathJax\ndocumentation](https://docs.mathjax.org/en/latest/index.html#browser-components)\nand the [MathJax Web Demos](https://github.com/mathjax/MathJax-demos-web), and the [MathJax\nNode Demos](https://github.com/mathjax/MathJax-demos-node) for more\ninformation.\n\n\n### Using MathJax Components in node applications\n\nTo use MathJax components in a node application, install the `mathjax`\npackage:\n\n``` bash\nnpm install mathjax@4\n```\n\nThen import `mathjax` within your application and initialize it:\n\n``` js\nimport MathJax from 'mathjax';\nawait MathJax.init({ ... });\n```\n\nwhere `{ ... }` is the MathJax configuration you want to use.  E.g., \n\n``` js\nimport MathJax from 'mathjax';\nawait MathJax.init({\n  loader: {load: ['input/tex', 'output/svg']}\n});\nconst svg = await MathJax.tex2svgPromise('\\\\frac{1}{x^2-1}', {display: true});\nconsole.log(MathJax.startup.adaptor.outerHTML(svg));\n```\n\n\nAlternatively, in an ES5 node application, you can use\n\n```js\nconst MathJax = require('mathjax');\nMathJax.init({ ... }).then(() =\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\nconst MathJax = require('mathjax');\nMathJax.init({\n  loader: {load: ['input/tex', 'output/svg']}\n}).then(() =\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:** the technique in the two examples above is for node-based\napplication only, not for browser applications.  This method sets up\nan alternative DOM implementation, which you don't need in the\nbrowser, and it depends on node and the local file system in other\nways.  This setup will not work properly in the browser, even if you\nwebpack it or use some other bundler.\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\n### Using MathJax modules directly in node applications\n\nYou can use the MathJax JavaScript files (as opposed to MathJax\ncomponents) directly in node applications.  This gives you the\ngreatest flexibility, but requires more coding.  To use this approach,\ninstall the `@mathjax/src` package:\n\n    npm install @mathjax/src\n\nThis will provide the following directories:\n\n    node_modules/\n      @mathjax/src/\n        ts/                  the MathJax source TypeScript files\n        js/                  the compiled JavaScript files\n        components/          the component build tools and control files\n        bundle/              the packages component files\n\nYou can use the components and JavaScript files directly in your node\napplications (see the [MathJax node\ndemos](https://github.com/mathjax/MathJax-demos-node) for examples).\n\nIf you want to work from the GitHub repository directly, then do the\nfollowing:\n\n``` bash\ngit clone https://github.com/mathjax/MathJax-src.git mathjax-src\ncd mathjax-src\nnpm run --silent build-all\n```\n\nin order to compile the JavaScript files from the TypeScript source,\nand build the component files from the JavaScript files.  Windows\nusers will need to use the command\n\n``` bash\nnpm config set script-shell \"C:\\\\Program Files\\\\Git\\\\bin\\\\bash.exe\"\n```\n\nfirst in order to tell `pnpm` to use the `bash` shell for scripts that\nit runs, as that is required by the build scripts that MathJax defines\nin the `package.json` file.  You may also need to use\n\n``` bash\nSet-ExecutionPolicy Unrestricted\n```\n\nto allow the scripts to run, if you receive errors about not being\nable to run the scripts.\n\nThe build process requires MathJax to set up a symbolic link, and in\nWindows, that requires permission, so you may receive an error message\nto that effect.  If so, you may need to run\n\n``` bash\npnpm link:src\n```\n\nfrom a shell with administrator privileges.  Once that is done, you\ncan run the build process from a non-administrator shell.\n\n\n## Code Contributions\n\nIf you are interested in contributing code to MathJax, please see the\n[documentation for contributors](CONTRIBUTING.md) for details on how\nto do this, and for the policies for making pull requests.  In\nparticular, please be careful that you are working from the proper\nbranch in the git repository, or you may be asked to rebase your\nchanges when you make a pull request.\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathjax%2Fmathjax-src","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathjax%2Fmathjax-src","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathjax%2Fmathjax-src/lists"}