-
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add latex parsing to docs site and update instructions
- Loading branch information
Showing
9 changed files
with
77 additions
and
26 deletions.
There are no files selected for viewing
Binary file added
BIN
+17.9 KB
.yarn/cache/@matejmazur-react-katex-npm-3.1.3-4d0b9d3d8d-db9e9aa03d.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,16 @@ | |
<html> | ||
<head> | ||
<title>markdown-to-jsx: try it live!</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,400;0,700;1,400;1,700&display=swap" | ||
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
href="https://unpkg.com/[email protected]/dist/katex.min.css" | ||
rel="stylesheet" | ||
/> | ||
|
||
<script | ||
crossorigin | ||
src="https://unpkg.com/react@18/umd/react.production.min.js" | ||
|
@@ -19,6 +24,10 @@ | |
crossorigin | ||
src="https://unpkg.com/styled-components@6/dist/styled-components.min.js" | ||
></script> | ||
<script | ||
crossorigin | ||
src="https://unpkg.com/[email protected]/dist/katex.js" | ||
></script> | ||
</head> | ||
|
||
<body> | ||
|
@@ -40,6 +49,12 @@ | |
|
||
<small>Sample content borrowed with thanks from [elm-markdown](http://elm-lang.org/examples/markdown) ❤️</small> | ||
|
||
Custom handling of code blocks (or any rule!) is possible with the [`renderRule` option](https://github.com/quantizor/markdown-to-jsx#optionsrenderrule). For example, LaTeX support via [`@matejmazur/react-katex`](https://www.npmjs.com/package/@matejmazur/react-katex): | ||
|
||
```latex | ||
\mathbb{N} = \{ a \in \mathbb{Z} : a > 0 \} | ||
``` | ||
|
||
You can even include custom React components if you declare them in the "overrides" option. | ||
|
||
<MyComponent>Isn't that cool?</MyComponent> | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters