mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2024-11-08 22:49:44 +00:00
feat: config mathjax to use $...$ for in-line math mode (#22)
* Update cdn mathjax version to 2.7.2
This commit is contained in:
parent
e1f5be88d3
commit
6f7bd1b933
3 changed files with 9 additions and 4 deletions
|
@ -18,6 +18,7 @@ autoCollapseToc: false
|
|||
contentCopyright: false
|
||||
reward: false
|
||||
mathjax: false
|
||||
mathjaxEnableSingleDollar: false
|
||||
---
|
||||
|
||||
<!--more-->
|
||||
|
|
|
@ -67,6 +67,7 @@ copyright = "" # default: author.name ↓ # 默认为下面配
|
|||
fancybox = true # see https://github.com/fancyapps/fancybox # 是否启用fancybox(图片可点击)
|
||||
bootcdn = false # In china. @Deprecated: use [params.publicCDN] # 是否使用bootcdn(@Deprecated: 请使用[params.publicCDN])
|
||||
mathjax = false # see https://www.mathjax.org/ # 是否使用mathjax(数学公式)
|
||||
mathjaxEnableSingleDollar = false # 是否使用 $...$ 即可進行inline latex渲染
|
||||
linkToMarkDown = false # if you config contentCopyright and hugo output .md files. # 是否在链接到markdown原始文件(如果你配置了下面的许可协议并允许hugo生成markdown文件)
|
||||
|
||||
contentCopyright = '<a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank">CC BY-NC-ND 4.0</a>'
|
||||
|
|
|
@ -16,13 +16,16 @@
|
|||
<script type="text/javascript" src="{{ "dist/even.min.js?v=2.7.2" | relURL }}"></script>
|
||||
|
||||
{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }}
|
||||
<script type="text/javascript">
|
||||
window.MathJax = {
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
{{ if or .Params.mathjaxEnableSingleDollar (and .Site.Params.mathjaxEnableSingleDollar (ne .Params.mathjaxEnableSingleDollar false)) -}}
|
||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
|
||||
{{ end -}}
|
||||
showProcessingMessages: false,
|
||||
messageStyle: 'none'
|
||||
};
|
||||
});
|
||||
</script>
|
||||
<script async src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'></script>
|
||||
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
||||
{{- end }}
|
||||
|
||||
<!-- Analytics -->
|
||||
|
|
Loading…
Reference in a new issue