[python-periodictable] 02/09: Make sphinx use local mathjax resources

Stuart Prescott stuart at debian.org
Sun Nov 5 04:19:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

stuart pushed a commit to branch master
in repository python-periodictable.

commit d1ccbd1faffbb011343fc9673708eccdb9ad07b7
Author: Stuart Prescott <stuart at debian.org>
Date:   Sun Nov 5 14:08:38 2017 +1100

    Make sphinx use local mathjax resources
---
 debian/control                            |  2 ++
 debian/patches/series                     |  1 +
 debian/patches/sphinx-local-mathjax.patch | 14 ++++++++++++++
 debian/rules                              |  1 +
 4 files changed, 18 insertions(+)

diff --git a/debian/control b/debian/control
index eeee7c2..b5a383e 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,8 @@ Uploaders:
 Build-Depends:
  debhelper (>= 10),
  dh-python,
+ libjs-jquery,
+ libjs-mathjax,
  python-all,
  python-matplotlib,
  python-setuptools,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f436b68
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+sphinx-local-mathjax.patch
diff --git a/debian/patches/sphinx-local-mathjax.patch b/debian/patches/sphinx-local-mathjax.patch
new file mode 100644
index 0000000..66f004d
--- /dev/null
+++ b/debian/patches/sphinx-local-mathjax.patch
@@ -0,0 +1,14 @@
+Description: Switch to local mathjax for documentation
+Author: Stuart Prescott <stuart at debian.org>
+
+--- a/doc/sphinx/conf.py
++++ b/doc/sphinx/conf.py
+@@ -43,7 +43,7 @@
+              ]
+ 
+ # MathJax CDN is discontinued
+-mathjax_path = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"
++mathjax_path = 'mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
+ 
+ # Add any paths that contain templates here, relative to this directory.
+ templates_path = ['_templates']
diff --git a/debian/rules b/debian/rules
index a887820..ceb0397 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,7 @@ override_dh_auto_build:
 	dh_auto_build
 	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml     doc/sphinx build/html # HTML generator
 	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -btexinfo     doc/sphinx build/texinfo # Info generator
+	ln -sf /usr/share/javascript/mathjax/ build/html/_static/mathjax
 
 override_dh_installinfo:
 	cd build/texinfo; \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-periodictable.git



More information about the debian-science-commits mailing list