{"id":13536605,"url":"https://github.com/next-theme/hexo-filter-mathjax","last_synced_at":"2025-04-12T19:46:04.120Z","repository":{"id":38229048,"uuid":"176729610","full_name":"next-theme/hexo-filter-mathjax","owner":"next-theme","description":"💯 Server side MathJax renderer plugin for Hexo.","archived":false,"fork":false,"pushed_at":"2024-12-09T00:19:29.000Z","size":73,"stargazers_count":111,"open_issues_count":7,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-31T00:01:53.917Z","etag":null,"topics":["hexo","hexo-plugin","math","mathjax"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/hexo-filter-mathjax","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/next-theme.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}},"created_at":"2019-03-20T12:32:33.000Z","updated_at":"2024-12-18T06:42:36.000Z","dependencies_parsed_at":"2024-03-26T21:28:18.387Z","dependency_job_id":"233ba377-4b0a-43dd-b72d-596823a445ef","html_url":"https://github.com/next-theme/hexo-filter-mathjax","commit_stats":{"total_commits":106,"total_committers":7,"mean_commits":"15.142857142857142","dds":"0.33018867924528306","last_synced_commit":"20dc61352f8cf4d19425ad1833eb72b467c212ef"},"previous_names":["stevenjoezhang/hexo-filter-mathjax"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/next-theme%2Fhexo-filter-mathjax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/next-theme%2Fhexo-filter-mathjax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/next-theme%2Fhexo-filter-mathjax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/next-theme%2Fhexo-filter-mathjax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/next-theme","download_url":"https://codeload.github.com/next-theme/hexo-filter-mathjax/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625491,"owners_count":21135513,"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":["hexo","hexo-plugin","math","mathjax"],"created_at":"2024-08-01T09:00:45.316Z","updated_at":"2025-04-12T19:46:04.093Z","avatar_url":"https://github.com/next-theme.png","language":"JavaScript","funding_links":[],"categories":["Plugins","JavaScript"],"sub_categories":["Hexo Plugins"],"readme":"# Hexo Filter MathJax\n\n[![npm-image]][npm-url]\n[![lic-image]](LICENSE)\n\nServer side [MathJax](http://www.mathjax.org/) Renderer Plugin for [Hexo](http://hexo.io/).\n\n**WARNING: This plugin is a server-side math rendering plugin, which does not depend on any front-end scripts. If you have already enabled other math rendering methods before installing this plugin, please do the following to avoid conflicts:**\n- Remove all other Hexo math plugins\n- Disable front-end math renderer in Hexo theme settings (For theme NexT, you need to set both `math.mathjax.enable` and `math.katax.enable` to `false`)\n- Delete front-end scripts related to math rendering\n\n## Installation\n\n![size-image]\n[![dm-image]][npm-url]\n[![dt-image]][npm-url]\n\n```bash\n$ npm install hexo-filter-mathjax\n$ hexo clean\n```\n\n## Options\n\nYou can configure this plugin in Hexo `_config.yml`. Default options:\n\n```yaml\nmathjax:\n  tags: none # or 'ams' or 'all'\n  single_dollars: true # enable single dollar signs as in-line math delimiters\n  cjk_width: 0.9 # relative CJK char width\n  normal_width: 0.6 # relative normal (monospace) width\n  append_css: true # add CSS to pages rendered by MathJax\n  every_page: false # if true, every page will be rendered by MathJax regardless the `mathjax` setting in Front-matter\n  packages: # extra packages to load\n  extension_options: {}\n    # you can put your extension options here\n    # see http://docs.mathjax.org/en/latest/options/input/tex.html#tex-extension-options for more detail\n```\n\n## Usage\n\nSet `mathjax: true` in Front-matter of each article (post / page) that you would like to enable MathJax. For example:\n\n```md\n---\ntitle: On the Electrodynamics of Moving Bodies\ncategories: Physics\ndate: 1905-06-30 12:00:00\nmathjax: true\n---\n```\n\nThen you can use the LaTeX syntax in the article.\n\n### Renderer\n\n[hexo-renderer-pandoc](https://github.com/wzpan/hexo-renderer-pandoc) is recommended because it can handle mathematical formulas in markdown documents perfectly. But you need to be aware that inline Math (..`$...$`) must not have white spaces **after the opening `$` and before the ending `$`**. For example:\n```diff\n-$ \\epsilon_0 $\n+$\\epsilon_0$\n-$ \\frac{\\partial}{\\partial t} $\n+$\\frac{\\partial}{\\partial t}$\n```\n\nIf you are using other renderers, such as [hexo-renderer-marked](https://github.com/hexojs/hexo-renderer-marked), you need to be aware of the conflict between LaTeX and Markdown syntax. For example, an underscore (`_`) may be interpreted as the start of italic text in Markdown, or subscripted mark in TeX. Use `\\` to escape if necessary:\n```diff\n-$\\epsilon_0$\n+$\\epsilon\\_0$\n-\\begin{eqnarray*}\n+\\begin{eqnarray\\*}\n-\\\\\n+\\\\\\\\\n```\n\n## Sample\n\nWrite the following LaTeX code:\n```\n$$\ni\\hbar\\frac{\\partial}{\\partial t}\\psi=-\\frac{\\hbar^2}{2m}\\nabla^2\\psi+V\\psi\n$$\n```\n\n```\n\\begin{eqnarray\\*}\n\\nabla\\cdot\\vec{E}\u0026=\u0026\\frac{\\rho}{\\epsilon_0}\\\\\\\\\n\\nabla\\cdot\\vec{B}\u0026=\u00260\\\\\\\\\n\\nabla\\times\\vec{E}\u0026=\u0026-\\frac{\\partial B}{\\partial t}\\\\\\\\\n\\nabla\\times\\vec{B}\u0026=\u0026\\mu_0\\left(\\vec{J}+\\epsilon_0\\frac{\\partial E}{\\partial t}\\right)\\\\\\\\\n\\end{eqnarray\\*}\n```\n\nThen you will get:\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/sample1-dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/sample1-light.svg\"\u003e\n  \u003cimg src=\"assets/sample1-light.svg\"\u003e\n\u003c/picture\u003e\n\u003cbr\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/sample2-dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/sample2-light.svg\"\u003e\n  \u003cimg src=\"assets/sample2-light.svg\"\u003e\n\u003c/picture\u003e\n\n## Known Issues\n\nLong equations with labels may cause horizontal overflow, because a `min-width` CSS property will be added to `mjx-container` elements by MathJax.\n\n## License\n\nReleased under the MIT License\n\n[npm-image]: https://img.shields.io/npm/v/hexo-filter-mathjax?style=flat-square\n[lic-image]: https://img.shields.io/npm/l/hexo-filter-mathjax?style=flat-square\n\n[size-image]: https://img.shields.io/github/languages/code-size/next-theme/hexo-filter-mathjax?style=flat-square\n[dm-image]: https://img.shields.io/npm/dm/hexo-filter-mathjax?style=flat-square\n[dt-image]: https://img.shields.io/npm/dt/hexo-filter-mathjax?style=flat-square\n\n[npm-url]: https://www.npmjs.com/package/hexo-filter-mathjax\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnext-theme%2Fhexo-filter-mathjax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnext-theme%2Fhexo-filter-mathjax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnext-theme%2Fhexo-filter-mathjax/lists"}