install mathjax js/css

restrict to HTML-CSS + STIX-Web for size
This commit is contained in:
Min RK 2015-04-17 12:02:47 -07:00
parent 052b568a6f
commit e520a89e54
2 changed files with 23 additions and 0 deletions

View File

@ -23,6 +23,10 @@ define([
// we use CSS to left justify single line equations in code cells. // we use CSS to left justify single line equations in code cells.
displayAlign: 'center', displayAlign: 'center',
"HTML-CSS": { "HTML-CSS": {
availableFonts: [],
imageFont: null,
preferredFont: null,
webFont: "STIX-Web",
styles: {'.MathJax_Display': {"margin": 0}}, styles: {'.MathJax_Display': {"margin": 0}},
linebreaks: { automatic: true } linebreaks: { automatic: true }
} }

View File

@ -138,6 +138,25 @@ def find_package_data():
if f.endswith(('.js', '.css')): if f.endswith(('.js', '.css')):
static_data.append(pjoin(parent, f)) static_data.append(pjoin(parent, f))
# Trim mathjax
mj = lambda *path: pjoin(components, 'MathJax', *path)
static_data.extend([
mj('MathJax.js'),
mj('config', 'TeX-AMS_HTML-full.js'),
mj('jax', 'output', 'HTML-CSS', '*.js'),
])
for tree in [
mj('localization'), # limit to en?
mj('fonts', 'HTML-CSS', 'STIX-Web', 'woff'),
mj('jax', 'input', 'TeX'),
mj('jax', 'output', 'HTML-CSS', 'autoload'),
mj('jax', 'output', 'HTML-CSS', 'fonts', 'STIX-Web'),
]:
for parent, dirs, files in os.walk(tree):
for f in files:
static_data.append(pjoin(parent, f))
os.chdir(os.path.join('tests',)) os.chdir(os.path.join('tests',))
js_tests = glob('*.js') + glob('*/*.js') js_tests = glob('*.js') + glob('*/*.js')