Skip to content

Commit 8530964

Browse files
committed
no longer need to configure MathJax due to yihui/hugo-lithium@2838faa
1 parent 5e3ead4 commit 8530964

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

exampleSite/content/about.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ There are two layout files under `layouts/partials/` that you may want to overri
5656

5757
```html
5858
<script src="//yihui.name/js/math-code.js"></script>
59-
<script type="text/x-mathjax-config">
60-
MathJax.Hub.Config({
61-
tex2jax: {
62-
inlineMath: [['$','$'], ['\\(','\\)']],
63-
processEscapes: true
64-
}
65-
});
66-
</script>
6759
<script async src="//cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
6860
</script>
6961

exampleSite/content/post/2016-02-14-hello-markdown.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ There are many differences in syntax between Blackfriday's Markdown and Pandoc's
2929
- [ ] ...
3030
- [ ] Profit!
3131

32-
Similarly, Blackfriday does not support LaTeX math and Pandoc does. I have added the MathJax support to this theme ([hugo-xmin](https://github.com/yihui/hugo-xmin)) but there is a caveat for plain Markdown posts: you have to include math expressions in a pair of backticks (inline: `` `$ $` ``; display style: `` `$$ $$` ``), e.g., `$S_n = \sum_{i=1}^n X_i$`.^[This is because we have to protect the math expressions from being interpreted as Markdown. You may not need the backticks if your math expression does not contain any special Markdown syntax such as underscores or asterisks, but it is always a safer choice to use backticks. When you happen to have a pair of literal dollar signs inside the same element, you can escape one dollar sign, e.g., `\$50 and $100` renders "\$50 and $100".] For R Markdown posts, you do not need the backticks, because Pandoc can identify and process math expressions.
32+
Similarly, Blackfriday does not support LaTeX math and Pandoc does. I have added the MathJax support to this theme ([hugo-xmin](https://github.com/yihui/hugo-xmin)) but there is a caveat for plain Markdown posts: you have to include math expressions in a pair of backticks (inline: `` `$ $` ``; display style: `` `$$ $$` ``), e.g., `$S_n = \sum_{i=1}^n X_i$`.^[This is because we have to protect the math expressions from being interpreted as Markdown.] For R Markdown posts, you do not need the backticks, because Pandoc can identify and process math expressions.
3333

3434
When creating a new post, you have to decide whether the post format is Markdown or R Markdown, and this can be done via the `rmd` argument of the function `blogdown::new_post()`, e.g.
3535

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
<script src="//yihui.name/js/math-code.js"></script>
2-
<script type="text/x-mathjax-config">
3-
MathJax.Hub.Config({
4-
tex2jax: {
5-
inlineMath: [['$','$'], ['\\(','\\)']],
6-
processEscapes: true
7-
}
8-
});
9-
</script>
102
<script async src="//cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script>
113

124
<script async src="//yihui.name/js/center-img.js"></script>

0 commit comments

Comments
 (0)