Skip to content

KaTeX math rendering #21

@amarezenebe

Description

@amarezenebe
<script>
	import { Streamdown } from 'svelte-streamdown';
	// Import only the components you need
	import Code from 'svelte-streamdown/code';       // Shiki syntax highlighting
	import Mermaid from 'svelte-streamdown/mermaid'; // Mermaid diagrams
	import Math from 'svelte-streamdown/math';       // KaTeX math rendering
</script>

<Streamdown
	{content}
	components={{ code: Code, mermaid: Mermaid, math: Math }}
/>

how can i render KaTeX math
i.e $$
f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2}
$$

or like streamdown.ai

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions