[python-bumps] 02/05: Use packaged mathjax for documentation

Stuart Prescott stuart at debian.org
Fri Nov 3 14:21:37 UTC 2017


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

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

commit e9f703a68d7847ce45907b3a7ee6582b6305a7f8
Author: Stuart Prescott <stuart at debian.org>
Date:   Sat Nov 4 01:19:28 2017 +1100

    Use packaged mathjax for documentation
---
 debian/control                            |  4 ++++
 debian/patches/series                     |  1 +
 debian/patches/sphinx-local-mathjax.patch | 14 ++++++++++++++
 debian/rules                              |  1 +
 4 files changed, 20 insertions(+)

diff --git a/debian/control b/debian/control
index 1fe1c23..4034a72 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-nose,
@@ -110,6 +112,8 @@ Package: python-bumps-doc
 Architecture: all
 Section: doc
 Depends:
+ libjs-jquery,
+ libjs-mathjax,
  ${misc:Depends},
  ${sphinxdoc:Depends}
 Description: data fitting and Bayesian uncertainty modeling for inverse problems (docs)
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..1980f5c
--- /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/conf.py
++++ b/doc/conf.py
+@@ -208,6 +208,8 @@
+ 
+ program_title = 'Bumps: Curve Fitting and Uncertainty Analysis'
+ 
++mathjax_path = 'mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
++
+ # -- Options for LaTeX output --------------------------------------------------
+ 
+ # The paper size ('letter' or 'a4').
diff --git a/debian/rules b/debian/rules
index 546a353..165f365 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,7 @@ override_dh_install:
 override_dh_auto_build:
 	dh_auto_build
 	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml     doc/ build/html # HTML generator
+	ln -sf /usr/share/javascript/mathjax/ build/html/_static/mathjax
 	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -btexinfo     doc/ build/texinfo # texinfo generator
 
 override_dh_installinfo:

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



More information about the debian-science-commits mailing list