Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🎨 style: Improve KaTeX Rendering for LaTeX Equations (#7223)
andresgit20c9f1a78346
diff --git a/client/src/components/Artifacts/Code.tsx b/client/src/components/Artifacts/Code.tsxindex de92c4c0da..21db2055d7 100644--- a/client/src/components/Artifacts/Code.tsx+++ b/client/src/components/Artifacts/Code.tsx@@ -35,7 +35,7 @@ export const CodeMarkdown = memo(const [userScrolled, setUserScrolled] = useState(false);const currentContent = content;const rehypePlugins = [- [rehypeKatex, { output: 'mathml' }],+ [rehypeKatex],[rehypeHighlight,{diff --git a/client/src/components/Chat/Messages/Content/Markdown.tsx b/client/src/components/Chat/Messages/Content/Markdown.tsxindex c0664adfe7..d668405d5d 100644--- a/client/src/components/Chat/Messages/Content/Markdown.tsx+++ b/client/src/components/Chat/Messages/Content/Markdown.tsx@@ -184,7 +184,7 @@ const Markdown = memo(({ content = '', isLatestMessage }: TContentProps) => {const rehypePlugins = useMemo(() => [- [rehypeKatex, { output: 'mathml' }],+ [rehypeKatex],[rehypeHighlight,{diff --git a/client/src/components/Chat/Messages/Content/MarkdownLite.tsx b/client/src/components/Chat/Messages/Content/MarkdownLite.tsxindex b92ab2e7ce..972395c425 100644--- a/client/src/components/Chat/Messages/Content/MarkdownLite.tsx+++ b/client/src/components/Chat/Messages/Content/MarkdownLite.tsx@@ -13,7 +13,7 @@ import { langSubset } from '~/utils';const MarkdownLite = memo(({ content = '', codeExecution = true }: { content?: string; codeExecution?: boolean }) => {const rehypePlugins: PluggableList = [- [rehypeKatex, { output: 'mathml' }],+ [rehypeKatex],[rehypeHighlight,{diff --git a/client/src/components/Prompts/Groups/VariableForm.tsx b/client/src/components/Prompts/Groups/VariableForm.tsxindex f89e7c3e3f..2b2eba7f62 100644--- a/client/src/components/Prompts/Groups/VariableForm.tsx+++ b/client/src/components/Prompts/Groups/VariableForm.tsx@@ -146,7 +146,7 @@ export default function VariableForm({remarkPlugins={[supersub, remarkGfm, [remarkMath, { singleDollarTextMath: true }]]}rehypePlugins={[/** @ts-ignore */- [rehypeKatex, { output: 'mathml' }],+ [rehypeKatex],/** @ts-ignore */[rehypeHighlight, { ignoreMissing: true }],]}diff --git a/client/src/components/Prompts/PromptDetails.tsx b/client/src/components/Prompts/PromptDetails.tsxindex c2647cbba2..e686386417 100644--- a/client/src/components/Prompts/PromptDetails.tsx+++ b/client/src/components/Prompts/PromptDetails.tsx@@ -59,7 +59,7 @@ const PromptDetails = ({ group }: { group?: TPromptGroup }) => {]}rehypePlugins={[/** @ts-ignore */- [rehypeKatex, { output: 'mathml' }],+ [rehypeKatex],/** @ts-ignore */[rehypeHighlight, { ignoreMissing: true }],]}diff --git a/client/src/components/Prompts/PromptEditor.tsx b/client/src/components/Prompts/PromptEditor.tsxindex 5227f934f3..7db89c7078 100644--- a/client/src/components/Prompts/PromptEditor.tsx+++ b/client/src/components/Prompts/PromptEditor.tsx@@ -43,7 +43,7 @@ const PromptEditor: React.FC<Props> = ({ name, isEditing, setIsEditing }) => {}, [isEditing, prompt]);const rehypePlugins: PluggableList = [- [rehypeKatex, { output: 'mathml' }],+ [rehypeKatex],[rehypeHighlight,{diff --git a/client/src/main.jsx b/client/src/main.jsxindex 265a7eefc9..4c7bde0270 100644--- a/client/src/main.jsx+++ b/client/src/main.jsx@@ -5,6 +5,7 @@ import App from './App';import './style.css';import './mobile.css';import { ApiErrorBoundaryProvider } from './hooks/ApiErrorBoundaryContext';+import 'katex/dist/katex.min.css';const container = document.getElementById('root');const root = createRoot(container);