File tree Expand file tree Collapse file tree 3 files changed +31
-4
lines changed Expand file tree Collapse file tree 3 files changed +31
-4
lines changed Original file line number Diff line number Diff line change
1
+ window . MathJax = {
2
+ tex : {
3
+ inlineMath : [ [ "\\(" , "\\)" ] ] ,
4
+ displayMath : [ [ "\\[" , "\\]" ] ] ,
5
+ processEscapes : true ,
6
+ processEnvironments : true
7
+ } ,
8
+ options : {
9
+ ignoreHtmlClass : ".*|" ,
10
+ processHtmlClass : "arithmatex"
11
+ }
12
+ } ;
13
+
14
+ document$ . subscribe ( ( ) => {
15
+ MathJax . typesetPromise ( )
16
+ } )
17
+
Original file line number Diff line number Diff line change @@ -18,17 +18,21 @@ theme:
18
18
accent : ' red'
19
19
20
20
extra_css :
21
- - ' stylesheets/extra.css'
21
+ - stylesheets/extra.css
22
22
extra_javascript :
23
- - ' https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'
23
+ - javascripts/mathjax.js
24
+ - https://polyfill.io/v3/polyfill.min.js?features=es6
25
+ - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
26
+
24
27
markdown_extensions :
25
28
- admonition
26
29
- pymdownx.highlight :
27
30
linenums : true
28
31
linenums_style : table
29
32
- pymdownx.superfences
30
33
- pymdownx.inlinehilite
31
- - pymdownx.arithmatex
34
+ - pymdownx.arithmatex :
35
+ generic : true
32
36
- footnotes
33
37
34
38
extra :
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ function create_target_dir(){
8
8
function copy_resources() {
9
9
cp ${DATA_DIR} /mkdocs.yml ${TARGET_DIR} /mkdocs.yml
10
10
cp -r ${DATA_DIR} /docs/images ${TARGET_DIR} /docs
11
+ cp -r ${DATA_DIR} /docs/javascripts ${TARGET_DIR} /docs/javascripts
11
12
cp -r ${DATA_DIR} /docs/stylesheets ${TARGET_DIR} /docs/stylesheets
12
13
}
13
14
@@ -19,7 +20,12 @@ function copy_resources() {
19
20
# with some nice features for the HTML version.
20
21
function fix_mkdocs_yml() {
21
22
mv ${TARGET_DIR} /mkdocs.yml ${TARGET_DIR} /mkdocs.ori.yml
22
- sed -e ' s/linenums_style: table/linenums_style: pymdownx-inline/g' ${TARGET_DIR} /mkdocs.ori.yml > ${TARGET_DIR} /mkdocs.yml
23
+ sed -e ' s/linenums_style: table/linenums_style: pymdownx-inline/g' ${TARGET_DIR} /mkdocs.ori.yml | \
24
+ sed -e ' s|javascripts/mathjax.js|https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML|g' | \
25
+ sed -e ' s| - https://polyfill.io/v3/polyfill.min.js?features=es6||g' | \
26
+ sed -e ' s| - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js||g' | \
27
+ sed -e ' s/pymdownx.arithmatex:/pymdownx.arithmatex/g' | \
28
+ sed -e ' s/ generic: true//g' > ${TARGET_DIR} /mkdocs.yml
23
29
}
24
30
25
31
function create_cover() {
You can’t perform that action at this time.
0 commit comments