mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-21 01:11:21 +08:00
install mathjax js/css
restrict to HTML-CSS + STIX-Web for size
This commit is contained in:
parent
052b568a6f
commit
e520a89e54
@ -23,6 +23,10 @@ define([
|
||||
// we use CSS to left justify single line equations in code cells.
|
||||
displayAlign: 'center',
|
||||
"HTML-CSS": {
|
||||
availableFonts: [],
|
||||
imageFont: null,
|
||||
preferredFont: null,
|
||||
webFont: "STIX-Web",
|
||||
styles: {'.MathJax_Display': {"margin": 0}},
|
||||
linebreaks: { automatic: true }
|
||||
}
|
||||
|
19
setupbase.py
19
setupbase.py
@ -138,6 +138,25 @@ def find_package_data():
|
||||
if f.endswith(('.js', '.css')):
|
||||
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',))
|
||||
js_tests = glob('*.js') + glob('*/*.js')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user