diff --git a/package.json b/package.json
index 4ca5c7e..5898796 100644
--- a/package.json
+++ b/package.json
@@ -16,9 +16,10 @@
"cd": "pnpm run cd:build && pnpm run cd:push && pnpm run cd:rollout"
},
"dependencies": {
- "@vuetify/vite-plugin": "1.0.0-alpha.10",
+ "@auth0/auth0-vue": "^1.0.0",
"@types/katex": "^0.14.0",
"@types/uuid": "^8.3.4",
+ "@vuetify/vite-plugin": "1.0.0-alpha.10",
"dependency-graph": "^0.11.0",
"install": "^0.13.0",
"katex": "^0.15.3",
@@ -26,8 +27,7 @@
"uuid": "^8.3.2",
"vue": "^3.2.25",
"vue-router": "^4.0.14",
- "vuetify": "3.0.0-beta.0",
- "@auth0/auth0-vue": "^1.0.0"
+ "vuetify": "3.0.0-beta.0"
},
"devDependencies": {
"@braks/revue-draggable": "^0.4.2",
diff --git a/src/components/Katex.vue b/src/components/Katex.vue
index 420362c..acbc53b 100644
--- a/src/components/Katex.vue
+++ b/src/components/Katex.vue
@@ -1,5 +1,4 @@
-
-
-
+
+
+
diff --git a/src/main.ts b/src/main.ts
index 5dc89ae..0d9c2c5 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -4,6 +4,9 @@ import { DraggablePlugin } from '@braks/revue-draggable'
import { createAuth0 } from '@auth0/auth0-vue'
import router from './router'
+import 'katex/dist/katex.min.css'
+import 'katex/dist/contrib/auto-render.min'
+
const app = createApp(App)
diff --git a/src/support/parse.ts b/src/support/parse.ts
index f92b28c..6dfdae2 100644
--- a/src/support/parse.ts
+++ b/src/support/parse.ts
@@ -284,15 +284,18 @@ export class MathStatement {
/** Render the statement as HTML string. */
toHTMLString(): HTMLString {
return katex.renderToString(this.toLaTeX(), {
- output: 'mathml',
+ output: 'html',
}) as HTMLString
}
/** Render the statement to a DOM element. */
- toDOM(): HTMLSpanElement {
- const node = document.createElement('span')
+ toDOM(node?: HTMLElement): HTMLSpanElement {
+ if ( !node ) {
+ node = document.createElement('span')
+ }
+
katex.render(this.toLaTeX(), node, {
- output: 'mathml',
+ output: 'html',
})
return node
}