Skip to content

Commit 0dcbf3b

Browse files
authored
[spec] Remove sed commands to change mathjax url (#1164)
With the Sphinx upgrade in #1157 we no longer need these sed commands. At the same time, clean up the way we configure mathjax, using a config value, instead of sed.
1 parent e214e45 commit 0dcbf3b

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

document/core/Makefile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ STATICDIR = _static
1010
DOWNLOADDIR = _download
1111
NAME = WebAssembly
1212

13-
# Hack until we have moved to more recent Sphinx.
14-
OLDMATHJAX = https://cdn.mathjax.org/mathjax/latest/MathJax.js
15-
NEWMATHJAX = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js
16-
1713
# Internal variables.
1814
PAPEROPT_a4 = -D latex_paper_size=a4
1915
PAPEROPT_letter = -D latex_paper_size=letter
@@ -111,16 +107,10 @@ html:
111107
do \
112108
sed s:BASEDIR:.:g <$$file >$$file.out; \
113109
mv -f $$file.out $$file; \
114-
sed s~$(OLDMATHJAX)~$(NEWMATHJAX)~g <$$file >$$file.out; \
115-
mv -f $$file.out $$file; \
116110
done
117111
for file in `ls $(BUILDDIR)/html/*/*.html`; \
118112
do \
119113
sed s:BASEDIR:..:g <$$file >$$file.out; \
120-
sed 's;<body; <script type="text/javascript">MathJax.Hub.Config({TeX: {MAXBUFFER: 30*1024}})</script><body;' \
121-
<$$file.out >$$file; \
122-
rm -f $$file.out; \
123-
sed s~$(OLDMATHJAX)~$(NEWMATHJAX)~g <$$file >$$file.out; \
124114
mv -f $$file.out $$file; \
125115
done
126116
@echo

document/core/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,3 +478,9 @@
478478
rst_prolog = """
479479
.. include:: /""" + pwd + """/util/macros.def
480480
"""
481+
482+
# https://www.sphinx-doc.org/en/master/usage/extensions/math.html#confval-mathjax_config
483+
# https://docs.mathjax.org/en/latest/options/input/tex.html#the-configuration-block
484+
mathjax_config = {
485+
'tex': { 'maxBuffer': 30*1024 },
486+
}

0 commit comments

Comments
 (0)