Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dangvanthanh/vue-a11y-katex

Katex Using Vue.js
https://github.com/dangvanthanh/vue-a11y-katex

katex vue vue-a11y-katex vue-katex

Last synced: 4 months ago
JSON representation

Katex Using Vue.js

Awesome Lists containing this project

README

        

# Vue A11Y Katex

> Katex Accessibility Using Vue.js

![](screenshot.png)

## Requirements

```
$ npm install katex --save
```

## Install

```
$ npm install vue-a11y-katex --save
```

## Usage

You can [download Katex](https://github.com/Khan/KaTeX) and host it on your server or use from CDN

```html

```

### CDN

```html

```

### .vue files

##### Import all components

```javascript
import Vue from 'vue'
import KatexMath from 'vue-a11y-katex'

Vue.use(KatexMath)
```

##### Usage

If you use `element-math` please include below script in html

```html

```

```vue





export default {
data () {
return {
inlinemathExpr: 'c = \\pm\\sqrt{a^2 + b^2}',
blockmathExpr: 'f(x) = \\int_{-\\infty}^\\infty\\hat f(\\xi)\\,e^{2 \\pi i \\xi x}\\,d\\xi',
elementmathExpr: `
<span class="blue">
Other node $$ \int_2^3 $$
</span>
and some <!-- comment --> more text blah. And math with a\
$$c = \\pm\\sqrt{a^2 + b^2}$$
`
}
}
}

```

## License

MIT © Dang Van Thanh