latex2vue
v2.2.2
Published
Vue components for LaTeX2JS
Downloads
12
Maintainers
Readme
LaTeX2Vue
installation
using the nuxt template
You can get started very quickly using [https://github.com/pyramation/nuxt-latex2vue-template](our nuxt starter template):
vue init pyramation/nuxt-latex2vue-template
cd my-project
# install dependencies
npm install # Or yarn install
from scratch
- Install the library!
npm install latex2vue
- Require
latex2vue
. If you are using nuxt, you should add a plugin in~plugins/latex2js.js
:
import Vue from 'vue';
import VueLaTeX2JS from 'latex2vue';
Vue.use(VueLaTeX2JS);
- Add CSS and plugin in your
nuxt.config.js
:
css: [
'latex2js/latex2js.css',
],
...
plugins: [
{ src: '~plugins/latex2js.js', ssr: false },
],
- Now you have a
latex
component! Just set thecontent
property and have a go!
<latex :content="someVariable" />