diff --git a/0001-Use-MathJax-TeX-fonts-rather-than-STIXWeb.patch b/0001-Use-MathJax-TeX-fonts-rather-than-STIXWeb.patch new file mode 100644 index 0000000..54fdd1d --- /dev/null +++ b/0001-Use-MathJax-TeX-fonts-rather-than-STIXWeb.patch @@ -0,0 +1,49 @@ +From d049b9309cf682c777a974d69bfa83f1abe5ad35 Mon Sep 17 00:00:00 2001 +From: Jonathan Underwood +Date: Sat, 26 May 2018 21:15:14 +0100 +Subject: [PATCH] Use MathJax TeX fonts rather than STIXWeb + +--- + notebook/static/notebook/js/main.min.js | 6 +++--- + notebook/static/notebook/js/mathjaxutils.js | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/notebook/static/notebook/js/main.min.js b/notebook/static/notebook/js/main.min.js +index a2c5832..1d1ccee 100644 +--- a/notebook/static/notebook/js/main.min.js ++++ b/notebook/static/notebook/js/main.min.js +@@ -28427,10 +28427,10 @@ define('notebook/js/mathjaxutils',[ + // we use CSS to left justify single line equations in code cells. + displayAlign: 'center', + "HTML-CSS": { +- availableFonts: [], ++ availableFonts: ["TeX"], + imageFont: null, +- preferredFont: null, +- webFont: "STIX-Web", ++ preferredFont: "TeX", ++ webFont: "TeX", + styles: {'.MathJax_Display': {"margin": 0}}, + linebreaks: { automatic: true } + }, +diff --git a/notebook/static/notebook/js/mathjaxutils.js b/notebook/static/notebook/js/mathjaxutils.js +index 20dbfa9..c1020d4 100644 +--- a/notebook/static/notebook/js/mathjaxutils.js ++++ b/notebook/static/notebook/js/mathjaxutils.js +@@ -26,10 +26,10 @@ define([ + // we use CSS to left justify single line equations in code cells. + displayAlign: 'center', + "HTML-CSS": { +- availableFonts: [], ++ availableFonts: ["TeX"], + imageFont: null, +- preferredFont: null, +- webFont: "STIX-Web", ++ preferredFont: "TeX", ++ webFont: "TeX", + styles: {'.MathJax_Display': {"margin": 0}}, + linebreaks: { automatic: true } + }, +-- +2.17.0 + diff --git a/python-notebook.spec b/python-notebook.spec index 415c89f..81b17e7 100644 --- a/python-notebook.spec +++ b/python-notebook.spec @@ -12,12 +12,16 @@ Version: 5.5.0 # upstream version, like 1.2.3rc1 %global uversion %{version}%{tag} -Release: 2%{tag}%{?dist} +Release: 3%{tag}%{?dist} Summary: A web-based notebook environment for interactive computing License: BSD URL: http://jupyter.org Source0: https://files.pythonhosted.org/packages/source/n/%{pypi_name}/%{pypi_name}-%{uversion}.tar.gz +# Patch to use the TeX fonts from the MathJax package rather than STIXWeb +# See BZ: 1581899, 1580129 +Patch0: 0001-Use-MathJax-TeX-fonts-rather-than-STIXWeb.patch + BuildArch: noarch BuildRequires: python2-setuptools @@ -100,7 +104,7 @@ Obsoletes: python-ipython-%{pypi_name} < 4 Requires: fontawesome-fonts Requires: fontawesome-fonts-web -#Requires: mathjax >= 2.6 +Requires: mathjax >= 2.6 Requires: js-backbone >= 1.2 Requires: js-marked >= 0.3 Requires: js-moment >= 2.8 @@ -126,7 +130,7 @@ Provides: bundled(requirejs-plugins) = 1.0.3 Provides: bundled(text-encoding) = 0.1 Provides: bundled(xterm.js) = 2.9.2 # See https://bugzilla.redhat.com/show_bug.cgi?id=1580129 -Provides: bundled(mathjax) = 2.6 +#Provides: bundled(mathjax) = 2.6 %description -n python2-%{pypi_name} %_description @@ -169,7 +173,7 @@ Provides: bundled(requirejs-plugins) = 1.0.3 Provides: bundled(text-encoding) = 0.1 Provides: bundled(xterm.js) = 2.9.2 # See https://bugzilla.redhat.com/show_bug.cgi?id=1580129 -Provides: bundled(mathjax) = 2.6 +#Provides: bundled(mathjax) = 2.6 %description -n python3-%{pypi_name} %_description @@ -215,8 +219,8 @@ for SITELIB in %{python2_sitelib} %{python3_sitelib}; do ln -vfs %{_datadir}/fonts/fontawesome font-awesome/fonts #temporarily kept bundled to workaround #1580129 - #rm -r MathJax - #ln -vfs %{_datadir}/javascript/mathjax MathJax + rm -r MathJax + ln -vfs %{_datadir}/javascript/mathjax MathJax rm -r backbone ln -vfs %{_datadir}/javascript/backbone backbone @@ -260,6 +264,10 @@ LANG=C.utf-8 nosetests-3 -v --exclude-dir notebook/tests/selenium %license COPYING.md %changelog +* Sat May 26 2018 Jonathan Underwood - 5.5.0-3 +- Unbundle mathjax once more +- Add patch to use the MathJax TeX fonts rather than the STIXWeb ones BZ: 1581899, 1580129 + * Wed May 23 2018 Miro HronĨok - 5.5.0-2 - BR ipykernel >= 4.8 (#1581723) - Temporarily keep bundled mathjax (#1580129)