-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for math notation, close #7
- Loading branch information
Showing
5 changed files
with
109 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import 'prism-themes/themes/prism-nord.css' | ||
|
||
import 'katex/dist/katex.min.css' | ||
|
||
import './src/styles/main.css' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Math and katex | ||
|
||
With the help of `remark-math` and `rehype-katex`, math notation is supported. | ||
|
||
## Inline math | ||
|
||
``` | ||
Some inline math, coming right up. $T_n = a + (n-1)d$ | ||
``` | ||
|
||
Some inline math, coming right up. $T_n = a + (n-1)d$ | ||
|
||
## Math block | ||
|
||
Or math block: | ||
|
||
``` | ||
$$ | ||
T_n = a + (n-1)d | ||
$$ | ||
``` | ||
|
||
$$ | ||
T_n = a + (n-1)d | ||
$$ | ||
|
||
Special thanks to [flashshare](https://github.com/flashshare) in [#7](https://github.com/hikerpig/foam-template-gatsby-kb/issues/7). | ||
|
||
And a super helpful tutorial of [Adding math support to a Gatsby MDX blog | Nicky blogs](https://nickymeuleman.netlify.app/blog/math-gatsby-mdx#wiring-up-remark-math). |