{"id":20496529,"url":"https://github.com/justforuse/vue-mathjax","last_synced_at":"2026-03-06T18:10:06.463Z","repository":{"id":40251422,"uuid":"136476846","full_name":"justforuse/vue-mathjax","owner":"justforuse","description":"Vue plugin with Mathjax","archived":false,"fork":false,"pushed_at":"2022-07-06T02:20:08.000Z","size":154,"stargazers_count":68,"open_issues_count":12,"forks_count":21,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-14T00:01:43.348Z","etag":null,"topics":["mathjax","vue","vue-component"],"latest_commit_sha":null,"homepage":"https://vue-mathjax.vercel.app/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justforuse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-07T12:51:21.000Z","updated_at":"2024-07-16T08:46:14.000Z","dependencies_parsed_at":"2022-07-08T07:42:52.372Z","dependency_job_id":null,"html_url":"https://github.com/justforuse/vue-mathjax","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justforuse%2Fvue-mathjax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justforuse%2Fvue-mathjax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justforuse%2Fvue-mathjax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justforuse%2Fvue-mathjax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justforuse","download_url":"https://codeload.github.com/justforuse/vue-mathjax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229970193,"owners_count":18152623,"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","vue","vue-component"],"created_at":"2024-11-15T18:07:34.504Z","updated_at":"2026-03-06T18:10:06.447Z","avatar_url":"https://github.com/justforuse.png","language":"Vue","readme":"# vue-mathjax\n\n[![npm](https://img.shields.io/npm/v/vue-mathjax.svg) ![npm](https://img.shields.io/npm/dm/vue-mathjax.svg)](https://www.npmjs.com/package/vue-mathjax)\n[![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/)\n\nA Vue.js Plugin for Mathjax\n\n## Before Usage\n\n- This is a plugin for vue2, if you are looking for vue3, maybe you can check [this](https://github.com/justforuse/vue-mathjax-next)\n\n- This plugin is not compatible with MathJax@3, you can make a PR if you know how to do it.\n\n## Table of contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n\n# Installation\n\n```\nnpm install --save vue-mathjax\n```\n\n\n# Usage\n## ❗️❗️Don't forget to import the Mathjax.js:\n```\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS_HTML\"\u003e\u003c/script\u003e\n```\n---\n```\nimport VueMathjax from 'vue-mathjax'\nVue.use(VueMathjax)\n```\nOR\n```\nimport {VueMathjax} from 'vue-mathjax'\nexport default {\n  ...\n  components: {\n    'vue-mathjax': VueMathjax\n  },\n  ...\n```\n```\n\u003ctemplate\u003e\n\u003cdiv\u003e\n\u003ctextarea v-model=\"formula\" cols=\"30\" rows=\"10\"\u003e\u003c/textarea\u003e\n  \u003cvue-mathjax :formula=\"formula\"\u003e\u003c/vue-mathjax\u003e\n\u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n\u003c!-- You can also define globally --\u003e\nimport { VueMathjax } from 'vue-mathjax'\nexport default {\n  components: {\n    'vue-mathjax': VueMathjax\n  },\n  name: 'HelloWorld',\n  data () {\n    return {\n      formula: '$$x = {-b \\\\pm \\\\sqrt{b^2-4ac} \\\\over 2a}.$$',\n      msg: 'Welcome to Your Vue.js App'\n    }\n  }\n}\n\u003c/script\u003e\n```\n\n# Props\n## formula\n`type: string` mathjax string\n\n## safe\n`type: boolean; default: true` sometimes you want render the html in your mathjax, so just set it to false. demo: https://codesandbox.io/s/vue-template-ftd5s\n\n## options\n`type: object; default: {}` custom configurations\n\n---\n# Demo\n![demo.gif](https://github.com/justforuse/vue-mathjax/raw/master/demo.gif)\n---\n# Online demo\nhttps://codesandbox.io/s/nrw4w90o6p\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","funding_links":[],"categories":["Components \u0026 Libraries"],"sub_categories":["UI Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustforuse%2Fvue-mathjax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustforuse%2Fvue-mathjax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustforuse%2Fvue-mathjax/lists"}