diff --git a/frontend/src/index.css b/frontend/src/index.css index d880c62f..ccd0d575 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -1040,13 +1040,14 @@ does not extend the close button beyond the viewport. */ } } -/* Math/Katex formatting to prevent duplication of content on screen */ -.katex-html[aria-hidden="true"] { - display: none; +/* KaTeX overrides - base CSS imported via markdown-katex.js plugin */ +.katex-display { + margin: 0 !important; + text-align: left !important; } -.katex-mathml { - font-size: 20px; +.katex-display > .katex { + text-align: left !important; } .rti--container { diff --git a/frontend/src/utils/chat/plugins/markdown-katex.js b/frontend/src/utils/chat/plugins/markdown-katex.js index cb7a9ae3..288d3456 100644 --- a/frontend/src/utils/chat/plugins/markdown-katex.js +++ b/frontend/src/utils/chat/plugins/markdown-katex.js @@ -1,4 +1,5 @@ import katex from "katex"; +import "katex/dist/katex.min.css"; // Test if potential opening or closing delimieter // Assumes that there is a "$" at state.src[pos]