Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/dangvanthanh/vue-a11y-katex
- Owner: dangvanthanh
- License: mit
- Created: 2018-03-24T16:04:55.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-02T15:04:04.000Z (over 6 years ago)
- Last Synced: 2024-09-22T04:39:27.274Z (5 months ago)
- Topics: katex, vue, vue-a11y-katex, vue-katex
- Language: JavaScript
- Homepage: http://vue-a11y-katex.surge.sh/
- Size: 286 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-a11y-vue - vue-a11y-katex - Katex Accessibility Using Vue.js. (Components and plugins / Courses)
- awesome-access - vue-a11y-katex - Katex Accessibility Using Vue.js. (Components and plugins / Courses)
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