- Differentiates between inline ($...$) and display ($$..$$) math for proper styling and layout. - Adds custom CSS to ensure formulas correctly inherit text color, fixing issues in dark/light themes. - Implements responsive handling for long formulas by allowing horizontal scrolling, preventing page overflow. - Introduces a silent `errorCallback` for KaTeX to suppress console errors from invalid LaTeX syntax in production, while retaining warnings in development. - Refactors KaTeX plugin loading to be more robust and simplifies CSS import by moving it to `main.tsx`.
14 lines
300 B
TypeScript
14 lines
300 B
TypeScript
import { StrictMode } from 'react'
|
|
import { createRoot } from 'react-dom/client'
|
|
import './index.css'
|
|
import AppRouter from './AppRouter'
|
|
import './i18n.ts';
|
|
import 'katex/dist/katex.min.css';
|
|
|
|
|
|
|
|
createRoot(document.getElementById('root')!).render(
|
|
<StrictMode>
|
|
<AppRouter />
|
|
</StrictMode>
|
|
)
|